summary stringlengths 15 147 | text stringlengths 1 19.3k | answer stringlengths 32 22.6k | labels float64 0.33 1 | answer_summary stringlengths 5 164 |
|---|---|---|---|---|
Estimating RPM to RCF in Methods from Older Papers | I'm attempting to replicate a cell biology method from a 1958 Laboratory Investigation paper. The protocol is for the isolation of an extracellular matrix protein, and a key step is a centrifugation carried out for 2 hours at 2300 rpm. Apparently it was not common practice to list make, model, and rotor size of centrif... | I am not sure about what they used in 1958 (perhaps Sorvall). However you may look at recent papers for ECM protein isolation (if that was your objective).
Have a look at this article.
From materials and methods:
ECM protein isolation.
Fibroblasts or A431 cells were removed from the
surface of the culture... | 1 | ECM protein isolation from a culture plate |
When using the acronym package and the smaller option, how to avoid the tiny 's' in the plural acronym? | I'm using the acronym package, and using the smaller option because that is a typographic convention.
\documentclass[a4paper]{article}
\usepackage[smaller]{acronym}
\acrodef{DLL}{Dynamically Linked Library}
\begin{document}
The plural of \ac{DLL} is \acp{DLL} but that `s' just looks way too tiny.
\end{document}
Comp... | According to the answer to this question: Plurals (from The Chicago Manual of Style Online), an acronym should be treated as a word with its own meaning, so (extrapolating) the "s" indicating plural should have the size of the lower-case "s" corresponding to the font size of the acronym.
Invoking the smaller option f... | 1 | Invoking the smaller option for the acronym package results in typesetting the acronym using textsmaller . |
Send & Delete in GMail | Is there any way to add "Send & Delete" button in GMail like "Send & Archive" which can be enabled in labs. any add-ons, extensions or greasemonkey script will do.
| There's nothing in Labs to do this at this time.
Depending on what you're after, you might be able to get close using filters. Create a filter that looks for a particular string in the content ("Contains:"). Make the string something innocuous that no one would ever think to put in a message (something like ///d\\\). ... | 0.777778 | Create a filter that looks for a particular string in the content |
What should I look for in a recording microphone for personal use? | I was browsing through mics on Amazon and quickly realized I was out of my depth. There are a couple closely related questions I am wondering about:
Are there different types of mics for (1) singing into at a concert, (2) singing into in a quiet room, and (3) picking up sound at more of a distance (e.g., singing and... | Great question. What all this really boils down to is the polar pattern or pickup pattern of the microphone. Some mics will pick up more sound from the front and less from the sides and rear. Mics that are extremely directional are good for rejecting the loud drums behind you and also rejecting the sound from a PA s... | 1 | polar pattern or pickup pattern of the microphone |
Directory.GetFiles string gives an error | I am creating a website using asp.net and c#
I need to access all files one by one in a directory. So I wrote the following code.
string[] ssImgs = Directory.GetFiles("images/movies");
Label1.Text = ssImgs[0];
Label2.Text = ssImgs[1];
But it gives an error. What is the correct way to do this? Thanks in a... | A little advice, when using the file system in ASP.NET, leverage Server.MapPath:
string[] ssImgs = Directory.GetFiles(Server.MapPath("~/images/movies"));
where ~/images/movies is the full relative path from the root of the web application.
Secondly, before just grabbing an index of the array, make sure it's actuall... | 1 | In ASP.NET, use Server.MapPath: string ssImgs = Directory.GetFiles |
I want to travel to the USA while working remotely for my non-US employer | I would like to travel in the USA for a period of 3 - 6 months. But I want to spend some time working for my employer (remote work) and getting paid by the employer. Is this possible under a tourist visa (B1/B2)?
I hope this is OK since I will not be getting paid by a US employer. I am in the IT trade so all that I wi... | Since so many people liked the comment I thought I'd turn it into an answer.
What you are describing is done all the time by the US and non-US employees on their vacations/holidays. Technically while you are doing work in while being on US soil you are not working in the US since you're not being employed by a US empl... | 1 | What you are describing is done by the US and non-US employees on their vacations/holidays |
Georeferencing uneven/irregularly gridded rasters | I'm trying to take a set of NetCDFs and turn them into georeferenced datasets using GDAL.
However, the only Geospatial data is a set of 2-D lat/lon arrays. The projection type is not lat/lon. THe arrays give the lat/lon of every individual cell.
I can't use a geotransform to reference the data because of the irregula... | gdalwarp -geoloc allows you to use the complete 2d-array of latlon as georeference. With that, you can use any target CRS to reproject your data to a commonly used projection.
See my answer to this question for an example:
How to match a raster NetCDF data with a vector layer in QGIS?
| 1 | How to match a raster NetCDF data with a vector layer in QGIS? |
What size should I make the line art for a one-sheet poster? | I have very little experience in print, if someone could give me some advice on this matter: I have to illustrate a one sheet movie poster (27"*40"), and I was wondering if I can get good results (meaning good quality for print) working on a less bigger piece of paper, and resizing it to poster size later in photoshop.... | Work at whatever feels comfortable to you if you are working with pen and paper. Then scan it as large as you can with as much PPI as you can.
When you scan the drawing, you can scan it at 500% or more and 1200PPI or more... which will allow you to properly size it for larger reproduction than the original drawing.
O... | 1 | Scanning a drawing as large as you can with as much PPI as possible |
Session Fixation - Setting path to root without / | I have found an XSS vulnerability on the subdomain of a site I am testing, and using it I can set cookies for both the main site and all it's subdomains.
My url currently looks like this:
http://s1.example.com/u/%22%3E%3Cmeta%20http-equiv=Set-Cookie%20content=%22sid=1234;%20path=/;%20expires=Thursday,%2020-May-15%20... | Try URL encoding the / character with the hex representation %2F.
| 0.555556 | URL encoding the / character with the hex representation %2F |
DataTreeListView shows no results | 'm using a custom control from the ObjectListView package. It's widely used by stackoveflow members so that's why i post it here.
But i find it very hard to show data results in the DataTreeListView control.
This is my code:
DataSet ds = LoadDatasetFromXml("FamilyTree.xml");
if (ds.Tables.Count &g... | You are missing following code blocks:
dataTreeListView1.KeyAspectName = "Id";
dataTreeListView1.ParentKeyAspectName = "ParentId";
| 1 | dataTreeListView1.KeyAspectName = "Id" |
Arriving very late at hotels in Athens | This September, I will be flying into Athens at 10:45 PM. I'll be leaving to Santorini, then arriving back towards the end of the week via Piraeus at 11:45 PM.
Will arriving that late in town pose any problem traveling to Athenian Callirhoe Exclusiv near the Parthenon? Will checkin be a problem?
I see that the h... | The last Line 1 metro leaves Piraeus at 00:15, so you're cutting it awfully close even if your ferry arrives precisely on time, and it doesn't pass very close to your hotel anyway (you'd need to transfer to Line 2).
Bus 040 from the port to Syntagma (near your hotel) runs every 30 min through the night, so it's probab... | 1 | Bus 040 from the port to Syntagma (near your hotel) runs every 30 min through the night, so it's |
Thousands of backlinks from Meetup.com | I have been wondering something for a while now. We have a manual penalty from Google on unnatural linking. When I check out "Links to your site" in Webmaster Tools we have 11,387 links from Meetup.com. Is this harming us? After clicking through some of the links randomly I have discovered it is from one of our dealers... | Although your intentions are clear, still I think that that too many links from a single domain can harm your website rankings.
There are various strategies you can apply:
If the back links are coming from a dealer's selling items page, is
there any way that you ask him not to use your link any more?
You can start... | 0.888889 | Removing bad links is better than creating some junk back links |
on mouse over background change in document.write | I need to change the background image on mouseover, but don't know how to do it as it is in a document.write that I did not write. Any help is appreciated. Here is what I have so far. I want B to be whats there normally and MO on the mouseover.
<script type="text/javascript">
function DrawRow (Link,Status) {
... | Are you okay with adding some CSS?
<style>
#somename{
background-image:url("../Images/Green-360-Button.png");
}
#somename:hover{
background-image:url("../Images/Green-360-ButtonMouseOver.png");
}
</style>
And add id="somename" to the <td>
| 1 | How to add some CSS to CSS? |
Which is the older sense of the word "linguist"? | I have been listening to some rants on YouTube against people learning a bunch of languages calling themselves "linguists".
I'm personally interested in both linguistics and languages as a hobby but I have no official training and certainly no qualifications in either.
My instinct was that the ranter was kind of righ... |
linguistics (n.)
"the science of languages," 1847; see linguistic; also see -ics.
The scientific sense of linguist came long after the actual meanings of linguist. So linguist can be used for someone who studies/masters a language/languages.
There is also multilinguist who studies/uses several languages.
M... | 1 | linguist can be used for someone who studies/masters a language/languages |
Service Layer Pattern - Could we avoid the service layer on a specific case? | we are trying to implement an application using the Service Layer Pattern cause our application needs to connect to other multiple applications too, and googling on the web, we found this link of a demonstrative graphic for the "right" way of apply the pattern:
martinfowler.com - Service Layer Pattern
But now we have... | As mentioned in the link you posted, the service layer defines an "interface" for clients by encapsulating the (complex) business logic and centralizing the control of transaction involving several resources. The service layer is not only used when you need to "share" services, it just makes it easier. But even with a ... | 0.777778 | The service layer defines an "interface" for clients by encapsulating the business logic . |
Where is the Zora Queen? | When I go back to Zora's Cave, the Queen is gone. I am told that she is out swimming and very late. I went to the lake and swam around but when I came back, but she is still gone. How can I find her?
| After completing Hyrule Castle, a number of characters, including the Zora Queen, disappear from Hyrule. This is mostly for flavour and finding where she is isn't a sidequest.
The Zora Queen, like the other disappeared characters, is a Sage and you will rescue her after the Swamp Palace.
| 0.888889 | The Zora Queen disappears from Hyrule Castle |
What's the point in adding alt-text to an image? | When you add an image to a post via the helper bar, you get this:
![enter image description here][1]
[1]: http://i.stack.imgur.com/ve8n0.png
What purpose does the enter image description here text serve? I've not noticed anyway of seeing this text, except if I view the page source for the post.
| It adds the alt-text, which is basically a fallback if there is an issue fetching the image. If the image is not found, it'll show a white box with the alt-text in it.
On IE, the alt-text also gives a something similar to a title{*} tooltip, though this doesn't work on Chrome (or, IIRC, Firefox).
So it works exactly ... | 1 | alt-text adds a fallback if there is an issue fetching the image |
Which is better extrusion or assembly for creating blueprints? | When creating a a model of something that will be assembled, in particular furniture blueprints, which is a better approach?
To do many extrusions of the object or the create the pieces separately and join them in parent child relationships?
| I would create the pieces separately and then join them later. Here are some reasons why:
It allows you to preserve separation of concerns. This in itself has many benefits; for example, you could have different team members working on different parts.
It allows you to easily animate assembly instructions by simply m... | 1 | Separate by Loose Parts |
Set natbib options after loading natbib package | Is it possible to set (or change) the natbib package options after its loading (i.e. after the line \usepackage{natbib})?
The reason I need it is that I'm using a LaTeX style from a journal and it has a natbib option which means it "...handles reference entries in the author-year system by using the natbib package", a... | You can use \PassOptionsToPackage{OPTIONS}{PACKAGE} to set additional options which should be used when the package gets loaded. But you have to use it before the package gets loaded.
Or you could use PreventPackageFromLoading from the scrfile package, which is part of KOMA-Script. You could prevent the package from l... | 0.888889 | PreventPackageFromLoading from KOMA-Script |
How do you decide what to get first, Forge or Twilight Council? | Once you have a decently size ground force (~ 6 troopers?), you want to start upgrading them, right? Now ... if you're seeing some concrete threat like Mutas or Tanks, then you'll want a specific upgrade like Blink or Charge.
But ... assuming you haven't found any concrete intel at this point, what do you lay down fir... | Basically, you get both around the same time => As soon as your natural starts mining.
While getting blink or upgrades from one base is certainly possible, it will cut heavily into your already very limited army production.
After that it depends on what army composition your want to have, what race the opponent has a... | 0.888889 | blink or upgrades from a single base |
What is the Goal of "Hot Network Questions"? | There has been a tug-of-war in the hot-questions list.
Community members like JonW seem to be unhappy with the traffic that it brings to their site:
'But we want to encourage people to post, that's the whole point of the HQ list!' I hear you cry. I disagree. We want to encourage people to the site not just to that... | Pity the poor community members of Workplace. They already have to deal with an endless supply of questions from the clueless who think that the rest of the world owes them a job and pats on the head. These are not necessarily bad questions, but they attract awful answers. Well, maybe they are not bad questions. They a... | 0.777778 | Does it mean that a community that has taken on the job of TWP has a whole lot to do? |
Capture all queries that use hints | How can I capture or list all queries that use hints and have executed since the last instance restart?
I am using SQL Server 2005 Standard Edition.
| That's not possible in retrospect.
You need to actively log the queries with SQL Profiler where you can export and filter on the queries with hints. Or use server-side trace for long running traces.
You can come close by inspecting the cached execution plans.
This will show most queries but remember that some aren'... | 1 | SQL Profiler can export and filter on queries with hints |
Why is Diet Coke more expensive than regular Coca-Cola and other soft drinks in Indonesia? | Here is a photo of a menu in Bali, Indonesia:
The Diet Coke is 14,000 rupiah. The regular Coca-Cola, and other soft drinks, are 10,000 rupiah. It isn't just this restaurant, the same is true of virtually every restaurant I have been to.
Why is Diet Coke more expensive than regular Coca-Cola in Bali (or Indonesia, i... | Because people are willing to pay more, price is set at the highest level that does not depress demand too much.
It may be that locals will drink the cheaper coke, but travellers are willing to pay more for the Diet, so allowing the market to be segmented.
| 1 | Price is set at the highest level that does not depress demand too much |
What is the reason to use an isolation amplifier? |
In a work place PC has a data acquisition card which is 16 bit and has 16 single ended channels. One of the channels is outputting a constant DC voltage which can be controlled by a user via a program in the PC.
The output voltage is feeding a VFD. The VFD takes the voltage value and controls the frequency of the A... | Isolation amplifier has an amplifier and isolator in one package. The reason of using isolation amplifier here is to minimize return loss and amplify the power at the same time
| 1 | Isolation amplifier has amplifier and isolator in one package |
When to use tools vs custom development? | To learn dependency injection in a current side-project, I am writing my own dependency injection container.
But this has lead me to wonder, at what point is it worthwhile to use a third party product vs "roll my own"? What would be the kind of questions you would ask to figure this out?
| To really understand a tool, I do like to create my own version of said tool. It helps me understand what the tool is actually doing and the hard parts of the problem it is trying to solve. Understanding those things can help you make better decisions about how to use the tool.
That being said I would rarely recommend... | 0.777778 | How to use a roll-your-own tool |
How should I rewire a miswired 3-way switch? | I have a 3 way switch that was wired incorrectly when the switches were replaced with a different color switch. Is there a methodical way for me to identify which wires represent which piece of the system so I can correct the bad wiring?
Currently if switch 1 is on, switch 2 can turn light on or off. If switch 1 is ... | Yes. You will need some basic testing equipment; a multimeter should do. There will be a live wire coming in one box, and two traveller wires also in that box (usually a black/white pair.) The traveler pair will go to the other box.
Use your multimeter to figure out what is live whe nothing else is. This is the hot '... | 0.777778 | What is live wire coming in one box? |
Is OTP useful in modern electronic communication? | I have seen from time to time questions about various OTP schemes and "OTP" (i.e. stream cipher) schemes. The most common OTP troubles appear to be:
How to extend size of previously generated key or how to generate key.
How to get key material securely to the recipient.
In electronic communication or storage encryp... | The OTP is more a theoretical construction than a real world construction. The OTP suffers from three core problems:
Key Generation.
Key Distribution.
Key Destruction.
Let's deal with each one in turn.
Key Generation
Key generation is surprisingly difficult. In order to get the full security proof for the OTP, y... | 1 | The OTP is more a theoretical construction than a real world construction . |
Important non-technical course for programmers? | What kind of non-technical training course do you suggest for a programmer? Example could be public speaking course, presentation skill, English, business writing, or anything not related to programming or software engineering itself.
| According to me Painting and Cooking. It makes us become more patient, and it allows us to relax.
| 1 | Painting and Cooking makes us more patient |
Find volume of cask | I was given the following question:
A wine cask has a radius at the top of $30 cm$ and a radius at the middle of $40 cm$.
The height of the cask is $1m$.
What is the volume of the cask in litres, assuming the shape of the side is parabolic?
I have to come to parabolic function of
$$y = \frac{-1}{250}(x-50)^2+40$$
T... | We place the centre of the cask at the origin, and assume that the cask is symmetrical about its mid-plane.
Consider the parabola $y=40-kx^2$. At $x=50$ we want $y=30$. So $k=\frac{10}{2500}=\frac{1}{250}$.
We will rotate this parabola about the $x$-axis. The resulting solid is the cask.
It is useful to integrate... | 0.888889 | How to compute the volumes of Austrian wine casks |
How to export PNG to be compatible with all browsers | I recently found our that some PNG files render a slightly different shade of color in Safari. (I think this is because Safari can't render PNG Gamma channel properly or what).
How do I export the PNG images so that they work perfectly fine throughout all the browsers.
(preferable using Adobe Photoshop)
| The slightly different shade is caused by browser applying gamma correction to colors in PNG, but not to any other colors.
To work around it:
Save image as sRGB with gamma 2.2 (that's the default in almost all programs, so if you don't have config options for it, you don't have to do anything).
Use image optimizer t... | 1 | gamma correction to colors in PNG |
First package for typesetting commutative diagrams | What was the first package for typesetting commutative diagrams in Latex and when was it made available?
| You can find a comparison between packages for commutative diagrams in a very nice paper by Gabriel Vicente Feruglio on TUGboat, issued in 1994.
According to the bibliography, the first available package (besides using directly picture mode) was the one by John Reynolds, diagmac.sty issued in 1987 and still available ... | 1 | Comparison between packages for commutative diagrams in a nice paper by Gabriel Vicente Feruglio |
Using "it's" vs. using "it is" at the end of a sentence |
Possible Duplicate:
Is there some rule against ending a sentence with the contraction “it's”?
Why is it that the following sounds incorrect:
"Would she know where it's?"
But this sounds fine:
"Would she know where it is?"
| Because you don't contract away a stressed syllable. It's counter to the very nature of contraction.
See also the answer to Is there some rule against ending a sentence with the contraction "It's"?
| 1 | Is there some rule against ending a sentence with the contraction "It's"? |
Show UILabel with complete text or hide it | I have a UI label say "ABCDEFGH". In iPhone 6 etc wider devices I can show the complete text. In small screen devices like iPhone 5, I see text as "ABCD...". I want the following:
if(complete text can be shown)
{
// show UILabel with text
} else // if text can not fit in, "ABCD..." case
{
// hide the UIL... | call the sizeToFit function on the UILabel. If it's size is longer that the maximum, hide it...
| 1 | the sizeToFit function on UILabel |
Should a call to action float in a long page? | I was reading this excellent site http://www.goodui.org/ when one of the points made me think
Repeating your call to action is a strategy that is more applicable to
longer pages, or repeating across numerous pages. Surely you don't
want to have your offer displayed 10 times all on the same screen and
frustra... | Most definitely yes. Web apps keep getting more complex, longer and require more cognitive load than ever before. It's quite common to use the OK Cancel both at the top and at the bottom of the page. It's redundant, alright, but it makes it easier for the user. An even better solution your suggesting is the floating ... | 0.888889 | How to use the OK Cancel in SharePoint? |
Can an untapped creature "become untapped?" | If an untapped creature is targeted with an "untap target creature" spell or ability, will it be considered becoming untapped?
| Unless specified as part of the target (e.g. "target tapped creature"), targeting doesn't check or care whether that thing is already tapped, so you can target an untapped creature with Savage Surge. That's why cards like Devout Invocation and Clock of Omens specify that those permanent must be untapped.
However, if a... | 0.888889 | Targeting doesn't check or care whether that thing is already tapped |
How to prevent the "Too awesome to use" syndrome | When you give the player a rare but powerful item which can only be used once but is never really required to proceed, most players will not use it at all, because they are waiting for the perfect moment. But even when this moment comes, they will still be reluctant to use it, because there might be an even better mome... | A simple solution would be to make this special item available in-game for a limited time.
For instance in 2012 Jagex (creator of Runescape) added a special item called the "DeathTouched dart" it could kill any opponent with just one hit. It has been said that it will be removed on some unspecified date.
http://r... | 1 | "DeathTouched dart" can kill any opponent with just one hit . |
Why ducklings are yellow? | Why ducklings are yellow, what the evolutionary background for this? How could it help to survive?
UPDATE
I agree with comment below,
I did remember then that ducks are wild animals too (when I asked the question I imagined domesticated ducklings as widely pictured in media), but anyway it is interesting to know why... | It doesn't need to help it survive, evolution has no intent and not all traits are advantageous. It might just be random, genetic drift or something, a bottleneck effect, any of these things.
In the wild the yellow ones will hardly live long enough to reproduce though.
| 1 | Evolution has no intent and not all traits are advantageous |
How do I turn off my Raspberry Pi? | Should I just pull the plug? Or is it best if I exit LXDE and any other running processes first?
| I've used that shutdown.py solution too.
You'll still need to find a physical switch and solder it to pins 6 and 8 of header 5. I took mine from an an old broken Arduino board. I've also drilled a small hole in the case to make sure that I can push the button with a small wooden pin when the case is closed.
This is h... | 1 | Shutdown.py is a shutdown switch for Arduino |
Why is my CV 145% complete? | On Careers, when filling out my CV, it is listed as being 145% complete. Could someone tell me why this is?
| The over 100% is intentional -- just indicates that you've gone the "extra mile" beyond the minimum required.
| 0.888889 | Over 100% is intentional . |
Create post thumbnails from images stored outside of uploads directory | I am redoing some of my older blogs and I noticed with the new themes most of them take advantage of featured images which is fine. The problem is a lot of my older posts that was never set either because I did not use it or because it didn't exist.
Now I know of the featured thumbnail plugin the regenerates your pos... | You need to first download those external images then you can attach and set them as the post thumbnail.
To download and attach you can use the media_handle_sideload() function.
I wrote a plugin that will search through all your posts and pages and download and attach any external image into the media library. It al... | 0.888889 | Download and attach external images to media library |
What kind of dose can you expect from a radioactive lens? | I read that lens makers used to use radioactive glass to increase the refractive index property of their lenses.
How radioactive are they?
Here are some example dosages; where would looking through the viewfinder for an hour fit?
http://xkcd.com/radiation/
| Typical lens radiation was apparently approaching 1 mR/hr at the surface of the lens and tapers off rapidly with distance. I'm not sure exactly where it lands in your chart, but the same source states that a chest xray is about 10 mR.
| 1 | Typical lens radiation was apparently approaching 1 mR/hr at the surface of the lens |
Can a smaller sensor's "crop factor" be used to calculate the exact increase in depth of field? | If APS-C and similar crop-sensor digital cameras have a focal length multiplying effect such that a 50mm lens has an apparent focal length closer to the field of view of an 80mm on a full frame camera, and yet at the same time the depth of field for the smaller sensor camera is more like the depth of field a 50mm lens ... | Yes, a sensor's crop factor can be used when calculating the change in depth of field (DoF) of a lens compared to that lens' use on a full frame (FF) camera. But it will not always lead to an increase in the DoF. If shot from the same distance and displayed to the same size, the DoF for the crop body camera will be red... | 0.833333 | How does depth of field change when using same lens on a full frame (FF) camera? |
Does 'The plot thickens' make the game easier or harder? | Just curious for games going forward.
Because the expansion allows you to see how people have played on missions, can reveal people's cards, etc, it seems like these are all an advantage mostly to the resistance.
In people's experience - does it make it easier for the resistance?
| There is a slight advantage to The Resistance but the plot cards mostly just throw a monkey wrench into the pattern of the game. When you play a game like this repeatedly, you as a group can fall into the same rhythm. Plot cards are designed to interrupt that rhythm. They cause the game to have more chaos and that chao... | 1 | Plot cards interrupt the rhythm of the game |
iPhone app - Persistent hamburger menu vs last page visited | I'm wondering which option is best for an iPhone app using a hamburger menu (placed at the top left):
The menu is persistent on every single page even when the user goes
to a sub-level.
When the user goes to a sub-level, the hamburger menu is replaced by a back button or a button whose label is the name of last page ... | Use "back" button on sub-level pages and make menu accessible for the users with swipe gesture on all pages.
| 0.777778 | Use "back" button on sub-level pages and make menu accessible with swipe gesture |
What are the chances of something *not* occurring? | Suppose I'm gambling using a strategy of doubling my bet whenever I lose to recoup my losses from previous bets. If my initial bet is 1/2048 of my capital, I can bet 10 times before I run out of money. Statistics says that the chances of this happening are ~1/718. As the law of large numbers states, though, this is in ... |
What bets are you making that the chance of losing ten bets out of ten is about 1/718?
I'm pretty sure the law of numbers doesn't actually state what you say it does. (The claim is nevertheless true, though - it's not certain at any finite $n$.)
$P(E)+P(\overline{E})=1$ (where $\overline{E}$ is the complement of $E$,... | 1 | What is the chance of losing ten bets out of ten? |
Can a PC have more than one Default Gateway? | I know that a PC can have multiple network adapters each of which with different network identifiers (IP,MAC etc.).
My question is, can a certain PC have more than one active default gateway? And if so, how does the PC (or better say the OS) knows to what adapter use for any given packet?
| On Windows (at least Vista), having multiple default routes on the same interface with different metrics is fine. Windows will automatically switch to the route with the next highest metric if the lower metric router goes down. If there are multiple default routes with the same metric, Windows randomly selects one to... | 0.888889 | Multiple default routes with different metrics on Windows (at least Vista) |
jQuery - Apply styling to all vertical TD in table on hover | If you hover over a price, you will notice the price and 1st child of .catTr td is highlighted. None of the others are. The goal is to create a very clear grid of what is being selected.
How can I get it to apply the same styling to every child td in the column with class tr.cat ?
Live Link: http://www.sinsysonline.c... | To add a class for an entire column use td:nth-child(n) where n is the column number. In your case, the columns you want to highlight vary from 2-4. You also need to prevent the head, foot, etc. elements from being highlighted, so use .not().
$('table#prices tbody td:nth-child(3)')
.not('.head,.price,.foot,.catego... | 0.888889 | td:nth-child(n) where n is the column number |
Adding custom icon and marker data together using Mapbox | I am new to mapbox and I have a simple question. I have made a feature layer and a list of custom icons. How do I add the two together?
My feature layer is formatted as below:
L.mapbox.featureLayer({
"type": "Feature",
"geometry": {
"coordinates": [
'.$long.','.$lat.'
],
"type": "Point"
... | From your code, I assume you are talking about mapbox.js, which is a derivative of leaflet.js
If so, I think what you are looking for is leaflet layer groups
So, in your case...
var featureLayer = L.mapbox.featureLayer({
"type": "Feature",
"geometry": {
"coordinates": [
'.$long.','.$lat.'
],
"ty... | 0.888889 | var featureLayer = L.mapbox.featureLayer |
Implementing application logic on model layer (MVC) | I keep on reading that the biggest layer in the MVC pattern should be the model. I've also heard that we should avoid putting logic on the controller layer. However, as my ASP.Net MVC 5 application is getting larger, I see that I'm getting heavy views, heavy controllers, and... extremely tiny models (they're not more t... | In my applications I put as much logic as possible in the domain models. On top of that there is an application layer which interacts with the database and domain models to perform application specific operations. The controller actions have as little code as possible and just call methods in the application layer.
I... | 0.777778 | How do I put as much logic in the domain models? |
Respberry Pi fails to boot with custom kernel | I'm trying to cross compile my kernel with touchscreen enabled, however my Respberry Pi fails to boot with the custom kernel.
I was trying to compile the kernel on my ubuntu 10.4 (x64) with different config files but after transferring the files to my Pi I was no longer able to boot it.
These were the steps I followe... | This:
> apt-get install gcc-arm-linux-gnueabi
Will be a toolchain targeting the more common ARMv7 architecture. It probably does not properly support the ARMv6 Broadcom SoC used on the pi, but you could try by adding:
CCFLAGS += -mcpu=armv6j -mfpu=vfp -mfloat-abi=hard
| 0.777778 | Install gcc-arm-linux-gnueabi |
Understanding the static keyword | I have some experience in developing with Java, Javascript and PHP.
I am reading Microsoft Visual C# 2010 Step by Step which I feel it is a very good book on introducing you to the C# language.
I seem to be having problems in understanding the static keyword. From what I understand this far if a class is declared sta... | The static keyword in C# is refering to something in the class, or the class itself, that is shared amongst all instances of the class. For example, a field that is marked as static can be accessed from all instances of that class through the class name.
public class SomeObject
{
//Static Field
static int Foo... | 0.888889 | static methods can only deal with local variables, or fields that // are also static in the class |
Appcache for dynamic site | I am trying to use HTML5 Appcache to speed up my web-mobile app by caching images and css/JS files. The app is based on dynamic web pages.
As already known – when using Appcache the calling html page is always cached -> bad for dynamic websites.
My solution - Create a first static page and in this page call the manif... | I had a hell of a time figuring out how to cache dynamic pages accessed by a URI scheme like this:
domain.com/admin/page/1
domain.com/admin/page/2
domain.com/admin/page/3
Now the problem is that the appcache won't cache each individual admin/page/... unless you visit it.
What I did was use the offline page to repre... | 0.888889 | How to cache dynamic pages accessed by a URI? |
C++ new memory allocation fragmentation | I was trying to look at the behavior of the new allocator and why it doesn't place data contiguously.
My code:
struct ci {
char c;
int i;
}
template <typename T>
void memTest()
{
T * pLast = new T();
for(int i = 0; i < 20; ++i) {
T * pNew = new T();
cout << (pNew - p... | There are two issues:
most allocators store some additional data prior to the start of the block (typically block size and a couple of pointers)
there are usually alignment requirements, e.g. Linux typically allocates to at least an 8 byte boundary, OS X allocates to at least a 16 byte boundary
So you'll nearly alw... | 0.666667 | Linux allocates to at least an 8 byte boundary, OS X allocates at least 16 byte boundaries |
EE control panel dashboard search field | the search field in EE's dashboard doesn't seem to find anything. what is this field supposed to search?
| I'd recommend using Switchboard as I guess it will give you more of the functions and results you'd expect from a search in the CP.
| 0.777778 | Switchboard will give you more functions and results from a search in the CP |
Why am I getting a redefinition error? | I'm following the tutorial here: http://iphone-3d-programming.labs.oreilly.com/ch01.html#ch01_id36002837
When I try to run the program, I get an error saying "Redefinition of 'void RenderingEngine1::OnRotate(DeviceOrientation)"
Here's the code. The function is at the end of it:
#include <OpenGLES/ES1/gl.h>
#in... | remove the body
class RenderingEngine1 : public IRenderingEngine {
public:
...
void OnRotate(DeviceOrientation orientation) {}
...
-> void OnRotate(DeviceOrientation orientation);
| 0.888889 | Remove the body class RenderingEngine1 |
yum hangs on installing a specific package | tried to install squid with command
yum install squid
and it consistently hangs on
Running Transaction
Installing: squid ##################### [1/1]
Had no problems with hundreds of other packages. Does anyone have an idea on what could be the problem?
edit: tried both: yum clean all ... | I would try Keith's suggestion of "yum clean all" first. If that doesn't work, I have encountered a situation like this when there is actually an issue with the RPM database.
You can try to rebuild the RPM database by doing:
sudo rm -f /var/lib/rpm/__db.* (you could move them to a temporary directory to be cautio... | 0.888889 | "yum clean all" |
Hide "Close Window" option from taskbar | I want to make a window that has an icon on the taskbar, but does not have the option to be closed from there. I could simply intercept WM_CLOSE, but then a non-functional option still remains on the window's taskbar menu. There are other questions on stackoverflow pertaining to that method, but none that describe ho... | The Taskbar button uses the same menu that is assigned to the window itself. There is no way to differentiate whether the menu is being invoked by clicking on the Taskbar versus clicking on the window (or even if it is being invoked by mouse or keyboard, for that matter). If you disable the "Close" item, the user wou... | 0.888889 | Clicking on Taskbar versus clicking on window |
when two associations are equal? | <|a -> 2, b -> 3|> == <|b -> 3, a -> 2|> returns False; can anybody explain why? If I am not mistaken here these two associations would be identical from the practical point of view.
| Perhaps as Pickett describes the developers do not consider these associations Equal since that function performs other conversions like:
Quantity[5, "Percent"] == 0.05
True
But perhaps Equal has not been (properly?) extended to associations yet as 2.0 and 2 are Equal but these are not:
<|a -> 2|> == &... | 0.888889 | Equal has not been extended to associations yet . |
Why are the two buttons on the apple TV remote shaped differently (Menu & Play/Pause) | On the apple TV remote, I have realized that the two buttons have a different physical design. The menu button goes invward (convex) and the play/pause one is flatter/goes more outward.
I tried to figure out why with my common sense, but failed. Does someone know?
| So in the dark, you'll know which is which without looking at it.
| 1 | Which is which without looking at it? |
Should I write a recommendation letter for a student at a previous job/institution? | I receive requests for recommendation many times, but I have received one from a student belonging at a previous affiliation of mine, asking for a favourable letter in view of their achievements.
I am aware of the fact that if I comment on the performance of the student, it could be used against me, since it is good p... | You may want to ask the student to send you any material that you need for writing your reference, for example grade sheets and a CV. Bringing in your personal experiences with the student in addition shouldn't be a problem at all. After writing the reference letter, you should erase all confidential material that the ... | 1 | You should erase all confidential material that the student sent you |
Directory.GetFiles string gives an error | I am creating a website using asp.net and c#
I need to access all files one by one in a directory. So I wrote the following code.
string[] ssImgs = Directory.GetFiles("images/movies");
Label1.Text = ssImgs[0];
Label2.Text = ssImgs[1];
But it gives an error. What is the correct way to do this? Thanks in a... | There are two potential issues here.
If you doing have using System.IO; in your file, the Directory class will not be found by the compiler.
The way you're specifying your path ("images/movies") will be relative to the current working directory, which is likely not the proper directory. You should use Server.MapPath... | 0.888889 | How to specify a path to the proper folder? |
Show UILabel with complete text or hide it | I have a UI label say "ABCDEFGH". In iPhone 6 etc wider devices I can show the complete text. In small screen devices like iPhone 5, I see text as "ABCD...". I want the following:
if(complete text can be shown)
{
// show UILabel with text
} else // if text can not fit in, "ABCD..." case
{
// hide the UIL... | You can get Screen's size like this :
CGSize screenSize = [[UIScreen mainScreen] bounds].size;
And then put an if statement like this :
if (label.frame.size.width>screenSize.width) {
//Use smaller label }
else {
//use bigger label }
| 0.777778 | Screen Size: CGSize screen Size |
Should I tell other interviewers where else I've interviewed? | I am currently travelling for faculty interviews. Some professors and other interviewers have asked me where else I have interviewed. Should I tell interviewers where else I've interviewed?
Intuitively I would like to give them less information, but I also don't want to appear guarded and defensive as a person, either... | At least in Germany, interviews for academic positions are more like dating than like normal job interviews. If you are good, the department will worry about being rejected as much as you do. If they offer you the position and then you don't accept, they are losing time - they may not be able to fill the position in ti... | 1 | If you are good, the department will worry about being rejected as much as you do. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.