One Database vs. Multiple Databases

Question: I need to design a system which represents multiple "projects", one per client in SQL Server , something similar to StackExchange... same data model, different sites (one per customer). Each project has the same data model, but is independent of all others. My inclination is to use one database to store all projects. What is your recommendation?
Answer: I would make separate databases, because otherwise, if each client is using a similar schema,  you're going to either have to combine tables or use lots of prefixes, or have link tables containing client identifying information.  In addition, it will be much easier to manage backups/restores of client data if they have their own DBs.
There's really no good reason not to use separate DBs, IMO.
Comment: Good point about the backups/restore, thanks for the advice.
Answer: One downside of seperate db's is rolling out schema changes; if you have a couple hundred db's, be prepared to find a clever way to push new tables, stored procedures, indexes for upgrades to them. Another downside is mirroring becomes less attractive for a DR solution as the number of db's grows.
Comment: Thanks for your input. Wouldn't be just a matter of running the same scripts in all databases when a change in the schema is needed? I'm just guessing... I haven't have the need to do this yet but does not seem as a difficult task, but I could be completely wrong and that is the reason I am asking :)
Comment: Yes, but, that can be a daunting task when the numbers get big. And when things get out of sync, it's a royal pain, scripts start failing. If your db is nice and stable though, it might not become an issue.
Answer: Unless there is pressing need to keep the data in one place, I suggest separating them. It will make moving the data between servers easier (if you want to split them over multiple database servers once load grows to the point of being an issue, for instance, or if a client wants to pay to take the app in-house), it can make backups and subsequent restores more convenient (dependant, or course, on the backup method(s) you use), and it reduces the risk of code bugs allowing clients (accidentally or through intentional hacking around) to see each others data.
Comment: You are absolutely correct about moving data easier by having separate databases and having the ability to take one client's db and set it up in a different server if needed.
Answer: There's no right answer here.   The purist-dba route would be all in one DB.  If you're good at the design/config/sql you'd be amazed what you can get out of one modern day ~$8K server.  The cheap and dirty web-scaling route would be 1:1 customer:db.  That way if a customer gets wildly more popular than others you can split them out and scale their setup.   The purist web developer route would be "one" db but built in a bigtable/dynamo kind of way to scale wide.
It really becomes less of a tech question and more of a business one.   How many devs and admins do you have now, how talented are they, what do they already know, what kind of traffic do you expect in the very near term, what kind of revenue would it take to buy/lease 10x the hardware it takes for that, etc.
Overall thats why most of the older startup hands will say "just get it working and focus".
edit: also, there's no way this is a sysadmin asking the question.  devs always like to think of designs that 10x the server config complexity "just in case".
Answer: As cagenut says, it depends. However...
One database per client sounds like it might be making things harder for yourself in the long run. What happens if you end up with 100,000 clients? Will SQL server cope with that many databases? Will you end up with 100,000 database backups? How will you manage that? If this is going to make more work for you, why take that option now if it could be changed later?
It might be an idea to use a single database now, but think about how you could partition the data if you did end up with very many clients.
Comment: If I end up with 100,000 clients, I am sure I'll have enough resources ($$) to throw at the problem then... :) I see your point, however I am inclined to believe that one db per customer is better for all the reasons posted here by others. I will also think that with that many databases I would probably spread them to multiple SQL server instances. Thanks for your input!
Answer: I don't use MS SQL but as a principle, one DB per customer. Much easier to deal with. Plus, if one database gets screwed, and it does happen, it won't affect your other customers. Any maintenance procedures can be scripted for multiple databases as easily as one.
Answer: I have been using one database per customer and as mentioned abv updating schema and backups will get tricky.
But not that much.
You need to log all your database separately (in a different database atleast if not a different machine), have a table called schema_update_log or something and write a script that updates schema for every database and logs success in this. So if you have 100,000 dbs, even across many physical server you just query each one and log success, if for any reason it fails, try the failed databases again.
So it would go something like this:
master_databases:
(record of every database per client, and its connection string)
db_id
database
...
schema_update_log
pk
query_id
db_id
status(pending, success, failed)
timestamp
error(just in case)
schema_query
query_id(referenced in schema_update_log)
query
then write a script to loop through each dataasem query and update log, keeping doing it till for every query_id, every database returns a success in schema_update_log.
this will take time, but will be more reliable than adhoc updates.
Answer: Separate DBs. In addition to other reasons given:

Your queries would otherwise need to all include a " AND project_id = $project_id"
Managing confidentiality, storing records of individual customers etc is much easier (you may want to periodically archive certain customers' db's)
If you ever do succomb to adding features for individual customers, you can add the schema changes just for that customer (or at least you have the option)
No danger of data leaking from one customer to another

Basically, it's much cleaner or more correct: if the rows in a table have absolutely nothing to do with each other, they shouldn't be in a table together. (Ok, I just made that rule up.)
Answer: I would say one database per customer sounds attractive in order to achieve a higher degree of content isolation from the perspective of security.
On the other hand I think if you want to handle more customers this is going to cost you, because you will need to supply additional infrastructure to handle any sort of db upgrades which can of course be done, but someone has to actually sit down and think of a way and in most of the cases it end up being done half manual.
With multiple customers you see more quickly the drawbacks of badly scaled code and that's a good thing, because you don't carry it over for years.
it will also make things easier when you migrate from a monolith to a microservice architecture as you just need to think of the domain of the service without setting up additional instances or environments per client. You should always keep in mind there are not unlimited devs and the more there are the more additional people you need to hire.
Sorry for the sort of economic answer as well, but I think it's necessary for this kind of question.
Also I'd like to mention security yes, but not as the only thing because we should also strive for performance which is ultimately, also more environmentally friendly -> less hardware -> less electricity -> power consumption. Just having a reference per client is nit going to cost you that much especially with SQL. The relational DBs are made for joins.

One Database vs. Multiple Databases


Is spaceship made of precast reinforced concrete tougher than those malleable alloy?

