Preventing a hierarchy of classes from being created on the stack

Question: I'm not sure if this is possible.
I need to prevent a all classes derived from X from being instantiated as local stack or member variables. I made all their destructors protected and this did the trick as far as outside scopes are concerned. However I need to prevent them from being instantiated by themselves, too. I mean if Y has member variables of type Z or instantiates local variables of type Z in its methods, thid doesn't cut it.
Now I could create private destructors in all the leaves of the hierarchy tree, but the problem is that every not should be allowed to be a (heap) variable. In the case X <- Y <- Z, all three should be instantiated but X and Y cannot have private destructors. Moreover even that doesn't stop me from having local variables of type Z in the methods of Z.
I guess by making their constructors private and adding operator new as friend to all of them will do the trick, but this is a LOT of extra work (since we use several versions of operator new) and the hierarchy is big.
So, is there a way of having a (preferably) compile-time, or a runtime error for stack instantiation of these objects, whithout resorting to the private-constructors-friend-new-way?
<edit>
The thing is that the previous programmers of this project wrote a ton of code and all classes in this hierarchy have terribly complicated destructors. And also, the authors indiscriminately called virtual methods in those destructros, which lead to a lot of unexplicable (to them) crashes and memory corruptions. Now converted all destructors to a obj->Release() pattern and in the top-most Release I have delete this. Obviously this wont work for stack objects and now I introduced some crashes of my own. Also I'm kinda short of time and the run/wait for crash/fix this specific crash method is very very slow
</edit>
Comment: I think where the variables located is depend on how you declared it?
Comment: An object should normally not care how it is stored. That violates the single-responsibility idiom. What you're asking is a serious abuse of the language, so I wouldn't expect an answer to be pretty.
Answer: In his book "More Effective C++" in item 27, Scott Meyers (incidentally my favorite author on C++) describes why it's not possible in the general sense and within the bounds of portable or semi-portable C++ to definitively distinguish whether an object has been allocated on the stack, heap, or is statically allocated. It also discusses various options for ensuring an object can only be allocated on the stack, or on the heap.  One of those is more or less do-able, the other doesn't have a truly portable foolproof way of working; I forget which is which. (Book is at work, I'm at home.)


Why is the movie titled "The Devil all the Time"?

Question: I don't see any "devil" in the ensemble cast plot. Why is the movie titled "The Devil all the Time"?
Answer: Per this article:

With the continuing occupation of Afghanistan overtaking Vietnam as the longest war in American history, The Devil All The Time's unsparing critique couldn't come at a better time. As the film's title tells audiences, Arvin's father spent his whole life fighting because the enemy killing him was at home in America all along.

Also:

The Devil All the Time stays true to its title in its embrace of constant darkness and shows viewers only the worst that humankind has to offer — meaning audiences hoping for a glimpse of humanity or a purpose to the madness are shit out of luck.

As well:

While the presence of God is a nebulous thing in this backyard fried noir, 'the Devil' of the title is present to just about every character inhabiting Pollock and Campos' vision of Knockemstiff, Ohio and its surrounding areas: It is the hell they make for themselves and their heirs by pretending to be better than they are while ignoring the pain underneath.
Answer: Early in the movie, the narrator says:

Years ago, Willard had fitted together a weathered cross above a fallen tree in a small clearing behind his house. He came every morning and evening to talk to God. It seemed to his son that his father fought the Devil all the time.

This means, that the fight between good and evil is constant in the lives of the characters in the movie.
There can be also another explanation: Notice, how many people in the movie make some bad (or plainly evil) things based on the "voice of God": Roy kills his wife, believing that he can resurrect her; Carl kills his victims because "he can see God in their eyes", girls seduced by Reverend Preston believe that they are getting closer to God. But it wasn't God, but the titular "devil all the time" who was giving them advice.


Transactional Replication row data inconsistency

Question: I am seeing data inconsistency in row count Transactional Replication. Subscriber is having 20 rows extra. The agent profile is used continue on data consistency error. The replication is working fine.
I want to know, Do I need to fix remove the extra 20 rows from subscriber? (OR) remove table from replication and add re-initialize the single article?
(OR) Shall I leave as it is.
Can anyone suggest.
Answer:
Do I need to fix remove the extra 20 rows from subscriber? (OR) remove table from replication and add re-initialize the single article? (OR) Shall I leave as it is.

That depends on what those 20 rows mean. Were they manually inserted on the Subscriber side intentionally? Or are they bad data / wrong to be in that table. The answer to that question will determine your course of action.
If the rows aren't hurting anything, replication is running fine, and we're inserted intentionally by someone, then leave them. If you don't know where they came from, and are bad data, then you can reinitialize to remove them, assuming your table's Article properties are set to DROP, TRUNCATE, or DELETE.
Note, you don't need to remove a table's Article from replication, in order to reinitialize it. But you can tell it to "Use a new Snapshot" when you reinitialize, if you want a clean slate essentially.
Comment: Thanks JD for the response. It helps me. I will check with the users. For new snapshot I hope you mean only for single table not for entire publication.
Comment: @Raja_mssqlDBA No problem! Using a new Snapshot will cause the entire Publication to be re-synchronized but if your Publication is big then yes you can just remove and re-add the table Article from your Publication (as you initially mentioned) and hopefully it lets you reinitialize without using a new Snapshot, which will then only do that 1 table.


debug disassembled dylib with hopper?

Question: Is there a way to connect gdb to hopper, then load a dylyb that is loaded by an app and then run the app while stepping through the dylib code? is there a way to do this?
Comment: Assuming you purchased it, why not ask the official support?
Comment: Thanks, I did a few days ago and the developer answered that this is not possible with the current version of hopper. I will mark this question closed.
Answer: Today (2020) actually you can debug dylibs by opening them in a separate window before starting debugger. When you go back in the callstack window it shows the actual code in the window of dylib. You can also place breakpoints and do whatever you want in it.
For debugging to work you should remove the codesigning of the main executable.
Answer: I asked the developer and got a reply indicating that this feature (debugging a dylib), is not available in the current version.
The best way to go for now seems to be to use the available tools to find the right place to edit the code and then reassemble it.

debug disassembled dylib with hopper?


Maven Configuration

Question: Failure to transfer org.codehaus.plexus:plexus-io:jar:2.0.1 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.codehaus.plexus:plexus-io:jar:2.0.1 from/to central (http://repo.maven.apache.org/maven2): No response received after 60000
Comment: try `mvn clean install -U`. It will download libraries regardless what you have in cache.
Comment: Just delete local repository and restart your build.And it looks like you have some problems with your internet connection.
Comment: What did you do to get the error? What have you tried to solve it?
Answer: Here are steps which you can follow.

Make sure internet is ON.
Delete {user.home}/.m2 directory.
Run mvn clean install

Above will build your artifact from scratch. Following command will help you converting the artifact in eclipse runnable project

mvn eclipse:eclipse

Cheers
Anant
Answer: I think you are trying to upload/download artifact to repo. You need to contact your SCM/maven repo administrator. Server may be down and that is why you are not able to upload/download your artifact.

Maven Configuration


Bug in copying BTC address

Question: I'm new here but I've been in the crypto world since 2016, today I'm going to tell you what just happened to me.
I had to send 25 euros to the address:
3Lch25qM9kKNEydEKKCKc2Em1naHBLN44y
After an hour from sending my BTC I still do not receive anything, so I decide to review the transaction and I was not believing what I saw .. a completely different address had been used to receive BTC and not giving an explanation I try to copy again and paste and I realized that that address changed once pasted. I'm not kidding, I'm not a scammer nor a liar, try also to copy and paste this address:
3Lch25qM9kKNEydEKKCKc2Em1naHBLN44y
and you'll end up with this:
3LP8AqQ5neyhGs9X5djjBBQ5RBBRCQ3LnY
https://www.blockchain.com/btc/address/3LP8AqQ5neyhGs9X5djjBBQ5RBBRCQ3LnY
Please help me
Comment: You should do a malware scan on you computer.
Comment: Are you using a recently updated version of Electrum?
Comment: So if you try to copy and paste the address remains the same? Can I try with windows defender or do you recommend something else?
I don't know if Stormgain has Electrum references as addresses but I don't think so
Answer: It appears that your device is affected by malware. Likely, the malware detects when a Bitcoin address is in the clipboard and replaces it with an address owned by the malware creator.
Comment: Yeah you're right. I lost over 2BTC few months back. I did my research and apparently i had downloaded a media file with the malware attached so it monitored anytime bitcoin wallet addresses are copied to my clipboard. Its called a Wallet Address swapper.

Bug in copying BTC address


Why trees in the way

Question: I have weight paint and made the vertex. I have made 3 tress group. In the particles tab with the tree group selected. The problem is the weight paint i have made i dont need the trees in the way. I have click the side arrow negative the effect. Yet the result as u seen below the trees are in the way. My weight paint vertex is straight like a road but the trees coming the way. Why the trees not arrange in a row so that i can see a straight road.
Comment: @atek I have noticed that your 3 trees are combined into one mesh.
I would recommend making this 3 seperate objects and then group them together.
Make sure the origin of each tree is at the bottom center of each tree.
Then choose group under the particle render tab.
Comment: Weight painting only controls particle probability, not direction, it won't make them line up in a row. If you want less trees widen the road
Comment: @DuarteFarrajotaRamos You mean i have to make the road widen with painting the red color more.
Answer: Fix for the given file

Made the adjustments @Delagone suggested:

Separated the tree object
Set the object origins for each tree object root.
Made sure the three tree objects are in one group
Choose the group instead of the object in the "Render" tab.

In the "Emission" tab

Emit from: "Verts"
Unchecked "Random"

Distributing particle system with weight painting
Particle system source mesh
The mesh resolution of the plane is very low.
The weight painting is saved in the vertices of the mesh. The more control you want over the weight painting and therefore the distribution of the particle system, the more resolution the mesh needs.
Emission of the particle system

The emission from setting tells the particle system where it should emit the particles. In the case of a plane with weight paint it should be set to "Verts" or "Faces".
Weight painting
You want a road with trees on both sides.
Then you need to weight paint to lines of both sides of the street where the trees should be.
The weight painting tells the particle system where it should put the trees.
The weight paint tells the particle system the probability
Example weight paints for road straight and with side street:

Comment: I have attach my file and the problem is with the reference i have made 2 road its not align inside but a new problem is the particles are outside the mesh.

Why trees in the way


Generating my world map without visiting the region?

Question: I'd like my Minecraft map to get fleshed out a bit around the region where I'm at to see if there are villiages or other structures worth checking out. However I'd like to keep from walking around in circles just to get the game to generate the map. Is there a way I can get the game to generate a chunk of my map without having to get "close" to the chunk?
Comment: Not a perfect solution, but what I often do is switch to creative mode, fly around for a bit (it's faster than walking) to generate chunks, then switch back to survival mode to play. This also lets you get the lay of the land. Of course, this only works if you have cheats enabled.
Comment: Because the seed defines structure locations, you can actually determine these things *without* generating anything. Search for the AMIDST program on the minecraft forums—it works great for locating villages.
Comment: @SevenSidedDie Ya that is in my answer... That i posted 15 days ago , and this is posted yesterday...
Comment: @SovietOnion Yeah! Sorry about that. I wrote it before I read the answers (oops) and upvoted yours. I'm on a phone so I can't delete comments. Feel free to flag it as obsolete. :)
Answer: Instead of doing it in-game, try using a outside source. AMIDST is a program that lets you put in a certain seed or load an existing map and it generates the minecraft map as a picture. You can use it to see if there are dungeons, pyramids, ruins, villages, even strongholds!
Edit:
This way will also make you not download mods and keep you away from the want to spawn yourself items!
Comment: I think that program is called AMIDST.
Comment: @IncredulousMonk Ya just googled it, it's that.
Answer: There is no other way to do it than in-game. One way you can optimize this is by getting Optifine, which will allow you to ramp up your render distance, making your client request chunks that are further away, speeding up the process.
Also consider using SinglePlayerCommands' /fly command with a high speed, e.g. /fly 10 to fly around quickly to generate chunks. With a high enough speed, you'll be requesting chunks faster than your computer can generate them.
Answer: World Edit comes with a world border tool. Once you set the borders, you can fill the world, generating all chunks inside the border, so you can simply look at the map and see.
Comment: Welcome to Arqade. We try to avoid insulting people when we're asking or answering questions. As such, I am editing the question to make it more user friendly.
Comment: Also, I've read this right, wouldn't it all be filled with a certain block?


Negative degree invertible sheaves on non-singular varieties have no global sections

Question: Let $X$ be a non-singular projective complex variety and $\mathcal{L}$ be an invertible sheaf on $X$ with negative degree. Is it true that $\mathcal{L}$ has no global sections? If so, can someone suggest a reference?
Comment: Without further data, "degree" only makes sense for line bundles (=invertible sheaves) on curves.
Comment: Let me try to expand on my comments.That exercise in Hartshorne is talking about the degree of a divisor on a variety *with a fixed embedding in projective space*. That is the "extra data" I was referring to. This sounds like a petty point to argue over, but in fact it really matters: there are varieties $X$ which come with many different embeddings into projective space, and depending on which embedding you choose, you can get a different answer for the degree of a subvariety. In other words, this notion of degree is not intrinsic to $X$ (unlike the case for curves).
Comment: I have edited the question. Use the definition of degree as in Ex. II. 6.2 of Hartshorne after identifying invertible sheaves with corresponding divisors as explained in chapter II.6 of Hartshorne.
Comment: @user54369 :  But Hartshorne Ex. II. 6.2 , isnt written for curves?
Comment: @user54369 :  it is Ex II. 6.12 the one for curves, sorry.  But if you use Hartshorne definition of degree (i.e. Ex II. 6.2.) it seems to me that your claim follows from the 1-1 correspondence of Proposition 13 plus the fact that the zero set of a section is an effective divisor whose degree seems to be non negative. I think that the last follows also from Ex. II. 6.2. part c).
Comment: @Holonomia: again, if we are not on a curve, "degree of an effective divisor" is not defined.
Comment: @Relapsarian:  at page 146 Ex. 6.2 of Hartshorne it is defined "degree" for any divisor $D$ of a projective variety non singular in codimension 1 hence "degree of an effective divisor" is indeed defined. What seems to be not clear to user54369 is if for such effective divisor its degree is non-negative.
Comment: Thank you all. I think I understand (the answer to the question is yes, since the degree of effective divisors is positive, using Hartshorne as reference).
Comment: @Relapsarian: Thank you very much for expand your comments.
Answer: I guess it's a bit late but it might be useful to someone.
As emphasized by @Relapsarian, if we work with a non singular curve $C$ (I will assume moreover that it's a projective curve), then we can talk about the degree of an invertible sheaf.
The correct formulation of the O.P. question should be then:

([Proposition) An invertible sheaf of negative degree has no non-zeros global sections.

Suppose we have a negative-degree invertible sheaf $\mathcal L$ on $C$ with a non-zero section $s$. Then  $s$ has no poles and probably some zeros, so $\operatorname{deg} \mathcal L\ge 0$ which contradicts the assumption.
Answer: That seems to be correct, at least if you have in mind compact manifolds.
See the introduction of http://www.google.it/url?sa=t&rct=j&q=&esrc=s&source=web&cd=62&ved=0CCoQFjABODw&url=ftp%3A%2F%2Fftp.math.ethz.ch%2Fhg%2FEMIS%2Fjournals%2FNYJM%2Fjdg%2Farchive%2Fvol.50%2F1_4.ps.gz&ei=DiOHVae6LKOcygOuooGQAQ&usg=AFQjCNEBF-29nDprqrWQeOXRVDa2wZ6RQg&sig2=A87X-NRzKdVC4BzeUEf2yQ
Comment: But isnt this written for curves?
Comment: Yes, sorry. I am going to edit my answer.
Comment: I am assuming that the variety is projective as well


How to read Exchange e-mails on Android?

Question: Is there any Outlook for Android? If not, should I use an IMAP or POP3 client for Android instead? Which one do you recommend?
Comment: IMAP is almost always better than POP3, as you have two-way synchronization. Android's built-in email applications (called Email) supports both IMAP and POP, it just depends on your email server.
Answer: You don't mention which phone or Android version you're using. On my Motorola Droid (Android 2.2) the built-in E-mail application allows me to connect to my employers Exchange server. When I created the account, I had three options for connecting: POP3, IMAP, and Exchange.
There are other e-mail clients out there that may also connect to Exchange.
Comment: Gmail is a separate application.
Comment: I thought the built-in app was only for GMail accounts
Answer: You could try K9 Mail.  I use it for non-Exchange accounts and it works great, so I know it's a great email app in general.  I believe it has the ability to connect to Exchange servers, too, so...there you go!


Remove "No SIM Card in Phone" message

Question: I recently changed to a newer phone and currently using my old android phone as a sort of "ipod". However, it always shows the message that there is no sim card. I know this is just an annoyance but is there anyway to disable it? I am rooted running a custom sense 4 rom on ICS. Is there anything I could flash to remove this message? Or disable the cellular radio completely?

Screenshot (click for larger variant)
Comment: I've tended to keep old Sim cards for just that purpose
Comment: There are Xposed modules to remove the 'no SIM' from the status bar, but I cannot find anything to remove the HTC one from the lock screen.
Answer: You can remove the "No SIM" notification from the Galaxy S3 S4 and Note 3 by adding an entry to your build.prop. You need root to do this.
I recommend using JRummy's Build Prop Editor. Once you've installed it, launch the app and click the bottom right icon (a + sign).
In the first box you can enter a description like so (this is optional):
# Remove "No SIM" from notification bar

In the second box, enter:
ro.config.donot_nosim= true

Then save and reboot.
If the "No SIM" popup still shows, or you get the "No SIM" notification icon, then look for an entry that reads:
ro.config.tima=1

and change that to:
ro.config.donot_nosim= true

If that still doesn't work, try removing ro.config.tima=1 or set it to 0 instead of 1.
You can also add sys.hiddenmenu.enable=1 to enable the hidden menu if it isn't already in your build.prop.
Comment: These Instructions worked for me on my Note 4.
Comment: Worked on my Note 2.
Comment: This did not work on my rooted Note 3.  Tried ro.config.tima=0, false, and removed entirely in every configuration with ro.config.donot_nosim=true and 1.  Bummer.  Wound up using an Xposed module.
Answer: Turn on airplane mode, enable WiFi.  Problem gone.
Comment: Enabling Airplane mode (a) did not remove the SIM card persistent notification and (b) added a new persistent notification on my Note 3.  Unfortunately this answer is a bust.
Comment: You need to restart the phone after you put it into airplane mode. When it restarts the notification will never come up, probably because it never tries to connect to the mobile network.
Comment: Confirmed on unrooted S5 that psouza4 is correct. Now you'll have TWO annoying icons on your status bar, and, CodyF, restarting has no effect. So, this solution is worse than unhelpful.
Answer: If you have root access:

download the free "Notifications Off" app from the Play store;
open it;
scroll all the way down till you find "system ui" and uncheck it;
hit the little floppy disk icon at the top to save it.

This works for my Sprint Note 3 on page plus.
Comment: The app sounds nice, but won't that disable *all* system warnings, including potentially important ones?
Comment: @Tobias: it will, this should not be the solution
Answer: Turn on Airplane Mode. It will turn off wifi unless you need wifi then I don't know what else to do.
Comment: @Al - This is not just a quirk of Android. iPads work similar - Airplane mode still allows you to independently turn Wifi on.
Comment: As has been pointed out in a duplicate answer to this question, for at least some phones (perhaps all?), this will not help. Not only does Airplane NOT remove the no-sim-card icon & notification, but it also triggers its own airplane mode icon. This answer proved to be unhelpful.
Comment: Funny little quirk of most Android phones: You can turn on Airplane Mode and then turn on WiFi. So your cell radio and GPS stay off, but your WiFi will work. However, I don't see how this is going to help the Asker.
Comment: This is the proper solution.

Remove "No SIM Card in Phone" message


In herding, what is meant by a "flank" and what are the different types?

Question: In herding, what is meant by a "flank" and what are the different types? It is easy to see that there are a couple of different types of flanks, one going clock-wise and one going counter clock-wise but I've also heard of "clean" flanks and "inside" flanks. Is there a good description of each of these and what they mean?
Answer: I'm not at all an animal expert, but to flank someone means to go around their side, so I would imagine flanking in the context of herding would involve moving around one side of a herd of animals so that they don't go in that direction; that side would feel "closed off" to them, and they would instinctively move in the other direction (if you flank them on the right, they would move left, for example).


Velocity of Solar System relative to CMB

Question: In the book 'An introduction to science of cosmology' by Raine and Thomas, they have two equations
$$
\frac{\Delta T}{T} = \frac{v}{c}\cos\theta'\qquad (4.14)
$$
$$
T = (3.372±0.014)×10^{-3}\cos\theta' K \qquad (4.15)
$$
From these two relations the velocity of solar system relative to CMB has been written as $371\pm 1$ km/s in the direction $(l = 264.14\pm 0.3^{\circ},\ b = 48.26\pm 0.3^{\circ})$. How do we arrive at this velocity and direction.
Comment: CMB dipole anisotropy... so what's the question?
Comment: You have to numerically fit the predicted anisotropy to the measured data. That may sound easy but I am fairly sure that it's not. The CMB data set has a number of non-trivial systematic error sources that need to be controlled carefully. You will have to read the full data analysis papers to understand how the collaboration did it and it's usually a good idea to contact the team members responsible for such an analysis to discuss the details if you want to do your own analysis or use the result for non-trivial research of your own.
Comment: @CuriousOne I think measuring just the dipole is probably much easier - it is very "loud" compared to the rest of the signal, and is the first thing that needs to be removed to do any other analysis. Probably to get very accurate removal requires a lot of care, but just getting a velocity to within 1km/s wouldn't be too bad, I think.
Comment: @KyleOman: Could be. 1km/s out of 370 sounds like a pretty good precision to me... but maybe the signal is not sensitive to the galactic background. My view on these things is a bit "clouded" since I got to hear an earful from a postdoc once who spent what little career she had in the field on cataloguing galactic gas clouds which needed to be excluded from the CMB analysis... there was very little scientific honor to be had from that and it was still absolutely vital to have as complete a set to remove systematic errors from the analysis. This may be less crucial for the dipole.
Comment: @CuriousOne Yeah the signal looks something like *****DIPOLE*****, quadrupole, octupole, hexadecapole, ... You can see the raw CMB map [here](http://apod.nasa.gov/apod/ap010128.html). You can kind of see a bit of the galactic foreground along the equator, but overwhelmingly you see the DIPOLE ;)
Answer: If we are moving relative to the CMB then CMB photons will be doppler shifted (and the amount depends on the direction relative to the CMB frame). This induces a dipole in the temperature fluctuation map
$$T(\theta) = T_0(1+v/c\cos\theta)$$
to first order in $v$, which we can measure. The direction and velocity can for example be found by fitting a dipole to CMB temperature maps produced by e.g. WMAP and Planck. For more details on how it's acctually done in practice you see for example the Planck article on the Doppler boosing of the CMB.
Answer: First, you make a measurement of the CMB temperature map. With the average temperature subtracted off, this looks like:

The main feature to see here is a clear dipole, the signature of the doppler shift caused by the motion of the detector relative to the CMB rest frame. There's also a bit of fuzz visible along the equator from galactic foreground sources. The actual cosmologically interesting CMB signal is buried under the overwhelming dipole and foregrounds.
To get a measurement of the velocity, one simply fits a dipole to the map (with the monopole, or mean temperature, already subtracted off), which looks like your equation 4.14. Your 4.15 looks a bit fishy to me out of context, because if $\theta'$ ranges from $0$ to $2\pi$, you'll get negative values for temperature. I don't think it's actually needed, in any case. Once the dipole is fit you'll know which direction the motion is in (I'm guessing $\theta'$ is defined as an angle offset from some reference angle), and its magnitude ($v/c$). From there it's just a matter of converting to galactocentric coordinates $(l,b)$.


How can I stop Google Analytics from tracking a certain user?

Question: I have the Google Analytics module installed. How can I prohibit the code snippet appearing on pages served to a particular user. Say user #15, for example?
Answer: I would consider creating a separate user role for that purpose and disabling Google Analytics for that role. The setting can be found at the module config page (/admin/config/system/googleanalytics) under Tracking Scope -> Roles.
Answer: I don't think you need to create a new role just to stop tracking a single user. If you want the user to be able to opt-out from being tracked, go to the Google Analytics module settings page (/admin/config/system/googleanalytics) and under Tracking Scope -> Users, select:
"Tracking on by default, users with opt-in or out of tracking permission can opt out"

Then you can give user roles you wish (e.g. "Authenticated User") permission to opt-out of Google Analytics tracking ("Opt-in or out of tracking").
The user can then log in to their account and opt out of tracking.
Having said that, if you want to prohibit a certain user from being tracked, or you don't want to give anybody else permission to opt out, then I agree that adding a new user role might be the best way to go for this.


Grub Error: Minimal bash like line editing is supported and no bootable os

Question: I have a very old 2012 model of dell inspiron pc with 2 gb ram running windows 10. Today I installed Android x86 (dual boot with windows 10). I installed the grub bootlader in Windows directory. And yes my pc is non efi. I used android x 86 and everything was right. But when I started my pc again the Dell logo appeared as usual, but after this the screen has some text like this (I can't remeber the exact text):
Grub loading...

Error 16

Then I googled a lot and tried a lots of things but nothing worked then I installed android x86 again but this too didn't worked I again googled and I followed a guide (I can't remember what was it) and now I have get rid of "error 16" problem but now the screen is showing something like this...
Minimal bash like line editing is supported.....bla...bla...bla

Again I searched a lot but couldn't find anything to solve this problem. And I don't have windows 10 installation disk. But I have a Fedora iso file in my laptop so I made a bootable image of Fedora in a pen drive and used it as live os in the pc to access files now I can access the hard disk but I don't know if there is some way to find and manually delete the grub bootlader from local disk C. And now whenever I type boot in the 'minimal bash' screen it says something like there are no bootable os. I'm totally confused. I can't even get it fixed by someone due to lockdown. Please help me.
I want to delete the grub bootloader and Android x86 and get my windows 10 back with all personal files or some way to boot fedora as only os without losing the personal files.
And yes I read this in a forum that I can remove grub bootloader from command prompt in windows so I want to ask if there is any way to manually remove grub bootloader using fedora and replace it with windows default bootloader.
Thanks a ton in advance.
Answer: I have fixed it today myself by making windows 10 recovery drive using my laptop and then booted my pc with the drive and then I typed the following commands in the command prompt which appeared in the repair menu
bcdedit /export c:\bcdbackup
c:
cd boot
attrib bcd -s -h -r
ren c:\boot\bcd bcd.old
bootrec.exe /rebuildbcd

And now I'm back with my Windows 10 and the GRUB has been removed forever :)
PS: My laptop was HP Pavilion with Windows 10 Home Edition while my Desktop (Dell) was running Windows 10 Enterprisre Edition.


How do I see the original version of a config file installed with apt-get?

Question: I have a server running Ubuntu and a program which was installed with apt-get install and I'd like to see the unmodified config file (e.g. /etc/foo/foo.cfg) so that I can diff it against the current version to see what modifications were made.  Is there an easy way to do this, perhaps with some sort of apt command?
Answer: As far as I know you can only achieve this if you still have the original .deb around, but most of the time a similar one should be enough.
I think this superuser.com link answers this question more thoroughly than I could:
https://superuser.com/questions/69045/how-do-i-get-the-default-configuration-from-a-deb-file
Answer: apt-get doesn't store the original version of the configuration file. You can redownload the original package.
As a preventative measure, install etckeeper Install etckeeper http://bit.ly/software-small, which is a seamless way of having version control in /etc. Once you've installed the package, edit /etc/etckeeper/etckeeper.conf to select your favorite version control software (the default is Bazaar, you can use Darcs, Git or Mercury instead), then run etckeeper init. You won't have to interact with etckeeper again unless you want to. You can run etckeeper commit manually after you've made a change, but if you don't apt will automatically make a commit before and after each package installation run. Use the VCS's commands (log, diff, annotate, …) to look at change histories and revert to older versions.
Answer: I wrote the a script for this use case. The script will download the .deb of a given package, and extract it's ./etc contents into the current working directory:
#!/usr/bin/env bash
set -eu

PACKAGE=${1:?"Package not provided"}
TMPDIR=$(mktemp --directory --tmpdir=/var/tmp "deb-etc-${PACKAGE}.XXXXXXX")
trap "rm -rf ${TMPDIR}" EXIT

pushd "${TMPDIR}"

apt download "${PACKAGE}"
ar -x *.deb

tar -xvf data.tar.xz ./etc/

popd
mv "${TMPDIR}/etc" "etc-${PACKAGE}"


AngularJS ui-router/session error handling

Question: I have a single page application utilizing angular and ui-router for our community users on our community site. All works great until their session is invalidated (they logout) or it times out. At which point the remoting function calls will fail (with errors like code 500 Visualforce Remoting Exception: Page not allowed for the profile) which I can likely handle by checking for the statusCode of 500 and redirect to login screen. The bigger concern is how to handle the routing issues. If their session is no longer valid and you hit a route or try to load a view (to show a popup as an example) from the static resource which it can't access without a session (receive a Error: [$compile:tpload] error). This one I think can only be handled with some deep diving into the angular code. I was wondering if anyone had recommendations on handling session timeouts or logouts since unless someone has the JS console open, they wouldn't understand the issue. Thanks!
Answer: I had a template I was displaying when there was an error on the remoting calls. I moved that to text/ng-template so it would always be accessible and then detected the statusCode 500 or 402 to display the popup. For the ui-router template error I used a generic error handler to capture the failed template load to display. Might help someone in the future
<code>.run(function($state) {
    $state.defaultErrorHandler(function(error) {
        // make noise
        alert('failed on route');
    });
})
</code>


How do Trade Winds work?

Question: I can't find any real information on them; how do they influence colonial and trade range in only one direction, and by how much?
Comment: I thought they only affect trade value, but I may be completely wrong.
Answer: I don't have confirmation, but I am guessing the one-directional system is done traveling from your capital outwards, so Europe can colonize America with a lower colonial range than America colonizing Europe because the one directional boost. Which trade nodes you can send merchants to is probably affected similarly.
I can't find information about the quantity of distance it increases.

How do Trade Winds work?


Is there a standard way to prepare lyrics for a singer?

Question: I'm making some electronic music, and would like to prepare it for vocals. I know what the vocals are and where they should go, but would like to know if there is a standard way to prepare it for a singer? Or if not, a standard way the recording process is usually done?
Comment: As a starting point, perhaps you should add how you do it now.
Comment: Right now, we're just adding a track (in ableton) with the notes we want the lyrics to be. We haven't actually done it yet though, we're getting ready to talk to some singers, and was just wondering if there was a regular way.
Answer: Usually, people write a score including the lyrics and the notes. For electronic music, you can write the singing part in MIDI, convert the MIDI to a score (MuseScore does it very well using MusicXML), add lyrics (ith the same MuseScore), and send the score. It's when people will read and sing the score that you can judge their voice quality and ability to read a score :)
As for the recording process : If you can rent a studio for a few hours, go to it with the music (without lyrics) already pre-mixed and pre-mastered and ask for the signer to sing over the music while you record what he/she sings. Then you will have some big files including the result, choose the best, edit it with the rest of your music (you can put effects on the voice, but use EFFECTS and only EFFECTS). Hope this helps :)


How wide of an opening for framing cabinets

Question: This seems like it's a fairly straight forward question, but I've seen conflicting answers.   I have a U-shaped alcove that I'm going to put in four, 24" cabinets.  It seems like the rough framing should be 97" wide (4x24" + 2 x 0.5" for the drywall).  Does the opening need to be more than that?  Seems like if it were too wide than you'd have unsightly gaps.  Since the alcove is deeper than the cabinets, it seems like you'd be able to smoosh (or cut out) any drywall if the wall varied any less than 97" (well, up to 1" total of play).
Answer: People usually assume that framing will be out of plumb and/or not straight, so allow an extra inch or two in the finished opening. That gap gets filled by filler strip that's custom scribed to the opening.
Comment: Well, since I can't see the spirit level from here, I'll say that you'll do fine. But in seriousness, check it with a level and remember that 1/4" drywall exists.
Comment: So let's say, hypothetically (o_O), that I actually framed it as 97 3/16".  How screwed am I going to be?
Comment: And, thinking more about this... is there any way you could install the cabs, and then bring the sheetrock to meet the side of the cabs? (It'd involve shims and construction adhesive, I suspect.) This would be hard to do if the cab fronts were dead flush with the drywall, but it should be okay if the cab was a little in/out from the alcove.


Is there a way to run Bash scripts on Windows?

Question: I have bought and I use Windows 7 Ultimate, and I like to use it to develop applications. One of the down sides (as with every OS) is that I can not run Bash scripts. Is there a way to run Bash scripts on Windows by installing some software? It is ok if it does not work 100%, but as long as the most common functionality is available it should be great.
Comment: http://win-bash.sourceforge.net/
Comment: [run bash on windows10](https://superuser.com/a/1217889/623314)
Comment: You can use [ConEmu](https://conemu.github.io/en/BashOnWindows.html) or [cmder](http://cmder.net/)
Comment: @stormy - these are console emulators and do not provide a shell. These can be used to run CMD, PowerShell or even a bash shell, if you have one installed.
Answer: Install Cygwin, which includes Bash among many other GNU and Unix utilities (without whom its unlikely that bash will be very useful anyway).
Another option is MinGW's MSYS which includes bash and a smaller set of the more important utilities such as awk (you may also want to check the competing fork - Mingw-w64). Personally I would have preferred Cygwin because it includes such heavy lifting tools as Perl and Python which I find I cannot live without, while MSYS skimps on these and assumes you are going to install them yourself.
Updated:
If anyone is interested in this answer and is running MS-Windows 10, please note that MS-Windows 10 has a "Windows Subsystem For Linux" feature which - once enabled - allows you to install a user-mode image of Ubuntu and then run Bash on that. This provides 100% compatibility with Ubuntu for debugging and running Bash scripts, but this setup is completely standalone from Windows and you cannot use Bash scripts to interact with Windows features (such as processes and APIs) except for limited access to files through the DrvFS feature.
Comment: Not deprecated, it's just one of the features that you don't get if you buy the cheaper Windows "*S*mall edition". It's also not available in the Home Edition, IIRC.
Comment: See [Windows Subsystem for Linux (WSL) Documentation](https://learn.microsoft.com/en-us/windows/wsl/about) for more info.
Comment: WSL got deprecated for Windows 10 S now... :(
Comment: @MuhammadFaizanKhan - The Git port to Windows, as well as a few other "command-line oriented" applications (Github Desktop as a notable example) also come with a Windows port of Bash. These, more often then not, are MinGW ports (i.e. compiled using MinGW and MSYS for Posix compatibility). Specifically, if you look at your Git for Windows installation, you'd see the `mingw32` directory that contains basically MSYS. So Git for Windows is MinGW that includes Git (its optional in the MSYS installer) with a "nicer" installer: https://superuser.com/a/1362301/10942
Comment: Also:  https://github.com/msysgit/msysgit/wiki/Relationship-to-Git-for-Windows
Comment: The mingw website in the answer is old. [This is the new one](http://mingw-w64.org/doku.php)
Comment: @Jdeep the website is indeed old, but the correct one is https://osdn.net/projects/mingw . The Mingw-w64 project you link to is a fork that is older than this answer and I should have known about it and mentioned it. Thanks for letting me know, I'll update the answer.
Answer: Best Option I could find is Git Windows Just install it and then right click on and click "Git Bash Here" this will open a bash window
This will open a bash window like this:
and the linux commands work...
I've tried 'sh' , 'vi' , 'ssh' , 'curl' ,etc... commands
Comment: You may as well just install MinGW without the extra bloat of Git if all you want is its shell.
Comment: I already had github desktop installed (and thus git), but I hid the context menu items, so I just clicked the windows Start button and typed Bash and pressed enter to open "Git Bash" (which is really MinGW).
Answer: If you're looking for something a little more native, you can use getGnuWin32 to install all of the Unix command line tools that have been ported. That plus winBash gives you most of a working Unix environment. Add console2 for a better terminal emulator and you almost can't tell you're on Windows!
Cygwin is a better toolkit overall, but I have found myself running into surprise problems because of the divide between it and Windows. None of these solutions are as good as a native Linux system though.
You may want to look into using virtualbox to create a linux VM with your distro of choice. Set it up to share a folder with the host os, and you can use a true linux development environment, and share with windows. Just watch out for those EOL markers, they get ya every time.
Comment: Or CoLinux : http://www.colinux.org/
Comment: colinux doesn't work on 64-bit (yet)
Comment: Does anyone know of a successor to the win-bash project? It is no longer actively developed and stuck on bash v 1.14 (bash proper, as of this post, is v 4.4)
Comment: @Bjartr The Microsoft folks have added a feature to allow a [native version of bash to run on windows 7](https://blogs.msdn.microsoft.com/commandline/2016/04/06/bash-on-ubuntu-on-windows-download-now-3/)
Comment: @SpencerRathbun
That will only run on Windows 10, I happen to be on Windows 7. I'm also not sure how it plays with mixing linux and windows executables and paths so it may not be any better (from my perspective) than cygwin bash.
Comment: @hexicle There's something on going for the 64bit, but not quite ready though [colinux64](http://svn.code.sf.net/p/colinux/code/branches/devel-64bit/README64)
Answer: Best option? Windows 10. Native Bash support!
Comment: No, not best options.
You just run linux that way, not bash IN windows - you cannot launch Windows executables from that bash (unless you workaround it with `cbwin`...but that's already too much fuss for just a workaround).
Comment: You can run virtual all bash scripts - as long as they do not try to interact with the host OS (Windows). WSL bash is a *lightweight virtualization* subsystem that can execute the *original* ELF binaries (ie Ubuntu) - but you cannot escape it!
Comment: 'Best' option is probably a matter of taste. So maybe you're right. However, it does enable me to run any (well .. most) bash scripts on my windows PC.
Answer: You can always install Cygwin to run a Unix shell under Windows. I used Cygwin extensively with Window XP.
Comment: What package do I need to install to run UNIX Shell in Cygwin?
Comment: @rFactor the Cygwin page includes a windows installer with all of the necessary components.
Comment: The Cygwin site explains what has been ported and how to install it. If all you want is a shell then the basic Cygwin install should be enough.
Answer: After installing git-extentions (http://gitextensions.github.io/) you can run .sh file from the command prompt. (No ./script.sh required, just run it like a bat/cmd file)
Or you can run them in a "full" bash environment by using the MinGW  Git bash shell.
I am not a great fan of Cygwin (yes I am sure it's really powerful), so running bash scripts on windows without having to install it perfect for me.
Comment: I do not know what is git-extensions but its description says it is a graphical user interface for git. How would you run shell scripts from this tool? Perhaps you mean to run them with msys bash that it includes?
Comment: Just to confirm - git-extensions does include a copy of bash and it sets it in the path. I tried `bash` from a powershell instance, failed, installed git-extensions and retried and it worked for me.
Answer: In order to run natively, you will likely need to use Cygwin (which I cannot live without when using Windows).  So right off the bat, +1 for Cygwin.  Anything else would be uncivilized.
HOWEVER, that being said, I have recently begun using a combination of utilities to easily PORT Bash scripts to Windows so that my anti-Linux coworkers can easily run complex tasks that are better handled by GNU utilities.
I can usually port a Bash script to Batch in a very short time by opening the original script in one pane and writing a Batch file in the other pane.  The tools that I use are as follows:

UnxUtils (http://sourceforge.net/projects/unxutils/)
Bat2Exe (http://bat2exe.net/)

I prefer UnxUtils to GnuWin32 because of the fact that [someone please correct me if I'm wrong] GnuWin utils normally have to be installed, whereas UnxUtils are standalone binaries that just work out-of-the-box.
However, the CoreUtils do not include some familiar *NIX utilities such as cURL, which is also available for Windows (curl.haxx.se/download.html).
I create a folder for the projects, and always SET PATH=. in the .bat file so that no other commands other than the basic CMD shell commands are referenced (as well as the particular UnxUtils required in the project folder for the Batch script to function as expected).
Then I copy the needed CoreUtils .exe files into the project folder and reference them in the .bat file such as ".\curl.exe -s google.com", etc.
The Bat2Exe program is where the magic happens.  Once your Batch file is complete and has been tested successfully, launch Bat2Exe.exe, and specify the path to the project folder.  Bat2Exe will then create a Windows binary containing all of the files in that specific folder, and will use the first .bat that it comes across to use as the main executable.  You can even include a .ico file to use as the icon for the final .exe file that is generated.
I have tried a few of these type of programs, and many of the generated binaries get flagged as malware, but the Bat2Exe version that I referenced works perfectly and the generated .exe files scan completely clean.
The resulting executable can be run interactively by double-clicking, or run from the command line with parameters, etc., just like a regular Batch file, except you will be able to utilize the functionality of many of the tools that you will normally use in Bash.
I realize this is getting quite long, but if I may digress a bit, I have also written a Batch script that I call PortaBashy that my coworkers can launch from a network share that contains a portable Cygwin installation.  It then sets the %PATH% variable to the normal *NIX format (/usr/bin:/usr/sbin:/bin:/sbin), etc. and can either launch into the Bash shell itself or launch the more-powerful and pretty MinTTY terminal emulator.
There are always numerous ways to accomplish what you are trying to set out to do; it's just a matter of combining the right tools for the job, and many times it boils down to personal preference.
Answer: There's one more theoretical possibility to do it: professional versions of Windows have built-in POSIX support, so bash could have been compiled for Windows natively.
Pity, but I still haven't found a compiled one myself...
Comment: POSIX sybsystem on Windows has been abandoned [1]. Being replaced by the "Windows Subsystem for Linux" which is based on the "Drawbridge" lightweight virtualization system to run unmodified Ubuntu-bash.
But there are some nuances, e.g. once inside this system, you cannot call Windows executables anymore!

[1] https://blogs.msdn.microsoft.com/wsl/2016/04/22/windows-subsystem-for-linux-overview/
Comment: @ankostis, Actually, with CU you can...


Working out consecutive days with longer resting periods

Question: Supose you can only work out for five days, and you know you won't be able to do so in a couple of weeks after. Would it be better to work out five days on a row, since you'll have a longer than usual resting period, or would it be better to work out on alternative days as usual?
Comment: I don't know the answer to your question. However, unless you are having some sort of surgery that will keep you from using your limbs. Pack a thera-band/stretchy-band. The biggest problem for your muscles will be the inactivity. So even if you can use a stretch-band for some kind of work out it will be beneficial. Plus, they don't take up a lot of space.
Comment: Accumulating tremendous volume before a long break isn't a terrible idea. Five days in a row is a little over the top though.
Comment: I would add that training 5 days in a row may not be bad, but, it really depends on the intensity.  you need to allow for sufficient recovery of not only your body, but, your central nervous system as well.
Answer: Your body can only properly recover while resting so I would recommend sticking to alternative days.
That being said, if you have a two week break coming up then you have a great opportunity to change your routine up when you get back and see some quicker results.  Our bodies and minds are great at establishing patterns and if you stick to a workout routine for long enough, your body will become accustomed to it and not grow at the same rate as when the routine was started.  That's much of why people on a new diet see great results initially but then the rate at which they lose weight slows down.  Body builders sometimes break out of plateaus by changing their routine.
If you haven't stopped exercising, you can always finish with a bang by increasing the intensity a little bit (but remember to rest!).  Then when you get back into it, change things up.  Your body won't know what's going on and will have to compensate accordingly.


How do I design a musical instrument?

Question: I am creating a tundra-nomad inspired culture, but I'm having trouble figuring out how to design instruments that will seem believable for these people and also be unique when compared to the real world. The nomads are primarily herders who control large, yak-like beasts for milk, meat, and wool, and make their money from trading these materials in markets. One of the ways they pass the time is through playing music. I have thought about making a pipe-like instrument made from an animal tusk and stones, but I still have no idea how it would sound or be played on. Any help or suggestions would be great!
Comment: The Inuit already have a well-developed drum culture with singing. Mongolia has flutes, rattles, gongs, and string instruments. https://en.wikipedia.org/wiki/List_of_Mongolian_musical_instruments
Comment: I know accepting an answer as soon as possible is tempting, [but please don't hurry yourself and take your time choosing and doing that](https://worldbuilding.meta.stackexchange.com/a/9736/80336) ^^. Indeed, people with very neat answers might be sleeping at the time you wrote your question, and might be discouraged to give them after seeing the green mark :).
Comment: You asked how to design a unique musical instrument, but you accepted an answer that doesn't answer that at all.
Comment: The "unique when compared to the real world" part is difficult. Humans have been making music for more than 10,000 years using an enormous variety of instruments. The diversity of these pretty much covers all the possibilities that physics allows.
Comment: Consider Inuit music https://en.m.wikipedia.org/wiki/Inuit_music
Answer: Strangely, this solution might best be designed by looking at how we classify all of Earth's many musical instruments. You see, once you get out of middle school's music program, it turns out that there are a multitude of musical instruments throughout history, more than a few of which are unique.
The people who study these want to know how to classify them, and even the traditional European instruments you're familiar with exist in a dazzling variety of modifications. There's not just one saxophone, but an entire spectrum of the things... those are (mostly) classified according to the key they are made to produce.
But what do you do about those instruments that are more exotic? Where does that one-of-a-kind accordion-or-maybe-it's-a-hurdy-gurdy belong?
Eventually, these people got their act together and fashioned a system that should be able to (in theory) describe and classify any musical instrument. Let me introduce to you the Hornbostel–Sachs system.
By being able to describe any plausible musical instrument, it can already describe those you'll design but haven't managed to design yet. And it lets you easily explore the possibilities, out to the very edge of what is plausible. At its most basic, it turns out all musical instruments go into 4 broad categories, based on what is vibrating to create the sound:

idiophones
membranophones
chordophones
aerophones

The first (idiophones) describes instruments that vibrate themselves to make sound. Bells come to mind, and cymbals. Chordophones vibrate a string, so everything from the guitar to the piano. Aerophones are anything in which a column of air (such as from a pipe organ) vibrate to make the sound.
Some of these you might be able to rule out right away. Do these people have string available to use for musical instruments? It seems to me that even the Inuit might manage that trick, using animal gut. But in many cases, strings need to be stretched out over some chamber (hollow or not), so they'd have to get creative.
Start exploring on the Wikipedia page, and if you need to dig deeper it links to other resources to continue research.
Comment: I wonder what an instrument that manipulates a water column would sound like? Perhaps called a "hydrophone"?
Comment: @virchau13 The system was designed almost a century ago, I think. It probably has modifications to it to account for those things that the original creators couldn't be expected to anticipate, but I admit I'm speculating there. It also makes me wonder about the theramin, which as far as I'm aware, produces music electronically in a direct manner. Do they only take into account the speaker cone itself? And, of course, where does the human voice fit into this? Dunno. If anyone wants to expand on my answer, they are welcome to.
Answer: Long bones are well suited for making flutes, like this ancient examples shows

If they happen to find canes they can also make similar instruments with those.
They just need to drill/carve holes at the proper distances in the body of the flute, ensuring that they sound well in tune. As somebody who struggled to properly tune a guitar, this can be tricky.
And with skins and wood they can make various types of drums.
Playing the flute would require the player to blow through it and then close the holes to obtain different sounds. The sound might be not as clean as with a modern instrument, but sometimes that's part of the color of the instrument.
For the drum, well, it's not rocket science, either use hands or sticks.
Answer: If it is a nomad-like group, the music will be fairly simple, rhythmical, and probably repetitive. Simple drums could be made from stretching some animal hide over a wooden bowl. Flutes and simple horns could be formed from animal bones. The musical style, of course, would be nothing like modern. Be sure to scale it back from even modern music--that means no major/minor scales. I would imagine the emphasis of the music would be words sung, but not in a choir fashion. Have one person be a 'singer'--they might alternate between their voice and a flute. Drums could be used to double the rhythm of the singer or just supply a steady beat.
I would caution you not to make it too complicated, flashy, or intricate. Simple rhythms at a moderato or andantino tempo, accompanied simply, would serve best.
Comment: Why does them being a nomad-like group mean that the music will be fairly simple?
Comment: Speaking as a singer/actor, the human voice alone gets EXTREMELY versatile, so why would this culture's music *automatically* be "simple" and "primitive?" The Inuit people's Wikipedia page mentions that while they didn't have a strong musical tradition because it was mainly used for religion/spirituality, they *adopted* foreign music very quickly. Unless the OP's culture subscribes to the "primitive savage" stereotypes, you can adapt all sorts of hand-held instruments for a people on the move.
Comment: Yes, we know what simple means, and ascribing that to nomads is a problem, whether you meant it neutrally or not. The OP could absolutely say this culture's music is *obnoxiously complicated* to outsiders, because either 1) like many nomads, they trek through other countries and mixed-and-matched styles, or 2) storytelling/music is their main entertainment, because how else do you cheer up cranky kids or footsore companions? "Wow, this ten-minute epic ballad is great! Oh wait, it's from Nomad-Group. They forgot to learn the SECOND HALF. *bangs head against wall*"
Comment: I agree with both of these comments. However, I meant 'simple' as in not virtuosic and flashy. I also agree with the adaptability of the culture, but I envision it as starting musical style, not a step up from another group. This group would undoubtedly be able to adapt, but I imagine that this group has remained isolated from other culture's music. But both of these comments are technically correct--I do not deny that.
Answer: Let's be inauthentic
"Yak-like beasts" implies alien, and alien beasts want alien music.
Posit the hair (wool) of these beasts is convergent to yak hair in function, but not in chemistry.  To wit, when it is soaked in an acid, such as the acid found in the stomach of a hungry yak when it is slaughtered, the polymer of the hair readily dissolves.  When the water is extracted as it is mixed with salt from an alkali flat in the presence of a little oil to keep a smooth surface, it repolymerizes and rapidly resolidifies.
By making this yak rayon and spinning and winding it deftly around one of the creature's horns, you can create a spiral of a hard, tough polymer that gradually increases in size.  Pull it off and play it with a faceted hammerstone (think guitar pick with some heft), and you can make unique noises by banging and stroking the coil.  A musical scale is introduced by making a unique pattern of fusions at various lengths along the coil with a bit more yak rayon, creating segments that isolate with a defined harmony.  It is also possible to place one of these inside another, playing the one on the inside with the hammer-pick but hearing the sympathetic vibrations on the outer one more clearly.
I have no idea if this works.  I ought to catch a yak-like creature and find out.  Is Abydos hot this time of year?
Answer: If you want to get authentic, it's drums and Jew's harp (don't get confused with the name).
Tundra song
Answer: Bagpipes.
Many, many different communities around the world have invented these independently. How they're tuned and whether they have drone pipes will vary, but the basic construction is the same. All you need is animal hide for the bag, wood or bone for the pipes, and animal fat to seal the joints and keep the hide in good condition.
If you want this to be be a bit more funky, perhaps these ones aren't a solo instrument. Instead there's a much larger bag on a frame, a couple of people blowing it up, and a couple of people playing cross-melodies on two chanters. Or four chanters, with some ocarina-like finger layout for each hand.
Answer: Rythym is the simplest form to cover, it can be created by something as simple as banging two sticks together, to as sophisticated as something like a snare drum. In your case, one of the main resources in nomadic civilizations would be animal furs and bones, allowing percussive instruments to be made from things like pelts. For portability, these would mostly be made of hide, with a structure made of something like sticks or bones. Bone instruments are extremely valid, as bone is known for having some of the most desirable acoustic properties known to man.
In order to design a unique instrument, you need to first understand music systems. For example, modern western music uses an equal temperament system, which while flawed, is extremely refined compared to more archaic music systems such as just temperament (https://en.wikipedia.org/wiki/Equal_temperament) Temprement is dependent exclusively on instrumental harmony, however, so if you want to avoid the rabbit hole that is music math, you could create harmonies and melodies acapella, as opposed to instrumentally.
Tying all this into your pipe-like instrument, the shaft would almost certainly be made of either horn or bone. This would be carved down to a specific length to create the desired pitch.
In order to avoid the aforementioned temperament systems, the pitch of the instrument would be controlled similar to a bugle, almost entirely by the player's mouth. (https://en.wikipedia.org/wiki/Bugle)
If you want to add an extra layer of sophistication, you could add holes at the octave points (1/2, 1/4, 1/8, 1/16, etc.) allowing the instrument a much wider pitch range. Keep in mind that each hole before the desired pitch needs to be covered. (like a recorder) so you can't have more octaves than the player has fingers.
(this shouldn't be an issue, most instruments have three to four octaves max)
To give a general idea of how this would look, let's assume we have a tube 67cm long (~26 3/8in) that resonates at middle C. The first hole would be drilled halfway up the tube, the second hole would be 1/4 up the tube, and the third 1/8 of the way. This would allow people to play music sounding somewhere between a horn and a trumpet while being much more resonant since it's made of bone.
Its tone would be described as resonant and warm, while still carrying a similar mood to brass instruments created today.

How do I design a musical instrument?


What is the difference between "first thing" and "first things first"?

Question: In Russian "first thing" and "first things first" are translated almost identically, so I can not understand when use one or another. For example you can say "We'll talk about it first thing in the morning". Could you say "We'll talk about it first things first in the morning" or not?
If yes, then what is the difference between these two sentences? If no, could you plese give an example of two sentences where I can see the difference.
Thanks in advance.
Comment: ***First things first*** is a quirky idiomatic usage whereby speaker affirms that he intends to start a discussion / meeting by talking about the most urgent (not necessarily most *important*) things first. Note that in some contexts, the "most urgent" thing might just be deciding who sits where, before starting a business meeting to discusst *much* more "important" things). But saying ***First thing*** before actually *introducing* the first topic is really just a kind of "filler" that usually means nothing more than ***Pay attention now, because I'm starting the discussion / presentation***.
Answer: No, they are not the same in English.
"First thing" means... well, the first thing you do in a given situation. So you could say that you could do something "first thing in the morning" or you could say "I'll do it first thing when I get to work tomorrow."
"First things first" is a set phrase that only occurs at the beginning of a sentence, like "First things first, let's get this mess cleaned up." It roughly means "Let's get to work" or "This is the most important thing." It's pretty much always used to describe the present or the very near future, like a task to be done in the next five minutes, not "tomorrow."
Comment: 'First things first' can be used to someone who seems to want to jump to later things in a plan or sequence, ignoring important first steps. E.g. on a camp site Boy: let's go to the bar and have some drinks. Girl: first things first - let's put up the tent.


Recorded Vocal tempo is less

Question: I have recorded a song with all drum arrangements using Logic Pro with the tempo of 85 but when the vocal and along with the arrangement is recorded and played, I feel the vocal tempo is less than the arrangement.How can I rectify this without wasting time in recording the whole project once again.
Answer: If the vocals are out of synch with the drums, you can timestretch the vocal track, or chop it into slices and align it with the drums.  But this will be a BIG time-waster compared with just re-recording the vocals, getting it right!
But perhaps you mean that the song is together, but just seems a bit slow and lacking in energy?   Well, first, reconsider.  You're now very familiar with the track. You know exactly what's coming next.  To tell the truth you're getting a bit bored with it.  But are you SURE speeding it up is the answer?   If it is, you can time-stretch the whole mix.   Back in the day this would have been done by simply speeding up the tape, shifting pitch as well as tempo. Hence the number of classic recordings that are in unlikely keys, or 'in the crack' between keys.
Answer: I think we need more info here as to exactly what's wrong with it...
...but...
I think you need to first analyse why the vocal feels out of tempo.
Do you think the song should have been faster in the first place?
Is the vocal just sloppily timed against the track?
Could you fix the track, which might be easier than fixing the vocal?
Did you already attempt to slide one against the other to test if it's just a front- or back-beat issue?
An perhaps more importantly...
Did you record a guide vocal early in the process so you would know if the entire idea even works at all, before blasting ahead with the full arrangement?
You can make some good headway on a track, you can think it's [insert current buzz-word here or just substitute cool] - but if you haven't tested the vocal against it & have something to work against as you construct the final tracking, you don't know if it's a good or bad song until you finished potentially wasting your time on the arrangement. [Cruel, but fair.]
The song is the master.
The arrangement ought to be slave to that.
Even after all that, if you are absolutely certain the song is good...
Rescuing a poor vocal on a good track will take more time & skill & either software, like Melodyne or VocAlign Pro [or please no, AutoTune] or a damn steady hand & a good feel for what is needed with manual tweaks & time-stretches, than getting a better/more sympathetic vocalist who could knock it out in 2 hours.

Recorded Vocal tempo is less


Move MySQL DB to another server

Question: I have server with very big mysql database (160GB).
How easy way to move this DB to another server?
Comment: Just a warning about copying the datadir directly as some of the answers have suggested: you **must** shut down MySQL first.  If you don't shut your MySQL server down first, with MyISAM tables this can corrupt the tables as they are copied and you will need to repair them with `repair table` and may result in losing data, with InnoDB you will end up not being able to start MySQL on your new server.  Make sure you shut down MySQL before doing this.
Comment: I doubt there is an *easy* way
Comment: Also, if you are using InnoDB and want to keep the server online while you transfer the data, using XtraBackup.
Answer: Having such a big database, I would recommend to copy the datadir of MySQL instead doing a dump:

Shutdown the MySQL services on server A
Compress the MySQL data directory (might be found under /var/lib/mysql), which contains all the data
Copy your MySQL configuration (might be found under /etc/mysql/my.cnf)
Copy both via SSH/SCP to server B
Extract the data, place the config file in the same directories
(Re)start MySQL services on server B

You can find the path to your MySQL data dir in the MySQL config file (my.cnf).
Be aware, that you should use the same version of MySQL on both servers! If not, you should export and import your data using MySQL dumps.
Answer: When you say "move to another server" we are assuming you want to move to another server running MySQL and not move to a different SQL server (i.e. postrgres or MSSQL).
There are broadly two options. Transfer the /var/lib/mysql dir to the new server as it is or do an export and import process.
Copying the whole mysql directory will mean less data being transferred and an exact replication of the database from one machine to the other. However, the MySQL versions have to be the same (I believe that in theory minor versions can alter but I wouldn't count on this). You can stop MySQL, tar up the directory and use scp to copy it to the other machine. Then untar the directory on the other machine and start up MySQL. If you want to do this copy on a regular basis you may want to consider doing a straight rsync of the lib dir so that subsequent runs of the rsync command only copies the differences across.
Doing an export/import process will create a massive text file with all your data saved as SQL insert statements (and with the table create statements at the beginning to set the database up). This should be importable into a different MySQL database version but, again, if the versions of the database are massively different then things could go wrong. It is usually best to keep MySQL versions the same. The main problem with doing it this way is, with 160GB of data already in your database, the dump will be very large as there will be extra data from the SQL statements. You can use some of the pipe commands above that people have listed to send the data to the remote machine or you could dump the file out (piping it through gzip to compress it) and scp it across (assuming you have enough disk space).
mysqldump -u<user> -p<password> <database name> | gzip > db_dump.sql.gz

Another technique you could use is to pipe the mysqldump command through gzip, then through netcat (which sends it over the network) to another netcat process running on the server machine which pipes it into gzip there and finally into mysql. This has the benefit of compressing the data as it goes over the wire and doesn't create temporary files.
On the target machine:
nc -l 55555 | gzip -d -c | mysql <database name> -u<user> -p<password>

On the source machine
mysqldump -u<user> -p<password> <database name> | gzip | nc <ip of target server> 55555

Hope this helps explain some of the issues. If you think I've made a mistake in here, post a comment. Double check the man page for commands as I don't have a MySQL database handy to test this with.
Answer: MySQL databases are stored in a very simple method:
dir = database names
files in dir are tables and indexes etc.
so locate where your databases are located - possibly something like:
/var/lib/mysql
In here you'd have all your database dir's, in those dir's the tables.
Now that you have found them stop MySQL and just tar zip the directory structure.
tar -zcf mysqldatabases.tar.gz *
Now you have all your MySQL stuff in one zipped file. Copy this to the new server's data directory and unzip / untar it.
Answer: You can pipe the output of the sqldump
mysqldump -uuser -ppassword myDatabase | mysql -hremoteserver -uremoteuser -premoteserver

This is possible only if you have remote access to the database.
Answer: A dump and restore over the network can be accomplished using this syntax.
mysqldump db-name | mysql -h remote-server db-name

Remember to prevent new writes to the database during this maneuver.

Move MySQL DB to another server


Centripetal acceleration on frictionless plane

Question: Suppose I have circular, frictionless disk, and in the center of the disk there is a small box. The disk is then rotated. I gently push the box to disorient it from the center. Will the box accelerate out of the frictionless disk due to pseudo(centrifugal) acceleration, or will it go out with the constant velocity with which I pushed it?
Answer: Since after the push there are no forces acting on the box parallel to the surface of the disk, the box will just continue in a straight line at a constant velocity. We know this must be true from Newton's first law. Although, this is if you are working in an inertial frame of reference where centrifugal forces, or any other pseudo-forces, are not present.
If you are working in the frame rotating with the disk, you would find that the centrifugal and Coriolis forces would combine in such a way where you will see the box spiraling outwards with the radial coordinate increasing at a constant rate. But these pseudo-forces are present because of working in a non-inertial reference frame. It has nothing to do with the fact that the disk is spinning. The fact that the disk is spinning does nothing to influence the box.
Answer: There minsconception you have is about when pseudo force of centrifugal or centripetal act,  since you push the rotating block it will continue to move in a straight line, there is no force parallel to the direction in which block is moving.
Answer:
Will it accelerate out of the disk

It will not "accelerate" out of the disk, just slowly, constantly in its own pace with its constant speed move out away from the centre until it falls off of the disk edge.
It will not be stopped, since there is no friction. And it will not accelerate any further after your push is done, since there are no other unbalanced forces. Horizontal forces are necessary for horizontal acceleration due to Newton's 2nd law, and there are no such forces present.
And this is all that will happen. No need to think of nonexisting "centrifugal forces" or "centrifugal acceleration" (although I'm  not sure what that is).


What is the best way to find plagiarism in a draft research?

Question: Recently I got a research from one of my colleagues. However, I suspect the draft of his work and think it is extracted from somewhere else and it is not a new research in the field of cryptography. I need to know due to the lack of the time I have can I make sure about this issue? what are the solutions for this?
Comment: Do you suspect that the text is plagiarized? (That's relatively easy to check for.) Or that the idea is plagiarized (much harder to find out)?
Comment: And _why_ do you suspect? There is something a bit fishy about this scenario...
Answer: It depends what you suspect was plagiarised, how and where from.
If you believe the ideas/structure/references (the latter would apply to a literature review) have been plagiarised, you're only recourse is to use your expertise and knowledge of the field to identify the sources. A literature survey of your own would help this.
If, as I suspect, you mean the text has been plagiarised, you can use services such as Turnitin and iThenticate (as suggested by others). If you work in a university, it is very likely that they already subscribe to one of those services, and you should be able to access it. Very often, universities provide (password-protected) access for students to check their work through such services, prior to submission; usually through their virtual learning environment (VLE, e.g. Moodle, Blackboard). Your librarians would be able to point you in the right direction.
However, there's a much easier way: just Google (and Google Book search aned Google Scholar search) the text you suspect of being copied. Pretty much the only sources Turnitin et al. have access to that Google doesn't is previously submitted student assignments; so (as I read this case) Google is as likely as anywhere to identify the source of any suspect passages.
I just picked a random sentence from a nearby textbook to test this. While "straight" Google didn't pick it up, Google Books did.
When I was a fresher, and we had our "don't plagiarise" lecture, I remember the lecturer telling us that the university subscribed to all these expensive anti-plagiarism services, but the lecturers just used Google instead.
Comment: @Berliner, no, do not use any deceptive practices in paper submission. Absolutely not.
Comment: Thank you, if I use this research ( it was a part of a collaboration with a partner of the university) and submit it to an academic conference, what can happen if the research has plagiarism? Can I, for example, submit with a different name and after acceptance and when I make sure about the plagiarism issue, change the author name, University of the article?
Answer: Use a plagiarism detection program. The two I'm most familiar with are Turnitin and iThenticate. There are plenty of others - just Google for "plagiarism detection".
Comment: Thank you but is there any free/trial ones?
Comment: "just Google for "plagiarism detection"" Literally :)


Serving MP4 files to HTML5 video, suitable tool, on Linux?

Question: I am serving some large MPEG4 files internally, via Apache http, and I am finding that the Chrome browser will try redownloading the whole video every time I scrub through the timeline. Is there any software that will deal with serving video that doesn't result in the whole download being initiated again?
Answer: You can use ffserver, which is installed with FFmpeg.

ffserver is a streaming server for both audio and video. It supports several live feeds, streaming from files and time shifting on live feeds. You can seek to
  positions in the past on each live feed, provided you specify a big enough feed storage.
Answer: If you are serving very large files that take long enough to download where a connection risks being severed, then use a synchronization tool like Dropbox, Google Drive, Amazon Drive for teams.  That can cost money to set up, OR you can store them in an Amazon Web Services S3 bucket and have users download them with the AWS Command Line Tools.  Those tools handle shaky connections very well.


Why customize Emacs variable sgml-xml-mode in sgml-mode.el?

Question: As the title asks, why customize Emacs variable "sgml-xml-mode" (from file "sgml-mode.el")?  In "(define-derived-mode sgml-mode text-mode '(sgml-xml-mode "XML" "SGML")" there is the line "  (set (make-local-variable 'sgml-xml-mode) (sgml-xml-guess))" which makes that variable buffer local and which uses function "sgml-xml-guess" to give it a value, so what is customizing that variable good for?
For example, creating a buffer "new" and setting its mode to "html-mode" has the result that "sgml-xml-mode" has the local value nil--even if customization sets the global value to t.
The variable is defined thusly:
<code>(defcustom sgml-xml-mode nil
  "When non-nil, tag insertion functions will be XML-compliant.
It is set to be buffer-local when the file has
a DOCTYPE or an XML declaration."
  :type 'boolean
  :version "22.1"
  :group 'sgml)
</code>
I am using:

GNU Emacs 23.3.1 (i386-mingw-nt5.1.2600) of 2011-03-10 on 3249CTO

A related question is Make emacs always close html tags.
Answer: It's just a historical accident.  I"m not sure this question is appropriate here, BTW.


Multiple Attacks with a Two-Handed Weapon and Off-Hand Spells

Question: If I have a high-enough BAB to earn two attacks per round as a full-round action, can I attack with a two-handed weapon (1st attack), remove one hand from the weapon (free action) and, say, make a touch attack (2nd attack) using Shocking Grasp?
Comment: Welcome to the site. Take the [tour].  This is an interesting question which might take some explaining due to the complexity of holding the charge. The primary clarification needed is *How and when did the attacker acquire the* shocking grasp *effect?* Until that's known, I don't think this can be answered in a reasonable length. Please edit the question to clarify. Thank you for participating and have fun.
Comment: Which system and edition is this question for? Can you add it as a system tag please?
Comment: My original answer may have been slightly misleading given that it answered the title more-so than the description below. My answer below is a lot more thorough.
Answer: As per the Paizo FAQ:

What kind of action is it to remove your hand from a two-handed weapon or re-grab it with both hands?
Both are free actions. For example, a wizard wielding a quarterstaff can let go of the weapon with one hand as a free action, cast a spell as a standard action, and grasp the weapon again with that hand as a free action; this means the wizard is still able to make attacks of opportunity with the weapon (which requires using two hands).
As with any free action, the GM may decide a reasonable limit to how many times per round you can release and re-grasp the weapon (one release and re-grasp per round is fair).

However, casting a spell is a standard action, and an increase to your BAB has no effect on your inability to perform multiple standard actions in a turn.
If you were using a one-handed weapon, you could cast shocking grasp beforehand with one hand and hold the charge; on your next turn you could make a full-attack with your BAB and then discharge the shocking grasp as a free action. A two handed weapon would not work in this case as it would problematically discharge on your weapon as soon as you touched it:

Holding the Charge: If you don't discharge the spell in the round when you cast the spell, you can hold the charge indefinitely. You can continue to make touch attacks round after round. If you touch anything or anyone while holding a charge, even unintentionally, the spell discharges.

You'd have to release the discharged spell before making your full attack with a two-handed weapon.
Answer: I second HeyICanChan  - it is not 100%clear, how Shocking Grasp has come to be in your example, but either way the answer is "no".
If you are asking whether you can CAST the touch spell instead of an attack the answer is:
No. Spells do not iterate like attacks.
Spells either consume a standard action, a swift action, a free action, a full round action or a longer time, but they never take the place of an attack. Otherwise a caster would be able to cast more spells with rising base attack bonus. That is not intended.
If the question is, if you could use a PREVIOUSLY CAST touch spell - the answer has been given by Dumpcats: No, a held charge would have gone off in the moment you touched your weapon.
But you could combine full attack with a quickened Shocking Grasp.
A quickened spell requires the meta-magic feat Quicken spell (PHB, 98f). You have to cast the spell as 4 levels higher, so Shocking Grasp would take a 5th level spell slot. It allows you to cast the spell as a swift action. (Spell Compendium p. 4) If you cast a touch spell as swift action, attacking the opponent is part of the action.

Reference for D&D 3.5 only:
FAQ D&D 3.5, p. 76, on casting a quickened ranged touch spell:
Casting a quickened version of either example spell works exactly the
same way (...); the caster makes all the ranged touch attacks
the spell allows as part of the free action he used to cast the spell.
The caster generally uses his full attack bonus for each ranged touch
attack. Any other attacks the caster might make during the same round
as the quickened spell have no effect on the caster's attack bonus for
the ranged touch attacks; however, if the caster does something that
gives him an attack penalty on all his attack rolls until his next
turn, such as fighting defensively, that attack penalty also applies
to his ranged touch attacks from the quickened spell. [That a quickened spell uses only a free action has been updated later on, e.g. in the Spell Compendium p.4 - Giorin]

There is no reason why this should not apply to touch spells instead of ranged touch spells.
So you could

use your full attack with your two-handed weapon (full-round-action)
take one hand off the weapon - no matter which - (free action)
cast a quickened Shocking Grasp and touch your opponent as part of the action (swift action). This attack would be extra and made with your full attack bonus.

This course of action is still different from what you describe above, because the spell would not take the place of an attack because of high BAB, but it comes close.
Other possibilities of combining melee attacks and spell casting:

Holding the charge of a spell, attacking with a melee weapon and then using the touch spell would work with a one-handed weapon. But in that case we are talking about two-weapon-fighting, which grants you an extra attack but severe penalties on your attacks. (PHB, p. 160; penalties without feats: -4 on your primary hand melee weapon attacks, -8 on the off-hand extra touch attack with the spell)
You can combine an attack with a spell if you use a spell storing weapon. In this case discharging the spell is a free action. This comes close to what you describe in  your question - but you would not have to bother taking your hands off the weapon or using an attack for the spell. The stored spell is exhausted after this hit.
If you have previously channeled a spell into your weapon using the Channel Spell class feature of the Spellsword prestige class (Complete Warrior) the spell would go off at the first hit - no extra action required, so a full attack would be possible.
The Arcane Channeling class feature of the Duskblade base class (PHB II) also allows combining a spell with a melee attack, but does not allow a full attack before level 13.


Object integrity and caching in a stateful client

Question: I'm wondering what strategies exist to handle object integrity in a stateful client like a Flex or Silverlight app.
What I mean is the following: consider an application where you have a Group and a Member entity. Groups contain multiple members and members can belong to multiple groups. A view lists the different groups,  which are lazy loaded (no members initially). When requesting the details of the group, all members are loaded and cached so the next time we don"t need to invoke a service to fetch the details and members of the group.
Now, when we request the details of another group that has the same member of a group that was already loaded, would we care about the fact that the member is already in memory?
If we don't, I can see a potential data conflict when we edit the member (referenced in the first group) and changes are not applied to the other member instance. So to solve this, we could check the result of the service call (that gets the group details) for members that are already loaded and then replace the loaded ones with the cached ones.
Any tips, ideas or experiences to share?
Answer: What you are describing is something that is usually solved by a "first-level cache" (in Hibernate, the "Session"; in JPA, the "EntityManager") which ensures that only one instance of a particular entity exists in a particular context. As you suggest, this could be applied to objects as they are fetched from the server to ensure that all references to a particular entity are in fact references to the same object instance.  You would also need a mechanism to ensure that entities created inside the AVM exist in that same context so they have similar logic applied to them.
The Granite Data Services project has a project called "Tide" which aims to solve this problem:
http://www.graniteds.org/confluence/display/DOC/6.+Tide+Data+Framework
As far as DDD goes, it's important not to design the backend as a simple data access API, such as simply exposing a set of DAOs or Repositories.  The client application cannot be trusted and in fact is very easy to manipulate with a debugging proxy such as Charles.  I always design a services API that is tailored to the UI (so that data for a screen can be fetched in a single call) and has necessary security or validation logic enforced, often using annotations and Spring AOP.
Answer: What I would do is create a client side application service which does the caching and servicing of requests for data. This would handle whether an object already exists in the cache. If you are using DDD then you'll need to decide what is going to be your aggregate root entity. Group or Member. You can't have both control each other. There needs to be one point for managing loading etc. Check out this video on DDD at the Canadian ALT.NET OpenSpaces. http://altnetpedia.com/Calgary200808.ashx


Silverlight Live Audio Streaming

Question: How do I stream live audio from the location to over the internet using Silverlight 2.0? What equipment, software etc do I need?
Answer: I've written/ported a MP3 decoder to Silverlight 3.
To get around the issue of a seekable stream and MediaStreamSource, I wrote a custom stream, SeekableStream, that wraps around any other Stream and makes it appear seekable by using an internal memory stream.
You can see it in action here where it can play a MP3 files located locally on your machine or on the web.
Source for the library and demo is now up on CodePlex
Answer: It depends what you want to stream.  If you just want to stream Mp3s over the web the Silverlight 2 MediaElement will do it for you.  Just point the Source property to the Uri of the mp3 and you're done.  That same technique works for video, too.  If you want to stream live content (i.e. a webcam) then you should use the stream services that were linked to by the other commenter.

Silverlight Live Audio Streaming


Can my work on manufacturing, designing & fabrication of an electric solar vehicle be considered as an original research & can it be published

Question: My classmates and I are pursuing B.Tech in Mechanical engineering and we have formed a team to manufacture, design, fabricate, and develop an electric solar vehicle which would operate under safe speed. We are designing it in a way to reduce weight and make it much lighter. We are also trying to minimise the cost of production &  making sure that it works both at day and night.
We have designed it using Solidworks and have taken into account all types of loads and stresses that will be generated. Apart from these goals, we are also working upon various other parameters which include efficiency and other considerations. We have fabricated the solar cells on our own.
We expect to complete our work in a couple of months. I want to know if our work can be claimed as an original research and if we can publish it. If so, how many people can be authors on the research paper ?
Answer: The simple answers to your questions are that, yes, you can claim your work to be original research and you can have as many authors as you like.  That said, the fact you think your work is original and of publication quality does not guarantee that any journal will agree.  Your best bet is to discuss the specifics of your project with your advisor (I assume you have one?) and follow his/her advice.


Lack of mathematical training for a CS Ph.D

Question: I've graduated and I'm looking to apply to a Ph.D. program in computer science. However, during my undergraduate years I did not take math courses other than the ones required for the CS major (i.e., discrete maths and algorithms). Thus I haven't taken a college course in calculus/statistics/linear algebra/probability, which I am aware is essential training for CS Ph.D. students. I also haven't taken an operating systems course since it wasn't required for the major and I opted for a different set of CS courses.
The reason for this was that I did not consider applying to graduate programs at the time, and chose to take courses in other unrelated departments to fulfill requirements for my second area of study. However, I am currently taking an online MOOC in calculus and linear algebra to increase my technical knowledge.
Although I have good grades in my CS courses and research experience, I'm wondering if this would be considered a red flag that I should address in my statement of purpose. If so, what would be a good way to do it?
Alternatively, would it make sense to apply for a Masters program to get more coursework under my belt before applying to a Ph.D. program?
Answer: Lack of mathematical training is a gap, but not what I would consider a red flag, if you have strength enough in other areas.  The key is whether I, evaluating your application, would think: "This person can't handle math" vs. "This person did other things besides math."
It is definitely a good thing that you are increasing your training: a MOOC will likely not make a big difference on paper, but if it's making a real difference for you intellectually, that matters too. Furthermore, a good mental mathematical tool-kit will make your life easier in many ways (including detecting when you shouldn't believe something just because it has math).
As for the question of whether to start with a Masters: that really depends on where you are and where you are trying to go.  For example, in the US, many Ph.D. programs literally or effectively start with a Masters, so it might be redundant (though the MOOCs or any other prep work will allow you to do less remedial work as part of it).  In Europe, on the other hand, most Ph.D. programs assume you already have a Masters, so it's pretty mandatory to start there.  Another thing that you might consider is to apply to both, starting with the Ph.D. if you get in, and burnishing your credentials in a Masters first if you don't.
Comment: I'm looking to apply to programs in the US. Should this be something I should explicitly address in my SOP.
Comment: I personally would not, but instead emphasize your areas of strength.
Answer: I was in your shoes at one point.  Here's what happened: I was accepted to a very good computer science graduate program, with a letter that identified two specific courses that I would need to have under my belt before starting the program the following fall.  I was strongly encouraged to take those two courses in the summer prior to starting their program.
That's what I did -- those two courses were offered in the summer session at the state school near where I lived.
Also note that there are lots of varieties of computer science PhDs.  Some really don't require or use much math.  Some are totally the opposite.  Some are in between.

Alternatively, would it make sense to apply for a Masters program to get more coursework under my belt before applying to a Ph.D. program?

Unlike in physics, in computer science, the main difference between being a master's student and being a PhD student is how long you stay in the department.
In short, I would advise you to apply to schools that interest you ASAP.  If they don't send you a letter advising you about what to take over the summer (as they did in my case), you could contact them (after you've been accepted) to ask some specific questions.
In the meantime, read some catalogs.  Each course will have its prerequisites listed.  I think you'll soon be able to appreciate what I'm saying -- that not all flavors of graduate level computer science studies require a lot of math background.
Oh, I forgot to say -- the admissions committee will look very carefully at your transcript.  They will be able to figure out if you have any problematic gaps based on that.
Regardless of exactly where you end up next year -- I think you will probably enjoy learning to do proofs.  Linear algebra will be fun and rewarding for you.  Probability might be a good course to take too.
Comment: -1 For "_in computer science, the main difference between being a master's student and being a PhD student is how long you stay in the department_". I have no idea what you're talking about.
Comment: This varies enormously between departments.  Some CS master's programs are in no way preparation for a Ph.D. program (professional master's programs).  Some are and function more or less as you've described.  Some are but have different standards (and many master's students end up rejected from the Ph.D. program).  And when Ph.D. students leave with a master's, they often don't lose face in the outside world because a CS master's degree is a common credential, but they may lose face within the department.
Comment: In physics, you apply for a PhD program.  Leaving after a masters is in some sense admitting to a measure of defeat.  Not so in Computer Science.  In CS, you can apply for a PhD program and leave with a master's without losing face; you can apply for a master's program and when you're done with the Master's, proceed with the PhD program of studies.  It's more flexible.
Comment: What courses were you suggested to take? And what area of CS are you working in? I'm looking to apply to systems related (networking) fields, so there wouldn't be much math there. However, on the application pages for a lot of CS PhD sites they strongly imply that applicants (in general) should have taken basic math courses e.g. calculus and linear algebra.