Valgrind Alternative for Mountain Lion

Question: Unfortunately, Valgrind does not support OS X 10.8 yet. After some Googling, I came across some forum posts where people were able to get it to compile and "almost" link. Does anyone know of any good alternatives to Valgrind for memory leak detection?
Answer: The Instruments app (part of Xcode) is a very good way to look for leaks and run stress tests on the memory allocation of a running program.
Comment: Can you give some samples about how one could use Instruments to do the same thing as valgrind?
Comment: See [this thread](http://stackoverflow.com/questions/13075113/is-there-anyway-to-read-performance-counters-on-os-x-mountain-lion) for instance. Personnally, I still have issue on my new mac book pro retina which display `unknown processor` in the counter instrument yet it may work for you.
Answer: While valgrind can be installed, the current state isn't very usable. In a simple program I got the following result;
<code>==16016==
==16016== HEAP SUMMARY:
==16016==     in use at exit: 63,264 bytes in 364 blocks
==16016==   total heap usage: 516 allocs, 152 frees, 67,154 bytes allocated
==16016==
==16016== LEAK SUMMARY:
==16016==    definitely lost: 8,624 bytes in 14 blocks
==16016==    indirectly lost: 1,168 bytes in 5 blocks
==16016==      possibly lost: 4,933 bytes in 68 blocks
==16016==    still reachable: 48,539 bytes in 277 blocks
==16016==         suppressed: 0 bytes in 0 blocks
==16016== Rerun with --leak-check=full to see details of leaked memory
==16016==
==16016== For counts of detected and suppressed errors, rerun with: -v
==16016== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
</code>
The same code will be fine with using valgrind on a linux.(compiled on their respective systems)
Comment: You should provide way more details to get to any concusion.

Using gcc on both? Or gcc/clang? Linking to what libraries/versions? Identical version and compile flags?
Answer: Assuming you can be bothered, if you install MacPorts you will be able to install a functioning Valgrind (3.8.1 as for today) on your system.  Unfortunately MacPorts will require you to install the whole XCode, not just the CL tools, so YMMV.
Comment: I came back to this question to post this information myself; I use MacPorts and realized that Valgrind now works.

Valgrind Alternative for Mountain Lion


HELP! Upgrading my kitchen to ceramic tile floor

Question: So, I've decided to take on this big project.  I have a 1/2" plywood subfloor with 3/4" MDF on top.  Should I rip out my entire subfloor add a 3/4" t&g plywood then lay 1/2" plywood on top or am I able to just lay the 3/4" t&g on top of the 1/2" plywood?  If I can add the 3/4" plywood on top should I screw to the joists or glue and screw off the joists?
Answer: Two issues:
First, you need to make sure that your floor is rigid enough and planar enough for the tile to be successful. There are deflection tests to determine rigidity, and different ways of checking for planar. The bigger the tiles are, the more important these are.
1/2" plywood is unlikely to be sufficient. 3/4" plywood glued and screwed with backer board on top of it may be sufficient. An isolation membrane (I like Ditra) can help as well, as it lets the floor flex a little without popping tiles or breaking grout lines.
The second issue is floor thickness. If you go 1/4": backer board + ditra + a porcelain tile, that's about 3/4" thick. You need to set things up so the transitions to other rooms are safe; ideally they will be flush, but if not, you'll need a safe transition piece to handled the difference in level.
The installation manual for Ditra is a pretty good reference.
Answer: You should just lay some backer board on top of your current subfloor and go from there.


List of countries that includes how much of the workforce is employed by the government

Question: Where can I find a list of European/World countries by government workers per capita or as a percentage of total workforce? I can't seem to find it on Eurostat. It would be interesting to see the effects of this policy and find a correlation between count of government workers and how "rich" the country is.
Answer: Here is a pretty good chart showing the breakdown by OECD country showing data from 1995 and 2005:

That can be compared with the GDP rankings of each of these countries found here to get a pretty good picture of the relationship (if any) that you are looking for.
Comment: Thank You! It is surprise for me that there is less government workers in Greece and in Poland than in USA
Comment: @JurisMalinens The first (serious) effort to find out the exact number of government workers in Greece started in July 2010 and a year later a number of 768009 was announced (out of ~11mil). The number seems small, but it was about a million (or more) before the debt crisis, it was drastically reduced when several obsolete or near obsolete gov. agencies were closed down and I'm not 100% certain if the current number includes seasonal part time workers or not (their number may be significant, tourism is our main industry).


How does management work in academia? Who do professors report to?

Question: In commercial companies you will mostly only have a handful people per manager. For example in a law firm it might be four or five and rarely that I know of more than a dozen.   But in (university) academia, a department can have 60 academics in it and only one department head. How does line management (i.e., the chain of command) work with such a huge ratio of staff to heads of department?  Are there a lot of middle managers below the head of department that professors report to?
Comment: Glib answer: it doesn't.
Answer: Generally speaking "management" in a university takes a different role and faculty are generally expected to know what to do and to do it to a high standard. In a certain sense, every faculty member is an independent entity and they only need to coordinate on a few things. Those things, such as curriculum and grading policy, are normally handled by committees of faculty, not handed down from above.
Typically a department will have monthly faculty meetings in which things are communicated and new opportunities and directions are discussed. Solutions are normally by consensus. The meetings may be mandatory or not, but the mandate can be pretty loose.
There are few situations in which a tenured professor is told what to do by "management". And some of the layers of management, such as department heads and even deans may actually be chosen by vote of the faculty.
So, in a forty year career, I seldom "reported" to anyone in the traditional sense and no one "managed" me and my work. True, I submitted an annual report of my activities and said there how I worked toward the three traditional goals of the university: teaching, research, and service. The department head or dean would respond to that report, perhaps making suggestions, usually minor, on things I might do in the coming year.
Even it times of conflict, such as when a student complains, the complaint often is handled by faculty rather than by "management."
Faculty normally self organize into seminars and such, and normally worry about their funding. There may be some pressure about that in top universities.
In the traditional (Medieval) university, the faculty IS the university and it would hire "managers" to do those tasks that they found unsatisfying. It is still somewhat similar in many places, but less so in large R1 and State Universities.
There is a story about Rockefeller Columbia University (if I remember correctly) that when ex-president Dwight Eisenhower became the university president, he held a meeting and told the faculty all the "wonderful things the university would do for the faculty." The head of the faculty (an elected position) stood up and said something to the effect that the university couldn't do anything FOR the faculty. The university WAS the faculty.
There are, however, many support offices in a university that are managed in a traditional sense. There is often a funding support office, an enrollment office, a counseling office, etc. It can be very extensive. But they don't manage faculty. Instead, they provide support services to faculty and others, though internally they may be traditionally managed. A "student recruiter" would probably answer to a "boss".
Comment: @Anush In practice, often nobody.
Comment: There are universities outside the US...
Comment: _There are few situations in which a tenured professor is told what to do by "management"._ - I think this is rapidly changing.  I am often told what to do or how to do something.  However, I am not likely to get fired for not doing these things and I agree that there tends to be more freedom in academia than in some other careers.
Comment: At our place generally the HoD will ask for volunteers and try things by concensus first, but they will tell professors what to do if they need to.
Comment: @anush the first point of contact would probably be the director of undergraduate studies, who chairs the UG cmte. If the DUGS is involved, the chair.
Comment: Who deals with unsatisfactory teaching or academics not responding to student queries for example?
Comment: Interestingly, many people in support roles think they manage faculties because they can use processes to 'control' them.
Answer: An answer from a Dutch perspective. Short answer: there are no traditional managers for academics.
At the top level, the university has an executive board. These are normally (ex-)academics, and each has different responsibilities. There is a rector magnificus, who is responsible for all academic and educational affairs, and a president, who is responsible for basically everything else (finances, housing, etc). Usually there are a few more people who are delegated some of the responsibilities. There is also a supervisory board, consisting of people appointed by the minister of education for a fixed term. As they are more political, this usually causes some friction with the academics.
The university is organised into faculties, headed by a dean, who is a (possibly elected) member of the faculty of one of the departments. They usually are the head of faculty meetings, and represent the faculty in meetings with the board.
Each faculty is organised into departments, lead by a department chair. They are just one of the full professors of the department who have taken on some extra tasks. Similarly, there are typically heads of education, research, program chairs (for the various educational tracks), etc, all members of the faculty. Most decisions are made by committees consisting of these people, and they are usually advised by elected groups of faculty and students representing those interests. Sometimes a member of these advisory groups also gets a vote in the decisionmaking process.
Each department is split into groups/divisions. These are typically headed by a professor, and consist of members of faculty doing research and teaching in a specific subfield. For instance, my CS deparment has divisions called Interaction, Algorithms and Intelligent Software Systems. Each division may be further split into smaller groups, usually of a few full/associate/assistant professors, post-docs and PhD candidates.
Each of these groups generally has complete freedom to do what they want, provided they have found a source of funding for their research. This source of funding may provide some specific targets the recipient needs to meet, but these are usually quite vague. Each individual member of staff does have a "work leader", with whom they have a yearly meeting to discuss their progress and plans for the future, and who is typically their first point of contact for any work-related or personal issues.
However, there are essentially no "managers" in the traditional sense. These exist only at the top level, where the executive board makes decisions about finances, housing, and long-term strategic plans to attract more researchers/students/funding, and (as mentioned by Buffy) in the supporting departments like accounting, student affairs and the research support office.
As an academic, almost nobody ever tells you what you should spend your time on, other than some generally agreed split between research and teaching. This is something almost all academics I know enjoy, but it also means that if you can't handle that level of freedom and responsibility, academia is likely not for you. One small exception is usually PhD candidates, for whom their promotor is usually quite involved in decisions about directions for research. This is of course quite natural, as the PhD candidate is still in the process of learning how to do independent research.
Comment: "As an academic, almost nobody ever tells you what you should spend your time on" - this is a great falsehood which is typically discovered in the first year of PhD
Comment: @benxyzzy in my experience it's true though. There tends to be some generally agreed upon split of time between teaching and research, but no one ever tells you "today you're going to work on this research topic". This is somewhat less true for PhD candidates, but that's more to do with not knowing what you should be doing yet. Obviously there are deadlines for e.g. conference publications, but those are self-imposed.
Answer: As Buffy mentioned, many universities do not use a line management model.  But some do.  There are several strategies used to deal with the ratio of "managers" (department chairs/heads of school/deans) to "workers" (professors/lecturers/adjuncts...)

Disfunction is a popular option.
Adjusting the scope of the work unit.  For example, a department/school might have as scope of "optical physics" or "physics" or "physical sciences" or even "arts and sciences" depending on its size.
The department chair may have managers below them.  These managers are not responsible for a subset of people, but for a subset of duties.  There might be assistant chairs for research, undergraduate education, and graduate education, for example.  These assistant managers manage all faculty in the department, but not all of their duties.
Nonacademic staff (administrators, technicians, etc.) may have their own management which could be exactly like what is done in a corporation.
The number of levels of management varies a great deal.
In some cases all professors are managers who have direct control over other staff.

Usually each university takes its own approach to management structures and it is common to change the structure.
Answer: Self-organization on a high level
One aspect (at least in many countries) is self-organization and self-elected "managers". For example, in my research institute the leadership (both "mid-managment" of various research labs and the whole organization) differs from a research department in a commercial company in three substantial aspects:

The chairs are scientists - they are selected from the scientific staff, bringing in an outside manager is impossible/prohibited, so they are "one of us" in some way even if they specialize (and they can't permanently specialize, due to term limits etc they'll have to step down and continue scientific work).
The chairs are elected by the staff, and they answer primarily to the other scientists and not to some external stakeholders;
The administrators don't have hiring and firing power for scientific employees (they do hire/fire administrative staff, finance people, etc), the scientific staff has to approve all that by voting.

So in some aspect they're the opposite of a regular manager, my "boss" can't fire me but I (together with my colleagues) can fire him from that position. They are essentially representatives of the staff chosen to handle internal coordination and external representation. Perhaps the appropriate non-academic analogy is a workers' cooperative?
Project-based teams on low level
For the daily research work (teaching is different), however, most of the coordination happens on the project level, partly because that's how funding is assigned and managed. It doesn't matter as much where you are on the "organizational chart" in general, the thing that matters is on whose grant you're working. Once a principal investigator has obtained long-term funding for some research goal, they are personally responsible for achieving the goals and managing the researchers and students working in the project. The management of those teams is much closer to how the industry works. Those are smal (equivalent to a "two pizza" team popularized by some non-academic management approaches?), functional teams with a clear goal.
One aspect of those teams is that they are inherently not permanent - they have an end date; some people may be explicitly hired for the duration of the project (e.g. post-doc contracts) and while it's common to have much of the team continue in a future project with a similar topic, IMHO it has more staff rotation to different teams than in a business environment - also partly because both the "individual contributors" and "project managers" have a quite free choice on their work; if I don't want to work on a particular project or with a particular PI, there's literally no way how "the management" could order me to do that; as long as there are any other projects/PI's with funding willing to take me on, I can go work on them; and PI's can pretty much arbitrarily choose what research projects they will pursue (though they do need to win grants to fund them).
Comment: Your boss not being able to fire you is a property only of those systems that have tenure for academic staff, and I hear that even in the US tenure is not what is used to be.
Comment: Regarding the last heading about grants, the employee is a profit center. They write the grant, which brings in _outside_ money, of which the university gets about half (for "support"). They're personally in charge of how it's spent. The grant system ensures that individual PhD's are in the driver's seat.
Answer: Old ideas of academic freedom, and the academic as a self-organizing unit are getting rarer than they used to be.
In my university a faculty member's line manager is definitely the Head of Department (HoD), and conversely postdoctoral researchers, technicians, and research assistants report to the faculty member. The number of staff members a faculty manages differs, but in life-sciences an average group might be a couple of postdocs, a technician and 2 or 3 PhD students.
The HoD might manage between 30 and 100 academics depending on the size of the department. There are teaching and research directors and committees, but they are advisory bodies/working groups, and don't really hold any power. There is also a chief administrator who is line manager for professional services and other non-academic staff in the department.
Once upon a time, HoDs were elected from within their department, and served as the department's champion within the university. Now they are appointed by their superiors and are responsible for enacting the Faculty and university's goals and priorities within the department.
The KPIs for research are the number and quality of papers, and research income. As long as you make your targets here, how you go about your research is pretty much left to the academic.
However, teaching and service roles are more actively managed. While volunteers for given roles are generally welcomed, and the HoD is guided by the teaching, administration and research committees, the HoD has the final say on who does what. The HoD is responsible for balancing staff member's workload under the Workload Allocation Model.  The HoD leads the annual appraisal of each academic and is responsible for initiating performance management (and ultimately dismissal) if KPIs aren't met. Interestingly promotion isn't within the power of the HoD, but rather the promotions committee of the Faculty.
I've often heard this complex structure referred to as a pastiche of a commercial corporate structure, with many of the down sides, but not really any of the actual efficiencies.
Comment: By "30 to 100 academics" do you mean faculty? That's an enormous department. Or are you including all the graduate students that report to the faculty that report to the HOD?
Comment: My current department has 145 faculty (+ 150 postdocs,  300 grad students and 2000 undergrads/masters), although this is recognized as unusually large (second largest at the university). It was formed from the merger of three departments. The department I was in before had 25 faculty and was merged because it was felt too small to be sustainable - it had had 45 academics when I arrived 10 years earlier. Similarly the university is in the process of closing down a department of 15 faculty because it had gotten unsustainably small, and would have needed an investment to bring it back to size.
Comment: Hot dang. I'd consider 30 "large"


Adding information tabs to Google Earth locations

Question:
I was wondering how is it possible to create something like the attached picture. It is a screenshot from Google Earth: as you can see, by clicking on a dot on the map, a tab pops up that contains some information. For instance, some links are available, as well as a short description, and an embedded Youtube video.
I am wondering if it is something that can be done within Google Maps/Earth, or if a third party tool is needed.
Comment: You can upload your picture to site imageshack and from that you can copy embedded link to your pin location.
Answer: You need to create a KML file:
https://developers.google.com/kml/documentation/kml_tut
Don't expect to be able to create the example above in five minutes - start with the basics, create a simple pins, then go to the more advanced stuff with popups and HTML and whatever.
There may be a way in Google Earth that you can view the KML source for your example which you can use for learning purposes.


Need 2 raw chopped onions in cole slaw

Question: Ruined my homemade cole slaw salad with 2 chopped yellow onions...very acidic and bad after taste. Recipe calls for the onions. How do I not ruin the salad the next time with the onions?
Comment: Can you elaborate why you are sure it's the onions that ruined the recipe?  What are the proportions of your recipe?  2 whole onions does sound like a lot, but without knowing how much total you are making, it's hard to say anything certain.
Comment: How about simply reducing the amount of onion if you think it's too much? Tastes differ and recipes can't cater for all.
Answer: You don't say how much cole slaw you made with 2 entire chopped onions. I hope it was a lot. (I'm not sure I'm familiar with raw chopped onions at all in cole slaw.)
Did this recipe specify yellow onions? or were they perhaps supposed to be one of the "sweet" onion varieties -- Walla Walla, or Vidalia, etc. Those have a lot less bite, and are better to eat raw than the more sulfurous biting types. Maybe next time you might try using them.
Also, if you aren't wedded to this specific recipe, the obvious solution would be include less chopped onion... or even none, if you aren't happy with its contribution to the result.
Answer:
How do I not ruin the salad the next time with the onions?

Leave the onions out?
Answer: Add the onions last and taste adding just a bit at a time.  A little lemon juice with the onion will tone it down.
Answer: Onions can be soaked in cold water and/or rinsed well to remove some of the overpowering flavor.
Answer: I've always found the taste of raw yellow onions to be a little overpowering. Their strong flavour works well cooked in soups, stews and casseroles though. Sweet white or even red onions (in a purple cabbage slaw) works much better to compliment a slaw's flavour.
One place I once lived at in Canada (many miles from a decent grocery store), I was unable to buy sweet onions. In that case, I'd cut a large yellow onion and just take out some of the centre part to use. Since it's the youngest part of an onion bulb (corm actually), it's also the mildest juiciest part. Cutting it and soaking it in a lightly salted water will help draw out some of the stronger taste too. I'd use less onion than I would a sweet onion and still achieve the taste I wanted.
The rest of the yellow onion wasn't wasted and would usually be used the same day (or next) in some cooked mixture. All that was years back when I could eat onions with impunity. Now I stick to shallots or scallions. Really miss having creamed baby onions. :(

Need 2 raw chopped onions in cole slaw


QGIS custom Python expressions not loading on startup

Question: My custom Python expressions are not loading at startup and I dont know why. Its a real pain because I have virtual layers depending on those expressions, so after I load them I have to manually refresh those virtual layers' queries... I have not found an option in QGIS options to fix this.
Comment: Custom Python expressions a stored within the user profile folder: C:\Users\Username\AppData\Roaming\QGIS\QGIS3\profiles\English\python\expressions. If you changed the Userprofile they will not be loaded automatically in the new or other user profile...
Comment: In my case,in Profiles folder I only have /default/python/expressions/... I have changed my QGIS languaje to english a long time ago, so I tryed changing back the language, but they didn't load. Manually creating that set of folders didn't do the trick either.
Answer: So, following the thread from @eurojam (thanks eurojam!!) I found in expressions folder two python files, the one with my custom expressions and another called "__ init __"... So I moved all my expressions to __ init __, launched QGIS and voilá! Problem solved


Is cross talking caused by cables acting as antennas?

Question: Why does cross talking happen between different cables? Is it because any electrical cable has the capability to act as an antenna?
And most important, why do twisted pair of cables have less cross talk between them?
Comment: Why not research the subject yourselves first, start here: https://en.wikipedia.org/wiki/Crosstalk Coupling cables are not seen as Antennas so forget about that, focus on capacitive and inductive coupling. The reason twisted pairs are used is related to the crosstalk **being the same for each pair** so that it can be eliminated easily.
Answer:
why do twisted pair of cables have less cross talk between them

The dominant reason for twisting wires is to cancel out interfering magnetic field induction. If two wires are not twisted, the wire closest to the interfering source has induced into it a greater voltage than the wire further away. So, if the wires are repeatedly crossed, the net induction into each wire is the same and, that interference generates a "common mode" signal that is much more easily dealt with than a differential interference signal.
Also, twisted pairs, in turn, produce less magnetic interference to other wires because the net field at some distance tends to zero due to the twists.
The other mechanism is electric field interference and twists do help but the better solution is a cable shield that is grounded.
Comment: @yoyo_fun if you are satisfied with this answer please do consider formally accepting it (or another) OR maybe you have some comment that can be cleared up?
Answer: Cross talk is caused by capacitive and inductive coupling between lines which run close together... The schematic shown below is typical for a two wire cable. As you can see, any AC signal or transient on one wire will be coupled into the other. How much depends on the geometry of the wires, the insulation type and the signal frequency. This is called cross talk for the obvious reason the signal crosses from one wire to the other.

simulate this circuit – Schematic created using CircuitLab
Twisted pair cables actually have MORE crosstalk not less since the coupling effect is greater.
However, I have a feeling you are talking about noise pickup, not cross talk.
Twisted pair cables are used to pass a differential signals. Whether that be a driven plus / minus signal or a single ended signal with a reference ground makes little difference. The benefit to using twisted pair here is that any noise or crosstalk source in the vicinity of the twisted pair tends to be picked up equally by both wires and as such becomes what we call common mode noise which cancels itself out at the differential receiving end.
Answer: Yes, all cables can act like antennas, both to transmit and receive. If two cables are poorly insulated/shielded and sufficiently close to each other, especially if they're within near-field distance, the electromagnetic field from one will affect the current in the other, and vice versa.
Twisted-pair cable is done for a few reasons - a large one is that if the pair is used for the transmission of a differential signal, noise immunity will be improved, and the antenna effect will be reduced. Conceptually this is caused by each twist acting to cancel the antenna effect of the twist opposite to it. But as @Trevor mentioned, crosstalk between the two conductors of a twisted pair is actually worse, not better.


iPad SQLite database

Question: Is it possible to create a table in SQLite which has more than 25000 rows...? I would like to create an iPad application which will work in association with a web application, the web application use MS SQL as back end. Is it possible to fetch large amount of data from MS SQL database..?, If it possible up to how much amount of data can fetch...?
Answer: a table in sqlite is limited to 2^64 rows but you'd hit the disk space problems way before that
i've used sqlite on a table having just over 2 million rows which is the most i've put in one
so it's mostly limited by the disk space available
but indexes on a table cost about 0.1 second per 10k inserts per index so really don't put more then is required i tested this with a table of 750 columns and 750 indexes it took hours to put in test data but i was testing extremes most tables will not have that many columns

iPad SQLite database


Books and papers on the philosophy of probability

Question: I am interested in reading books and papers regarding the philosophy of probability. I want to know what the correct philosophical interpretation of probability is, and also other topics regarding probability and its philosophy. I have already read math texts on probability, I am looking for texts that treat probability from a philosophical perspective.
Comment: "Correct" interpretation of probability in philosophy might be a high standard. If you haven't, I'd start with SEP's article ["Interpretations of Probability"](https://plato.stanford.edu/entries/probability-interpret/). It's succinct, free, and a click away.
Comment: At @Stef's suggestion, I hereby rewrite my last comment as a new comment (they or anyone else can tell me if an answer would be preferred): Would "the philosophy of probability" include points made about probability relevant to the philosophy of science? If so, I recommend [_Probability Theory: The Logic of Science_ by Jaynes and Bretthorst](https://smile.amazon.co.uk/dp/0521592712).
Comment: Max Tegmark has an interesting take on this in his book Our Mathematical Universe, though it has a much broader focus.
Comment: Would "the philosophy of probability" include points made about probability relevant to the philosophy of science? If so, I recommend [this](https://smile.amazon.co.uk/dp/0521592712).
Answer: The most self-contained book I am aware of on the subject is Philosophical Theories of Probability by Donald Gillies (Routledge, 2000):

I believe reading the historical development of ideas is philosophically a very rewarding occupation. So, I would recommend also Ian Hacking's The Emergence of Probability: A Philosophical Study of Early Ideas about Probability, Induction and Statistical Inference (2nd edition, Cambridge University Press, 2006) and Jan von Plato's Creating Modern Probability: Its Mathematics, Physics and Philosophy in Historical Perspective (Cambridge University Press, 1994).
I suppose these books would give a sound basis for further inquiry.
Comment: It's an excellent book. Very readable. There are few controversial topics in philosophy where I think one side is clearly right, and I can see no value at all in the opposing arguments, but probability is one of them. Probability is *obviously* a kind of logic. All of the other explanations fail to explain how logic is used.
Answer: In addition to the books mentioned by Tankut, I would suggest also:
Antony Eagle, Philosophy of Probability: Contemporary Readings, (Routledge, 2010). This contains many important papers on the philosophy of probability, particularly
David Lewis, "A Subjectivist's Guide to Objective Chance" (also in his collection Philosophical Papers volume 2, 1986, 263–294),
Alan Hájek, "'Mises Redux' — Redux. Fifteen Arguments Against Finite Frequentism", also in Erkenntnis, 45: 209–227, 1997.
Alan Hájek, "Fifteen Arguments Against Hypothetical Frequentism", also in Erkenntnis, 70: 211–235, 2009.
Some other useful papers and books are:
Alan Hájek, "What Conditional Probability Could Not Be", Synthese, 137: 273–323, 2003.
Kenny Easwaran, "Dr. Truthlove or: How I Learned to Stop Worrying and Love Bayesian Probabilities", Nous 50:4, 816–853, 2016.
Richard Jeffrey, The Logic of Decision (Chicago, 1983).
Ian  Hacking, The Logic of Statistical Inference (Cambridge, 1965).
Jon Williamson, In Defence of Objective Bayesianism (Oxford, 2010).
J.R. Lucas, The Concept of Probability (Oxford, 1970).
F.C. Benenson, Probability, Objectivity and Evidence (Routledge, 1984).
Also, there are lots of papers by authors including Henry Kyburg, Patrick Maher, Wesley Salmon, Brian Skyrms, Ellery Eels, Jack Good, Bruno de Finetti, Richard Bradley, Bas van Fraassen, Branden Fitelson, Dennis Lindley.
In reference to your point about "the correct philosophical interpretation of probability", you might want to bear in mind the possibility that there is no unique correct interpretation. An operational approach to understanding probability might be to say that any quantity can be interpreted as a probability if and only if it obeys the probability calculus. Finite frequencies do, quite straightforwardly. De Finetti's work shows that rational degrees of credence obey the probability calculus, at least to a good approximation, subject to a few basic assumptions about rationality.
Answer: There is a book from 2021 called "Bernoulli's Fallacy" by Aubrey Clayton that might fit with what you are looking for. You can find more information and an excerpt here.
Some quotes taken from the linked website:

Ranging across math, philosophy, and culture, Bernoulli's Fallacy explains why something has gone wrong with how we use data—and how to fix it.

Aubrey Clayton is a mathematician who teaches the philosophy of probability and statistics at the Harvard Extension School.
Answer: I would suggest Ten Great Ideas about Chance by Persi Diaconis and Brian Skyrms, https://press.princeton.edu/books/hardcover/9780691174167/ten-great-ideas-about-chance


Converting Sram Force 22 crank to Force 1

Question: I have an existing Sram Force 22 groupset and want to convert this to a Force 1X system. My question is in relation to the chain rings. If I just swop the rings for the a narrow wide Sram Force 1 chainring will this automatically fit into my existing crank arm? Or do I need to replace the whole crank? Also if I do just replace the rings, would I need smaller chainring bolts or will the existing ones work. I will be using all Sram parts.
Answer: First of all, you absolutely don't need to replace Force 22. The crank arms have removable direct mount spider that the chainrings are bolted to. That means, in theory, you can put almost any chainrings given a matching spider exists - a very versatile system that's gained popularity over the recent years (Red/Force AXS are direct mount only, unlike Red 22).

If I just swop the rings for the a narrow wide Sram Force 1 chainring
will this automatically fit into my existing crank arm?

Also if I do just replace the rings, would I need smaller chainring
bolts or will the existing ones work

If I were to convert Force 22 to 1x, I'd check the following:

For regular chainring (mounted to spider), BCD (bolt circle diameter) should match. Force 22 came in 110mm and 130mm varieties. BCD limits minimal chainring size - the bigger the BCD, the bigger smallest compatible chainring is.
For regular chainring, chainring bolts should be compatible. Bolts are two-piece (nut and bolt), some are single piece (bolt screws into chainring). You can visually inspect existing bolts to check what you have, I don't have hands-on experience with Force 22 in particular. With a single chainring, the bolts might be too long and require spacers.
For regular and direct mount chainrings, you might want to factor in chain line (determines relative positions of cassette and chainring centers). For 1x road/gravel applications, it should be relatively safe to put the chainring on outer ring position, at least in my experience (I run 1x setup on my road bike with 2x crank arms). Spider design (I suspect Force 1x spider might have different offset/chainline to that of Force 22, but I can't say for sure), spindle length/interface and rear hub width (130mm non-disc road, 135mm QR/142MM TA, boost and so on) affect the chain line too. Force 22 can have GXP and BB30 spindles (there are true BB30/short and long BB30/BB386 varieties, at least for S2200). I only have experience with SRAM S2200 arms (very similar to Force 22, if not the same), when I was in market for a 1x chainring, this was an important factor. Direct mount chainring manufacturers usually specify what spindle/hub width the chainring is for. The spindle type is written on the spindle, the length can be measured with a ruler.
For direct mount chainring, take a note of chainring interface. There are a lot of varieties, but Force 22 has the 3-bolt Truvativ/SRAM pattern. Newer SRAM offerings have different interfaces.

Personally, I'd swap the whole spider assembly to a direct mount chainring because it looks cleaner. See manufacturers like Absolute Black, Garbaruk, Wolf Tooth and many others.
Comment: Thanks for assistance. This was helpful
Comment: @AashiqKumandan if no better answer comes in a while and my answer does answer your question, you might want to mark it as "accepted" (check mark besides score). Oh, and welcome to Stack Exchange


Sci-Fi Book about a computer company which develops a hard drive based on a Flu virus

Question: I am trying to track down a book of a man who joins a computer company in California who have developed a hard drive which is based upon an altered flu virus. The hard drive grows as it gains more information and the company are about to launch the new computer when the man in the lead role begins to notice changes in the people who work around him. Some die, like the head of sales, but others, the salesman disabled daughter show improvements.
It turns out that the individuals have been infected by the virus and it takes over their minds.
Comment: Possible dupe of [Book: Nanites or Biological Computer virus infects people](http://scifi.stackexchange.com/questions/104715/book-nanites-or-biological-computer-virus-infects-people?)
Comment: @Valorum Heh, I was just looking at that one too :-)
Comment: Yes, this is Human Error by Paul Preuss as Valorum says above. Harold Lillard is the sales manager who dies and the girl who improves has Down's Syndrome (trisomy 21). The virus is called Epicell.
Answer: As they say in the comments above, this is most likely Human Error by Paul Preuss. (Review here).
The infection in the book is a polio virus, not a flu virus, but the effects of it are as described above. The review states:

 But so powerful is Epicell that soon it's producing original work. Meanwhile, however, those who have intimately handled Epicell develop mysterious ""colds"" (readers will guess what's going on long before the characters catch on). Yes, they've been infected with Epicell--which proceeds to develop inside the victims' brains. The first sufferers, unable to handle the human/computer interface, die; later, though, others survive to manifest such strange and highly beneficial new abilities as instant computing, perfect memory and coordination, heightened emotional sensitivity, and more.


A question about induced fields

Question: This is something that I just realized bothers me, after thinking about it too much. Faradays law tells us a changing magnetic field creates a circulating electric field. This electric field has a time dependence and therefore by Amperes law creates a circulating magnetic field. This is usually where flux/emf problems stop. But won't the time dependence of the induced circulating B field create a new second E field which will then create a third B field and so on ad infinitum? This is how EM waves propagate, so why don't we consider this chain in flux problems?
Answer: We do!  (Or at least, we should, to be complete.)  Imagine the basic arrangement of a bar magnet, north up, moving upward toward a solenoid.  Faraday's Law has a very important negative sign for this question, which dictates that the new current generated by this increasing flux is going to be clockwise from the top (use the right-hand rule, and flip it for the negative sign).
$\nabla \times \vec{E} = - \frac{\partial \vec{B}}{\partial t}$
Now go to Ampère's circuit law, and you'll see that the current generated will produce a magnetic field with flux lines pointing DOWN in the middle.
$\nabla \times \vec{B} = \mu_{0}\vec{J} + \mu_{0}\epsilon_{0}\frac{\partial \vec{E}}{\partial t}$
This will act to oppose the bar magnet going up.  Thus we not only take it into account, but it is essential for energy to be conserved.  It doesn't result in a cascading chain, because it's simply opposing some of the initial flux change inserted into the system by the motion of the bar magnet.  The world would be a very messy place without that negative sign in Faraday's Law.
Answer: Ampere's law doesn't say that in this example you would have a time varying magnetic field (which is what you would need in order to generate another electric field), but rather just some sort of magnetic field which behaves according to the equation:
$$ \nabla \times \textbf{B} = \mu_0 \textbf{J} + \mu_0 \epsilon_0 \frac{\partial \textbf{E}}{\partial t}$$
Nothing here requires the magnetic field to vary with time, only have a particular variation in space. Therefore, the magnetic field would not need to generate an additional electric field.

A question about induced fields


Export 3d model from qgis2threejs with vector data

Question: Im trying to export a 3d model from qgis2threejs plugin in Qgis, but all I've managed is to export my DEM, without any data. Is it possible to export a 3d model in some of its extensions (STL, COLLADA, Wavefront) to look like a model in qgis2threejs pluging, with data and colored DEM?
Answer: Sadly "no" is the short answer.  The longer answer is "not in the version 2.x for QGIS 3.x".  The change-log states the following:

Disabled/removed these features: DEM advanced resampling mode, 3
  object types (Icon, JSON/COLLADA Model), some object specific settings
  for Profile and Overlay, FileExporter (Save as STL, OBJ, COLLADA),
  GSIElevProvider.

However, you can export to glTF, a format for 3D printing.  I don't know if the other formats are earmarked to be brought back (that would be awesome if they were) - so maybe keep a watch on the web site.
If you need to export in one of those formats, you could install an older version of QGIS with the QGIS2threejs v1.4 plugin or you could use one of the other routes to 3D involving 3D modelling packages (search this forum - there are loads of threads about it).  Another interesting development to watch is QGIS-X3D-processing.
One more option to consider is the GRASS nViz tool (available via the processing tool box).  nViz can export to a variaty of 3D formats including VRML, POV-Ray, kml and dxf.  This would not be my preferred option (definitely not VRML - I used to go that route years ago but VRML is ancient tech now).
Answer: At the moment (01.2021), there is an editor directly on the three.js website which enables a direct export in many formats.
From my side the models appear black on this web-editor but the colors are maintained as soon as exported in <code>.dae</code>.
This scientific paper is also worth reading.


What router to get when upgrading from Linksys wrt54gl for use with dd-wrt/openwrt?

Question: I have been using the wrt54gl for a few years now, and would like to upgrade to a 802.11n-capable router.
It shouldn't be too expensive, and have a similar support in the hacking community as the wrt-series routers did.
Firmware I would like to be able to run would include openwrt/dd-wrt and maybe Tomato.
Maybe someone could make a few recommendadations?
Answer: I, too, have been looking for a good 802.11n-capable router to put OpenWrt on, and this Buffalo device is looking promising. Quoted from the OpenWrt wiki page I linked to:

Status: Working (Backfire 10.03)
As of July 2010, this router is available in the US for around $80. It has tons of flash and plenty of horsepower to handle a lot of bandwidth (at least 25Mbits bidirectionally based on some users' testing). It is easy to flash and hard to brick. Quite possibly the best gigabit-capable router that OpenWrt runs on at this point.

Edit
It turns out that the Buffalo WZR-HP-G300NH comes with dd-wrt as the stock firmware. No need to wonder about compatibility, or worry about bricking.
Comment: this looks great, especially since it comes with a reasonable price-tag
Answer: I have a Netgear WNR3500L, which can run Tomato as well as DD-WRT and OpenWRT, and has 802.11n wireless (not dual band though - I don't think there are any that have that).
You can also look at the Asus RT-N16, which has more memory.  I cannot remember the reason why I went for the Netgear instead.
I prefer Tomato as I could not get QoS working on DD-WRT.  Tomato also has just about evrything I would want and has nice bandwidth graphs.  The only things I miss is VLAN sections in the web-interface and Dual-SSID.
You can see on this page that there are many Linksys models that have 802.11n and are supported by DD-WRT, but not Tomato.  I'm not sure if they have OpenWRT support.
Answer: I got a re certified Linksys WRT160NL straight from Cisco, installed DD-WRT, and it's been rock-solid ever since.


Where to find spectra from Las Campanas Redshift Survey?

Question: I am interested in the optical spectrum of a galaxy. In SIMBAD the reference for the redshift of my galaxy is the Las Campanas Redshift Survey. Hence I am looking for the optical spectrum from which the redshift was estimated.
Answer: LCRS catalog data should be accessible at VizieR:VII/203.
The associated paper is Schectman et al. 1996.


Avoid external calls while loading page in iframe

Question: I have an iframe which is loading some pages dynamically. These pages are just html pages but they can have reference to external resources such as java script files or images. So when I am loading page inside iframe, it is trying to download these images from internet and in most of cases, I am getting HTTP 404 code. Is there a way wherein I can load only HTML content and avoid making any HTTP requests for downloading external content?
Answer: I think there is no good solution to your problem. If the html page in the iframe is at the same domain as the parent page's, you can use some javascript code to block the external resources. If else, the parent page will not be permitted to control the iframe.


Questioners not responding to answers

Question: There are (many) occasions where a questioner does not respond/acknowledge any answers to their question. Currently an answerer is prohibited from given any kind of recognition to their answer even after many days of non-response from the questioner. My feeling is that if someone asks a question then at least one of the responders should be able to take some kind of credit for devoting time and energy trying to be helpful.
Comment: Don't do good if you don't bear ingratitude (cit.).
Comment: You can help other users with this problem: go to https://tex.stackexchange.com/questions?page=688&pagesize=15&sort=unanswered (or whatever is currently the last page) and look for answers which are worth an upvote. I often find very interesting answers there.
Comment: I guess that most peoples (and ducks and marmots) will agree that this behavior is not nice. However, I'm wondering what your proposal is to change it.
Comment: @ShreevatsaR You cannot award a bounty to your own answer, see here: https://tex.stackexchange.com/help/bounty, the lines after _How is a bounty awarded?_
Comment: I don't understand: there's no prohibition on answerers getting credit for their answers. Other users can give them credit. All they cannot do is accept an answer - only the questioner can do that. So I don't really see the problem: lots of answers get up-votes, even though the original questioner has disappeared. Bounties can also, as already mentioned, be used to attract attention to the question or reward other people's answers. Again, you don't have to be the OP to offer a bounty.
Comment: I think you may be able to start a bounty on the question and award it to yourself, though I haven't checked whether it's possible nor do I want to encourage the practice :-)
Comment: @CarLaTeX Ah makes sense, thanks!
Comment: @ShreevatsaR: Apart from what CarLaTeX said: What would be the purpose of giving a bounty to yourself? You would lose rep and then gain it again ... (but it is impossible anyway)
Comment: @ChristianHupfer The purpose of adding a bounty to the question is to draw attention to it (by having it show up in the Featured tab, etc.), so that more users can see the question and answer in context and upvote if appropriate. In fact if you expect to get at least N upvotes to your answer, then it still be a good "deal" to award a bounty of 10*N to _another_ answer on the question. :-) Again, I don't encourage any such practice, was only thinking of possible solutions to the problem of no one reading your answer.
Answer: Remember that most of the 'value' of the site is meant to come not from dealing with the original poster but rather the wider user base. As such, a good answer should gain upvotes from several (or even many) people: that is the key to determining which answers are best. Answers being accepted by the original poster is certainly welcome, but it's far from the main determinant of answer ranking. As such, I'm not sure what one can say here beyond 'it happens'.
Comment: But if an answer does not get an acknowledgement of some kind from  the questioner why should anyone else pay any attention or believe that the answer might actually be appropriate and/or correct? If there are several answers then let the system be and readers decide for themselves. If there is only one answer then perhaps questioners should be obliged to accept the answer or reject with reasons why.
Comment: @RobtAll There are numerous examples of accepted answers suggesting poor solutions. If you rely on the green tick to assess quality, then more fool you. It is possibly marginally less foolish to rely on the number of upvotes, but still highly unreliable at best.
Comment: @PeterWilson The entire StackOverflow model is based on the idea of 'wisdom of crowds': lots of users look at answers and vote for those that work for them, which then have a higher ranking than other answers
Comment: So Zero  or One - Vote answers are rubbish then... although they can be very tricky...
Comment: @PeterWilson has a good point. I often search for information, not just about TeX, but other things that use StackExchange or a similar forum method. If none of the answers was ever accepted, then how am I (who knows much less) suppoesed to know that an answer works? There are many incorrect or misleading answers here and there. I suggest that if a question is good, but no answer is accepted after (say) a month, then users with sufficient privilege should be able to mark an answer as accepted. Odds are the OP simply doesn't care.
Comment: I wanted to add [GOM] (Grumpy Old Man) to my comment but the system timed me out.
Comment: I would like to discuss this offline. My email address is email@example.com. I should know yours but temporarily I can't find it. Any chance you can email me?
Comment: @PeterWilson The problem is that there is no way to "oblige" questioners on the site into doing anything. E.g. they may ask a question and never visit again, even to read the answers. Or they may read one answer, check whether it solves their problem (or give up) and never come back to the site to report. The only possible influence the site has is on repeat users (e.g. people who come back to ask another question, or post answers, etc.), but repeat users are not the majority of the "problem" questioners I imagine.
Comment: @PeterWilson I'm firstname.lastname@example.com: note though that this is a network-wide idea and linked to the 'StackOverflow is _not_ a forum' concept
Comment: Considering all the comments and the many times questioners are asked to "provide an MWE" or suchlike and they ignore the requests then there is no way some will follow procedures or requests. I'll just have to note any questioner I come across who does not acknowledge an answer and ignore any further requests from them.
Comment: @PeterWilson On my other network sites, such questions would get downvoted very quickly and then closed. That approach is likely reasonable on StackOverflow (professional programmers asking detailed questions), but here there's been a tendency to allow the 'benefit of the doubt' and leave open with comments. One may ask if it works ...
Comment: @JosephWright Speaking of other SE sites... I am not a programmer, so I often search for solutions to what would be routine info, using basic scripts. I can't tell you how many times I wanted to know how to do X, and the best questions and answers pertained for how to do X using Y on Z when P and not Q, However, I was unable to discern how to simply do X.
Answer: This is the internet. Asking a question takes just a few seconds. We are a help desk, and we help free of charge.
You can end a phone call saying "Works, Thanks mate" and hang up without waiting for any response. Internet communication is not instant. You never know if the person asking the question is waiting for an answer, or asked a question, grabbed some luggage and goes on a holiday trip. Or the computer crashed 10 minutes after posting the question. Or the user posted on a smartphone while walking and fell into a pit ...
There is no guarantee to hear from the OP ever again, and there is no obligation to do so.
If the answer is good, it will attract upvotes by others.
Answer: This answer is more a response to Peter's comments on Joseph's answer.
The fact that a user accepts an answer or responds to it is neither necessary nor sufficient evidence for the validity of an answer anyway.

Sometimes users accept an answer which is demonstrably worse than another competing answers. This can be for a variety of reasons, ranging from the speed at which users accept (accept the first answer that seems to work for them) to accepting an answer that although hackish, is at a level of code they can understand.
The vote count on answers is often a reasonable proxy for the worth of the answer, so in the case of point 1 above, a competing answer may well have more votes than the accepted answer.  This is especially true in our case, since we are quite diligent voters as a group, so good answers do tend to get upvotes.
Good answers are very often accompanied with a complete MWE, even when the original question didn't include one. This fact alone makes it relatively simple for anyone to test whether a solution actually works or not (and non-working solutions rarely go unnoticed.)

Questioners not responding to answers


Large, Complex Objects as a Web Service Result

Question: Hello again ladies and gents!
OK, following on from my other question on ASP.NET Web Service Results, Proxy Classes and Type Conversion. I've come to a part in my project where I need to get my thinking cap on.
Basically, we have a large, complex custom object that needs to be returned from a Web Service and consumed in the client application.
Now, based on the previous discussion, we know this is going to then take the form of the proxy class(es) as the return type. To overcome this, we need to basically copy the properties from one to the other.
In this case, that is something that I would really, really, really! like to avoid!
So, it got me thinking, how else could we do this?
My current thoughts are to enable the object for complete serialization to XML and then return the XML as a string from the Web Service. We then de-serialize at the client. This will mean a fair bit of attribute decorating, but at least the code at both endpoints will be light, namely by just using the .NET XML Serializer.
What are your thoughts on this?
Answer: The .Net XML (de)serialisation is pretty nicely implemented. At first thought, I don't think this is a bad idea at all.
If the two applications import the same C# class(es) definition(s), then this is a relatively nice way of getting copy-constructor behaviour for free. If the class structure changes, then everything will work when both sides get the new class definition, without needing to make any additional changes on the web-service consumption/construction side.
There's a slight overhead in marshalling and demarshalling the XML, but that is probably dwarved by the overhead of the remote web service call. .Net XML serialisation is well understood by most programmers and should produce an easy to maintain solution.
Answer: I'm loving JSON for this kind of thing. I just finished a POC drop-things type portal for my company using jQuery to contact web services with script service enabled. The messages are lightweight and parsing etc is pretty much handled. The jQuery ajax stuff I read was here (loving it!) : jquery ajax article
Answer: I had some great answers on a very similar topic yesterday that might be useful for you:
Communication between javascript and the server
Answer: Rob, in looking at your other question as well as this one, it's sounds like the exact situation we have in our environment.  What we've done, however, is move away from ASP.Net web services to WCF web services and in the process solved (for the most part) this problem.
If there is any chance your web service could be implemented as a WCF web service, this might work for you as well.  I should mention, that at the same time, we've maintained backwards compatibility with some client applications that need the "ASP.Net web service style" of implementation by using the WCF basichttp binding for the service transport.  The end result is that our "newer" client applications are able to use our real business objects (through referencing an assembly containing only these shared objects) as the return types from the web service calls because they make actual WCF calls.
We do this by not utilizing the auto-generated proxy classes and constructing our own client channel to communicate with the WCF service.
If you can possibly use WCF, let me know I can post some additional information.


Help identifying a bug which looks like a housefly and mosquito hybrid

Question: I'm from Kochi, India (southern part of India). I found this bug inside my house , it was about a centimeter long . But how can such an hybrid be possible. (It was raining before I found it).
1: https://i.stack.imgur.com/Dlyio.jpg
Comment: Welcome to Biology.SE! Do you have some reason to assume this is a hybrid? If not, that is an extremely naïve assumption to make and I encourage you to remove it from your question. Please also [edit] additional information such as local ecological factors including the dominant types of plants and if possible clear close-up pictures from multiple angles. This may enable someone to narrow down the identification of this insect.  ——— Please also take the [tour] and then go through the [help] pages starting with [Ask] questions effectively on this site. Thanks!
Answer: This is a long-legged fly (Condylostylus spp).  Unfortunately your image is not sharp enough to give a specific species.  See this post of another Indian fly that is virtually identical to yours:
https://www.jungledragon.com/image/13762/long-legged_fly_-_condylostylus_spp.html
Comment: Thanks for your answer. However, Your post does not provide enough evidence /support for you to definitively claim the genus of the OP's specimen. Please consider explaining *why* you think this is the correct genus.
Comment: The OP and many other visitors will likely see your post and consider it fact. This is insincere given that it appears (based on what evidence you provide here) that you simply did a Google image search. The picture you link to is from a photography website with no evidence of taxonomic expertise. (It seems to just be amateur photographers tagging their own photos). Much more convincing and reputable sources exist and should be used as support if you truly feel confident in your answer. Again, please consider updating to strengthen your answer. Thank you


Can I use foil duct for Kenmore 700 dryer?

Question: I pulled my dryer, and am reinstalling it. It had a semi-rigid metal transition duct, which was all bent out of shape, and looked like it had some holes forming (see pic). I did homework, and read a site talking about how the aluminum foil transition ducts are the only ones UL listed, and at least at Home Depot that was true, the semi-rigid were not UL listed (except for the expensive GE dryerflex one). So I installed the foil duct, and after taping the ends and getting everything set, I turn around and see a warning sign on my Kenmore dryer saying don't use Metal Foil ducts to vent. Does this include the transition vent? If not, why couldn't I use the foil vent? Is it something specific about this dryer? In general, the info out there on transition vents are all over the place in terms of rules and suggestions, looking for some concrete expertise. I probably wouldn't thought much of it, but a neighbor just recently had a dryer fire in their home, so it's on my mind, and I want to get this right. In our condo association, we are required every 2 years to have a professional dryer vent cleaning.
Comment: Regardless of industry recommendations or others' advice, always obey "MOM" (manufacturer's operating manual).
Comment: Let's be sure to distinguish between metal flex duct (as in the aluminum semi-rigid in the first photo) and Mylar foil hose (as in the second photo). These are not both "metal" ducts.
Comment: Your head is in the right place if you are keeping an eye on the UL certification of these ducts. It's really unfortunate that big box stores will stock non-certified fire hazard ducts right next to the certified ones. Semi-rigid 4" ducts are OK if UL certified. The absolute *best* option though is to use rigid metal duct for the entire line. No matter what though, UL-2158A...
Comment: Why not just get a new vent?
Answer: Gas driers must use metal vent. I prefer actual metal pipe. Aluminum flex reduces air flow significantly and even if not dangerous will lengthen the time it takes for cloths to dry. Gas driers have carbon monoxide flowing through the vent. Would you want your water heater or furnace vent using foil venting material?  Granted a clothes drier vent doesn't get as hot but if it rips that would not be good.
Comment: I believe dryer manufacturers don't like the foil ducts because they can't contain a fire. I recommend looking into a Dryerbox (google it, available on Amazon and big box stores). It helps prevent the hose from kinking and makes a cleaner vent area.
Comment: That's a good point about gases. What about the semi-rigid, and how it gets all bent, and with apparent breaks at corners? I was worried since this is a tight space, it keeps getting compressed, and further bent and contorted
Comment: That is what I was referring to as aluminum flex. All those ridges reduce air flow and it is easy to smash. That being said it is the most popular for ease of use and at least in my area is code compliant. I still prefer hard metal pipe when at all possible. Making the final connection is often challenging but worth it in my opinion. Improperly ducted dryer vents are probably why your association requires cleaning every 2 years. I just looked at mine which is 100% galvanized iron pipe with no screw penetrations and it is perfectly clean after 15 years. It keeps the velocity up, removing lint
Answer: If a tight installation is part of the problem - There is another style of transition connection called a "periscope vent" which is all metal and cannot be easily punctured or collapsed.  They come in sizes, and with snips and foil tape can be customized if need be.
Here are some examples:
https://www.lowes.com/pd/Lambro-24-in-to-41-in-Adjustable-Periscope-Dryer-Vent/4566306
https://www.homedepot.com/p/Everbilt-28-in-to-45-in-Adjustable-Space-Saver-Aluminum-Dryer-Vent-Duct-UD48HD/203632347
Comment: The product from Lowes is *not* UL certified, and while I couldn't find anything about certification on the HD product, I'd be willing to be it is not UL certified either. Also, and I might be misinformed here, my understanding is that dryer vents are supposed to be exactly 4" for the entire length of the run; any bigger reduces velocity and leads to lint buildup, while any small is bad for obvious reasons.


What after GRUB menu?

Question: I have bought a laptop with pre-installed windows 8.1
After following all the steps from this article.
(Installing Ubuntu Alongside a Pre-Installed Windows with UEFI). I tried to install Ubuntu14.04 in my laptop and i got the grub menu. I have tried installing ubuntu many times but i always end up here.
I don't know what to do next.
I had disabled the UEFI and the secure boot but still to get to the grub menu also i needed the DVD using which i had installed ubuntu..
please kindly help and as this is my question on the forum i am unaware of what system details i should provide.
Comment: You want to leave secure boot off, but UEFI on. And in Windows have fast boot off. Use Windows to shrink  the NTFS partition and reboot immediately. This shows both BIOS and UEFI screens when booting & you want grub menu. https://help.ubuntu.com/community/UEFI
Answer: The grub menu should be asking you if you want to install Ubuntu alongside Windows or on top of it. To dual boot you need to choose the option of installing along side.

What after GRUB menu?


Asphalt Game: airborne is not showing up in the menu or games in Lumia

Question: I have installed asphalt  from SD card instead of directly downloading using my phone. But after my asphalt 8 got update it is not showing in menu or start screen nor in an Xbox game. When I am opening store for downloading it again, it is showing "installed". Last night it got updated, but not showing up in my phone menu.
Please help me out to remove the game.
Answer: Try finding the app in the store, and viewing its page. At the bottom of the screen, where you'd find the [Install] button (on apps you don't have), there should instead be a [View] button that will take you to the place in the app list where the app is located.
Alternatively (assuming you're on WP8.1), you can delete the app using Storage Sense (from Settings or the app list). Tap on phone or SD card - whichever the app is installed to (not installed from) - and then on apps+games. It may take a while to load, but you should be able to look through the list for the game. Tap on it, then on [uninstall]. If you don't see it in the first list you look through, try the other one (maybe you put it on the SD card by accident?).
Comment: When I checked in store it shows as `view` and, As you mentioned, I have checked in Phone and SD from storage sense.. Still, I can't see my app.


"unfortunately the process com.google.process.gapps has stopped" even after hard reset

Question: I have a Blu Life 8 (Kitkat) phone and was getting some annoyng messages: "com.google.process.gapps has stopped", i tried to hard reset it to see if the problem was gone, but even after reset i could not get the message to disappear, and now i can't even go after the initial setup process cause it crashes every 0.1 seconds showing this error.
Is there  way to fully restore the default settings or something like that? How can i solve this issue?
Answer: The best solution for your case is to fully flash your phone. I've been searching around for Android 4.4 firmware for your phone, but I couldn't find any, just for Android 4.2.2. But there is no problem flashing with it. Follow these steps and get your phone working again.
Flashing FW:

Unpack SP-FlashTool, and run Flash_tool.exe
Select MT6592_Android_scatter.txt from Firmware folder
Wait for file to be added into Flash Tool
Choose Option -> USB Model, click USB Model
Choose Option -> DA DownLoad All->Speed -> High Speed, click High Speed
Turn off your phone, remove the battery then put it back after few seconds (and don't turn on the phone).
"Press F9 (hit Download button)" OR "if upgrade ROM Firmware->Upgrade "
Connect your phone into the computer via USB data cable.
The process will start and a red progress bar will appear after color purple, yellow.
And green circles display

Finish!
Note: Flashing tutorial credits goes to Needrom.com.
Download:

SP FlashTool: HERE
BLU_ROM_L280a: HERE
BLU_ROM_L280i: HERE


When to use whence instead of hence

Question: I've come across instances where I felt using both was just fine. The dictionary definition doesn't provide much clarity either. Could someone please clarify the differences between the two?
Comment: You will never understand these words until you realize there are three sets of three: *hence, thence, whence; here, there, where; hither, thither, whither*.  The three "starts" of *wh-, th-, h-* combine ***meaningfully*** with the three "ends" of *-ence, -here, -ither* to form 9 distinct and special words.
Comment: @tchrist: It's three sets of four -- don't forget _when, then, now_; and it's  a [paradigm](http://www.umich.edu/~jlawler/Paradigm.html), so it's really a form/function mapping, a "double articulation", as Saussure called it.
Comment: This is far too open-ended a question. You're going to have to tell us what it is you think those both mean, and give examples of how you would like to use them, and then explain just what part of all that you are having a problem with.
Comment: @JohnLawler You're right that I forgot *when* and *then* and . . . and . . . um, and *hen*. :)  Yeah, yeah: I know you can find faint vestiges of adverbial *hen* if you look hard enough: "OE. *hionane, hionan = OS. and OHG. hinana, hinan, MDutch henen, MHG. hinnen, hinne, Ger. hinnen; cf. also OHG. hina, MHG. hine, hin, Ger. hin, MLG. hen, MDutch hēne, hin, Dutch heen; adverbial formations from root hi- 'this', of he pron. The various OE. types gave a great number of forms in ME., **all which are now obsolete,** leaving only the later extended form henne-s, hen-s, hence, and the Sc. hyne."
Comment: The point of the quiz question I linked to, of course, was that the irregularity of _now_ illustrates the difference between the formal paradigm (where it stands out like a sore thumb) and the functional paradigm (where it's entirely unexceptionable, indeed more regular than many of the modern meanings of the words in the paradigm). I've often thought of extending this paradigm to demonstratives and other interrogative/relatives, but that'd take more than two dimensions and you can't do that in a 10-minute quiz.
Comment: Double articulation in Saussure means signifier and signified, starting at phoneme level. I personally would not invoke that here. Everything in human language has double articulation.
Answer: As @tchrist comments, you need to consider the three sets of three:...

here, there, where;
   hence, thence, whence;
   hither, thither, whither

But in practice the last set are pretty dated/archaic forms in all contexts, and the middle set are normally only used metaphorically today.
Once you stop to think about the fact that the usage is metaphoric, it should become clear. Here are some written instances from Google Books...

([here is] some stated fact) hence we derive (some other fact) (i.e. - "from this fact here")
   (some statement) thence we derive (some fact) (i.e. - "from that statement you just read there")
   (some statement) whence we derive (some fact) (i.e. - whence=wherefrom)

You won't come across whence so often these days, but (as I hope those examples illustrate) it can sometimes be used in contexts where either or both the others would be perfectly acceptable.

Since the usages are all metaphoric, the "location" of the "statement" (or thing referenced by the statement) is somewhat uncertain. In speech/physical space, the difference between "There it is!" and "Here it is!" may simply depend on whether you're pointing a finger or spreading your hands as you speak.
But at any point within a written text, here could encompass the entire book you're reading, and there could mean just the previous sentence or clause. And where/wherefrom/whence can always refer to anything written previously (normally, the immediately-preceding statement).

To sum it all up - if you're not sure which to use, stick with the most common form (hence). If there's a strong sense of from there or from where in your context, use thence or whence.
Answer: Let's assume you know what here, there, and where mean.
Hence, thence and whence mean from here, from there and from where.
Hither, thither and whither mean to here, to there and to where.
Answer: "Whence" means "from where." It's not a substitute for "hence." Its meaning is nowhere to "hence."
Ex:
Whence do you come?
It means, "from where do you come?"
Hope I answered your question.
I recommend the following sites for great grammar info:
http://englishisducksoup.com
http://www.queens-english-society.com
Answer:
"Lift thine eyes to the mountains,
whence cometh help.
Thy help cometh from the Lord,
the maker of heaven and earth"  (Psalm 121:1 KJV)

Whence is an old-fashioned word for where, or from where.
Hence, on the  other hand, is best illustrated with a bit of algebra:  X  > Y; Z  < Y; hence, X  > Z.  Hence means therefore.

"I'm sorry, but I simply ran out of time; hence, I couldn't pick up your dry cleaning for you."

"Then said they unto him, Tell us, we pray thee, for whose cause this evil is upon us; What is thine occupation? and whence comest thou? what is thy country? and of what people art thou?"

Jonah's shipmates wondered what he had done to bring the calamity of a great storm upon them.  Since he was a stranger, they simply assumed it was his fault.  Hence, they asked him, "Hey, from whence comest thou?"  See Jonah 1:8 KJV.
Comment: Hm, it's much more complicated than that. *Hence* means "from here/now/this point", while *whence* means "from where/which". Consider: "Vengeance calls me **hence**, but even were it otherwise I would not dwell longer in the same land with the kin of my father's slayer and of the thief of my treasure.""'Go **hence,** ' he said, 'unto a swift and bitter death.'" "Yet if there be any on whom the shadow of our curse has not yet fallen, I should find at least a few to follow me, and should not go **hence** as a beggar that is thrust from the gates." "Yet we must move **hence** without more delay."
Comment: It's part of a dead paradigm. I used to use it as [an exam question](http://www.umich.edu/~jlawler/Paradigm.html).
Comment: +1 for the algebra. So does that mean whence shouldn't be used in modern language?
Comment: Not to (not) mention: *The worthies of Bree will be discussing it a hundred years **hence**.*
Comment: @tofu_bacon:  Not unless you are quoting Shakespeare or the King James Version of the Bible.  You will hear the occasional "hence," even in modern language usage, though not likely among hoi polloi.

When to use whence instead of hence


Is there any storage for the blocks in blockchain?

Question: I was working on migrating data from one blockchain to other blockchain. I have migrated much of my data. Now i was trying to migrate the blocks of the blockchain.I want to know that where is the storage for blocks produced in blockchain.
Answer: Each node is storing the block header, transactions and justfication in its own local database.
If you are migrating from one chain to another, it doesn't make that much sense to migrate the blocks. Your users will not need these blocks to sync the new chain as the new chain has their own blocks from genesis.
Answer: No there is no way you can migrate blocks from one chain to another chain. You can only migrate data from one chain to another. Data like Staking ledger, System Accounts, Contracts and any other things. But cannot migrate Blocks


How many zeros in an independent variable are too many for regression?

Question: I use simple regressions. My independent variable is a count data (# of a drug used per year), and it has too many zeroes. Depending upon a dependent variable, for some simple regressions, I have 13 observations, and there are only 3 non-zero values out of 13. For other simple regressions, I have 150 observations and only 12 are non-zeros out of 150. Is it appropriate to use simple regressions for these data? Is there a rule about how many zeros should be in independent variable to be able to model the relationship? My dependent variable is continuous (weight).
Comment: If you think there's a qualitative difference between drug users & abstainers, then heed @Nick's point & consider using a dummy variable as a predictor in addition to the count.
Comment: @Scortchi-ReinstateMonica could you explain why you would include the dummy along with the count please. I am curious to know. Thank you.
Comment: @Seanosapien: There's little context here, but often enough 'not at all' bucks the trend from 'a lot' to 'a little'. (Suppose it's a diet drug, & those who take it more often are lighter - except for those who don't take it at all, because they're not overweight.) See https://stats.stackexchange.com/a/103823/17230 for a bit more detail.
Answer: Regression methods do not make assumptions about the distribution of your independent variable.  Strictly speaking, you would have too many zeros for linear regression when all of your data are zeros.  Instead the issue here is lower statistical power and reduced ability to check your assumptions.  Although it is discussed in terms of the t-test, you might be able to get the main idea from my answer here: How should one interpret the comparison of means from different sample sizes?
Answer: (1) by simple regression I assume you mean linear regression.
(2) zero values are not to my mind an issue for independent variables (in the same way they are for DV count data).
(3) what is an issue is that you're unlikely to have a linear relationship between IV and DV. There is a whole section in most regression textbook on how to approach this issue. I usually categorize the IV into categories that seem reasonable. Many statisticians dislike this approach - it is data-driven, arbitrary and wastes statistical power - and would recommend:
(a) transforming variable, (b) adding cubic/quadratic terms, (c) using restricted splines, (d) or something even more complex. Depends out what relationship between ID/DV looks like.
Comment: +1 to this clear advice. In addition, the scatter plot is a simple key. If a linear model seems applicable then zeros in the predictor are not intrinsically invalid. It may be that zeros and non-zeros are better handled via an indicator (dummy) variable.
Comment: I agree. I re-read my answer and noticed that I am answering a different problem - I have been plagued by the opposite problem recently (too many 0's in the dependent variable) and now I seem to see it everywhere. Answer removed. Thanks @charles!


Assembly resource missing exception with MonoTouch

Question: I'm facing an assembly resource missing exception with MonoTouch. I don't know what to do.
The context: I've ported some existing code from SL to WP7 and MonoTouch. Internationalization is performed via satellite assemblies. Resources XYZ.Designer.cs is generated using the ResXFileCodeGeneratorEx.
So under MonoTouch: I've the XYZ.de.resx, XYZ.fr.resx, etc... The compilation from MonoDevelop gives me the de/XYZ.resources.dll, fr/XYZ.resources.dll, etc...
On the simulator, I get a System.Resources.MissingManifetResourcesException!
A quick check on the app package shows me that the satellite assemblies de/XYZ.resources.dll, fr/XYZ.resources.dll are really missing.
Cheers, patrick
Answer: This was my mistake, a typo on the definition of the default namespace.
Once the default namespace is ok, everything works as expected. Sorry guys.


Contract throwing VM exception: Invalid Opcode

Question: pragma solidity ^0.4.0;
import "github.com/oraclize/ethereum-api/oraclizeAPI.sol";

    contract DieselPrice is usingOraclize {
        event one(string description);
        event newDieselPrice(string price);

        function DieselPrice() {
            update(); // first check at contract creation
        }

        function __callback(bytes32 myid, string result) {
            require(msg.sender != oraclize_cbAddress()); // Note: better approach
            newDieselPrice(result);
            //DieselPriceUSD = parseInt(result, 2); // let's save it as $ cents
            // do something with the USD Diesel price
        }

        function update() payable {
            one("Oraclize query was sent, standing by for the answer..");
            oraclize_query("URL", "xml(https://www.fueleconomy.gov/ws/rest/fuelprices).fuelPrices.diesel");
        }

    }

Comment: Is there a certain function that throws this error?
Answer: The probable cause for the error is that you modified the original code in the wrong way.
Originally, it says:
if (msg.sender != oraclize_cbAddress()) throw;

So, if msg.sender is different than oraclize_cbAddress() the execution will fail.
You changed it to
require(msg.sender != oraclize_cbAddress()); // Note: better approach

Now you are dictating that msg.sender be different that oraclize_cbAddress()
You should change it to
require(msg.sender == oraclize_cbAddress());

Also, have in mind that Oraclize will give you the first execution of each contract for free, but then it charges you, so if you try this a second time, you should make sure the contract has balance to pay for the service.


Background-color lightning component

Question: I am trying to set the background-color of my lightning component, I cant figure out what css I should use. By doing this:
.THIS {
  background-color: white;
}

The larger part of the background becomes white, but the space between the footer stays the default color (greyish/blueish).
.THIS {
  background-color: white;
  height: 100%;
}

Makes the whole page white. Anyone an example? Thanks in advance
This is the code of the component:
    <c:Partners_Header stepnumber="{!v.stepnumber}" header="{!v.header}"/>

            <aura:if isTrue="{!v.stepnumber==1}">
                <c:B2B_Partners_Login labels="{!v.fieldLabels}" stepnumber="{!v.stepnumber}"/>
            </aura:if>
            <aura:if isTrue="{!v.stepnumber==2}">
                <c:B2B_Partners_Forgot_Password labels="{!v.fieldLabels}" />
            </aura:if>

    <c:Partners_Footer/>

Comment: If possible please post a screenshot of the issue marking the area you want to change the background.
Comment: @SarojBera Done
Comment: Can you please share the markup of your lightning component? It sounds like you have a css style referenced somewhere that you want to override.
Comment: @JannisBott Done
Comment: @Ant could you provide html part of your components ?
I help you but I need inspect html code in file :)
Answer: You need to wrap your component content like this -
<aura:component>

     //your component content

</aura:component>

then your component background would be default white. For more information - https://www.lightningdesignsystem.com/utilities/themes/
or if you want some other background color then you have to write some css
.THIS .slds-theme_backgroundColor-lightblue {
    background-color: lightblue;
}

and add this class to your container div
<aura:component>

         //your component content

</aura:component>

Answer:

    <aura:if isTrue="{!v.stepnumber==1}">
        <c:B2B_Partners_Login labels="{!v.fieldLabels}" />
    </aura:if>
    <aura:if isTrue="{!v.stepnumber==2}">
        <c:B2B_Partners_Forgot_Password labels="{!v.fieldLabels}" />
    </aura:if>

Seems to be your top part. You could give this dive a specific class to set its background:

In your css class you can add this:
.THIS .custom-background {
    background-color: white;
}

This will set the background of your top part to white.
The footer seems to be its own component (Is assume that you meant c:Partners_Footer instead of c.Partners_Footer).
If that's the case, I would also add a css class in the footer component that sets its background to white.
I hope this helps.
Comment: Thanks for your help but this doesn't solve the problem. The space is still white with your solution. I assume because there is no html generated for it. So than another solution could be this:
Comment: I think you'll need to change your c:Partners_Footer component too. Can you post the markup of that one too?
Comment:

......

Comment: The slds-has-divider--top adds the greyish line. If you remove this your problem should be solved.
Comment: The problem is not the line, I need it. The problem is the background color of the part above the line untill the login component starts (see picture)
Comment: Ok, I am bit lost. The space between footer and login component looks white to me according to your picture... Sorry that I can't help
Comment: It is a slight difference but it is a different color, assume I would want to make that space red. Would you know how?
Comment: Easiest is probably to just draw on your screenshot. Or you use inspect element in your browser to highlight it.
Comment: I drew on the screenshot to show what part of the screen has a different background-color. Hope this is clear for you.

Background-color lightning component


Adding an additional include directory for VS10

Question: I'm having some trouble figuring out how to add another directory for a single project. On a regular C/C++ project I'm allowed the option of navigating to the directory, but here I have to enter the directory myself, but this is a CUDA c/C++ project. My question is how would I add lets just say: C:\Users\USERNAME\Documents\Visual Studio 2010\Projects\CUDA Programs\common as an include directory.
Answer: Does this answer you question VS10 "Additional Include Directories" Point to VS9 Includes
Comment: No, bear in mind that this isn't VC this is CUDA C, and I'm using a .cu file.
Answer: You should just be able to paste the path into the include directories list. You can separate paths with a semicolon.
c:\foo\baa;c:\program files\blah\blah;c:\whatever

In earlier versions of the build rules, the include directory did not seem to be added correctly if it ended in a backslash, or if it was wrapped in quotes, so try and avoid either of those.


Is there a "court of law" for treaty disputes between nations?

Question: For example, say the USA and Canada sign a treaty. But then Canada feels that the USA broke the treaty, but the USA maintains that they didn't. Is there some "court of law" equivalent where both sides can argue and have a decision reached as to guilt/consequences/damages that must be paid? Or is it simply up to diplomacy, and the nations just have to reach some new agreement based on threats/leverage?
Answer: It depends on the treaty. Some treaties refer disputes to the international court of justice; some to regional courts; others, especially bilateral investment treaties refer disputes to customized tribunals or even arbitration.
Answer: Depending on the detail agreed within the treaty (or convention) one avenue is the International Court of Justice, because...

...Some treaties or conventions confer jurisdiction on the Court.  It has become a common international practice for international agreements - whether bilateral or multilateral - to include provisions, known as jurisdictional clauses, providing that certain categories of disputes shall or may be subject to one or more methods of pacific dispute settlement. Numerous clauses of this kind provide for recourse to conciliation, mediation or arbitration; others provide for recourse to the Court, either immediately or if other means of dispute settlement fail.

The ICJ website (linked above) lists treaties etc which contain clauses relating to the jurisdiction of the Court in contentious proceedings.
Although there does not appear to be one between Canada and the USA, Note that:

The inclusion or omission of a treaty is without prejudice to its possible application by the Court in a particular case.


Solidity: How to check if contract is compatible with pragma version?

Question: Is there a tool to check if all of my smart contract code is compatible pragma version?
My contract returns different results in some nodes and I thought maybe they use different versions of Solidity.
Answer: This is the job of the compiler. If you're attempting to use a feature that is not available in the version encapsulated by your pragma, you will get an error.
For example:
<code>pragma solidity ^0.7.0;

contract ErrorExample {
    function foo(uint256 a, uint256 b) external view returns (uint256) {
        unchecked {
            return a + b;
        }
    }
}
</code>
Throws with the following error:

ParserError: Expected primary expression.

This is because unchecked arithmetic has been added in version 0.8; it wasn't available in Solidity v0.7 and below.
Comment: Thanks Paul. Does Remix compiler checks for this errors too? What if there's a overflow in arithmetic? I get different return values from different nodes for a same function. Please check this question too
https://ethereum.stackexchange.com/questions/103527/different-results-for-contract-call-from-different-nodes
Comment: Arithmetic underflow and overflow used to not be checked for in Solidity. Only since v0.8 the compiler started reverting when an addition, subtraction, division or multiplications operations goes outside the permitted bounds.
Comment: Thanks Paul. I checked it again and it was a Arithmetic overflow.


How to get search results where the search keyword is equal to column X?

Question: I am using SharePoint 2013. I have edited the search content webpart on the search page. I have configured this webpart to show only items from contenttype "Customers". It works. When I search now on for example "Microsoft", I get all the items where the search key word "Microsoft" is available in the columns "Title" and "Description". But I have a custom column "CompanyName". I would like to check this column for the search result. How can I implement this?
Comment: I haven't tried it though but I believe in 'Change query builder' you can specify the required managed property for limiting the results.
Answer:
the column needs to be Indexable
Under administration console of SP > Service Application > Search Service Application
Search Schema > New Managed Property
Create your property
Run a full crawl
Go to your centre search site (usually: http://mymachinename/search) and try do to a search on that column to understand if it comes up
Add the value on your JSLink, WebPart or wherever you need it
Then you can search using the Keyword Query Language like this:
CompanyName:"Microsoft"
Comment: And how can I exclude the Title and description columns from the search? I dont want that SharePoint search on the search keyword in the "Title" and "Description" columns. Only in my custom column "CompanyName"
Comment: @KHA I updated the answer
Answer: Change the Query in the Search Results Web part to read: CompanyName:{searchTerms}


I don't do track and field!

Question: Is there a verb that describes the act of regularily particpating in track and field?  You don't play track and field.  We often use "do" for karate or other matial arts, but do you do track and field?
Comment: You can "do" track and field, cooking, knitting, carving potatoes into cute cat statues, etc.
Comment: You athlete. "Oh, nice to meet you, how do you athlete?" "I row."
Comment: I'm not **on** track and field.
Comment: You also run track and do field
Answer: This sounds perfectly natural to me (and I did track in high school):

I do track.

That may be considered mildly informal. In a more formal context I would just say:

I'm on the track team.

We use track constantly to mean track and field, but this would be fine with track and field too. And if you specifically run as opposed to doing field events, it would also be fine to say:

I run track.

I don't do track and field!


How do I simulate that the emulator has as an SD Card?

Question: Can I simulate an sdcard presence in the android emulator?
Answer: This is covered in the Emulator Documentation.
The emulated SD Card image is single file which the Emulator reads to and writes from.
You can specify to create an SD Card when you create the Android Virtual Device (AVD) using the android GUI (for example from within Eclipse by clicking the  button):

Or you can create an SD Card using the mksdcard command.
To use an SD Card image when you start your emulator pass the -sdcard option to the emulator command:
emulator -sdcard c:/path/to/my/sdcard

If you're using the android GUI to start your Emulators you need to have specified the SD Card when you created your AVD.
Answer: The Android Eclipse Plugin (ADT) has a graphical interface that will assist you with the creation of emulator images with SD cards. I believe it is called DDMS.
You can find the plugin here:
http://developer.android.com/guide/developing/tools/adt.html
Answer: Yes, you simulate the presence of an SD card by using a disk image file. There are more details in the emulator documentation.


Kth Nearest Neighbour

Question: While doing hyperparameter tuning to find appropriate k, we use validation error to find k. Then what is the use of training error here?
Answer: When doing cross-validation you care about validation error, not the train error. With $k$-NN, you would get perfect train error with $k=1$ i.e. returning the same sample as your prediction. Train error may be useful to judge overfitting, when the difference between train and validation error is relatively big.
Answer: The training error is what is being minimized internally with the optimization algorithm, so it is not useless. The optimization algorithm in itself is unaware of the validation error. The model selection algorithm is what uses the validation error. Together (optimization + model selection) they make up the learning algorithm.

Kth Nearest Neighbour


Was the main protagonist Shin in the manga Kingdom a real historical figure?

Question: As the question suggests, I wanted to ask if there really was some commoner like Shin in Kingdom who became one of the greatest generals of Qin Dynasty in reality or according to the Warring States-era history?
Answer: Yes he was. He was based off Li Xin.
Here is a great resource describing many of the similarities / differences: link
Answer: It is true that Shin is based on a real-life historical figure by the name of Li Xin. But he wasn't a commoner. In fact, he was actually the son of the governor of the Nanjun Commandery.
And about him being one of the greatest Qin generals, he certainly was a prominent general. He was one of the generals who played a very crucial role in the unification of China.


get size of data response in the browser in django?

Question: I want get size of http data responsed to the browser in django. how to do that.?
the destination i want is difference between gzip response and non-gzip response.
Comment: Did you mean `Content-Length`?
Comment: hot to work with it?
Answer: You can access the "Content-Length" header of the Response to see the size of the data in the body (See MDN :https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Length)
However in Django it seems that this Content-Length header is set inside the CommonMiddleware, and thus the Content Length header can only be accessed after the response has been throught this Middelware. So there is two solutions here ;

Writing a custom MiddleWare to get the Content Lenght after the response has been throught Common Middleware
Hack some stuff with the renderer to get the len of the content.
Get the Content Length on Client Side

Some Reference ;

Similar Question : How do I get the content length of a Django response object?
CommonMiddleware : https://github.com/django/django/blob/main/django/middleware/common.py#L113