Question: Set in the mid 22nd century AD, a major construction work is being carried out in the orbit of Uranus. The military is developing a cheaper fleets using precast reinforced concrete(PRC) hoping to extend its influence across the outer planets within the solar system, they are betting on the strength and durability as compared to metal which is prone to fail at high temperature. The contract is to deliver 1000 battleships in one year, if PRC is superior in term of cost and toughness how can it be mass produced to sustain the construction project?
Comment: @JBH - Probably it is superior as regards cost per unit volume.  But if that is your only criterion I do not want to ride in your spaceship.
Comment: PRC isn't tougher (or more suitable in any way) to alloys in spacecraft construction.  Knowing this, are you asking the question from the perspective that no better material exists, and so could it be done with PRC?
Comment: @Willk, Is that cost per unit volume before or after you transported it into orbit?
Comment: @JBH Or rather, out to the orbit of Uranus from an area with a lot of silica...the asteroid belt would be a lot better.
Comment: Uranus has rings, right? I think that they might be able to get the raw materials relatively easily if they're mining those.
Comment: @nick012000, now we're talking!  If you were involved in a battle near the rings of Uranus, could you scrap the control components and raw metals from the derelicts and, mining the rings for their raw materials, create operable PRC hulls for all the crew you saved during the battle?  (User6760, we're having some comment fun... hope you don't mind.)
Comment: @Willk Military (or navy) travel in whatever they are told to travel in.
Comment: Someone's been there, done that. https://forums.spacebattles.com/threads/feasability-of-spaceships-made-of-concrete.185805/
Comment: concrete needs air to cure and it takes years to completely cure, if exposed to vacuum before it is completely cured the water will volitize.  so you need a giant bubble to make your ships and they can't leave them for years.
Comment: This might not be useful for Uranus, but have you considered the possibility of [plastic space hulls](http://www.observatorioplastico.com/ficheros/noticias/106147213731053639.pdf)?
Comment: @John Easily solved by coating the entire outside with a polymer paint or such.
Comment: That works afterwards, but the ship needs to be in an atmosphere for weeks to cure.
Comment: I am strongly leaning towards no but first I'd like to ask: Just how big is said battleship? What kind of engines and weapons are they using?
Answer: Could it be done?  Probably.  Does it make sense?  Probably not.1
It's certainly true that PRC could take the proverbial bullet better than what we would consider hull material today.2  However, there are some problems with the use of PRC.

Concrete is porous.  That means you can't cast it in space as space would freeze/suck-out all the water before the concrete cured.  It could also pose problems with high/warm humidity on the inside and cold/vacuum on the outside — but city-sized water storage tanks are built out of reinforced concrete, so maybe this isn't as important as I think it is.  Note that the cold vacuum of space will make the concrete brittle, meaning it'll shatter from outside impact more readily.

As a consequence of being porous (and the fact that cement isn't very hard, you can scrape dust off 100-year-old cement and dig small holes with the point of a knife), concrete isn't easy to hermetically seal under pressure.  Yes, you can do it, but those connection points will be serious weak spots.  Your hulls will want as few openings as possible.3

PRC is heavy.  That means using extra fuel to move it, turn it, anything-with-it.  It might be the most economical material to build with, but it will not be the most economical material to fly with.

Last, but not least, PRC can withstand a lot of force, if your only measure of success doesn't include cracking.  Cement is brittle, which is why we add aggregate to form concrete.  Concrete is also brittle, which is why we reinforce it with rebar to get reinforced concrete (RC).  RC is also brittle, which is why places like Texas require foundation slabs to use tensioned rebar — which is still brittle.  The reinforcement is what keeps buildings from falling over, but the moment the PRC cracks, everybody dies.4  Your ships might not be capable of fast acceleration (speeding up/down, turning) without cracking the concrete.

However, none of this completely exempts the use of PRC for spaceship hulls.
OK, so how can it be mass produced?
Herein is a big problem.  As Shekhar Shah, Ph.D Chemistry, Veer Narmad South Gujarat University, explains, cement (the basis of concrete) is actually a complex little process.  It requires:

Lime or calcium oxide, CaO: from limestone, chalk, shells, shale or calcareous rock
Silica, SiO2: from sand, old bottles, clay or argillaceous rock
Alumina, Al2O3: from bauxite, recycled aluminum, clay
Iron, Fe2O3: from from clay, iron ore, scrap iron and fly ash
Gypsum, CaSO4.2H20: found together with limestone

The materials, without the gypsum, are proportioned to produce a mixture with the desired chemical composition and then ground and blended by one of two processes - dry process or wet process. The materials are then fed through a kiln at 2,600º F to produce grayish-black pellets known as clinker. The alumina and iron act as fluxing agents which lower the melting point of silica from 3,000 to 2600º F. After this stage, the clinker is cooled, pulverized and gypsum added to regulate setting time. It is then ground extremely fine to produce cement.

The problem isn't that you couldn't have a starbase or some other enclosed cement-manufacturing facility.  The problem is whether or not Uranus' rings have all the constituent materials and whether or not it's practical to gather those materials.
I can't find a listing of whether or not all the components of cement can be found in Uranus' rings, but I'm going to go out on a limb and say they are not (big problem!).  Let's take limestone, for example:

Limestone is a sedimentary rock, which means it was formed from small particles of rock or stone that have been compacted by pressure. Sedimentary rock is important because it often contains fossils and gives clues about what type of rock was on the Earth long ago. Just like a tree's rings tell a lot about its environment, layers found in sedimentary rock can tell about important changes in the environment.
How is it formed?
Limestone is formed in two ways. It can be formed with the help of living organisms and by evaporation.
Ocean-dwelling organisms such as oysters, clams, mussels and coral use calcium carbonate (CaCO3) found in seawater to create their shells and bones. As these organisms die, their shells and bones are broken down by waves and settle on the ocean floor where they are compacted over millions of years, creating limestone from the sediments and the pressure of the ocean water.
The second way limestone is formed is when water containing particles of calcium carbonate evaporate, leaving behind the sediment deposit. The water pressure compacts the sediment, creating limestone. (Source)

When you boil that all down, limestone requires pressure and water — and while those rings might have come from something that was under pressure, it's unlikely they came from something that had sufficient water to complete the process.5  Bauxite and gypsum are low contenders, too.
Add to this the problem that most of Uranus' rings are dust, which would be a whomping pain in the neck to collect at the volumes you need, and the process of using PRC for spaceship hulls becomes impractical.6
Conclusion
While PRC could be used to build a spaceship, I do not believe it is an any way a practical solution to the problem — especially where combat is concerned.  Just the cost in fuel to compensate for the mass of the PRC is enough to justify not doing it.  Add to this the low likelihood of mineral access in Uranus' rings, then the effort needed to mine and process it, and this doesn't sound like a winner.
At the tech levels you're talking about it might be easier to collect the silica from the rings and make artificial diamond, which is also brittle, but not like concrete.

1 This is officially a frame challenge.  I do not believe it's possible to manufacture 1,000 warships a year in a practical way for practical purposes and therefore am not answering the OP's specific question.
2 It's worth noting that a combat-grade warship using future technology we haven't invented yet will probably use laminate materials (not unlike today's tanks) that would always be a better solution — in combat — than PRC.  Let's ignore this for now.
3 E.G., no portholes like you find in Star Trek or B5.  Think "General Products Hull #2" as you would find in various Larry Niven novels.
4 Yes, you could build a fluid/goo layer that auto-seals the crack when it forms, etc., but if you're going to go to all that effort just to use PRC, why use PRC in the first place?  Keep in mind that PRC will be (not might be, will be) thicker than an alloy laminate, which means it needs more fluid to solve the problem (it's not enough to say, "yeah, but the metal hull needs that, too").
5 Not that it wouldn't be UBER-COOL to find limestone in any planetary ring.  That's proof of non-terrestrial life.  Oh yeah, that would be cool!  Regrettably, that's basically why no ring is expected to have it.  You might find calcium, but you're using precious life-giving necessary-to-breathe oxygen to make Calcium oxide.
6 As you might imagine, creating a vacuum in the vacuum of space is challenging.  That means you're scooping the dust or using some form of electrostatic gathering process.  Complex, power-hungry, and messy.
Comment: @John, I don't disagree that some cements are much better than others, but *all* cements (used for concrete) are porous.  It's a byproduct of having to use water for the chemical catalyst.  If they weren't porous, they couldn't cure (via water evaporation and an exothermic process).
Comment: Not all concrete is porous common concrete is because the materials involved are the cheapest. also not all concretes age poorly, some age very well, https://www.ncptt.nps.gov/blog/university-concludes-100-year-concrete-study/
Comment: Concrete does not cure by evaporation, it cures via carbonation or hydration reactions depending on the type. You can completely cure hydraulic cement in a sealed container, just not in a vacuum because then the water does evaporate and rather quickly.
Comment: @John, Fair enough, I appreciate the clarification.
Comment: You are right about the porosity though, even hydraulic cement is still semi-porous, it works as a water barrier but I don't know how well it would hold up to vacuum..
Answer: You might be interested to know that this has been looked at, and it has been deemed feasible.

In 1981, Construction Technology Laboratories, a division of the
  Portland Cement Association, initiated a study of the feasibility of
  using concrete for structural components of a space station. The idea
  of using concrete in space may seem absurd to many scientists and
  engineers. Nevertheless, the study shows that concrete is not only
  suitable but also economical for space station construction.

Concrete: Potential Material for Space Station
Answer: JBH has provided an answer as to why concrete isn't the ideal material for spacecraft. While I agree with him that concrete isn't the way to go, I will expand on the OP's idea a bit.
Reading between the lines, the Uranus Space Navy (USN) is looking for a means of rapidly producing spacecraft hulls. Reasoning that using some sort of precast material will allow for faster spacecraft production than alternatives such as traditional metal construction or some form of 3D printing, we might be able to meet the desire of the USN in a number of ways:

Cast basalt.This basically takes lunar slag or similar materials and melts them. The molten material is injected into a mold to produce standard shapes, which can then be linked together. While cast basalt might not have much material advantage over concrete, a thick enough layer will provide radiation shielding and thermal mass to absorb incoming laser or particle beam fire, and even some resistance to kinetic energy from projectiles. This might work best layered over a metal, composite or ceramic hull.
Water. Remarkable as it sounds, a ship can be "built" simply and cheaply by essentially having one balloon of reinforced fabric placed inside a larger balloon and the inter-space filled with water. A layer of water 5m thick will provide radiation protection and thermal mass, and should be allowed to freeze into shape to provide structural strength. Mixing reinforcing material like fibre into the water will improve the strength, Project Habakkuk in WWII mixed wood pulp with water to create a reinforced ice which took three years to melt.

http://www.neofuel.com/iceship/iceship_isru_1998.html

Sintered regolith. Sintering is a less energy intensive manipulation which presses grains of material together with heat and pressure. The resulting material is strong but porous, providing a cheap shielding material to layer over existing hulls or installations, much like cast basalt.

So while the use of cast materials like regolith or ice might not provide an elegant solution, it is fast and inexpensive. Using these materials for their shielding properties and thermal mass is likely the best possible way of exploiting their properties, and if used as the basis of mass produced sacrificial "drone" ships, the USN could conceivably overwhelm their enemies with massive fleets of drones backed by a few manned ships with diplomats and Space Navy officers.


Singularities of flat manifolds

Question: Can a flat manifold have infinitely many singularities? Let me explain: I am working on riemannian geometry applied to thermodynamics. I am analyzing closed simple systems whose state of equilibrium states is a flat riemannian manifold. I solve the differential equation for the scalar curvature equal to zero and I assume that one of the components of the diagonalized metric is constant. The result is that the chosen coordinate system might have infinitely many singularities. Is this actually possible? Is there any topological/geometrical result that forbids this result I'm getting?
Comment: "Infinitely many" is ambiguous: are we talking about a countable number of isolated points, or a  submanifold of singularities? // Also, "flat" and "scalar curvature equal to zero" are not the same thing, unless we are in 2 dimensions. What is the dimension of your manifold? // I general, try to provide some precise statements/formulas along with your question.
Answer: Suppose that $(M,g)$ is a flat, complete, smooth Riemannian manifold.
If $N$ is a smooth manifold and there is a diffeomorphism $f: N \to M$, then
$(N, f^*g)$ is also a flat Riemannian manifold. Thus, the property of being
flat gives no control over "how bad" the metric looks in local coordinates.
For instance, choose a sequence of $C^{\infty}$ diffeomorphisms $f_i: M \to M$ so that
the limit $f_{\infty}$ is a diffeomorphism except on an infinite singular set. Then you have a sequence of smooth, flat metrics $f^*g_i$ that develop arbitrarily many singularities in rather arbitrary ways. The limiting "metric" is then a flat
metric with arbitrary coordinate singularities.

Singularities of flat manifolds


Use QSPI or QUAD SPI as a "normal" SPI?

Question: I need high speed SPI peripherals to control some SK9822 LED's (which can be clocked at up to 30 MHz, which I'd like to use (the speed is needed because of the LEDs being in motion)
So I searched for a MCU with 2 fast SPI's
I chose the STM32F446RE which does have 2 high speed SPI (SPI1 and SPI4), BUT SPI4 is not available on the LQFP64 package.
Now my problem is, that I control 2 "Stripes" of LED's and thus need 2x 30 MHz capable SPI interfaces. (or some interface with a clock and data pin, since the LED's only need clock and data, no MISO, only MOSI)
I searched for alternatives and found that there is a QSPI on the LQFP64 package, which would be fast enough (see page 130).(Link to the datasheet of the MCU)
Now my question is, is it possible to use QSPI as a "normal" SPI with the speed of 30 MHz?
If so, how would I program it?
Is there anything special to do or something like that?
(I only know SPI, never worked with QSPI)
Thank you in advance for your replies!
Comment: There is an application note specifically for QSPI, including information on single-SPI Mode, see https://www.st.com/resource/en/application_note/an4760-quadspi-interface-on-stm32-microcontrollers-and-microprocessors--stmicroelectronics.pdf
Answer: Based on the datasheet, 30 MHz should not be a problem:

If you used the SPI, using the QSPI will not be a problem at all for you. You may need to prepare the bits to be able to control the LEDs correctly.
Comment: Okey, yea that's what I saw too, it's fast enough

but I have no idea on how I'd send the proper data / what the differences of QSPI vs SPI are if I use it only for a CLK and MOSI signal

But good to know that it should be possible, thank you for your answer! :)

Use QSPI or QUAD SPI as a "normal" SPI?


How to short url in sharepoint 2013

Question: there is a limit of 255 chars on Url link.
Is there a way to short the link? (not using internet service)
Answer: Nothing OOTB available, but there are third-party tools to achieve this.
https://www.sharepointshorturl.com/
There is an interesting article about how to bypass
http://www.ixitapp.com/Blog/Post/20/How-to-bypass-SharePoint-URL-path-length-restrictions.  I am sure there might many others articles, but one of the recommendations you will get is avoid folder structure and use metadata. Since there is no workaround OOTB to change the limit. Some discussion here.
For SharePoint online, this has recently changed to 400 characters so this may roll to SharePoint 2013/2016 in the future.

How to short url in sharepoint 2013


Bach BWV 817: what do the slashes between the notes of a chord mean?

Question: In this Henle edition of BWV817 there are slashes between the notes of the chords in bars 1, 2, 3. What does this signify? I don't think I've seen this symbol anywhere else in the book. The editorial notes don't comment on bars 2, 3 at all.
Comment: I've been playing classical piano music since I was a kid, have played thousands of piano pieces, and I've never seen these sorts of lines in piano music to indicate separation of voices or otherwise. Haven't used Henle that much though. In any case, no idea what's going on.
Comment: Try harpsichord music!
Answer: They're intended as visual aids to clarify the voices.

In m. 1, it's a clarification that the top voice is dotted while the lower voice is not.
In m. 2, it's to make clear there are three voices, with the lowest voice having originated in the bass staff.
M. 3 has the lines for the same reason as m. 1.

There is another possibility. They may have been guide lines for the engraver that were mistakenly included in the engraving.
Answer: This is a slur.
As explained in the foreword to Henry Purcell: Suites, Lessons and Pieces for the Harpsichord (J&W Chester, London, 1919):

and that is indeed how it's played.
Comment: These marks don't seem to be in any of the sources, however.
Comment: Interesting. It does explain Schiff's performance, though not [Gould's](https://www.youtube.com/watch?v=FU93aA2M0H8) or [Landowska's](https://www.youtube.com/watch?v=jM2jnUnztZU), and Schiff plays it differently in [another recording](https://www.youtube.com/watch?v=92gUW3IrZDo). I've not encountered the marking in Bach before; I wonder where else it might show up in his keyboard music.


Analogy for an absurd way to teach something?

Question: I recently found out that someone is being taught the programming language Python to learn math. This seems quite absurd, and I could have sworn I had heard an analogy about something like this, but couldn't quite remember it.
Comment: IMO that's not absurd at all. In higher maths, it is helpful to know a scripting language or two to be able to automate lots of the tedious works that isn't directly relevant to whatever you're currently doing or to find solutions graphically/numerically/brute-forcely, which requires a lot of iterations. The language that is most often used for this purpose is [Mathematica](http://www.wolfram.com/mathematica/), but any language will do.
Comment: Is learning Python to learn maths any sillier than inventing the computer just to decide the Entscheidungsproblem?
Comment: I'm not sure it's that absurd!  Nothing teaches math like having a practical application for it.  But it certainly shouldn't be the only way to present the material.
Comment: Agreed here - it's not absurd at all - the practical application makes it worth it. I'll think of analogies though.
Answer: Using a sledgehammer to crack a nut is rather more general, but seems to fit what you're asking for.  It's a common analogy for "doing something more complicated than necessary to accomplish something comparatively simple".
(On the other hand, I'm not sure whether this situation really is an example.  If the maths in question is pretty simple, then it could be.  But for some areas of maths, having a good scripting language to play with examples could be very helpful indeed, especially if the person has prior programming experience and so can learn Python quite easily.)
Answer: Trying to "run before you walk"?
Answer: try an April Fool Result:

An AFR is an April Fool Result: a proof of a simple mathematical fact
  using much harder mathematics than needed. It is using sledge hammer
  to break a toothpick, or a blowtorch to light a candle.

You can find examples/analogies at this MathOverflow thread "Awfully sophisticated proof for simple facts":
The number one analogy for this would be, to quote Greg Kupberg:

"Yes, Fermat's Last Theorem is an important generalization of the fact
  that 2 ^ (1/n) is irrational. :-)"

here's also an nice example from Carl Linderholm's Mathematics Made Difficult (via Wikipedia):

As an example, the proof that two is a prime number starts: It is
  easily seen that the only numbers between 0 and 2, including 0 but
  excluding 2, are 0 and 1. Thus the remainder left by any number on
  division by 2 is either 0 or 1. Hence the quotient ring Z/2Z, where 2Z
  is the ideal in Z generated by 2, has only the elements [0] and [1],
  where these are the images of 0 and 1 under the canonical quotient
  map. Since [1] must be the unit of this ring, every element of this
  ring except [0] is a unit, and the ring is a field ...
Answer: Not exactly what you're looking for, but Albert Einstein once said "Education is what remains after one has forgotten everything one learned in school."
I don't know what particular math is being taught, but take the example of learning calculus by using a machine to do the derivatives and integrals. The reason high schools and colleges push calculus is not because it is useful in every day life, it is because learning calculus helps train (and test) your mind to 'think mathematically'. The student learns how to get the work done with a machine, but once he forgets there is nothing left.
Answer: Free to Bernard Shaw and applicable to above:
"He who can teach math, does. He who cannot, teaches Python."
Comment: This doesn't answer the question, and misunderstands Shaw's epigram.


Remap keys for one specific program under Linux

Question: How can I set keys to be remapped for one specific program in Linux? (More specifically Caps Lock -> Escape for gVim. I hit it accidentally too much to remap it in everything).
Answer: Autokey allows you to remap keys with window filters, and it's available in most distributions' repositories. As a bonus you can even map scripts to certain keypresses, it's pretty powerful. https://code.google.com/p/autokey/
Comment: Maintained of Autokey: https://github.com/autokey/autokey/wiki/Installing
Answer: Check Vim's wiki on wikia.com.

If you want to completely swap the
  Caps Lock and Escape keys, you have to
  replace the "Lock" on Caps Lock. Drop
  this file in your home directory:

<code>! Swap caps lock and escape
remove Lock = Caps_Lock
keysym Escape = Caps_Lock
keysym Caps_Lock = Escape
add Lock = Caps_Lock
</code>

and call it ".speedswapper". Then open
  a terminal and type

<code>$ xmodmap .speedswapper
</code>

The swapping lasts for the duration of
  the X session, so you can put it in a
  .xinitrc or similar startup file.

There are some other interesting alternative ESC mappings as well.
Comment: No good. I want it changed for vim only, while this changes it for everything.
Comment: AFAIK, it's not possible to do it inside vim because X catches the key stroke long before vi or vim can see it, that's why the official wiki doesn't have a vimrc approach. You should use an application outside vim that catches caps key on OS level (read http://stackoverflow.com/questions/2176532/how-to-map-caps-lock-key-in-vim for more information). You can try to use a bash script to turn on/off caps lock key when needed. http://dancingpenguinsoflight.com/2009/01/maps-caps-lock-key-to-escape/
Answer: you can write a simple bash script which can run the above mentioned solution whenever you run vim and remove the file after you close vlc.


vTiger What should be the best approach, customize Contacts or develop new module?

Question: I'm looking for someone that could give me some tips about the best approach in my vTigerCRM implementation.
I looked at Contacts module and most of fields existing there do not fit my needs.  I know that I can create custom fields, but the amount of custom fields would be greater than 30 fields.
Some existing fields, I would like to change the way that it's used. For example: in our scenario, the Contact name will be only 1 field. The module has 2 fields: First Name and Last Name.
I could not find a way to disable the First Name field.
Some existing fields on Contacts module would be changed (renaming the labels) using some language file, although this will work for a user perspective, in my developer perspective sounds inappropriate.
I have concerns too about the evolution of vTiger versions. If I change/customize the Contacts module, I think that I'll have issues when updating/migrating vTiger to newer versions.
The new entity would have most of relationships that Contacts actually has i.e. Activity (monitor mails sent, incoming calls, outgoing calls), Lead conversion, Opportunities, and so on.
I'm really worried about which way to go. If someone could comment this I'll be grateful.
Answer: I'm working on the implementation of vTiger for 3 months now and the first thing I'll tell you is to use the existing modules if possible.
You can modify the type of field you need to custom in vtiger_field by changing the uitype. Most of the time it will be easy, and there is some help on vtiger forums if you need to change a text field into a picklist for example.
Then you can hide the field you don't need by changing displaytype = 0, again in vtiger_field.
I migrated from 5.3 to 5.4 and in the process you provide your old database so this kind of changes are saved. I can't tell you for changes in the php code.
Hope it helps


To whom should I return my trophies

Question: In Witcher 3, the trophies description says that it can be returned for a reward but I am not sure who to return those trophies to.
Answer: Note: This vendor was patched in version 1.12 (released in January 2016). The alchemist no longer buys at 100% of cost. Leaving the answer up as it might be relevant to GoG purchasers who haven't patched.
The alchemist near Oxenfurt Gate (north east of Novigrad) will buy trophies from you, for a better price. He also sells extremely reasonably priced precious stone dust (and other alchemical ingredients).

He turns up at around 5am (you'll need to be outside of the building, otherwise he won't spawn).
He'll actually buy anything for it's full price, though he has a limited amount of Crowns.
Comment: That guy said "If anyone asks, you have not seen me" :-)
Answer: After killing the beast you usually return to the one that gave you the mission to collect your reward but you don't hand back the trophy to him/her, you just keep it yourself. You can then sell it or equip to buff some stat.

To whom should I return my trophies


Default caching behavior of IE 8 in absence of caching headers on SSL

Question: What is the default caching behavior of IE 8 in absence of caching headers? If no headers have been set from the server side, how would it cache the response, or will it follow no-cache by default? The connection is secured i.e. HTTPS.
I am facing this problem where I write byte stream in response and the headers which I set are -
response.setContentType("application/pdf;charset=utf-8;");
response.setHeader("Content-Length", server.getContentLength() + "");
response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
I know this fact that if a user tries to download a file over a HTTPS connection, any response headers that prevent caching will cause the file download process to fail in Internet Explorer, but in my case no headers for caching have been specified explicitly. Then also IE 8 says -
Unable to download.
Internet Explorer was unable to open this site. The requested site is either unavailable or cannot be found. Please try again later.
I am not getting the exact reason behind it. So, I can only make guesses about the default caching mechanism of IE 8. However it works fine in IE 9+ and in other browsers.
Answer: I found the exact reason for this. It was set by our own code, which does for every response for a particular request. So, now I know that these headers are set by us, and in the code which provides the export functionality, I just overrode them to work properly for IE 8 -
response.setHeader("Cache-Control", ""); // HTTP 1.1
response.setHeader("Pragma", ""); // HTTP 1.0


What is best Primary action UX writing for this scenario?

Question: What do you think about UX writing of primary action?  should be named as just Add or Add holidays. For me Add doesn't give clues to the user about what going to add.
Answer: I feel like it's always a better idea to give more context for buttons, unless you start putting paragraphs of text as their labels - they still need to stay scannable. Two to three words should be fine.
The argument in your case could be:

The label for the whole form is "Add holidays", so why would we duplicate the label on the button?

But if we consider that users would probably spend more than a second in this form, defining all the holidays, using a more context-aware label could be useful - less chance of users getting confused without any real downsides.
For more tips, check these articles:

https://medium.com/sainsburys-customer-experience/a-quick-guide-to-writing-better-button-labels-69daecff3497
https://uxmovement.com/buttons/5-rules-for-choosing-the-right-words-on-button-labels/

P.S. On an unrelated note, I noticed that the inputs for the holiday are in the order Name - Date, but added values are the other way around: Date - Name. It's usually a good idea to use the same order in both cases - this way you'll lower the unnecessary cognitive load.
Comment: Thank you! P.S. Thank for the correction.
Answer: Giving more context is always better. It creates a consistent and lighter cognitive load if the main CTA and the page title are connected. Especially given there's enough space. I would suggest adding the count as well (how many holidays will be added) to give the user more confirmation.


Schengen Visa for Syrian citizen

Question: I would like to have a Schengen Visa for my honeymoon. Is it possible to have a Schengen Visa now for me and my husband as Syria citizens? We have money and people who can send us an invitation, what is the possibility and what requirements should my husband and I fulfill?
Comment: Exactly where are you planning to go. At least some Schengen countries are currently not having an operating consulate in Syria due to the unrest, so even if you in theory can apply for and be granted a Schengen visa, you may in practice have problems doing so, e.g. by having to go to Lebanon or Turkey to apply for the Schengen visa, which again may be difficult under the current circumstances.
Comment: @Tor-EinarJarnbjo Not all Syrian citzens live in Syria, of course.
Answer: As far as I can see, yes, you can get a Schengen visa. I went to the French government visa website and filled in the form to see if somebody travelling on a Syrian passport would need a visa for a short stay and it said "You need a visa [unless, e.g., you're also an EU citizen]." I assume that, if Syrian citizens were ineligible for Schengen visas, it would have said something like "You cannot get a visa."
You can find the requirements on the application website for the country you wish to visit. Note that, for an ordinary tourist visit such as a honeymoon, you don't need to be invited by anybody.
Answer: From the questions we see here I come to the conclusion that strong ties to your home country are very important, as is a good pattern of income which is more than enough to cover your needs at home.
No embassy has that in its online publications, as far as I know, but when you look at the questions of people who did not get a visa, problem with one of those are very common.
Comment: Note that "home country" in this case means your country of residence, not necessarily your country of nationality. So if you're living in a country other than Syria, you don't have to prove strong ties to Syria. Basically, "strong ties" means "you have a good reason to leave Schengen at the end of your honeymoon", such as having jobs in your home country.

Schengen Visa for Syrian citizen


why does consumption not have a positive multiplier?

Question: My tutor said that only $I$, $G$, $X-M$ in AD can include a multiplier and that consumption does not create a multiplier effect. I understand that these factors affect my ability to consume and that one of these factors changing will affect my income and affect my MPC and create a multiplier. But, what if i take a loan? am i not creating further rounds of spending? I am increasing demand and increasing retailer incomes and increasing further rounds of spending so how is it not a multiplier?
Comment: Hi anon, can you provide more context to your question? E.g. it seems like you're referring to the IS-LM or AS-AD models. Maybe you can also provide the equation to which your questions refers.
Answer: I think either you misunderstood your tutor or they were not clear.
What they likely meant was that increase in total $C$ won't be multiplied by multiplier. I think this is best seen mathematically. I will omit X-N to simplify the math a bit and use the AD in an closed economy:
$$Y= C+I+G$$
Next what your tutor assumes implicitly is that both $I$ and $G$ are exogenously given, this is standard simplification assumption for beginners but it's worth while noting that especially for $I$ this is generally not the case.
Next consumption depends on net income and it will be given by:
$$ C(Y-T)= c_0 +c_1 (Y-T)$$
Where $c_0$ is autonomous consumption (special type of consumption that does not depend on income) $c_1$ is marginal propensity to consume, $Y$ is the aggregate income which is macroeconomically equivalent to AD and output, finally T are taxes (taxes are sometimes also dropped to simplify things for students so maybe you were not introduced to them).
So now our model looks like this:
$$Y= c_0 +c_1 (Y-T)+I+G$$
Since $Y$ is on both sides of equation we first have to solve for $Y$ to see clearly the effect different variables have on $Y$. Using simple algebra we find:
$$Y= \frac{1}{1-c_1}\left(c_0 +I + G - c_1 T\right)$$
The fraction $\frac{1}{1-c_1}$ is the multiplier, and only variables in the bracket affect the AD via the multiplier. As you can see in bracket there is no $C$ because $C$ was endogenous and dependent on income so it is not $C$ that drives higher income/AD but higher income/AD itself. There is self reinforcing loop, although this effect gets smaller through each circle (since MPC cannot be bigger than 1).
However, what I think your tutor did not appropriately explain is that AD still depends on the autonomous portion of consumption $c_0$. So some consumption does have this effect, but if we talk about aggregate consumption $C$ then no because $C$ is ultimately driven by $Y$.
Next you are probably asking why $I$ isn't also driven by $I$ and that's a good question, in real life it almost certainly is, save some special circumstances like liquidity trap, but in class when you learn the model for the first time $I$ will be assumed independent of income so the model solves easier. Later on you will see that when $I$ will be dropped from the solution.


how can I start Internet Explorer 10 always in kiosk-mode?

Question: I 'll use a win7 computer as an information terminal. After its startup internet explorer is starting up in kiosk mode with the wanted side. The use of hotkeys like windows button, ctrl c etc is disabled. When I click for further information on this page (which isn't created by myself) the browser starts a new window and the whole ie-menu is available.
How can I setup this browser, that every ie-window is starting up in kiosk mode?
Comment: So the page the kiosk is pointing at has a link that is causing a pop-up that has all the browser controls available in it?  Perhaps use a pop-up blocker, or better, don't use a standard browser?
Comment: @fepi: How are you disabling hotkeys? I don't think kiosk mode does this itself.
Comment: I 've found a usefull link which explains how to do it, but it's in German http://www.youtube.com/watch?v=rBvYy7D3hZk
Comment: @fepi: Did my answer work for you?
Answer:
Firstly, run the Group Policy Editor by clicking the Start button and
choosing Run... or pressing Windows Key + R and typing gpedit.msc followed by Enter
In the left hand pane go to Computer Configuration -> Administrative Templates -> Windows Components -> Internet Explorer
Find the entry Enforce full-screen mode and double-click it
Set it to Enabled and click the OK button

Note that users can still open new windows but they will lack all menus etc.
Also I would say that the security of such a system still isn't great. If your users have access to a keyboard and mouse connected to the machine then they might still be able to bypass your efforts to secure it.
Answer: To start IE in kiosk mode, run iexplore.exe -k "C:\path\to\\webpage.html"
From Microsoft:

To start Internet Explorer in Kiosk mode, click Start, click Run, type the following command in the Open box, and then click OK
iexplore -k page
where page is the Web page address for the Web page that you want to appear when Internet Explorer starts. If you do not specify a Web page in the Open box, Internet Explorer opens your start page. Note that the Web page that you specify can be a Web page on the Internet, on your computer, or on another computer on the network.


Blender 2.8. Export material

Question: I made this water material and I was wondering how to export this material to use in other projects. Haven't find a concrete answer to this for some reason.
Comment: Do you want to export it to other projects within blender or other projects in a different piece of software?
Comment: In Blender, you don't export and import materials (or any other type of object). You either [link or append](https://docs.blender.org/manual/en/latest/data_system/linked_libraries.html) them.
Answer: Shaders are implementation specific, and there are no real standards as to how to process, store, or describe them.  Blender uses a variant of OSL for cycles, and a slightly different version for EEVEE.  Unity uses DirectX (HLSL) and OpenGL (OGLSL) shaders (based on the target platform), Unreal can do something similar.  Substance uses a proprietary format for their PBR shading.
Occasionally, if two tools are widely used, the parties involved will make a bridge between the two.  However, without knowing what you are trying to export to, we cannot give much advice.

Blender 2.8. Export material


How to deal with annotation errors?

Question: I know my annotators are not perfect, sometimes making mistakes. What would be the best way to deal with the annotation errors for my training data?
Answer: It's very common to have some amount of errors or inconsistencies in a dataset. Sometimes these inconsistencies are not even errors, in some subjective tasks (e.g. translation), annotators may simply not agree on what is the best answer.
What to do with this kind of noise completely depends on the case at hand. If the noise caused by these errors represents a reasonably small proportion of the data, it can safely be ignored: in this case it's up to the learning algorithm to distinguish the relevant patterns from the noise. Otherwise there can be ad-hoc pre-processing implemented to clean up the data. In cases where the subjectivity of the annotator plays an important role, it's useful to have several annotators annotated the same data and check the inter-annotator agreement. This might in turn be used to filter out the least consensual instances, or aggregate the annotations in some way (e.g. majority voting).

How to deal with annotation errors?


How to hide an exposed filter block if the view results are empty?

Question: I have an exposed filter block on the sidebar on my page. I want to hide the exposed filter block if the result of the view is empty. What is the best was to do it ?
Right now i am having some Jquery code in a no result behaviour textfield wich hides some block elements. But i dont like this solution. I prefer if the code is clean and the html code is completely removed.
Comment: https://drupal.org/node/1343430
Answer: @pierre's answer is a good one, however $view->total_rows is not always populated.
So you could do something like this instead, which will work no matter what:
function MODULE_views_pre_render(&$view) {
  if ($view->name == 'VIEW_NAME' && $view->current_display == 'DISPLAY_NAME') {
    if (empty($view->result) && empty($view->getExposedInput())) {
      $view->exposed_widgets = NULL;
    }
  }
}

Comment: This solution worked for my use case.
Answer: In a custom module, implements hook_form_FORM_ID_alter() for the views_exposed_form form. Start by checking if the form is the one from your view and display, then set its #access property FALSE if the views has no results.
function MODULE_form_views_exposed_form_alter (&$form, &$form_state) {
  $view = &$form_state['view'];
  if ($view->name == VIEW_NAME && $view->current_display == DISPLAY_NAME) {
    if (empty($view->total_rows)) {
      $form['#access'] = FALSE;
    }
  }
}

Comment: Most likely $view->name doesn't exist any more, so $view->id() can be used instead.
Answer: The above suggestions for [function MODULE_form_views_exposed_form_alter(&$form, &$form_state)] are helpful if you want to hide the exposed filters whether or not the results will showing.
So according to yours requirement you can hide filters when no result will found using below code-:
function hook_views_pre_render(&$view){
  if($view->name == VIEW_NAME){
    if(empty($view->result) && isset($view->exposed_widgets)){
        $view->exposed_widgets = FALSE;
      }
   }
}

Answer: Just one quick correction for Drupal 9 to avoid having the warning:

Warning: Parameter 1 to hook_views_views_pre_render() expected to be a reference, value given.

use Drupal\views\ViewExecutable;

/**
 * Implements hook_views_views_pre_render().
 */
function agi_views_views_pre_render(ViewExecutable $view) {
  if ($view->id() === 'view_id'){
    if (empty($view->result) && isset($view->exposed_widgets)) {
      $view->exposed_widgets = FALSE;
    }
  }
}
Answer: Answer provided by @Juyal Jee is generally correct, but probably outdated. $view->name variable doesn't exist any more. Insted $view->id() method can be used:
function hook_views_pre_render(&$view){
  if($view->id() == VIEW_NAME){
    if(empty($view->result) && isset($view->exposed_widgets)){
      $view->exposed_widgets = FALSE;
    }
  }
}

Answer: To my surprise, adding a Global: Result summary field in the Header seems to have changed the block behavior.
Before, the block showed on the page with only the Title search box visible. Immediately after I saved the new field, the block stopped showing.
My answer is obviously very unscientific, and I've not tested thoroughly. Are others experiencing the same magic?
Answer:
Go to the advanced tab of you view
Add contextual filters
Select Global: Null
When the filter value is NOT available: Select 'Hide view'
Comment: Its not working. The View is gone, but the exposed filter block is still there!
Comment: Here is a detailed guide: http://www.agentic.ca/blog/suppressing-views-exposed-filter-output-until-user-enters-search-terms
Comment: The answer is incomplete and misses several steps from the referenced article.
Comment: For what it's worth, looks like this answer is from https://www.drupal.org/forum/support/post-installation/2011-11-16/hide-block-if-view-is-empty#comment-5254336 and people found it helpful. @astha, are you the author of that comment, too? If so, you have my upvote even though your (useful!) answer does not completely solve the issue for me.


What is the difference between wisdom and clarity?

Question: I am asking this question here because wisdom is related to philosophy. I want to know, is wisdom the same as seeing things clearly? Or is there a difference between wisdom and clarity? If so, what is the difference?
Comment: A smart person learns from their mistakes. A wise person learns from the mistakes of others. Wisdom is not required to achieve clarity but it's less painful.
Answer: Clarity is an easier concept to define. It means seeing things clearly, distinctly and accurately. Wisdom is more ambiguous. One useful gloss on the idea is that if knowledge is knowing "how" to do things, wisdom is knowing "why" to do OR not do things. Wisdom is considered as good judgement, making good decisions, acting in ways that are effective and beneficial.
Clarity is a great support to wisdom, and wisdom can bring clarity. But they are distinctly different things. You can have clarity without wisdom (you can understand a situation, but still make the wrong decision) or wisdom without clarity (as when you need to make a good decision in an unclear situation). Similarly, clarity can help build knowledge, and knowledge can help bring clarity, but they are not the same as each other, nor is knowledge the same as wisdom (the well-educated person can still make bad mistakes in judgement).
In the Platonic/neo-Platonic cosmology, Wisdom is one of the Greater Forms, along with Love, Truth and Beauty, which are all variants on the greatest form, the Ideal of Good.
Answer: The history of philosophy does not provide a unique, sharp definition of wisdom (Greek: sophia). See an overview of several meanings of wisdom.
IMO wisdom may be considered the capability to reflect his/her experiences in life. So the concept makes two presuppositions:

The person has reached a certain age and made a series of experiences.
The person reflects and assesses these experiences.

A wise person searches for clarity about his/her experiences and their importance in his life. But wisdom covers more than clarity and also more than knowledge.


How does the DMA know "when to send" the next byte?

Question: I'm transferring data from memory to a peripherial's register in an STM32 uC. For example take 20 bytes. I understand that after sending all the 20 bytes, the "Transfer Complete" interrupt will occur. My question is: between individual bytes (e.g. 4th and 5th) how does the DMA know when it is time to send the next byte? How does it adjust its   speed?
Comment: DMA is usually interrupt-controlled. So if you send memory to a peripheral, it will be controlled by some "byte transfer complete" interrupt strobe (well, it's not an actual interrupt in case of DMA, just a control signal).
Comment: In the STM32 micros that I've worked with, the peripheral's "transfer complete" bit (under a different name, like TXE or RXNE) is connected to the DMA engine.  This lets the DMA know that the peripheral is ready for a data transaction.
Answer: It works both ways. When receiving, the peripheral signals the DMA controller it should read a byte. When transmitting, the peripheral signals to DMA controller when it should write a byte.
Answer: This is a complicated topic. STM32 has a very advanced I/O ARM Cortex architecture. Peripheral devices are connected to "bus matrix" (or "switch fabric") via a set of "AHB/AXI" busses. Take a look at 1/4 of the STM32H750 block diagram:

Each bus has local hardware means to arbitrate the access to it, so this is one of the mechanisms that regulates the rate of atomic transfers. The other mechanism is built into FIFO (First In First Out) buffers associated with each DMA channel. Each FIFO usually operates by "watermarks", which indicate the fill level of the buffer. If the buffer reaches certain pre-configured level, DMA engine starts to transfer intermediate bytes; when the level drops, DMA temporarily stops. The other end of FIFO is filled by an interface to a peripheral device, which usually also has some buffers, and local hardware state machines provide the data transfer as conditions permit. So the DMA engine "knows" when to transmit intermediate data when a set of flags/semaphores along the long chain of interfaces when they give it "green light". Obviously no "interrupts" are involved in this chain of handshakes, this is the entire idea of DMA (aka "Bus Mastering"), only the end of entire transaction is signaled by an interrupt (or/and by a status flag), so a software can reload the DMA pointers.


How to gamify a mentoring activity?

Question: I am working on an app where we are aiming to develop peer to peer training. How could we gamify the learning process to make it more fun?
Comment: Can you elaborate on what you mean on peer training? What are the goals of the application? What kin of things did you have in mind?
Answer: For starters, I think it's a good idea to provide rewards for both students and mentors. As an example: Mentors could receive rewards for answering questions by students, while students receive rewards for solving exercises. Furthermore, the mentor should be able to give rewards for good questions etc.
Actually, it's quite a bit like Stack Exchange, if you think about it. Only, without exercises and without the ability to directly ask one particular teacher who can be rewarded for answering and also reward you for a good question.
Another idea that pops up immediately, is to have team or group exercises with predefined roles. For example, if the exercises includes writing a calendar program (like Google calendar). One person could be responsible for graphical design, one for coordination etc.
This is maybe not an ideal scenario since a task like that would be quite extensive but I think you get the picture.
In general, I think it's not that difficult to represent the traditional relation between student and mentor. This system is, in a sense, already includes rewards. However, the difference between the traditional system and an app like yours is really the possibility to engage in learning because you feel interest or curiosity about the subject. Having someone who can help and reward you only fuels the intrinsic motivation you already have. In that sense, I believe what really counts is that a system like the one you outline offers a sense of security for the student. The gamification is mostly based on extrinsic motivation and as such only an added bonus. The ability to connect based on interest and the desire to learn is what really makes the difference, I think.
I recommend the documentary 'Alphabet' which recently premiered. In this film, there is also a high emphasis on learning as a game, even though it may not exactly be what you're looking for, it might nevertheless provide some inspiration.
Answer: The game mechanics playdeck from tech startup SCVNGR gives 50 great starting points.
Perhaps more directly relevant to the SE CogSci audience is the Mental Notes project, which aims to "bring a little psychology to Web design [...] each card describes one insight into human behavior and suggests ways to apply this to the design of Web sites, Web apps, and software applications.".
Comment: welcome to the site, I don't think the [cogsci.se] audience has any preferences towards web based design or programming, that's a hang over from [so]. :)
Comment: I meant more that it specifically references psychology, rather than just the implied psychological connection of game mechanics :-)
Comment: oh lol, u can tell I didn't read thoroughly. cheers.  *caught out* :)

How to gamify a mentoring activity?


Data Category VS Article Type

Question: I am looking for the difference between the two - dont both do the same job iei classify the articles and the access to them?
Answer: I will take a stab at a non technical way to think about it. Article types are used to define different kinds of articles, from a simple FAQ to a complex procedure including the fields available and layouts to use per channel the article might be viewed in. As you rightly noted you can control visibility of article types at a user profile level or via permission sets.
When you search the knowledge base data categories come into play. search results can be refined to more relevant results quickly using data categories. For example, if you had 10000 faq articles on Italy, your profile might have access to those 10000 articles because your user profile permits you to see faq's. Using data categories at an article level, you attribute categories of 'north' (geography data category), 'accommodation' ( type data category) and 'summer' (season data category) to a particular article. If you filtered the faqs by one or more of these categories you'd quickly zero in on the relevant article for summer accommodation in northern italy.
Making more sense ?
Comment: Thanks for the reply. So, are you saying that we cannot control access using data category? and that only article type controls that?
Comment: Not exactly - sorry if am not clear. I propose article types are how you control access to types of articles and data categories are to manage relevance of results during search. Does that make more sense ?

Data Category VS Article Type


"clientless" rdp session to windows 7 professional

Question: I am currently automating the installation of a legacy windows 7 application, that requires a desktop session on the target machine. We are currently setting up automated testing system (using Jenkins) that requires that the desktop app be started and running in a gui session.
This is currently done with a manual step to login to a console with "remote desktop to port 3389" and start this desktop app, however as soon as I try to script this configuration, I run into the problem of needing a GUI app for my rdp tool on the client side.
The application is effectively running as a server, but has a gui that needs to be available within a console or rdesktop session.
Is there a configuration for one of the RDP client tools (for linux or windows) that can connect to the running Rdp server, login and start a session (with no x-server, or local gui app)
Possible solutions

Guacamole is a "clientless" rdp gateway, so I think it might be possible to script it to make an initial connection automatically, which is sufficient for my purposes (though it seems pretty heavyweight)
python rdp library;    https://github.com/citronneur/rdpy
Use the Rdesktop in "bitmap" mode, so it streams the remote session to "disk", rather than to a x-server.
Comment: Would something like this work [PS Open RDP](https://gallery.technet.microsoft.com/scriptcenter/Connect-Mstsc-Open-RDP-2064b10b)?
Answer: This sounds like a possible scenario to use something like Powershell remoting to execute a background process and launch your GUI app.
If you need an actual login session it is probably best to simply enable AutoLogin via the registry.


iCloud drive taking 58 GB on my internal SSD. Why is that?

Question: I have read online, from multiple sources, that icloud drive is like Google drive or Dropbox, so why would iCloud drive take up 58 GB on my internal drive. I thought putting files in the iCloud drive was storing them in the cloud.  Google drive and Dropbox doesn't take up a lot of space on my internal drive. Why is iCloud Drive using so much space on my internal drive?
Answer: Depending on settings, for both Dropbox and iCloud the files may continue to take up space on the originating computer, and on any computer that has been "synced" to allow offline usage of the files.
For iCloud you control this behavior by the storage preferences:
Open "About This Mac" from the Apple () menu, then click Storage. There is an overview of your free space, space used by different types of files, and options for optimizing usage.
Answer: iCloud is different from Google and Dropbox in that it's not primarily an external storage; it's a syncing solution.
This means that files you put in iCloud are available and accessible from every device that's signed in from that same Apple ID.
To do this, it has to keep a purgeable copy of your data in each device.  It will periodically sync changes to the files across all your devices.
So you can use iCloud like you use Dropbox and Google but those service have a fundamentally different purpose than iCloud.
Answer: MacWorld says (and I seem to recall hearing the same) that the files stored in iCloud on your local drive are essentially a local cache and as such generally purgeable if you start running out of space on your local drive.
Basically it is there to give you faster access to some files, and on the chance that you need one of those files when you have no network.
Comment: But doesn't that defeat the purpose of having an additional storage area. I bet many people used the iCloud drive thinking it would free up space on their internal drive? I did.
Comment: If you run out of space those files are deleted by macOS as the canonical versions are on the iCloud servers.


how do you make an app ONLY support landscape?

Question: how do you make an app ONLY support landscape? No portrait mode JUST  landscape throughout the whole thing in xcode 3?
Answer: The accepted answer did not work for me. This did:
In the properties file for your app (YOURAPPNAME-Info.plist), located in the "supporting files" group, there is an array called "Supported interface orientations". Remove the orientations you don't want from the array, and your app will be locked into the remaining orientation.
Answer: My naive answer is to add this method in all of your root view controllers:
<code>- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    if (interfaceOrientation==UIInterfaceOrientationLandscapeLeft || interfaceOrientation==UIInterfaceOrientationLandscapeRight)
        return YES;

    return NO;
}
</code>
This is what I do in my game.  Of course, my game only has one view controller.
Also, I found it helpful to set "Initial interface orientation" in my app's info.plist to Landscape.
Answer: You can change the Supported interface orientations in your info.plist file, as shown below:
Answer: Orientations are now easily set using the target's summary tab.
Answer: We can change the orientation by simply selecting the required orientations as well. Select the device from "devices" and change the orientation


Solving exponential equation (quadratic type)

Question: I fail trying to solve the following equation:
$9^x-6^x-2^{2x+1}=0$

Trying to write it as a quadratic equation makes my constant term exponential
$(3^x)^2-2^x3^x-2^{2x+1}=0$

How can I solve this type of problem most efficiently?
Answer: \begin{align*}
  9^x-6^x-2^{2x+1} &=0 \\
  (\color{red}{3^x})^2-(\color{red}{3^x})(\color{blue}{2^x})-
  2(\color{blue}{2^x})^2 &=0 \\
  (\color{red}{3^x}+\color{blue}{2^x})
  (\color{red}{3^x}-2\cdot \color{blue}{2^x}) &= 0
\end{align*}
Rejecting $\color{red}{3^x}+\color{blue}{2^x}=0$, we have
\begin{align*}
  \left( \frac{3}{2} \right)^{x} &= 2 \\
  x(\ln 3-\ln 2) &= \ln 2 \\
  x &= \frac{\ln 2}{\ln 3-\ln 2}
\end{align*}
Comment: Replace $3^x$ by $a$ and $2^x$ by $b$, you have $a^2-ab-2b^2=(a+b)(a-2b)$.
Comment: How do you go from row nr2 to row nr3?, the last factoring there?
Answer: dividing by $$2^{2x}$$ we get $$\left(\frac{3^x}{2^x}\right)^2-\frac{3^x}{2^x}-2=0$$ and set $$t=\frac{3^x}{2^x}$$ and you will get an quadratic equation.


Would it be okay to top up manual transmission fluid (GearOil) when engine is hot

Question: Title Pretty much explains the question, would it be okay to do this when the engine is hot. the gearbox would also be hot obviously.
Comment: @SolarMike - The OP is asking about a manual transmission ... what you are describing is for an automatic. Running through the gears on a manual won't change a thing.
Comment: What make/model/engine are you wondering about? The reason I ask is, depending on the vehicle, the answer may be different.
Comment: As @Paulster says we need to know the vehicle as some are topped up with engine running after cycling through the gears either hot or cold, others when engine not running and all variations between.
Comment: My apologies, it's a 2007 ford fiesta.
Comment: Apologies for mis-reading... If it is a mk6 then this link gives lots of info : http://www.fordownersclub.com/forums/topic/12648-fiesta-mk6-gearbox-filler/
Answer: Yes
It's sort of like an oil change after driving around a bit. The only real concern is burning yourself.
Of course, this being the transmission, you are less likely to burn yourself because "hot" for a manual transmission isn't really that hot. The oil is subjected to extremely high pressures (between gear teeth) but nothing that's combusting.
Just remember to always remove the fill port bolt before the drain plug if you decide to drain and refill. I do also wonder why you need to "top up" MTF... It's normally a sealed system.
Comment: Very good points, all. +1.


I can't find TOR icon or app

Question: I want to uninstall TOR but I can't find it. It's not listed in Control Panel - Programs and Features. None of the explanations I've read work. It's still on my computer somewhere because at odd times, when I try to use a url for a web site, the screen goes black and a garbled string of characters appears in the address bar. Any suggestions as to what I can do do to help me find it will be greatly appreciated.
Answer: Tor Browser does not get installed in the way that most programs do, so it doesn't appear in "Programs and Features". You can simply delete the "Tor Browser" folder to remove/uninstall it.
https://tb-manual.torproject.org/uninstalling/

Removing Tor Browser from your system is simple:
On Windows:

Locate your Tor Browser folder or application. The default location is the Desktop.
Delete the Tor Browser folder or application.
Empty your Trash.

[...]
Note that your operating system's standard "Uninstall" utility is not used.

when I try to use a url for a web site, the screen goes black and a garbled string of characters appears in the address bar

This sounds like something unrelated to Tor Browser. You should make a new post with a screenshot and more details, and maybe someone will be able to help with that issue specifically.

I can't find TOR icon or app


Integrity verification has failed

Question: Hi my Samsung J7 Prime just stuck on The integrity verification has failed. You need to reset your device to factory default settings. This will erase your data. i dont want to reset the phone because my data is important on the phone please help me what to do without losing the data ?? please please please
Comment: descripe what actions you did to get integrity verification failed
Answer: I really hate to be the bearer of bad news, but if you have an integrity failure, you probably wouldn't want to boot your device even if you could.
Allow me to explain. The "integrity failed" message means that a part of your system has been modified and might not be safe to boot. It might have been modified by a malicious app, program, or it could have just been you trying to root your device. (If it's the last one, please make sure you follow all directions by whatever guide you are using to root your device in order to make sure that stuff like this doesn't happen).
Unfortunately, what this means for you is you are going to have to reset your device. It is a security feature built into android, so it's best you follow it's direction. I know how this feels, it sucks, but its just the case with this error. Make sure in the future that you keep backups of any important data.
If you don't read any other part of this answer, please read this:
If you reset your device and the error continues, STOP! Unless you know what you are doing, this error can be very difficult to correct on your own, and easy to make worse for yourself. Instead, take your phone into a repair shop or your carrier to have them fix it.
If I'm completely getting your situation wrong, please let me know any additional information you have and I will try to update my answer accordingly. Best of luck to you.
Comment: it may possible to fix without erasing userdata. usually official stock ROM can be flashed with glass echidna heimdall or odin. maybe the device is already rooted and it just requires disable dm-verity. but @KazimAhmed didn't tell us the reason for integrity fail, so it's all speculation
Comment: Yeah the answer I gave was assuming he has no idea what caused it.

Integrity verification has failed


Asp.NET: UserControl's BubbleEvent not being handled by repeater or page

Question: I have a user control inside of a repeater.  The user control has an ImageButton, which when clicked, should raise an event to the page which will handle the event:
<code>//Button onClick event in user control
protected void btnOpenOption_Click(object sender, ImageClickEventArgs e)
{
    RaiseBubbleEvent(sender, e);
}
</code>
The following are two methods on the page.  One to handle a BubbleEvent from a child control, the other to handle the repeater's ItemEvent command:
<code>protected void rptProcessOptions_ItemCommand(object source, RepeaterCommandEventArgs e)
{
    //do something...
}

protected override bool OnBubbleEvent(object source, EventArgs args)
{
    //do something else...
}
</code>
I've read that the repeater ItemCommand handler should listen for the BubbleEvent from the child control and subsequently handle it, but it's not.  The OnBubbleEvent handler on the page is not picking it up either.  In other words, the event is just getting lost.  I know it's firing because I can see that when I step through in the debugger.
I've used RaiseBubbleEvent before successfully, but never inside a repeater, so I'm not sure if what I'm attempting is correct.  Any thoughts?
Answer: ItemCommand is only fired if the EventArgs is an instance of RepeaterCommandEventArgs.


What's up with the white knight in the forest of the lost giants?

Question: Relatively early in the forest of the lost giants you climb up a ladder and there sits a white knight beneath a tree. He looks like an NPC, he does not attack or react in any way, but there is also no talk-prompt for me to use. What's up with this guy?
Answer: He is a Heide knight. There are several of them in the game and he won't attack you until you attack him. He's not a regular NPC and doesn't talk, but he is much stronger than the other enemies and if you kill him, you get a good weapon. As far as I know, they are just normal enemies and offer no other possibility of interaction but killing them.
Comment: Ah, okay. It felt just so unusual for a DS game to have someone who does not attack on sight, yet can't be spoken to.
Comment: They are different from normal enemies: They do not respawn and have scripted drops.
Answer: There are 3 in the game. All of them are non-hostile, unless provoked. Especially the one in Forest of Fallen Giants can prove a huge challenge to new players, because of its wide range and immense damage.
'They' are called Heide Knights.
The first one you encounter will most likely be in the Forest of Fallen Giants, 2 more are found in The Lost Bastille and Shrine of Winter.
In normal mode, they drop the weapons Heide Knight Sword, Heide Spear and Heide Lance.
If you play on NG+ or use a Bonfire Ascetic, you will receive parts of the Heide Knight Armour Set.


Is ritual always a practice, or can it be a belief too?

Question: If ritual is repetition outside of what can be justified through direct experience, can ideas and opinions, as well as words and actions, be ritualistic? Would a belief in God - given the axiomatic impossibility to verify the entity directly - classify as ritual?
Answer: Till the experience of clear seeing and knowing, realizing, what ever deed by body, speech and mind is good to considered as a habitual ritual, householder Ilya Grushevskiy and interested.
Ways of belief, expecting certain happiness and release, to the extend of not knowing, not clear seeing, are rituals.
In regard of abounding the fetter of ritual toward an aspiration headed to Nibbana it requires the knowledge of the path through realization. Relaying on this, it's also again practiced as ritual (habitual) but no more destined toward anything else as well as raw rituals not headed toward the aim have been abounded.
The same, of course, would count also for the path into the Brahma-realms, if realized once.
To possible understand the underlying point as well: believing is an action (mental), a practice, as well, and the foremost in becoming also signs and physical deeds, rituals. Usually the word ritual is used for practice that would not really cause the desired effect (i.e. actually: mind is one, sign, physical another). Sometimes ritual refers also to holding on certain actions by signs and deeds although the mind might not be directed at it's purpose, perceived as habitual only outwardly.
(Note that this gift of Dhamma is not dedicated for trade, exchange, stacks or entertainment but as a means to make merits toward release from this wheel)
Answer: I get the impression (e.g. from this answer) that a "belief" might (instead) be classified as a "view".
The word you're asking about might be sīlabbata -- using a quick search of Google I saw several discussions of that, but didn't notice references to suttas where the term is clearly defined.
The PTS dictionary says,

bbata [=vata2] good works and ceremonial observances Dh 271; A i.225; S iv.118; Ud 71; Sn 231, etc.; sīlavata the same Sn 212, 782, 790, 797, 803, 899; It 79

Given that the word includes sīla I assume that, like the precepts, it implies some element of behaviour and not only of view.
I think the two (i.e. "belief" and "practice") might be equated by some Christian sects, e.g. "the only thing you have to 'do' is 'believe'" (i.e. the Christian sola fide doctrine) -- I guess that might seem like a ritualistic belief.
There may be something analogous in Buddhism too, e.g. this answer or perhaps even just taking refuge.
Answer:
Is ritual always a practice, or can it be a belief too?

Silabbata paramasa is a ritual backed by wrong belife.

If a ritual is a repetition outside of what can be justified through direct experience, can ideas and opinions, as well as words and actions, be ritualistic?

Yes. As it is a practice not rooted in reality.

Would a belief in God, given the axiomatic impossibility to verify the entity directly - classify as a ritual?

Yes. Any practice expecting liberation will be.
Following is a good writeup:

SILABBATA PARAMASA is generally translated into meaning the adherence to wrongful rites, rituals and ceremonies. Believing that a wrong practice is a right practice is called Silabbataparamasa, which is believing, maintaining, or supporting a wrong belief in the practice. According to the teaching of the Buddha, apart from the Eightfold Noble Path, all other practices are wrong practices and taking them as right practices amount to wrong belief in the practice.
Everything that appears at the six doors of senses constitute the Five Aggregates of Grasping, namely, rupa and nama, the Truth of Suffering. Meditating on rupa and nama is practising the Path by which the Four Noble Truths will be understood. Believing in and practising any other method which keeps aside the magga Path and which does not lead to understanding the Four Noble Truths, is wrong belief in the practice (silabbata paramasa ditthi).
There are people who are preaching that "It is not necessary to practise meditation nor to observe the precepts (sila)." That is to say, they are saying it is sufficient to simply listen to sermons and learn by heart the nature of rupa and nama." It will be necessary to consider whether such views amount to silabbata paramasa. In the opinion of some, such preachments amount to teaching wrong view in practice as this method excludes the three disciplines of:

Samadhi
Sila
Vipassana

Although a person at a lesser level of insight may participate in Wrong Practice and even be unaware of such, a Sotapanna, a person of the first level of The Four Stages of Sainthood, and those above, being well-established in the knowledge of the Right Practice are not liable to hold the wrong view of silabbata paramasas. (1)

SILABBATA PARAMASA DITTHI PRESENTED BY: the Wanderling
Comment: Upasaka: "1. Samadhi - 2. Sila - 3. Vipassana" is mentioned in the text, while saying listening to the Dhamma might be ritual. Atually my peron would say that this believe, 1,2,3 is total ritual and not based on the Dhamma, Upasaka, so maybe worthy to prove whether this citation is biased or not. May just "unlucky" formulated. With the ritual of listening Dhamma, at least, right view can be gained, path and end of wrong practice. The most importand ritual is listening to the Dhamma.
Comment: The source quotes the question `Is the practice of Zen, which by its own nature explores or professes the Enlightenment experience as attained by the Buddha and the ancient masters Outside the Doctrine, in direct contrast with or violate the premises of the Buddhist concept of Wrong Practice (silabbata paramasa)?` and usually in Zen right view and listening to Dhamma at first place is avoided. Just to consider. They are after Paccecabuddhahood, if even prevering to stay Bodhisattas.
Answer: I think you can easily distinguish between the two.  Beliefs are orthodoxy i.e. excepted views, doctrines, or teachings.  Ritual is orthopraxy or correct conduct, liturgy, or action.  What ultimately distinguishes ritual from belief is that the former is expressed in some context whereas the latter fundamentally structures how a person views the world. Saying "I believe in God, the Father, the Lord, the Giver of Life" is to make a ritualistic declaration of an orthodox belief.  Belief is God, on the other hand, is to formally order your universe according to that view.  Obviously, both are contrived when compared with direct experience.


MacBook has black screen, boots up but just the fan runs

Question: Want to know what can be the problem and if it worth repairing.  Just the fan boots up, the screen is black and the keyboard won't light up.  Apple genius could not troubleshoot.
Comment: Did you try hooking it up to an external monitor?  The fan turning on is actually a good sign.
Comment: Welcome to Ask Different! :) To help ensure you get good answers, can I ask you to [edit](https://apple.stackexchange.com/posts/302430/edit) your question to provide some additional info. For example: What exact model of MacBook do you have? What version of macOS are you running? How long has this problem occurred? Did it coincide with anything else (e.g. software update, new hardware, etc)? Do you happen to know what the Apple genius tried during troubleshooting?
Answer: Credit: Apple

If your Mac won't turn on
  Learn what to do if your Mac won't turn on.
Rule out display issues
First, rule out the display as the source of the issue. To be sure you're not having a display issue, press your computer's power button. If your Mac has power but doesn't have any video:
  You may hear a startup chime.
  You may hear fan or drive noise.
  You may see a light from the Sleep LED, if your Mac has one.
  Pressing the Caps Lock key on the keyboard causes it to light.
  If any of these things happen and you have an external display, get help with video issues on external displays connected to your Mac. Otherwise, continue with this article.
  Power issues
If your Mac won't turn on and you have ruled out display issues, try these steps.
  Verify that you have a good connection from your Mac to the wall outlet by confirming the power cord and adapter are securely connected and plugged in. To check if the wall outlet is working, plug in a lamp or other electrical device.
  If the wall outlet is working and you continue to have no power, try another power cord or adapter, if available. If you're using a Mac notebook, learn about troubleshooting MagSafe adapters, and leave the power adapter connected long enough to provide an adequate charge to the battery.
  Disconnect all accessories that are plugged in to your Mac. This includes things like printers, USB hubs, or mobile devices.
  Hold down the power button for ten seconds. Then press the power button again to see if the Mac turns on.
  Reset the SMC.
  If you recently installed memory or a drive in your Mac, make sure it's compatible and installed correctly. If possible, reinstall the original memory or drive to see if the issue persists.
  MacBook Pro: How to remove or install memory
  MacBook: How to remove or install memory
  Mac Pro: How to remove or install memory
  Mac mini: How to remove or install memory
  iMac: How to remove or install memory
  If your Mac still won't start up after you've tried each of these steps, visit an Apple Store or Apple Authorized Service Provider for further diagnosis. If you plan to visit an Apple Retail Store, make a reservation at the Genius Bar, if available in your country or region. Diagnostic fees may apply for issues not covered under warranty or AppleCare Protection Plan (APP).


How does the distribution curve gets modified if I take some molecules out of the gaseous system following the Maxwell-Boltzmann law?

Question: If you have a gas of molecules following Maxwell-Boltzmann distribution then plot for the distribution curve is gaussian. Now, If I take out some molecules from it then how does the distribution curve gets modified?
Comment: How are you taking them out? Are you using effusion?
Answer: If the Maxwellian is normalized to the number of molecules $N$, after extracting $n$ molecules and after equilibration, you'll get a Maxwellian normalized to $N-n$.
The Maxwell-Boltzmann distribution is a property of the system at thermodynamic equilibrium. Therefore, as soon as equilibrium has been achieved after perturbation, one ends up with the same distribution function.


Dual boot loading windows boot manager

Question: I have SSD and HDD on my computer, I installed ubuntu along side Windows 10 on the SSD, but when i turn on my computer Windows 10 was loaded without GRUB showing. I followed the order in this video:
https://m.youtube.com/watch?v=F4fPwUFTwlk
and now Windows Boot Manager is loaded, but the only option is load Windows 10.
How can I make the GRUB menu appear?
This is the boot options in my bios
Answer: You have to change the boot order in bios settings. Make Ubuntu boot first in os boot manager as for hp machines, then it will show GRUB menu.
Comment: After restarting and entering in BIOS Setup, there is an option of boot manager in boot configuration option in my hp pavilion.
Comment: I meant that the 'ubuntu' option isn't there. I edited and added picture of my boot options.
Comment: you have to select os boot manager and then change the boot order by pressing f6.
Comment: press f10 after placing it first
Answer: Reboot your PC and press Esc or F10,F1 to boot loder. (As you mentioned its HP Lap)
Once you got the boot setting, Set ubuntu as default.

As know Esc will set temporary session for boot. Means if you load it again it will load windows.

Dual boot loading windows boot manager


If someone is using multiple Illusion effects, how do they layer?

Question: Say if someone is using a Hat of Disguise, the Rogue ACF Mimic, Alter Self Spell, and a Disguise Self Spell?
Which effect would be seen?
Answer: First thing to say here, Alter Self spell is not an illusion, but real physical change (though mostly a superficial one). So your new look would be your real sensory quality and it is what would be changed (see below) with illusion magic.
Now, illusion magic starts. Hat of Disguise and Mimic both emulate Disguise Self Spell. Disguise Self represents Glamer subschool of Illusion school of magic and works as follows:

A glamer spell changes a subject's sensory qualities, making it look, feel, taste, smell, or sound like something else, or even seem to disappear.

That means, unlike Figment spells, Glamer spells don't produce images which could swarm around you if you use several of them. They "set" your sensory qualities to something, so, an effect which comes last would be seen.
Previous illusion effects in your example are still there, but subsequently made irrelevant by later ones. Alter Self, in its turn, isn't irrelevant, but only disguised by illusions. If you, for example, got claw attacks from your new form (say, lizardfolk), they are peretty much available even if you disguise yourself as a human later.


Do I need an external hard drive to create a system image?

Question: I have upgraded from Vista to Win 7 Home Premium 32.  I want to create a system image for recovery purposes in the event of disaster.  Tried it several times on discs and it didn't work.  Would it work better with an external hard drive?  I looked at HP250GB Pocket Media Drive with USB cable for about $80.  Would this work for creating the system image and for recovery?  Does a recovery put the operating system back on my laptop?  I know that sounds really dumb, but it's all pretty confusing to me.
Answer: Yes it's really easy by using Norton Ghost.First take your system back-up with ghost and save it in your external drive.Whenever you need to recover the system,you can load your image to your disk by using norton ghost again.
Comment: I'll look for more information about Ghost.  Features, cost?, how-tos.
Comment: you can find Ghost on sale for about 50 bucks, it will save the image to just about any media you might want to use, and you can set it up so that it will do a "self-extracting" restore from the media.
Comment: Or you could do the same thing for free with PartImage on a live Linux CD (eg. SystemRescueCd)
Answer:
Would it work better with an external
  hard drive?

Yes, it's always better to keep a drive backup safe and sound on a external storage device.

I looked at HP250GB Pocket Media Drive
  with USB cable for about $80. Would
  this work for creating the system
  image and for recovery?

Most certainly, 250 GB goes a long way, most drive backup programs offer compression of up to 50%

Does a recovery put the operating
  system back on my laptop?

But of course.
My recommendation:
EASEUS Todo Backup, supporting Windows 2000/XP/Vista/Windows 7 and Windows Server 2000/2003/2008, is a potent FREE backup software providing system backup & restore, hard disk or partition backup & restore, disk clone to protect your system and disk. It can back up whole PC, including the operating system plus your data, applications, settings and everything!
Answer: I would always recommend doing a full backup to either a USB flash drive or an external hard drive.
Windows built in backup utility is brilliant for a full image, but if you want another tool, look for ImageX in the WAIK (Microsoft Windows Automated Installation Kit).
It is a tiny tool. I personally made a custom WindowsPE disk with this on it (the WAIK guides you through this) but you can put it on a usb stick and run Windows setup from the dvd or BartPE. You can then create a full drive backup very easily
Read here for more information on the tool. You basically need the \mount and \capture flags.
Here is the direct link to information on creating images.
Here is the direct link to information on mounting images.
Answer: I would partition the laptop's hard drive into a C:\ (system) and a D:\ (storage) type of layout. That way when you do use a system imaging tool you only image the actual operating system instead of a lot of data that changes often. Using a live CD might actually be a little easier to work with since you can have networking and internet access if need be. You can usually save off an image to just about anyplace such as a CD, DVD, external drive or network drive. If you're thinking about disaster recovery, you might also want to think about doing a nightly backup of your data so that you can also recover it if the laptop's hard drive fails.
Good luck, and hope this helps some.
Comment: I keep pretty current on backup of personal files using USB flash drives, but want full recovery capability of both OS and personal data which can be updated periodically.  A program named DriveClone Pro claims to do exactly this.  I don't know if the HP250GB Pocket Media Drive can be used for this.  There is a D: drive (Recovery) on my laptop, but I can't actually see what's in it or how to use it.
Comment: d:\\(Recovery) is probably an image created by the company that you bought your laptop through. Restoring your system through that will bring your laptop back to when you got it from the factory.
Answer:
Tried it several times on discs and it didn't work.

What exactly did you try?
To add to NT's answer: You can't create an image of a system that is running, so you should create a bootable cd which contains ghost and boot with that to create the image. I can recommend BartPE to create such a disc.
Comment: Went to Start > Backup and Restore > Create Sysem Image > Save on DVD+RW.  It ran a long time (expected) but then said "Windows found errors on the media and cannot save further backup"  It wanted a new disc labeled (same as before).  It just repeated the problem over and over.

That's why I wondered if an external hard drive would work better.
Comment: Ow, didn't even know about that feature :) I guess maybe it's a problem with your dvd-drive, so yes, you'll have to try the other options then, being it an external harddrive (or a second partition on the internal one), or a network location (you don't have another pc lying around somewhere? ;-)
Comment: I think you **can** create an image of a running system with windows backup, as long as the output is saved to a non-imaged partition.
Answer: You can easily create a restorable image using Symantec Backup Exec System Recovery 2010.  They have a 60 day demo that will allow a running system to create an image.  That image can be restored to same or different hardware or even convert to an MS or VMware Virtual machine image.
I used this before I upgraded to Windows 7 anad have used it to back up numerous systems before as well.
Symantec BESR 2010


cosine similarity problem

Question: i have calculated the tf-idf values of terms of document 1 and document 2..now i dont know how to use these tf-idf values...basically i want to find similarity between two documents(in my case are webpages)..can any body tell how to implement cosine similarity, jaccard coefficient to find similarity...c# code would be appreciated..pls help...thanks
Answer: I recommend a visit to Apache Mahout. It provides a complete kit of tools for this. Even if you don't want to use them, you can get the answers to these questions by looking at existing implementations.

cosine similarity problem


Windows authentication in SilverLight Application (not Silverlight Business Application)

Question: I am trying to add Windows authentication to an existing website that I have created. All information that I have read regarding using Windows authentication in silverlight requires that you start with the Silverlight Business Applicaion template instead of the Silverliight application template. I already have a website that I started writing using the Silverlight Application template. How can I add windows authentication to this existing website?
Answer: If your application is hosted in IIS and this is a intranet site, you just need to set the application in IIS authentication method to Windows Authentication, then when the client tries to load the SL App a 401 challenge will trigger asking the user to enter in his/hers credentials. You can also set IE to pass with windows credentials to the server when the site is loaded.
I have had spent quite a bit of time tweaking various properties to get the right functionality that i am looking for (especially with machine names being fully qualifies or not) but basically that's one thing to keep in mind when debugging this is that machines names play a role in how the server interprets a client trying to access the server.


Difference-in-difference with interaction terms

Question: I am looking for an empirical paper that perform a difference-in-difference regression where the whole did regression (treated+post+post*treated) is interacted with a continuous variable (or a categorical one)... Do you have an idea of such a paper ?
Answer: My own not-yet-published paper!
Sorry, I can't immediately think of a more authoritative paper, though mine does fit the bill (assuming that it is non-wrong).
(I formulate the DID slightly differently -- rather than including a dummy for treated (implicitly assuming that any difference between T and C is a level effect) I weight the control group by propensity scores for being in the treatment group.)
Comment: Do you have a link?
Answer: Price and Wolfers (2010) measured NBA referees on how many fouls they called based on their race and the race of the players they called fouls on. See Table 3:
Joseph Price & Justin Wolfers, 2010. "Racial Discrimination Among NBA Referees," The Quarterly Journal of Economics, MIT Press, vol. 125(4), pages 1859-1887, November. http://www.nber.org/papers/w13206
The continuous variable is the foul rate, and the "treatment" is the change in fouls called over the change in % white referees.
Comment: Thanks for sharing, really interesting topic. I read it in a different way though. In table 3, I think the treatment is 'percentage of white referees in a game', in an extreme case,  players in a game with nonwhite referees are the treatment group and all white referee are the control group. This is the first difference. player's race in different group constructs the second difference.