qa_id,question_title,question_body,question_user_name,question_user_page,answer,answer_user_name,answer_user_page,url,category,host 5299,Very simple particle filters algorithm (sequential monte carlo method) implementation,"I'm interested in the simple algorithm for particles filter given here. It seems very simple but I have no idea on how to do it practically. Any idea on how to implement it (just to better understand how it works) ? Edit: This is a great simple example that explain how it works. I've tried to implement it in C++: see my code here, but I'm note sure if I do it the right way. Can you please check if I understood it well, or there are some misunderstanding according to my code ? ",shn,https://stats.stackexchange.com/users/8114,"What that sentence means is you should generate $x_t^{(i)}$ from the distribution of $p(x_t|x^{(i)}_{t−1})$. For an alternative introduction to particle filters I recommend An Overview of Existing Methods and Recent Advances in Sequential Monte Carlo MATLAB has numerous toolboxes on particle filters. If you are working in C++, here is an implementation you can use to compare your code with. ",Emre,https://stats.stackexchange.com/users/4479,http://stats.stackexchange.com/questions/27946/very-simple-particle-filters-algorithm-sequential-monte-carlo-method-implement,SCIENCE,stats.stackexchange.com 477,What are the benefits of owning a physical book?,"I have seen this question about updates of the D&D 4th Edition books, and it got me thinking. Since I got my Kindle I have not read a single paper novel; they have fewer drawbacks compared to digital copies than rpg rulebooks. Dead-tree types have some benefits like looking good on a bookshelf, but any ebook reader weighs less with 100 novels than the usual hard-cover book. If you want to look for the damage of Ares Alpha, even with a half-decent tablet it takes less than 2 seconds. Digital copies do not get worn, they never get unwanted earmarks, but you can bookmark them. Rulebooks do get updates, and unless you are willing to take a pen to your book, your hard copies will never contain them. The pdfs can be edited and resent to the buyers. Even better is the WotC approach with the DDI, you can look up any monster or item or (almost any) rule, in the most recent form, for 3 years at the cost of seven books. I think this is the way to go, even considering the horribly slow character builder. Although I must admit good illustration can help build the athmosphere. So what am I missing? Why are people buying rpg rulebooks in paper format? Why are books even published, I do not need to know if feats are supposed to be on the right page and skills on the left, I just want a list of them, filterable any way I want. Is this just a necessary part of earning money? I understand that pdfs are copied illegally, but the Compendium is not. ",András,https://rpg.stackexchange.com/users/9552,"I own an ebook, and I find it more comfortable linear reading than in physical books. Also, it's very handy when looking for exact words. But I find flipping the pages looking for something that is not bookmarked or you don't know exactly where it is, (and you don't know what words look for) or doing diagonal reading on several pages much easier in physical books. One thing that it's not very important to me, but it is to a lot of people is the aesthetic and emotional factors. A good physical book is something pretty that you can have and manipulate on your hands and that looks well on your bookshelf. Also, in time you can be emotionally attached to your manuals (especially if you own only a handful), but is rarer to feel the same to a digital file. Still, it's probable that if you have a good and fast ebook reader, the advantages of digital formats are more than the disadvantages, but answering your question, these are the benefits of physical books that come to my mind. ",Flamma,https://rpg.stackexchange.com/users/5641,http://rpg.stackexchange.com/questions/34615/what-are-the-benefits-of-owning-a-physical-book,CULTURE,rpg.stackexchange.com 552,"Where are the fishing spots surrounded by rocks etc, and do they actually increase the chances of catching fish?","While talking to the fisher guy in the fishing hut he told me the best place to fish was in small places surrounded be rocks or wall. Is this true? If so, where are theses places in the game? Is there anything else that helps to catch more fish? For example, I have noticed that fishing next to a fisherman seems to have a higher chance of catching something. is this correct, and what else helps with fishing? ",Qwertie,https://gaming.stackexchange.com/users/57500,"Yes, fishing in a small tile of water walled off by shore and/or rocks on three of the 4 sides decreases the chance of ""Nothing seems to be biting..."" message. This does not reduce the chances of not catching anything to 0, but it is considerably better than it is otherwise. However, if you are chain-fishing for shiny Pokemon, your best bet is is to have your lead Pokemon have the ability Suction Cups or Sticky Hold. If the Pokemon you've chosen for the task is under-leveled compared to what you are fishing, having it hold something like a smoke ball will allow you to flee from the hordes of non-shinies without fail. For more information on how chain-fishing works (specifically what will and will not break the chain) see this question/answer; How does chain fishing work? ",Trent Hawkins,https://gaming.stackexchange.com/users/30115,http://gaming.stackexchange.com/questions/153619/where-are-the-fishing-spots-surrounded-by-rocks-etc-and-do-they-actually-increa,CULTURE,gaming.stackexchange.com 7963,LaTeX command for double lower index summation,"I would like to know what is the latex command to include a double lower index using sigma notation (i.e: second index lies underneath the first index)? I tried typing: \displaystyle\sum_{m,n=-\infty, \; (m,n)\neq (0,0)}^{\infty} \left[ \frac{1}{(z-2 m\omega_{1} - 2 n\omega_{2})^{2}} -\frac{1}{ 4(m\omega_{1} + n\omega_{2})^{2}} \right] I would appreciate the assistance. Thanks ",user12015,https://tex.stackexchange.com/users/45877,"Try using substack: \usepackage{amsmath} ... \begin{equation} \prod_{\substack{ 1 \le i \le n \\ 1 \le j \le m} } M_{i,j} \end{equation} This example is taken from the Latex Wikibook. ",gdiazc,https://tex.stackexchange.com/users/45396,http://tex.stackexchange.com/questions/159627/latex-command-for-double-lower-index-summation,TECHNOLOGY,tex.stackexchange.com 857,How to tell a macmini to stop booting to Windows from a macbook pro?,"I need to be able to control a mac mini without a screen and I think using screensharing would be enough. I've enabled screensharing, setup a manual IP address and I have an ethernet cable. The problem is I don't have display to use on the mac mini and I currently borrowed a keyboard and a firewire cable to setup screensharing: booted mac mini in target mode (wish there was a way to do it without the keyboard) booted the macbook holding the alt key and choosing the firewire drive The problem is the mac mini has a bootcamp partition setup to which it boots by default. I googled a bit and tried the System Preferences > Startup Disk option then the /etc/fstab route but no joy: the mac mini still boots to Windows. How can I get the macmini to simply boot to it's osx all the time (given that I have to change the settings on a macbook with a firewire cable) ? ",George Profenza,https://apple.stackexchange.com/users/8542,"The system stores the boot choice in NVRAM, so you might reset it by powering off and then holding command-option-p-r while you hear the start chimes repeat 2 or 3 times. At that point, it should choose the first bootable system on the internal drive. IF that doesn't work, you could post the filesystem layout - but a corrupt NVRAM settings file would explain why your choice of Startup Disk wasn't respected. ",bmike,https://apple.stackexchange.com/users/5472,http://apple.stackexchange.com/questions/84865/how-to-tell-a-macmini-to-stop-booting-to-windows-from-a-macbook-pro,TECHNOLOGY,apple.stackexchange.com 8257,"It was a tough question. I thought it through, though. Rules for 'ough'?","Is there a rule, or rules, for how to pronounce ough? trough (short o, gh pronounced f), thought (short o, silent gh), though (long o, silent gh), through (oo, silent gh), tough (short u, gh pronounced f). ",JimM,https://ell.stackexchange.com/users/11894,"There are at least five ways to pronounce ough: tough, enough (rhymes with cuff) through (rhymes with blue) trough, cough (rhymes with off) ought, bought (rhymes with caught) bough (rhymes with cow) As for the rules, the only one I can think of is that the pronunciation found in thought only happens with the ough is followed by a ""t"". Other than that, there's really no way to tell by looking at the word. I remember the first time I met someone with the last name of Gough. I didn't know if it was pronounced as ""go"", ""goff"", ""guff"", or ""gow"" (that last one rhyming with ""now,"" not ""know""). English has many letter combinations like this; consider: earth vs hearth now vs low eight vs height food vs blood pint vs lint to name but a few. Some words (like bow and wind) have vowels that can be pronounced two different ways, depending on the meaning of the word, leading to some ambiguous sentences, like this one: He took a bow as he gave her a bow. ",J.R.,https://ell.stackexchange.com/users/113,http://ell.stackexchange.com/questions/58002/it-was-a-tough-question-i-thought-it-through-though-rules-for-ough,CULTURE,ell.stackexchange.com 9636,Throwing a ball upwards in an accelerating train,"If I throw a ball upwards to a certain height in an accelerating train, will it end up in my hand? At the moment I release the ball, it will have a velocity equal to that of the train at that instant. But because the train is accelerating, the train will have a greater velocity and thus the ball will travel lesser distance and should fall behind me. Is my reasoning correct? ",user34304,https://physics.stackexchange.com/users/34304,"User Sahil Chadha has already answered the question, but here's the math and a pretty picture for anyone who is unconvinced that you're right. Since the train is accelerating, from the perspective of an observer on the train, the ball will experience a (fictitious) force in the direction opposite the train's travel having magnitude $ma$ where $m$ is the mass of the ball and $a$ is the magnitude of the acceleration of the train. If we call the direction of travel the positive $x$-direction, and if we call the ""up"" direction the positive $y$-direction, then the equations of motion in the $x$- and $y$-directions will therefore be as follows: \begin{align} \ddot x &= -a \\ \ddot y &= -g. \end{align} The general solution is \begin{align} x(t) &= x_0 + v_{x,0} t - \frac{1}{2}a t^2 \\ y(t) &= y_0 + v_{y,0} t - \frac{1}{2}g t^2 \end{align} Now, let's say that the origin of our coordinate system lies at the point from which the ball is thrown so that $x_0 = y_0 = 0$ and that the ball is thrown up at time $t=0$ with velocity $v_{y,0} = v$ and $v_{x,0} = 0$ in the positive $y$-direction, then the solutions becomes \begin{align} x(t) &= -\frac{1}{2}a t^2\\ y(t) &= vt - \frac{1}{2} gt^2 \end{align} So what does this trajectory look like? By solving the first equation for $t$, and plugging this back into the equation for $y$, we obtain the following expression for the $y$ coordinate of the particle as a function of its $x$ coordinate along the trajectory: \begin{align} y(x) = v\sqrt{-\frac{2x}{a}} +\frac{g}{a} x \end{align} Here's a Mathematica plot of what this trajectory looks like for $v = 1.0\,\mathrm m/\mathrm s$ and the list $a = 9.8,5.0,2.5,1,0.1\,\mathrm m/\mathrm s^2$ of values for the train's acceleration From the point of view of someone on the train, the ball flies backward in a sort of deformed parabola, but the smaller the acceleration is, the more it simply looks as it would if you were to throw a ball vertically in an un-accelerated train. ",joshphysics,https://physics.stackexchange.com/users/19976,http://physics.stackexchange.com/questions/89098/throwing-a-ball-upwards-in-an-accelerating-train,SCIENCE,physics.stackexchange.com 2661,Putting Linux processes on certain CPU cores," Possible Duplicate: How can I set the processor affinity of a process on Linux? Computer CPUs have many cores insde them nowadays. I have always wondered if there is a way to, when I start a process on the Linux command line, specify which particular core or cores that process might use? For example, can I start a massive grep task and say ""use ALL of CPU2 for yourself"". Or could I start a find task and say ""never leave CPU3"". Or maybe I could start a video decoding task and say ""use whatever is available on CPU1 and CPU2"" OR, is there no way to do this because it is not needed and the OS is doing this kind of stuff intelligently by itself (based on nice levels and general resource usage of the process etc) IfyouknowwhatImean ",Daniel,https://unix.stackexchange.com/users/23149,"See the taskset utility. Should be exactly what you're looking for. ",Jim Paris,https://unix.stackexchange.com/users/21804,http://unix.stackexchange.com/questions/47704/putting-linux-processes-on-certain-cpu-cores,TECHNOLOGY,unix.stackexchange.com 8730,Unrecognized element 'authentication'.,"I am trying to write a simple authentication. I'm also trying to make this quick and learn about the forms authentication via web.config. So i have my authentication working if I hard code my 'user name' and 'password' into C# code and do a simple conditional. However, I get en error message 'Unrecognized element 'authentication'. Line 2: <system.web> Line 3: <customErrors mode=""off""> Line 4: <authentication mode=""Forms""> Line 5: <forms name="".C#FEWD"" Line 6: loginUrl=""/schools/admin/login/index.aspx"" My web.config file looks like this: <configuration> <system.web> <customErrors mode=""off""> <authentication mode=""Forms""> <forms name="".C#FEWD"" loginUrl=""/schools/admin/login/index.aspx"" protection=""All"" timeout=""60""> <credentials passwordFormat=""Clear""> <user name=""schools"" password=""magic"" /> </credentials> </forms> </authentication> <authorization> <deny users=""?"" /> </authorization> </customErrors> </system.web> </configuration> ",Sahr Foday,https://stackoverflow.com/users/1187961,"Its probably just that you're missing the node terminator from your customErrors setting: <customErrors mode=""off""/> More following comment: Your complete config should be: <configuration> <system.web> <customErrors mode=""off"" /> <authentication mode=""Forms""> <forms name="".C#FEWD"" loginUrl=""/schools/admin/login/index.aspx"" protection=""All"" timeout=""60""> <credentials passwordFormat=""Clear""> <user name=""schools"" password=""magic"" /> </credentials> </forms> </authentication> <authorization> <deny users=""?"" /> </authorization> </system.web> </configuration> ",Jon Egerton,https://stackoverflow.com/users/592111,http://stackoverflow.com/questions/9131953/unrecognized-element-authentication,STACKOVERFLOW,stackoverflow.com 7331,What platform can I use to establish a users support forum?,"I was asked to develop a users support community forum for a small and young hi-tech company. This kind of forums is very popular with companies these days and is a great alternative to the official product support lines. An example of what we look for is the Analog Devices' Engineer Zone forums. I am totally noob to this area so any advice will be appreciated - how to start developing such a site, what platforms are available (preferably open-source/free) and what are the advantages and disadvantages of these platforms. Is a stackexchange style forum appropriate for such site? * If you think there is a better SE site to post this question, please let me know. ",ysap,https://webmasters.stackexchange.com/users/9535,"A stackexchange style forum would be appropriate for this site (although there are many many other support forums out there). For a list of clones see this meta.stackexchange.com answer. The stackexchange model is designed around users helping users, but if your staff can take part then that's even better. If I were you I'd tweak the code so that users that are staff are clearly identified as such. ",paulmorriss,https://webmasters.stackexchange.com/users/1643,http://webmasters.stackexchange.com/questions/18090/what-platform-can-i-use-to-establish-a-users-support-forum,TECHNOLOGY,webmasters.stackexchange.com 3279,Is SourceSafe really safe?,"Having spent all morning trying to check something in - I now realise I've lost a couple of days worth of work. Its happened before - and is apparently common occurrence with SourceSafe. Can SourceSafe be used successfully, without problems, and if so, how? ",billy.bob,https://programmers.stackexchange.com/users/4630,"Using SourceSafe in a commercial operation is like heating the building by burning dollar bills. In 2000, my eight-developer company probably lost 5-10% of its productivity because of the twice-daily-on-average corruptions of VSS databases. It was only that low because we'd gone to hourly backups. Since moving away from VSS to Perforce, svn, and git, I've never had an SCM database become corrupted. ",Bob Murphy,https://programmers.stackexchange.com/users/1696,http://programmers.stackexchange.com/questions/24910/is-sourcesafe-really-safe,TECHNOLOGY,programmers.stackexchange.com 8912,Can we represent this sequence as a function of n?,"I have this sequence : 4,12,24,48,240,720,.... I order to find nth term of this sequence , can we represent this sequence as a function of n. ",nav_jan,https://math.stackexchange.com/users/44271,"This is the unique minimum degree interpolated polynomial: $$ -\frac{23}{15}n^5+\frac{175}{6}n^4-\frac{572}{3}n^3+\frac{3329}{6}n^2-\frac{3559}{5}n+324 $$ whose values at $1,2,\ldots,6$ are $4,12,24,48,240,720$. This can be found using GAP via: InterpolatedPolynomial(Integers,[1,2,3,4,5,6],[4,12,24,48,240,720]); While this is unlikely the answer you are looking for (since it has a negative leading coefficient and is of the maximum degree possible; moreover, your sequence appears to grow around $O(n!)$, whereas this polynomial grows as $O(n^5)$), you're probably not going to get a better answer without explaining what the sequence actually is. ",Douglas S. Stones,https://math.stackexchange.com/users/139,http://math.stackexchange.com/questions/210501/can-we-represent-this-sequence-as-a-function-of-n,SCIENCE,math.stackexchange.com 3546,How do I make an endless road in Unity?,"Basically I created 2 quads side by side and I added a road texture. I used transform.translate so that the road moves, but I am trying to make the road endless by making the 2 quads reposition themselves in front of the current quads repeatedly so that when I add a player the road is endless. Any way I could do this? ",tomowale,https://gamedev.stackexchange.com/users/68793,"Well, the answer of Vinayak Garg is good but since you work with perspective this won't be perfect. This is basically paralax mapping and works great for 2D games. But here you want to have the road dissapear in the horizon probably. If your road is straight then just extent on this technique and add many pieces until it is looking good. Whenever you leave a piece behind move it to the front. If you want a curvy rode you have to look in procedural algorithms to generate a path for you can use pieces to correct this path. Perlin noise for example can be used for ""infinite"" randomization. They use it for minecraft in 3D, you just probably just need a 1D variant that just controls the the curve of the road. ANyway, this is a lot harder to implement. ",Madmenyo,https://gamedev.stackexchange.com/users/20075,http://gamedev.stackexchange.com/questions/104193/how-do-i-make-an-endless-road-in-unity,TECHNOLOGY,gamedev.stackexchange.com 4847,How detect which OpenGL texture formats are natively supported?,"For example, how detect if my videocard doesn’t support ""bgr8"" and convert it to another format, such as ""rgba8"" in software mode. UPDATE: Sorry for the confusion. This question more about situation when I set internalFormat in glTexImage2D to something like ""bgra8"" but videodriver internally convert data to another format, like ""rgba8"". ",KindDragon,https://gamedev.stackexchange.com/users/8399,"Generally most hardware doesn't suport 3-component texture formats so in this specific example you can make a reasonably safe assumption that it's converted. A 3-component OpenGL texture is actually 4-component in hardware but with the alpha component ignored/set to 255/whatever. http://www.opengl.org/wiki/Common_Mistakes#Texture_upload_and_pixel_reads (That ""common mistakes"" page is a goldmine - bookmark it now!) For a more general case, glTexSubImage2D performance can give you a good indication of whether or not the upload must go through a software conversion path. You'd go about this during program startup - just create an empty texture (via glTexImage2D with NULL data), then issue a bunch of glTexSubImage2D calls, each followed by a glFinish to ensure it completes. Ignore the first one because caches/states/etc are being setup for it, and time the rest of them. Repeat this for a few different formats and pick the fastest. Another alternative - seeing as you've tagged this question ""Windows"" - is to create a D3D device at startup (just after you've created your window but before you init OpenGL) then use D3D to check for format support. While OpenGL allows for software conversion to a valid internal format, D3D doesn't - if it's not supported by the hardware you can't do it. Then destroy D3D and bring up OpenGL. (This technique can also be used for querying other stuff that OpenGL doesn't let you query directly). It's actually a useful rule of thumb to cross-check what you're doing in OpenGL with the D3D documentation. If D3D can't do something then it can be a good indication that the something in question is not supported in hardware. Not always true, but a useful starting place. ",Maximus Minimus,https://gamedev.stackexchange.com/users/9134,http://gamedev.stackexchange.com/questions/17587/how-detect-which-opengl-texture-formats-are-natively-supported,TECHNOLOGY,gamedev.stackexchange.com 1791,How can I prevent the intake vent for an on demand water heater from getting plugged?,"We have a Navien on demand water heater. The intake and outlet vent pipes run out through the poured concrete foundation and have a plastic grill on the end. If the intake vent is blocked in any way the water heater will not turn on as a safety feature. I have to add another tighter mesh over the intake in the summer or paper wasps build nests inside the pipe. If I leave the mesh on then in the winter it gets blocked with snow and ice. I need some sort of vent cover that blocks insects and does not get blocked by snow. Here is a sample with the ""as delivered by the contractor"" on the right and with a crude but workable filter for summer use on the left. Any ideas? Edit: the manufacturer suggests adding a PVC T valve at the end of the outlet. The number of elbows allowed is governed by the length of the run and number of previous elbows in the run. I'm going to try a T valve and the filters shown in the answer below. ",kevinsky,https://diy.stackexchange.com/users/18543,"Aside from adding an elbow, one method to allow finer mesh without blocking airflow is to extend the mesh a fair distance - I'll try to get a picture of Something similar, but doubt I can find the exact thing I'll want - basically either a long (12""/30cm or so) mesh tube, or a 12-18"" section of pipe, drilled full of holes, and then wrapped in mesh small enough to keep the wasps out. When you make the mesh smaller, you need more area so that the flow can remain the same (even if some parts are blocked) - so the idea is to greatly increase the area of mesh. OK, these are fish pond filters, but they have the right idea. Some car or truck air filters might actually be adaptable to work, too - especially the ""aftermarket high flow"" types (you might ditch the ""foam filter"" those have and just use the ""mesh cage"" part of them) - but that's more if you want something you can buy - you should be able to make something that works out of ordinary hardware cloth mesh. ",Ecnerwal,https://diy.stackexchange.com/users/18078,http://diy.stackexchange.com/questions/36798/how-can-i-prevent-the-intake-vent-for-an-on-demand-water-heater-from-getting-plu,LIFE_ARTS,diy.stackexchange.com 4641,How can I adjust tax withholding so that I don't get a large Tax Refund?,"I'm a few years out of college now. I've filled out my W4 accurately and I still get a tax refund every year of a pretty sizable sum. The thing is, I have student loans and I would much rather have been paying that extra money on a monthly basis (to prevent interest charges) than have given it to the government to 'hold' for me. I've spoken to the HR department about lowering my tax deductions and they suggest putting more exemptions on my W4. However this seems off because I would essentially be purposely filling out a form incorrectly. Also, I don't see anything on this one sheet to take into consideration my student loan interest deduction, which is a large part of where my refund comes from. How do I pay my taxes correctly throughout the year so that I don't owe or receive any money when I file? ",Carlos Bribiescas,https://money.stackexchange.com/users/14567," However this seems off because I would essentially be purposely filling out a form incorrectly. Note that the only part of the W-4 form that is required to be filled out and given to the employer is the small certificate at the bottom that you tear off. In this part, it only asks you for ""Total number of allowances you are claiming"". You don't have to fill out any of the worksheets in the other parts of the form, which actually ask for specific information. Since there are different allowed ways of computing the ""Total number of allowances you are claiming"", I doubt that any number you put there can be said to be ""incorrect"". I think that the best to use the IRS Withholding Calculator. If you use it, the calculator will probably tell you to claim a few more exemptions. And you don't have to feel bad about ""filling the form incorrectly"" if you follow the IRS calculator. ",user102008,https://money.stackexchange.com/users/5920,http://money.stackexchange.com/questions/37375/how-can-i-adjust-tax-withholding-so-that-i-dont-get-a-large-tax-refund,LIFE_ARTS,money.stackexchange.com 5810,MVC3 Actionlink with submit,"I am new MVC user and I am trying to make shopping cart as following MVC Music Store tutorial I am trying to pass the radiobutton value which is different price types through actionlink. Is it possible to pass the value with productId? When I click the link, it will call 'AddToCart' method. Could you help me? thanks. Product model namespace MvcApplication2.Models { public class Product { [Key] public int productId { get; set; } public int categoryId { get; set; } [Required(ErrorMessage = ""Product model name is required"")] public String model { get; set; } [DisplayFormat(DataFormatString = ""{0:0.#}"")] public decimal displaySize { get; set; } public String processor { get; set; } public int ramSize { get; set; } public int capacity { get; set; } public String colour { get; set; } public String description { get; set; } public decimal price { get; set; } public decimal threeDayPrice { get; set; } public decimal aWeekPrice { get; set; } public decimal twoWeekPrice { get; set; } public decimal aMonthPrice { get; set; } public decimal threeMonthPrice { get; set; } public decimal sixMonthPrice { get; set; } //public decimal sixMonthPrice { get { return price * 0.25M; } } public int stock { get; set; } public virtual Category Category { get; set; } } } details.cshtml @model MvcApplication2.Models.Product <td> Rental Period: <br /> @using (Html.BeginForm()) { <div class=""display-label""> @Html.RadioButtonFor(model => model.price, Model.threeDayPrice) 3 day: £@Model.threeDayPrice </div> <div class=""display-label""> @Html.RadioButtonFor(model => model.price, Model.aWeekPrice) 1 week: £@Model.aWeekPrice </div> <div class=""display-label""> @Html.RadioButtonFor(model => model.price, @Model.twoWeekPrice) 2 week: £@Model.twoWeekPrice </div> <div class=""display-label""> @Html.RadioButtonFor(model => model.price, @Model.twoWeekPrice) 1 month: £@Model.twoWeekPrice </div> <div class=""display-label""> @Html.RadioButtonFor(model => model.price, @Model.threeMonthPrice) 3 month: £@Model.threeMonthPrice </div> <div class=""display-label""> @Html.RadioButtonFor(model => model.price, @Model.sixMonthPrice) 6 month: £@Model.sixMonthPrice </div> } </td> </tr> </table> <p class=""button"" style=""margin-left:200px; width:90px;""> //Is it possible to submit the selected radiobutton value through this? @Html.ActionLink(""Add to cart"", ""AddToCart"", ""ShoppingCart"", new { id = Model.productId }, """") </p> ---Added controller--- ShoppingCartController.cs public ActionResult AddToCart(int id) { // Retrieve the product from the database var addedProduct = db.Product .Single(product => product.productId == id); // Add it to the shopping cart var cart = ShoppingCart.GetCart(this.HttpContext); cart.AddToCart(addedProduct); // Go back to the main store page for more shopping return RedirectToAction(""Index""); } ",wholee1,https://stackoverflow.com/users/725505,"Because you say you are new right off the bat I'm going to tell you that the way you are going about this is not the best way to achieve what you are trying to achieve. Putting a submit button at the bottom of the form will get the data to post and bind to Product if you change the top of the form to @using (Html.BeginForm(""AddToCart"", ""WHATEVERYOURCONTROLLERISCALLED"")) but I think you are missing a few key points here. There are some conventions that you seem to be ignoring ShoppingCart.cs should be named ShoppingCartController.cs and appear in the controllers folder of your project Instead of naming each price on the model you can use a list of prices options and display them on the form as a series of radio buttons while putting the mutually exclusive choice. for example. The Model public class Product{ // remove all the different price properties. // other properties go here...And while you are at it Use Pascal case for property names Eg. displaySize would be DisplaySize but I guess that is up to you. [Required] public string PriceChoice { get; set; } } The Controller public class ShoppingCartController : Controller { public ActionResult Details(int productId) { // get the product from the database var model = Database.GetProductById(productId); // set a default if you want model.PriceChoice = ""a""; return View(model); } [HttpPost] public ActionResult AddToCart(Product model) { // do whatever you need to do return RedirectToAction(""Details"", new { id = model.Id }); } } The View @using (Html.BeginForm()) { <div>A: @Html.RadioButtonFor(x => x.PriceChoice , ""a"")</div> <div>B: @Html.RadioButtonFor(x => x.PriceChoice , ""b"")</div> @Html.ValidationMessageFor(x => x.PriceChoice ) <input type=""submit"" value=""OK"" /> } Now that's all very abridged and basic so I hope you get the gist of it. Also you'll find some value in reading this Post Redirect Get So while it doesn't strictly apply to what you are doing it will explain the structure of the code you are reading in the examples where you see RedirectToAction. Now if you want to do this really cleverly you will have to learn some javascript and issue an Ajax command. Hope this helps ",Peter,https://stackoverflow.com/users/402941,http://stackoverflow.com/questions/9761960/mvc3-actionlink-with-submit,STACKOVERFLOW,stackoverflow.com 1182,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. ",Louis Rhys,https://programmers.stackexchange.com/users/8486," I think you should have a good hobby so better learn to do a sport(an outdoor, so you get exercise as well) Learn Music or try writing poetry, proses, scripts for drama(learning those things will improve your creativity which i think is most needed for a programmer or any person) Mathematics(Strongly recommended) public speaking and communication skills ",Keshan,https://programmers.stackexchange.com/users/7669,http://programmers.stackexchange.com/questions/31567/important-non-technical-course-for-programmers,TECHNOLOGY,programmers.stackexchange.com 913,What's the deal with alignment languages?,"In early D&D, there was the concept of an ""alignment language."" The original ""little brown book"" D&D says only: Law, Chaos and Neutrality also have common languages spoken by each respectively. The Holmes basic rules, which come between ""brown book"" and Moldvay say: Lawful good, lawful evil, chaotic good, chaotic evil, and neutrality also have common languages spoken by each respectively. One can attempt to communicate through the common tongue, language particular to a creature class, or one of the divisional languages (lawful good, etc.). While not understanding the language, creatures who speak a divisional tongue will recognize a hostile one and attack. Moldvay D&D says: Dungeons & Dragons, Basic Rules, page B11 Alignment Languages Each alignment has a secret language of passwords, hand signals, and other body motions. Player characters and intelligent monsters will always know their alignment languages. They will also recognize when another alignment language is being spoken, but will not understand it. Alignment languages are not written down, nor may they be learned unless a character changes alignment. When this happens, the character forgets the old alignment language and starts using the new one immediately. What? So much of Dungeons and Dragons was very generic ""sword and sorcery"" fantasy that these rules always stuck out to me as an extremely sore thumb, or like one of those snails that has been infected by a fungus and begins to pulsate in random colors. What the heck is going on here? So, alignment languages show up pretty early in D&D's history. Every intelligent being that is on the side of Law can communicate. Every intelligent being that has no particular feelings about Law can, too. If they experience a profound change in their feelings about this, they can no longer communicate with the people they used to. It isn't clear how much communication is possible in an alignment language, since Moldvay describes it as ""passwords, hand signals, and other body motions."" In AD&D 1E, though, there is no such limitation: Advanced Dungeons & Dragons, page 34 Character Languages In addition to the common tongue, all intelligent creatures able to converse in speech use special languages particular to their alignment. These alignment languages are: Chaotic Evil, Chaotic Good, Chaotic Neutral, lawful Evil, Lawful Good, Lawful Neutral, Neutral Evil, Neutral Good, and Neutrality. The alignment of your character will dictate which language he or she speaks, for only one alignment dialect can be used by a character (cf. CHARACTER CLASSES, The Assassin). If a character changes alignment, the previously known longuage is no longer able to be spoken by him or her. That cross-reference to the assassin class is there because assassins alone can learn the languages of other alignments. Probably not all of them, though, because now there are nine instead of three. In AD&D 2E, the alignment language seems to have been silently dropped, and never spoken of again as far as I know. When I was ten and played AD&D, the idea of alignment languages struck me as incomprehensible, and today even though I have come to love almost everything about basic and early-Advanced D&D, alignment languages still seem incomprehensible, weird, and unexplained. What I want to know is this: how were (or are) alignment languages put to use, described, and conceived of in actual play ? So far, my use of them has always been ""pretend they do not exist."" I am curious as to how others view and address them. Also: where did this bizarre idea come from? It smacks of being lifted from some fantasy book, but I can't recall ever reading anything like it. ",rjbs,https://rpg.stackexchange.com/users/54,"There are hundreds of languages in daily use throughout the real world, but the syntax, words, and omissions of terms reflect the worldviews of the users. As simple examples, consider the Russian discourtesy toward indefinite articles, use of tonalities in Sinitic tongues, and words denoting relations in various languages (can you say 'brother-in-law' in a single word?). When certain terms are favored over others, those choices may indicate one's worldview. Similarly certain physical gestures could indicate one's state of mind (orderly, caring, malicious, self-absorbed, etc.). When Gary used the D&D game to introduce alignment concepts of Law/Chaos (and later adding Good/Evil to the mix), Alignment Languages were an early and under-developed side effect. A logical argument could be made that one's alignment could be revealed to all by these unconscious word choices and gestures, and the end result of that logic is the ""Know Alignment"" spell, in which a cleric's perceptions are magically boosted to translate all such clues. (For implementation, however, the spell works without requiring such interaction.) In actual use in the 1970s and early 1980s, Alignment Communications (whether verbal or otherwise) were incidental tools used to supplement communication already in progress. If you were conversing with a stranger in Common, you could 'slip in' a bit of alignment, to either augment or corroborate the usual discourse. Moral extremists (paladins, assassins, et al.) tended to make such attempts more frequently than others. And in any event, this nonmagical information-gathering was always indicative at most, never reached the level of detail gained by the use of the magical spell. ",ExTSR,https://rpg.stackexchange.com/users/72,http://rpg.stackexchange.com/questions/10032/whats-the-deal-with-alignment-languages,CULTURE,rpg.stackexchange.com 1998,How to specify which resources to protect with Spring Security OAuth2 provider configuration,"I'm currently implementing a Spring MVC application that is both an OAuth client (in the sense that it consumes data from third party service providers), and an OAuth2 Service Provider (in the sense that it should provide the means for third party oauth clients to consume data from this application from a dedicated REST api). While I have no issue with the implementation of the application in its capacity as OAuth client, my OAuth2 service provider configuration is interfering with the applications ability to authenticate with service providers- if I enable the Oauth2 config, it appears to intercept callbacks to the application from third party service providers. Disabling it returns the application back to its normal working state. I'm assuming that this is because I am not specifying which urls I want to the oauth2 provider to govern exclusively- but I can't see any way of specifying this. To simplify the question how do I configure Spring Security OAuth2 provider to manage one url root (e.g. '/restapi/*'), and this url only, with it ignoring all other urls entirely? I've had a look at the resources at the projects homepage, but nothing is jumping out at me... This may well be down to how I've defined my security intercept-urls, in which case it may not be an OAuth2 specific question, but how to apply different security schemes to different url schemes. Any advice on how to do that would be great! ",VLostBoy,https://stackoverflow.com/users/343343,"Out of the box you won't be able to do it with Spring Security 3.0, but you can in 3.1. According to this blog post: In Spring Security 3.1, you will be able to use more than one http element to create multiple filter chains. Each chain handles different paths within the application, for example a stateless API under the URL /rest/** and a stateful web application configuration for all other requests. To do what you want you can subclass the provider security filters and override doFilter() to only apply to certain URLs. If you are using namespace configuration you'll need to have your subclassed filters replace the corresponding filter in the filter chain. Kindof a pain, but doable. For example, here's how I am doing it for my custom VerificationCodeFilter: override def afterPropertiesSet() { setVerificationServices(springVerificationCodeFilter.getVerificationServices) setClientDetailsService(springVerificationCodeFilter.getClientDetailsService) setUserApprovalHandler(springVerificationCodeFilter.getUserApprovalHandler) super.afterPropertiesSet() val filterChainMap = filterChainProxy.getFilterChainMap val filterChain = filterChainMap.find(_._2.exists(_.isInstanceOf[SpringVerificationCodeFilter])). getOrElse(throw new Exception(""Could not find VerificationCodeFilter in FilterChainMap""))._2 val index = filterChain.indexOf(springVerificationCodeFilter) filterChain.remove(index) filterChain.add(index, this) } ",sourcedelica,https://stackoverflow.com/users/158658,http://stackoverflow.com/questions/6956369/how-to-specify-which-resources-to-protect-with-spring-security-oauth2-provider-c,STACKOVERFLOW,stackoverflow.com 5880,Piezo as a switch to flash an led when disturbed,"An LED embedded in a small translucent item (say half the size of a pack of cards) that would flash on briefly if the object was disturbed or tipped over. I immediately responded that a piezoelectric sensor/generator inside the object wired to an LED would do it. However, when I tried to demonstrate this concept using a piezo buzzer I liberated from an old phone, I could only get the LED to register a dim blip when I smashed the piezo buzzer with a blunt object. How would I ensure that a piezo sensor/generator would actually light up the LED adequately without the application of blunt force trauma. As I mentioned, space would be an issue so no large parts, breadboards, or really complex circuitry. I'm just trying to figure out the easiest and smallest way to accomplish this simple task. Thanks a lot for any help you can give me! ",Rory O'Hare,https://electronics.stackexchange.com/users/6179,"The trick is to get some feedback oscillation. I once built one of these using a trusty spring from a mechanical pencil. Attach the spring to a pager motor inside a grounded aluminum housing. When the spring hits the foil it will cause a vibration that will last for an random, but short period of time. The challenge is calibrating the pager motor so that the spring gets a little extra kit; but shuts off most of time. ",Mikhail,https://electronics.stackexchange.com/users/5925,http://electronics.stackexchange.com/questions/22736/piezo-as-a-switch-to-flash-an-led-when-disturbed,TECHNOLOGY,electronics.stackexchange.com 2088,COD Black Ops: Can opponents voice chat in free for all?,"In a free for all match, can I voice chat with my opponents? One of my friends started playing Black Ops (it's her first FPS game ever) and to teach her how to play I created a private free for all match so we would be the only two players on the map. I tried voice chat with her and everything was set up correctly (we could see the speaker icon above our heads blink when either of us spoke in the map). Only thing is I could not hear her at all (the volume was up high). I know in TDM you can't listen to the enemy chatter due to strategy and stuff but I would guess you could listen to enemies in free for all (for trash talking). Anyway, to repeat, is it possible to listen to enemy voice chat in FFA? ",Sid,https://gaming.stackexchange.com/users/10088,"In Free for All, all chat is enabled. You should be able to talk to any player in the match. ",Rob,https://gaming.stackexchange.com/users/8721,http://gaming.stackexchange.com/questions/24593/cod-black-ops-can-opponents-voice-chat-in-free-for-all,CULTURE,gaming.stackexchange.com 6249,Random Forest to estimate land use in past with Landsat,"I am new in Machine Learning and in R. I am working in my Master thesis. I am trying to estimate the LULC of the years 1984, 1990, 2000, 2011, 2014 for characterizing the forest dynamics. I have for each year the bands corresponding to Landsat imageries. The images were corrected and I have calculated vegetation index (NDVI, EVI, SR) and Tasseled Cap Components(Brightness, Greenness, Wetness). All this was performed using i.landsat.toar, i.vi and i.tasscap commands in Grass 7, respectivelly. I have as reference the year 2009 since there is a orthophoto and LiDAR data. Using the orthophoto I digitized training polygons for 5 classes (1. Crops, artificial, bareland; 2. pinus forest; 3. Mixed forest; 4. Quercus and 5. Shrubs). I fitted a model using Random forest and my intention is to classify the other year datasets wich have 5 reflective bands, 3 vegetation indexes and 3 tasseled Cap Components as predictor variables. The performance of the model is quite good, OOB 10.45% but within classes the Mixed forest achieved about 30 % of error. Thus, when I use the model to classify the other years the misclassification is very high. Am I doing anything worng? Is the Random forest useful for this purpose? Is there any software, method or algorithm that i could use to estimate the landuse? ",Juan Jose Mena,https://gis.stackexchange.com/users/52026,"I would look at the support of you individual classes. If support for a given class is marginal in your fit model, the error may propagate in very undesirable ways. I would also consider fitting a series of binary models and predicting probabilities of each class separately. You could then perform a sensitivity test on the probabilities and evaluate if there is multiple pixel membership (eg., pine forest transitioning into mixed). You may be having issues with trying to validate a hard-boundary classification where fuzziness exists in the class margins. A probabilistic approach may allow you to evaluate the changes in the ecological gradients. ",Jeffrey Evans,https://gis.stackexchange.com/users/8520,http://gis.stackexchange.com/questions/147076/random-forest-to-estimate-land-use-in-past-with-landsat,TECHNOLOGY,gis.stackexchange.com 5087,How do you prove $S=-\sum p\ln p$?,"How does one prove the formula for entropy $S=-\sum p\ln p$? Obviously systems on the microscopic level are fully determined by the microscopic equations of motion. So if you want to introduce a law on top of that, you have to prove consistency, i.e. entropy cannot be a postulate. I can imagine that it is derived from probability theory for general system. Do you know such a line? Once you have such a reasoning, what are the assumptions to it? Can these assumptions be invalid for special systems? Would these system not obey thermodynamics, statistical mechanics and not have any sort of temperature no matter how general? If therodynamics/statmech are completely general, how would you apply them the system where one point particle orbits another? ",Gerenuk,https://physics.stackexchange.com/users/5152,"The best (IMHO) derivation of the $\sum p \log p$ formula from basic postulates is the one given originally by Shannon: Shannon (1948) A Mathematical Theory of Communication. Bell System Technical Journal. http://cm.bell-labs.com/cm/ms/what/shannonday/shannon1948.pdf However, Shannon was concerned not with physics but with telegraphy, so his proof appears in the context of information transmission rather than statistical mechanics. To see the relevance of Shannon's work to physics, the best references are papers by Edwin Jaynes. He wrote dozens of papers on the subject. My favorite is the admittedly rather long Jaynes, E. T., 1979, `Where do we Stand on Maximum Entropy?' in The Maximum Entropy Formalism, R. D. Levine and M. Tribus (eds.), M. I. T. Press, Cambridge, MA, p. 15; http://bayes.wustl.edu/etj/articles/stand.on.entropy.pdf ",Nathaniel,https://physics.stackexchange.com/users/5477,http://physics.stackexchange.com/questions/14436/how-do-you-prove-s-sum-p-ln-p,SCIENCE,physics.stackexchange.com 7493,Laptop Battery does not show true charging level,"My laptop has a 6 cell Lithium Ion Battery. Even when the battery is fully charged it shows the battery charge status at 0%. As a result if there is a power loss (when I want to move the laptop from one place to another) it immediately goes into hibernation. However, when I restart the laptop WITHOUT plugging in the power, it starts and the battery meter shows some figure like 95-96% remaining. The battery then runs for almost an hour and a half. The laptop is around 2 years old. How can I rectify this issue? ",Vinayak,https://superuser.com/users/8477,"To rectify it you need to narrow the scope of the trouble. It's possible it may be an issue with Windows or with the Battery (i guess battery first). You might check out a Linux (Ubuntu) LiveCD. If the same problem exists with the LiveCD, then it's definitely a hardware issue. After identifying it as a hardware issue then replace the battery. If the problem doesnt exist using the LiveCD, then there is an issue with Windows and a reload may resolve it. If you tell us which model laptop, we may be able to identify a known issue with that battery (seems like my wife's Inspiron 15xx has trouble per the reviews of replacement batteries on Dell's site). ",Joshua K,https://superuser.com/users/6044,http://superuser.com/questions/47189,TECHNOLOGY,superuser.com 2720,Is research a viable business model?,"I have had the suspicion that it may be for a while and apparently not all is a product of my mind. Let me quote from an answer: In my experience, in UK and other European countries, the research funding comes from successful proposals to the relevant funding bodies. There are research centres that were established and keep going only because the staff there constantly submits project proposals (somebody told me that the success rate is 1 out of 5 or maybe even lower). There are two questions here. Can a company feasibly focus on obtaining funds in publicly funded research (as a business model) successfully enough to ""survive""? Can such a company be started (nearly) from scratch? In short, the company would be exactly like a research institute (or institution) except that it would be private. Reasons why question 1 may not be feasible: I don't see any company doing this kind of thing, i.e. there may be some, but there are not many, which means that it may be hard. It's a bad sign. Public funds seem to be assigned to public entities, while companies can benefit from the collaboration and synergy, but they are expected to get their funding from their work as companies (searching for customers, etc.) In this case the customers would be the partners in the projects and the society itself, but again, this seems to be an ""innovative"" (maybe naïve, or even plain stupid) idea. Research is a means for something, not an end on itself, that's why the business model should be on something else (point two) and that's why such a company would raise eyebrows on the mere idea of its existence. It may even be against some kind of tacit rule or even written laws. Reasons why question 2 may not be feasible: No previous history of success of the company, or products or anything means zero (or negative) trustworthiness and no projects assigned to the company. No partners would like to associate with the company in a project for the reasons in point 1. The most similar case I can think of are spin-off companies that are created from successful research labs, not from scratch. OMG so much communism! Go to kickstarter you hippie! As an example, a possible scenario that could be close to this: Someone writes a paper about a software system that does something not very novel in the state of the art but in a way that is very different from an architectural point of view, leading to good results in practical terms. In short: in theory nothing is new, in practice what was just a dream is now a reality. What is done remains the same in theory, but how it is done is completely different in practice (and now it works). Unfortunately only a proof of concept (PoC) can reasonably be implemented. Would it be feasible to request funds to continue the development of this PoC (still very far from a commercial product) as a start-up or that simply doesn't make sense? ",Trylks,https://academia.stackexchange.com/users/7571,"From the perspective of the US, there are many research institutes that operate as a private business entity. These research institutes can apply for some federal funding in the same capacity as a research at an educational institution. I see it being possible to start a private company without a lot of capital, although you will need to have a very strong skill set that is in demand. Whether this is a sustainable model really seems to depend on the specialized skills that the business would offer and the infrastructure that would allow it to efficiently prepare grants. Research-I educational institutions in the US have an incredible infrastructure to prepare and apply for grants that would be difficult to replicate in the private sector. ",Brian P,https://academia.stackexchange.com/users/17232,http://academia.stackexchange.com/questions/23676/is-research-a-viable-business-model,LIFE_ARTS,academia.stackexchange.com 8043,Litvaks/Yeshivish and Shulchan Aruch,"I understand that non-Chasidic (Ashkenaz) haredim follow the Mishnah Berurah when it comes to Orach Chayim part of Shulchan Aruch. But Mishnah Berurah is only for Orach Chayim. What they do with other parts of S""A (Yoreh De'ah, Even Ha-Ezer, Chosen Mishpat) do they just follow Rema or later commentaries printed in standard S""A? I mean, Chabad Chasidim have S""A Baal HaTanya which contains Yoreh De'ah and Chosen Mishpat. I can recapitulate my question: do Litvaks/Yeshivish learn Mishnah Berurah and then Shulchan Aruch with commentaries for other parts of halacha? ",perplexed,https://judaism.stackexchange.com/users/5340,"First of all, there's no rule that all of the litvishe Ashkenazim have to follow the Mishna Berura. It was very well accepted, but deciding on each halacha is a very complicated matter, and on every page of the Dirshu or Oz VeHadar versions of the Mishna Berurah you can find places where later poskim have disagreed and where certain rulings of the Mishna Berurah have not been widely accepted. In fact, in the introrduction to the Oz VeHadar Aruch Hashulchan, it states that Rav Moshe Feinstein would often pasken like the Aruch Hashulchan over the Mihnah Berurah (though finding all of those places isn't so easy since he doesn't always quote them) and there's a teshuvah by Rav Yosef Eliyahu Henkin's grandson which says that he also thought the Aruch Hashulchan wins over the Mishna Berurah, (Shut Bnei Banim 2:8). But again, halacha is complicated and great poskim decide these things on a case by case basis. Having said all that, I think it should be clear the first source for an authoritative, litvish, late European commentary on Shulchan Aruch, the Aruch Hashulchan would be the answer, but the Chayei Adam and Kitzur Shulchan Aruch are used often as well, and are much easier to read. Of course, there are many issues, teshuvos, and poskim who have come afterwords, so seforim that are now popular include the Badei Hashulchan (and more recently Divrei Sofrim) on Y.D. and the Pischei Choshen (which isn't a commentary on Shulchan Aruch but still very thorough and widely accpeted as far as I've seen) on C.M. and dayanim studying Even Haezer often use the Otzar HaPoskim. Also, I should point out that the Lubavitcher Rebbe's Shulchan Aruch on Y.D. and C.M. especially are far from comprehensive ",Matt,https://judaism.stackexchange.com/users/5083,http://judaism.stackexchange.com/questions/37654/litvaks-yeshivish-and-shulchan-aruch,CULTURE,judaism.stackexchange.com 3619,Can I use Windows Server 2008 R2 as a workstation?,"I would like to know if I can temporarily use Windows Server 2008 R2 as a workstation on my laptop? My laptop is an ASUS M51Va The reason for this is that I am attending on a Microsoft MCSA courses and I want to practice the trainings at home so that I can learn more. By using it as a workstation I mean will it be possible to use it to watch movies or play games like I do on windows 7? Lets say for example can i install a media player like VLC or install Warcraft TFT? ",RiXZ,https://superuser.com/users/87367,"For the most part you should be able to play games and watch movies, although some programes will not run on a server machine, for example, some anti-virus products will detect that you are running on a server and whine/refuse to install. You will also need to set up other services such as the Windows Audio and Search but overall you shoudln't have any problems. Also, consider a dual-boot setup, so Server 2008 plus your current OS, or take a look at VirtualBox for Virtualisation, as you mentioned it is only a tempoary setup. ",tombull89,https://superuser.com/users/35261,http://superuser.com/questions/301636,TECHNOLOGY,superuser.com 4091,When do I need to worry about thread-safety in an iOS application?,"When writing the usual view controller code, can I assume that this will only be called from a single event-loop thread? What kind of classes do I need to make thread-safe? What are the usual situations where multiple threads are involved? ",Thilo,https://stackoverflow.com/users/14955,"The Concurrency Programming Guide can be helpful. ",chiranjib,https://stackoverflow.com/users/443141,http://stackoverflow.com/questions/7102797/when-do-i-need-to-worry-about-thread-safety-in-an-ios-application,STACKOVERFLOW,stackoverflow.com 5527,MS SQL Stored Procedure for counting Dynamic table items,"I had wrote this below stored procedure and getting incorrect statement. ALTER PROCEDURE dbo.[Counter] @TableName VARCHAR(100) AS BEGIN DECLARE @Counter INT DECLARE @SQLQ VARCHAR(200) SET NOCOUNT ON; --SET @TableName = 'Member'; SET @SQLQ = 'SELECT COUNT(*) FROM dbo.[' + @TableName + ']'; --Preparing the above sql syntax into a new statement(get_counter). --Getting an error here I had googled the prepare statement but don't know why facing this error. PREPARE get_counter FROM @SQLQ; @Counter = EXEC get_counter; -- here @resutl gets the value of the count.@TableName DEALLOCATE PREPARE get_counter; -- removing the statement from the memory. END Then I had wrote another one: ALTER PROCEDURE dbo.[Counter] @TableName VARCHAR(100) AS BEGIN DECLARE @Counter INT DECLARE @SQLQ VARCHAR(200) SET NOCOUNT ON; --SET @TableName = 'Member'; SET @SQLQ = 'SELECT COUNT(*) FROM dbo.[' + @TableName + ']'; --Preparing the above sql syntax into a new statement(get_counter). Execute @SQLQ; -- here @resutl gets the value of the count.@TableName --DEALLOCATE PREPARE get_counter; -- removing the statement from the memory. Return @Counter; END It is running fine but I can't get the result in the Counter , anyone please help me(I know that I haven't assigned any value to the counter but if I do I get error). After your answer martin I had replace my code with yours now its : ALTER PROCEDURE dbo.[Counter] @SchemaName SYSNAME = 'dbo' , @TableName SYSNAME AS BEGIN SET NOCOUNT ON; DECLARE @SQLQ NVARCHAR(1000) DECLARE @Counter INT; SET @SQLQ = 'SELECT @Counter = COUNT(*) FROM ' + Quotename(@SchemaName) + '.' + Quotename(@TableName); EXEC sp_executesql @SQLQ , N'@Counter INT OUTPUT', @Counter = @Counter OUTPUT Return SELECT @Counter END Now I had retrieved it . ALTER PROCEDURE dbo.[CreateBusinessCode] @MemberID bigint, @len int, @RewardAccountID bigint, @ConnectionStatusID tinyint, @Assign smalldatetime AS BEGIN SET NOCOUNT ON; DECLARE @counter INT EXEC @counter = dbo.Counter 'dbo','member'; Select @counter; END ",user1542653,https://stackoverflow.com/users/1542653,"You should use SYSNAME for object identifiers and Quotename rather than concatenating the square brackets yourself. ALTER PROCEDURE dbo.[Counter] @TableName SYSNAME, @SchemaName SYSNAME = 'dbo' AS BEGIN SET NOCOUNT ON; DECLARE @SQLQ NVARCHAR(1000) DECLARE @Counter INT; SET @SQLQ = 'SELECT @Counter = COUNT(*) FROM ' + Quotename(@SchemaName) + '.' + Quotename(@TableName); EXEC sp_executesql @SQLQ , N'@Counter INT OUTPUT', @Counter = @Counter OUTPUT SELECT @Counter END ",Martin Smith,https://stackoverflow.com/users/73226,http://stackoverflow.com/questions/11592327/ms-sql-stored-procedure-for-counting-dynamic-table-items,STACKOVERFLOW,stackoverflow.com 3454,High-Tech Dungeon Crawling in Hard Sci-Fi,"I've started playing Eclipse Phase with a group of friends. Most of them have a Dungeons and Dragon history, and love getting magic items and such. I've already made up my mind to take the party on more dungeon raids, but what specifically can I do in the way of loot? It is a hard science fiction setting; no magic. It's noted in the core book that some brand-name weapons and items will have special features, and there is something called Psi that is basically watered-down psychic abilities. What are some recommendations you would make for drops and treasure caches? ",Tasuret,https://rpg.stackexchange.com/users/1598,"Treasures? Self-mobile plot-hook - NPC similar to Princess Leia in SW Ep IV in role. In distress, but of use down the road Illegal goods of use to the party Better weapons than the party has... if they can take them from the current owners. Rescue a trainer who can provide them esoteric skills training maps to other places to raid Entry Tokens to Eroticon 6 (HHGTTG reference...) repair parts almost untraceable bulk cargo of high value Readily traceable very high value cargo worth black marketing (ADVENTURE HOOK FROM H***) parts for improving their gear manuals for various bits of gear objects d'arte ",aramis,https://rpg.stackexchange.com/users/407,http://rpg.stackexchange.com/questions/6974/high-tech-dungeon-crawling-in-hard-sci-fi,CULTURE,rpg.stackexchange.com 9175,Align Environment and Spacing," Possible Duplicate: Blank lines in align environment When I put a blank line between a line of text and the align environment, it will add two blank lines instead. It seems that the align environment automatically adds a set of blank lines. I don't want two sets of blank lines, but this makes my code very hard to read. Compare (the 'correct way') \begin{align*} L\frac{di}{dt} + Ri = EU(t) \\ i(0) = 0 \end{align*} In Heaviside's operator notation, this is \begin{align*} pLi + Ri &= EU(t)\\ i &= \frac{E}{pL + R}U(t) \end{align*} and \begin{align*} L\frac{di}{dt} + Ri = EU(t) \\ i(0) = 0 \end{align*} In Heaviside's operator notation, this is \begin{align*} pLi + Ri &= EU(t)\\ i &= \frac{E}{pL + R}U(t) \end{align*} This may seem trivial but in a large document it's really hard to read the first example and relatively easy to read the second. Is there a way to change this, e.g. with a \renewcommand? By the way, is there an easier way of putting code on this site besides hitting space bar 4 times for each line? I tried HTML tags but they don't work. ",Tianxiang Xiong,https://tex.stackexchange.com/users/9600,"Use the comment sign % instead of a blank line. \begin{align*} L\frac{di}{dt} + Ri = EU(t) \\ i(0) = 0 \end{align*} % In Heaviside's operator notation, this is % \begin{align*} pLi + Ri &= EU(t)\\ i &= \frac{E}{pL + R}U(t) \end{align*} ",lockstep,https://tex.stackexchange.com/users/510,http://tex.stackexchange.com/questions/36267/align-environment-and-spacing,TECHNOLOGY,tex.stackexchange.com 2460,how to retrieve data from database correctly in java,"I wrote this code in order to display the name of employee who has the maximum salary but when the output wasn't correct it appeared null not ""mmm kkk"" !! although I filled the table and this is the contents : HERE this is my code, can any one help me ?? :( public static void displayMaxSalary() throws ClassNotFoundException, SQLException { int size=0; int count=0; String maxSalary=null; Class.forName(""com.mysql.jdbc.Driver""); Connection con = DriverManager.getConnection(""jdbc:mysql://localhost/task4DB?"" + ""user=root&password=123""); PreparedStatement st = con.prepareStatement(""select * from task4Table ""); ResultSet r1=st.executeQuery(); while (r1.next()) { size++; } int salaries[]=new int[size]; String Names[]=new String[size]; while (r1.next()) { salaries[count]= r1.getInt(""salary""); Names[count]= r1.getString(""fName"")+""""+r1.getString(""lName""); count++; } for(int i=1;i< salaries.length;i++) { if(salaries[i]>salaries[i-1]) { maxSalary= Names[i]; } } System.out.println(""The name of employee who has the higher salary is :""); System.out.println( maxSalary); } //end-displayMaxSalary. ",Akari,https://stackoverflow.com/users/2500509,"You change query to get all maximum salary persons in single query PreparedStatement st = con.prepareStatement("" select fName, lName, salary from task4Table where salary = (select max(salary) from task4Table)""); ResultSet r1 = st.executeQuery(); Iterate this resultset. ",Manoj,https://stackoverflow.com/users/1659977,http://stackoverflow.com/questions/17188114/how-to-retrieve-data-from-database-correctly-in-java,STACKOVERFLOW,stackoverflow.com 4414,How to measure a crooked room?,"I am faced with the task of measuring a room that has no right angles. The room has the following layout (this sketch in not scaled, there is also a window in the right wall which I omitted here): I want to measure the room as accurately as possible, because I want to create a plan for a friend who is a carpenter to cut some plates for a subceiling, and I would like for them to fit. My current plan is to measure the diagonals shown in the sketch as well as all the individual wall-segments. This should give me the information to construct an accurate plan without actually having to measure the angles of the corners. The measuring is complicated by the fact that I cannot measure on the ground, because there is furniture in the way that I cannot move. Also, since the walls are really crooked, I want to take the measurements at the hight at which the subceiling will be built. The longest diagonal is about 6 meters. How do I measure this room accurately? Is my approach sound? How can I measure these diagonals accurately (preferably without having to buy a laser-measuring-device)? ",Björn Pollex,https://diy.stackexchange.com/users/4558,"Forget it!!!! Trying to measure an untrue room for prefabrication of parts is nearly impossible. Your carpenter will have to come in, establish a center line in both axis and divide the differences on the edges. This application is no different than doing a suspended ceiling, and must be done on site. There will be a bit of adjustment in all directions, I'm sure. ",shirlock homes,https://diy.stackexchange.com/users/386,http://diy.stackexchange.com/questions/10590/how-to-measure-a-crooked-room,LIFE_ARTS,diy.stackexchange.com 4855,How can I alter an existing Primary Key on SQL Azure?,"I want to modify an existing primary key on a SQL Azure table. It currently has one column, and I want to add another. Now, on SQL Server 2008 this was a piece of cake, just did it in SSMS, poof. Done. This is how the PK looks like if I script it from SQL Server: ALTER TABLE [dbo].[Friend] ADD CONSTRAINT [PK_Friend] PRIMARY KEY CLUSTERED ( [UserId] ASC, [Id] ASC ) However, on SQL Azure, when I try to execute the above, it will of course fail: Table 'Friend' already has a primary key defined on it. Fine, so I try to drop the key: Tables without a clustered index are not supported in this version of SQL Server. Please create a clustered index and try again. Ok, so I try to create a temporary clustered index in order to drop the PK: CREATE CLUSTERED INDEX IX_Test ON [Friend] ([UserId],[Id]) Which results in: Cannot create more than one clustered index on table 'Friend'. Drop the existing clustered index 'PK_Friend' before creating another. Great, a catch22 moment. How do I add the UserId column to my existing PK? ",Magnus,https://dba.stackexchange.com/users/3949,"Note: as of Azure SQL Database v12, these restrictions no longer apply. The is no such thing as a 'primary index'. There is such a thing as a 'primary key' and also there is such a thing as a 'clustered index'. Distinct concepts, often confused. With this distinction in mind, lets revisit the question: Q1) Can the clustered index in a SQL Azure table be modified? A: Yes. Use WITH (DROP_EXISTING=ON): create table Friend ( UserId int not null, Id int not null); go create clustered index cdxFriend on Friend (UserId, Id); go create clustered index cdxFriend on Friend (Id, UserId) with (drop_existing=on); go Q2) Can the clustered index of a table that has a primary key constraint be modified? A: Yes, same as above, as long as the primary key constraint is not enforced via the clustered index: create table Friend ( UserId int not null, Id int not null identity(1,1), constraint pk_Friend primary key nonclustered (Id)); create clustered index cdxFriend on Friend (UserId, Id); go create clustered index cdxFriend on Friend (Id, UserId) with (drop_existing=on); go Q3) Can the primary key constraint of a table be modified? A: Yes, as long as the primary constraint is not enforced via the clustered index: create table Friend ( UserId int not null, Id int not null identity(1,1), constraint pk_Friend primary key nonclustered (Id)); go create clustered index cdxFriend on Friend (UserId, Id); go alter table Friend drop constraint pk_Friend; alter table Friend add constraint pk_Friend primary key nonclustered (UserId) go Q4) Can the primary key of a table be modified when is enforced via the clustered index? A: Yes, if the table never had any rows: create table Friend ( UserId int not null, Id int not null identity(1,1), constraint pk_Friend primary key clustered (UserId, Id)); go alter table Friend drop constraint pk_Friend; alter table Friend add constraint pk_Friend primary key clustered (Id, UserId) go Q5) Can the primary key of a table be modified when is enforced via the clustered index if the table is populated? A: No. Any operation that converts a populated clustered index into a heap will be blocked in SQL Azure, even if the table is empty: create table Friend ( UserId int not null, Id int not null identity(1,1), constraint pk_Friend primary key clustered (UserId, Id)); go insert into Friend (UserId) values (1); delete from Friend; go alter table Friend drop constraint pk_Friend; As a side note: the constraint can be modified if the table is truncated. The workaround to change the PK constraint of a populated table is to do the good old sp_rename trick: create table Friend ( UserId int not null, Id int not null identity(1,1), constraint pk_Friend primary key clustered (UserId, Id)); go insert into Friend (UserId) values (1); go create table FriendNew ( UserId int not null, Id int not null identity(1,1), constraint pk_Friend_New primary key clustered (Id, UserId)); go set identity_insert FriendNew on; insert into FriendNew (UserId, Id) select UserId, Id from Friend; set identity_insert FriendNew off; go begin transaction exec sp_rename 'Friend', 'FriendOld'; exec sp_rename 'FriendNew', 'Friend'; commit; go sp_help 'Friend'; The sp_rename approach has some issues, most importantly being that permissions on the table do not carry over during the rename, as well as foreign key constraints. ",Remus Rusanu,https://dba.stackexchange.com/users/708,http://dba.stackexchange.com/questions/6937/how-can-i-alter-an-existing-primary-key-on-sql-azure,TECHNOLOGY,dba.stackexchange.com 1283,How do I auto-remove trailing whitespace in Android Studio?,"Similar to the question for eclipse, How can I auto-remove trailing whitespace from the entire file being edited? How can I auto-remove trailing whitespace only from the lines I changed? ",qix,https://stackoverflow.com/users/954643,"Ha, it's as simple as Code->Reformat code... (option-cmd-L) ",qix,https://stackoverflow.com/users/954643,http://stackoverflow.com/questions/26354301/how-do-i-auto-remove-trailing-whitespace-in-android-studio,STACKOVERFLOW,stackoverflow.com 9329,Is it ok to mix 2 GB and 4 GB DIMMS in an iMac (mid 2011)?,"I've been told it is important to use matching DIMMs when installing memory to take advantage of the 128 bit throughput. I'm looking to buy a new 27"" iMac (mid 2011) which has 4 memory slots. If I put matching 2x2GB in 2 of the slots and matching 2x4GB in the other two slots, will that reduce its throughput or cause any problems? Do all 4 have to match or do each set of 2 need to match? ",Kenny Wyland,https://apple.stackexchange.com/users/6973,"Just to add to your peace of mind, my 21"" iMac (prior version) is working beautifully at 2x2 and 2x4 (12 total) GiB. Way faster than before (4GiB really isn't sufficient for what I do), and I don't see any oddball slowdowns. I got good quality memory that matched the MHz (1333) of the existing memory. Works like a charm. That said, I didn't try going to 16 GiB, so I can't vouch that 16GiB isn't faster than 12, but for me, 12 is more than sufficient at the moment. When the time comes, I'll switch out the older 2x2 sticks, but I don't see that it will make a huge improvement. ",Kerri Shotts,https://apple.stackexchange.com/users/6269,http://apple.stackexchange.com/questions/15315/is-it-ok-to-mix-2-gb-and-4-gb-dimms-in-an-imac-mid-2011,TECHNOLOGY,apple.stackexchange.com 1618,Is there any significant ranking penalty for using 302 redirects to force HTTPS?,"We have a site with: Decent ranking on certain targeted keywords. An HTTPS-only policy, which uses 302 redirects to force clients onto the secure version of any URL. Internal links using HTTPS, so there is no redirection. Some, but not all, external links from other domains use HTTPS. The rest do not and will of course be subject to the 302. Google is only indexing the HTTPS version of each URL. Even if you search specifically for the HTTP URL, only the HTTPS URL is shown in the results. Will there be any significant, immediate ranking benefit to changing our site to use 301 redirects to enforce HTTPS? Are there any statements from Google, Matt Cutts or other authorities on this specific situation? Based on my research the difference should be minimal since we are already well indexed, and our internal links are fine, so Google is not going to apply a sitewide penalty for the 302s, which are, in effect, only the first link in the chain. ",Jordan Rieger,https://webmasters.stackexchange.com/users/27841,"The problem with 302 redirects are that they are temporary, which often results in both pages being indexed in Google - The page you are redirecting from and the page you are redirecting to. If both pages are indexed in Google then that is problem as you have a duplicate page indexed. As mentioned here: Google's page on HTTP status codes 302 (Moved temporarily). This code is similar to a 301 in that for a GET or HEAD request, it automatically forwards the requestor to a different location, but you shouldn't use it to tell the Googlebot that a page or site has moved because Googlebot will continue to crawl and index the original location. So although you mention all your internal linking will use https, but external links inevitably will be with http, so Google is going to find some http links and 302 redirects, which could result in duplicate pages being indexed. Here is video from Matt Cutts where he attempts to answer the question weather there are problems ranking sites that use https. Although he doesn't mention your question specifically, he does touch on the point that if doing this correctly, you should be using 301 redirects. Can switching to HTTPS harm ranking? So to summarise you should not be using 302 redirects to force http, you should be using 301 redirects. ",Max,https://webmasters.stackexchange.com/users/23156,http://webmasters.stackexchange.com/questions/51663/is-there-any-significant-ranking-penalty-for-using-302-redirects-to-force-https,TECHNOLOGY,webmasters.stackexchange.com 5256,Transform a Binary Search Tree into a Greater Sum Tree,"Given a Binary Search Tree (where all nodes on the left child branch are less than the node), and all nodes to the right are greater/equal to the node), transform it into a Greater Sum Tree where each node contains sum of it together with all nodes greater than that node. Example diagram is here: Looking for code review, optimizations and best practices. public class GreaterSumTree implements Iterable { private TreeNode root; public GreaterSumTree(List<Integer> list) { create(list); } private void create (List<Integer> items) { root = new TreeNode(items.get(0)); final Queue<TreeNode> queue = new LinkedList<TreeNode>(); queue.add(root); final int half = items.size() / 2; for (int i = 0; i < half; i++) { if (items.get(i) != null) { final TreeNode current = queue.poll(); final int left = 2 * i + 1; final int right = 2 * i + 2; if (items.get(left) != null) { current.left = new TreeNode(items.get(left)); queue.add(current.left); } if (right < items.size() && items.get(right) != null) { current.right = new TreeNode(items.get(right)); queue.add(current.right); } } } } public static class TreeNode { private TreeNode left; private int item; private TreeNode right; TreeNode(int item) { this.item = item; } } public static class IntObject { private int sum; } /** * Computes the greater sum, provided the tree is BST. * If tree is not BST, then results are unpredictable. */ public void greaterSumTree() { if (root == null) { throw new IllegalArgumentException(""root is null""); } computeSum (root, new IntObject()); } private void computeSum(TreeNode node, IntObject intObj) { if (node != null) { computeSum(node.right, intObj); int temp = node.item; node.item = intObj.sum; intObj.sum = intObj.sum + temp; computeSum(node.left, intObj); } } /** * Returns the preorder representation for the given tree. * * @return the iterator for preorder traversal */ @Override public Iterator iterator () { return new PreOrderItr(); } private class PreOrderItr implements Iterator { private final Stack<TreeNode> stack; public PreOrderItr() { stack = new Stack<TreeNode>(); stack.add(root); } @Override public boolean hasNext() { return !stack.isEmpty(); } @Override public Integer next() { if (!hasNext()) throw new NoSuchElementException(""No more nodes remain to iterate""); final TreeNode node = stack.pop(); if (node.right != null) stack.push(node.right); if (node.left != null) stack.push(node.left); return node.item; } @Override public void remove() { throw new UnsupportedOperationException(""Invalid operation for pre-order iterator.""); } } } Here is a test case: public class GreaterSumTreeTest { @Test public void test() { Integer[] a = {1, 2, 7, 11, 15, 29, 35}; GreaterSumTree greaterSumTree = new GreaterSumTree(Arrays.asList(a)); greaterSumTree.greaterSumTree(); int[] expected = {71, 87, 89, 72, 35, 42, 0}; int[] actual = new int[a.length]; int counter = 0; Iterator itr = greaterSumTree.iterator(); while (itr.hasNext()) { actual[counter++] = (Integer) itr.next(); } assertTrue(Arrays.equals(expected, actual)); } } ",JavaDeveloper,https://codereview.stackexchange.com/users/28539,"A minor bug: You get an IndexOutOfBoundsException for an empty list in GreaterSumTree.create(List<Integer> items). You don't have a comment stating you need to input a list containing at least something. Consider returning IllegalArgumentException and adding a comment. /** * Computes the greater sum, provided the tree is BST. * If tree is not BST, then results are unpredictable. */ public void greaterSumTree() { if (root == null) { throw new IllegalArgumentException(""root is null""); } computeSum (root, new IntObject()); } You should use IllegalStateException here. IllegalArgumentException is for when the arguments are bad. What's bad here is the internal state of your object. Alternatively, remove the check here and put it in the create function. That way you don't get bad internal states. ",Pimgd,https://codereview.stackexchange.com/users/49350,http://codereview.stackexchange.com/questions/55966/transform-a-binary-search-tree-into-a-greater-sum-tree,TECHNOLOGY,codereview.stackexchange.com 370,"How do I know I'm running within ""go test""","When I run ""go test"", I want to use a different configuration file. How do I know within my code if I'm running within a test context or a normal context? Is there some sort of environment variable to check? ",Rob Kinyon,https://stackoverflow.com/users/1732954,"One possibility would be to use build constraints. If you run go test as: go test -tags testing pkgname Then you can use that tag to select which files will be included in a standard build of your package, and which will be used for testing. If you put your standard configuration in a file of its own, then adding a line to the top like the following will ensure that it is not used for testing: // +build !testing You can then include the testing configuration in one of the *_test.go files, or in some other file that requires that the testing tag be set. ",James Henstridge,https://stackoverflow.com/users/721283,http://stackoverflow.com/questions/14249217/how-do-i-know-im-running-within-go-test,STACKOVERFLOW,stackoverflow.com 1650,A symbol for the quotient of two objects,"One needs often a symbol to denote the quotient of two (algebraic) objects. (e.g. quotient by a subgroup, subring, submodule etc.). In simple cases people use A/B. But when both A,B are complicated to write, this doesn't look good. e.g. \mathcal{O}_{(V',0)}}/\mathcal{O}_{(V,0)}} For some reasons people do not use just \frac{A}{B}. Is there some way to achieve the following: $A$ raised a bit, then \Big/ then $B$ a bit lowered. ",qui_vadis,https://tex.stackexchange.com/users/1597,"Something like: \documentclass{article} \def\quotient#1#2{% \raise1ex\hbox{$#1$}\Big/\lower1ex\hbox{$#2$}% } \begin{document} \[ \quotient{\mathcal{O}_{(V',0)}}{\mathcal{O}_{(V,0)}} \] \end{document} Update, here is a real plain example: \def\quotient#1#2{% \raise1ex\hbox{$#1$}\Big/\lower1ex\hbox{$#2$}% } $$ \quotient{{\cal O}_{(V',0)}}{{\cal O}_{(V,0)}} $$ \bye ",Khaled Hosny,https://tex.stackexchange.com/users/729,http://tex.stackexchange.com/questions/4624/a-symbol-for-the-quotient-of-two-objects,TECHNOLOGY,tex.stackexchange.com 8890,How could I launch the sequence of git commands from java application?,"I need to add the file to the repository and then commit it from my java project. I use Runtime.getRuntime().exec(""C:\\Program Files (x86)\\Git\\bin\\sh.exe""); to start git but what should I do next? ",cadmy,https://stackoverflow.com/users/3110505,"I code should be something like this: public void gitCommands() throws IOException { // Build command List<String> commands = new ArrayList<String>(); commands.add(""/bin/bash""); commands.add(""-c""); commands.add(""git add .""); StringBuilder out = new StringBuilder(); ProcessBuilder pb = new ProcessBuilder(commands); pb.redirectErrorStream(true); process process = pb.start(); //EDIT: // get Exit Status process.waitFor(); //go for next commands ..... } ",molavec,https://stackoverflow.com/users/1278487,http://stackoverflow.com/questions/21530450/how-could-i-launch-the-sequence-of-git-commands-from-java-application,STACKOVERFLOW,stackoverflow.com 985,How do I convert these headings into questions?," Sectional Differences Divide The Union The Ongoing Debate over Slavery: 1850-1856 From Compromise to Crisis:1857-1861 Thanks for the help guys! ",TheHipsterBeard,https://ell.stackexchange.com/users/15706,"There's not really enough context to turn them into meaningful questions. The first two can be made into questions by adding what is/are, but without knowing what you're trying to ask there's not enough information here to help you. What were the Sectional Differences that Divided The Union? What is the Ongoing Debate over Slavery? ",Mark,https://ell.stackexchange.com/users/15703,http://ell.stackexchange.com/questions/47213/how-do-i-convert-these-headings-into-questions,CULTURE,ell.stackexchange.com 4104,"Difference in ""capable"" and ""able""","What is the difference in being physically capable and physically able? When would one choose one over the other? ",Homer,https://english.stackexchange.com/users/21117,"They mean the same thing, but when there's a further qualifier, capable is preferred, whereas able is usually by itself: He is physically able. — [normal] He is physically able to lift 200 kg. — [OK, not that unusual] He is physically capable. — [unusual, but not wrong] He is physically capable of lifting 200 kg. — [normal] ",Daniel,https://english.stackexchange.com/users/10041,http://english.stackexchange.com/questions/75010/difference-in-capable-and-able,CULTURE,english.stackexchange.com 7334,Another instructor is pushing me out of the classroom right after my class ends,"I am a graduate student in math in my final year, and for several years have been teaching at my department as a lecturer. This semester, in the same lecture hall there is another lecture that starts 20 minutes after my class ends. It's taught by another instructor from my department. I usually have many students coming to office hours and there are also students asking questions immediately after lecture. Due to other activities, I cannot have office hours right after the lecture this semester and can only stay for about 15 minutes to answer questions. Many times in the past I had a similar situation and never had any issues with it. This semester the instructor who is teaching right after often arrives 20-15 minutes before her class starts and tells me immediately that I have to go with my students somewhere else. I make sure to leave the blackboard clean and take all my stuff away from the instructor's desk before she arrives, but I do believe that I have a right to stay in the classroom after my lecture for at least 5-10 minutes. There is no vacant classroom around, and I don't have time to go with students to my office, which is in a different building. Last time the instructor told me in front of my students that I don't understand ""simple things"" and that I am ""playing games"". When I was talking to one of my students, she stood very close to us and clearly demonstrated that she wanted us out. I tried to explain her that I couldn't go anywhere else due to my time constraints, but she didn't want to listen to me. I really don't understand what ""simple"" things she meant and what ""games"" I am playing. We leave the board clean. She doesn't need to set up a projector. She can still talk to her students before her class starts, if she wants to (even though it seems like her students don't ask her any questions before their class). So, I don't see how I cause any disruption. I had met this woman many times before this semester, but we never talked. I didn't see her talking to other instructors/students much, and she seems to be quite reserved and a bit neurotic. She doesn't want to have any conversation with me regarding the issue. I felt really offended after last class when she said those things to me in front of my students. What would you do in my case? Added later: There are no official rules regarding classroom occupancy between classes. Instructors are supposed to use common sense and be reasonable. For me using 50% of the break time seems reasonable to answer questions after lecture seems reasonable. I agree that for some people it may not. I don't block the entrance to the classroom. A few students from the next class who come earlier always go ahead and take their seats as soon as my students start leaving the room. I also had one of the students from the next class listening to my explanation to one of those after-class questions and asking me further questions before their class (which is the same class as I am teaching, just a different section). Maybe the instructor got jealous, I don't know. The entrance to the classroom is from its front (not back), so I do stay in the front. But it is a big lecture hall, and there is a plenty of space in front of the room (the board itself consists of 8 huge panels). Also, during my career as a grad.student who is also teaching for the department, I have had several observations from experienced professors who are considered to be great teachers at the department and are in charge of undergraduate teaching policy. In my evaluations the fact that there are always several students approaching me with questions after class considered as very positive, meaning that students find me approachable. Thank you everyone for answers. ",Lidd88,https://academia.stackexchange.com/users/31345,"If I were in your situation, I would ask the other professor for a reason and explain that I wanted to make an announcement to my students at the next lecture. If the response is ""because I want you out"" then I would politely explain that I would announce to the students that we could only remain for 10 minutes after class after which time we would all need to be out of the room. No need to make it confrontational. I find that if you offer to help people solve a problem that helps reduce tension. If this professor doesn't actually have a problem then offering to help solve a problem will be a non-confrontational way of pointing that out. This worked for me last semester. We only had 15 minutes between classes and my course was taught in a computer lab. Quite often students had questions about projects they were working on and already had their code pulled up on their screen. Unfortunately the students from the following course would be filing in and because their course required them to have access to code on a particular machine (shared drives wouldn't work) they needed particular seats which my students were still occupying. In my case, the professor after me simply explained why he needed the room and at the next lecture I explained to my students why they needed to exit within 5 minutes of the end of class. Everyone understood, no tension, no confrontation. ",Matt S,https://academia.stackexchange.com/users/31376,http://academia.stackexchange.com/questions/41133/another-instructor-is-pushing-me-out-of-the-classroom-right-after-my-class-ends,LIFE_ARTS,academia.stackexchange.com 6619,Can we represent this sequence as a function of n?,"I have this sequence : 4,12,24,48,240,720,.... I order to find nth term of this sequence , can we represent this sequence as a function of n. ",nav_jan,https://math.stackexchange.com/users/44271,"If we divide the terms by 4 we have $1,3,6,12,60,180...$ now we can proced to see a pattern, let's see the representation in prime numbers, $6=2\times 3$, $12=2^2\times 3$, $60=2^2\times 3 \times 5$ and $180=2^2\times 3^2 \times 5$, ... So, taking $1=2^0$ and $3=2^0\times 3^1$ we have the list: $2^0$ $2^0\times 3^1$ $2^1\times 3^1$ $2^2\times 3^1\times 5^0$ $2^2\times 3^1\times 5^1$ $2^2\times 3^2\times 5^1\times 7^0$ We see that the sum of the exponents of each line is $0,1,2,3,...$ When the sum of the exponents of each line is odd we add a new prime factor elevated to $0$. Then the next two number in the sequence is: $2^2\times 3^2\times 5^1\times 7^1=1260$ $2^2\times 3^2\times 5^2\times 7^1\times 11^0=6300$ ",José Ramírez,https://math.stackexchange.com/users/44789,http://math.stackexchange.com/questions/210501/can-we-represent-this-sequence-as-a-function-of-n,SCIENCE,math.stackexchange.com 264,Voltage ratings of capacitors: ceramic vs electrolytic,"Now I know when it comes to electrolytic capacitors it's usually good practice to use a voltage rating 1.5x - 2.5x the maximum rating you ever expect the capacitor to be exposed to, as the lifetime can be significantly reduced by running it near its limits. But does the same protocol apply to ceramic capacitors? For example, assume a 25V ceramic capacitor - will running it at 24V reduce its lifespan significantly? I'm currently designing a PSU which needs to be reliable, so at the moment I'm using 50V caps for a maximum 20V input (35V caps aren't available), but I'd like to switch to 25V caps if possible. ",Thomas O,https://electronics.stackexchange.com/users/1225,"You do not have the same lifespan issues with ceramic caps. You will lose capacitance as the voltage increases. The amount you lose is dependant on the dielectric. When choosing the electrolytics you also need to look at the ESR, temperature rating and the maximum operating temperature. Since the lifetime is predicted using the Arrhenius activation energy law running using a 105°C rated cap will give you a significant increase over running a 85°C cap (assuming all other conditions are the same). There are some 5000 hour rated electrolytics. ",jluciani,https://electronics.stackexchange.com/users/424,http://electronics.stackexchange.com/questions/5274/voltage-ratings-of-capacitors-ceramic-vs-electrolytic,TECHNOLOGY,electronics.stackexchange.com 3852,""" not all code paths return a value"" when return enum type","I have enum list and method and i get error: "" not all code paths return a value"" Some idea whats wrong in my method ? I am sure I always return STANY type :/ Thanks for help :) private enum STANY { PATROL, CHAT, EAT, SEARCH, DIE }; private STANY giveState(int id, List<Ludek> gracze, List<int> plansza) { // Sprawdz czy gracz stoi na polu z jedzeniem i nie ma 2000 jednostek jedzenia bool onTheFood = false; onTheFood = CzyPoleZjedzeniem(id, gracze, plansza, onTheFood); if (onTheFood && (gracze[id].IloscJedzenia < startFood / 2)) return STANY.EAT; // Sprawdz czy gracz nie stoi na polu z innym graczem bool allKnowledge = true; allKnowledge = CzyPoleZInnymGraczem(id, gracze, allKnowledge); if (!allKnowledge) return STANY.CHAT; // Jesli ma ponad i rowna ilosc jedzenia patroluj if (gracze[id].IloscJedzenia >= startFood / 2) return STANY.PATROL; // Jesli ma mniej niz polowe jedzenia szukaj jedzenia if (gracze[id].IloscJedzenia > 0 && gracze[id].IloscJedzenia < startFood / 2) return STANY.SEARCH; // Jesli nie ma jedzenia umieraj if (gracze[id].IloscJedzenia <= 0) return STANY.DIE; } ",netmajor,https://stackoverflow.com/users/259227,"there's no return if none of those if conditions are met. You need to either use if...elseif...else or have a return after all of the if statements that will return a value if nothing has been returned (none of the if conditions were met). ",derek,https://stackoverflow.com/users/234558,http://stackoverflow.com/questions/2894131/not-all-code-paths-return-a-value-when-return-enum-type,STACKOVERFLOW,stackoverflow.com 2764,How to calculate mean and standard deviation in R given confidence interval and a normal or gamma distribution?,"Suppose you are given a $95 \%$ CI $(1,6)$ based on the normal distribution. Is there any easy way to find $\mu$ and $\sigma$? What if it came from a gamma distribution? Can we do this in R? ",toby j,https://stats.stackexchange.com/users/11963,"If you mean the true parameters of course the answer is no. But if you mean that you want to recover the sample estimates from the confidence interval the answer is yes for the normal distribution if the sample size $n$ is also given. If the confidence interval was $(1,6)$, then $1= \overline{X}-1.96 \cdot S/\sqrt{n}$ and $6=\overline{X}+1.96 \cdot S/\sqrt{n}$. So $\overline{X}= (6+1)/2=3.5$ and then $6=3.5 +1.96 \cdot S/\sqrt{n}$ or $S=\sqrt{n} 2.5/(1.96)$. For the gamma distribution this paper shows various ways to get the approximate and exact confidence intervals for rates. Getting the parameter estimates from these confidence intervals may be complicated. ",Michael Chernick,https://stats.stackexchange.com/users/11032,http://stats.stackexchange.com/questions/30402/how-to-calculate-mean-and-standard-deviation-in-r-given-confidence-interval-and,SCIENCE,stats.stackexchange.com 9480,Creating a Bridged Network Connection in Terminal,"Okay, I'm struggling a bit here. I'm not all that good with Terminal and sorting out network issues using it but I've managed to scrape by so far. Without using Internet Sharing (because controlling that via Terminal as per my question here doesn't actually seem to work in Yosemite) how can I share my internet connection from one interface (lets say en0) to another (again, lets say en1)? I kind of understand that Internet Sharing creates a bridge (usually called bridge100) and then uses bootpd (I think) to establish a DHCP server and NAT to route all traffic from 192.168.2.xxx (which is the bridged network) through to your primary network. How can I get the same result without using the Sharing pref pane? ",Stuart H,https://apple.stackexchange.com/users/104399,"Here is an interesting solution to share internet with a layer-2 bridge but without using NAT/DHCP (not required)/Internet Sharing Pref Panel at all: Create a shell script ethernet-bridge.sh in /usr/local/sbin with the following content: #! /bin/sh # ###################################### # coded by Nat! # 2013 Mulle kybernetiK # GPL command=${1:-start} shift proxyarp=${1:-no} shift start() { sysctl -w net.inet.ip.forwarding=1 sysctl -w net.inet.ip.fw.enable=1 if [ ""$proxyarp"" != ""no"" ] then sysctl -w net.link.ether.inet.proxyall=1 fi ifconfig bridge0 create ifconfig bridge0 addm en0 ifconfig bridge0 addm en1 ifconfig bridge0 up if [ $? -eq 0 ] then syslog -s ""Ethernet Bridge is up"" else syslog -s ""Ethernet Bridge failure"" fi } stop() { ifconfig bridge0 destroy sysctl -w net.inet.ip.forwarding=0 sysctl -w net.inet.ip.fw.enable=0 sysctl -w net.link.ether.inet.proxyall=0 syslog -s ""Ethernet Bridge is down"" } case ""$command"" in start*) start ;; stop*) stop ;; esac and make it executable: chmod 755 /usr/local/sbin/ethernet-bridge.sh Then put the following XML into /Library/LaunchDaemons as com.ethernet-bridge.plist <?xml version=""1.0"" encoding=""UTF-8""?> <!DOCTYPE plist PUBLIC ""-//Apple//DTD PLIST 1.0//EN"" ""http://www.apple.com/DTDs/PropertyList-1.0.dtd""> <plist version=""1.0""> <dict> <key>Label</key> <string>com.ethernet-bridge.plist</string> <key>ProgramArguments</key> <array> <string>/usr/local/sbin/ethernet-bridge.sh</string> </array> <key>UserName</key> <string>root</string> <key>GroupName</key> <string>wheel</string> <key>RunAtLoad</key> <true/> <key>LaunchOnlyOnce</key> <true/> </dict> </plist> Then modify the file and load it: sudo chmod 644 /Library/LaunchDaemons/com.ethernet-bridge.plist sudo chown root:wheel /Library/LaunchDaemons/com.ethernet-bridge.plist sudo launchctl load /Library/LaunchDaemons/com.ethernet-bridge.plist The plist will enable the bridge mode while booting. Check with ifconfig -a if the bridge is visible. To stop the bridge mode just enter: sudo /usr/local/sbin/ethernet-bridge.sh stop To restart the bridge mode just enter: sudo /usr/local/sbin/ethernet-bridge.sh start Now set up the clients with a fixed IP/netmask/Gateway (the internal IP-address of the briding machine)/DNS or properly set up a DHCP server on the bridging machine. Additionally you have to set up a static route on your router to the network you provide Internet Sharing to (in your example (en1)). Until now the syslog messages don't work - I'll try to improve the script pertinently. A similar approach is outlined here, but I didn't get it to work in Yosemite ",klanomath,https://apple.stackexchange.com/users/93229,http://apple.stackexchange.com/questions/178653/creating-a-bridged-network-connection-in-terminal,TECHNOLOGY,apple.stackexchange.com 5272,E_COMPILE_ERROR when enabling Magento compilation,"I'm trying to enable compilation on Magento via the control panel and while compilation is enabled the main page fails to display properly and I find that index.php has repeatedly raised the following error in logs: E_­COMPILE_­ERROR: require_­once­(­)­: Failed opening required '­Config­File­Manager­Model.­php' ­(include_­path='/­var/­www/­vhosts/­<domain_name_redacted>/­httpdocs/­includes/­src­:.­:'­)­ The site returns to normal immediately after disabling compilation but I'd really like to have the performance benefits. Does anyone know how to fix this? ",David Perry,https://magento.stackexchange.com/users/2075,"It sounds like one of your extensions, or some custom code in your system, is incompatible with Magento's compilation mode. The exact solution will vary depending on your PHP system. Here's an explanation of the problem and some troubleshooting tips that should help you. A file in your system contains a line that looks something like this //the string 'ConfigFileManager-Model.php' may be //a constant or variable as well require_once 'ConfigFileManager-Model.php'; The file ConfigFileManager-Model.php is not part of Magento, or any publicly distributed package as far as I can tell. It sounds like when you're running in ""non-compiled mode"", Magento can find this file without issue. That means it's somewhere in the normal Magento include paths /path/to/magento/app/code/core/ConfigFileManager-Model.php /path/to/magento/app/code/community/ConfigFileManager-Model.php /path/to/magento/app/code/local/ConfigFileManager-Model.php /path/to/magento/path/to/calling/files/own/folder/ConfigFileManager-Model.php #possibly more, depending on your system's default include path However, when Magento runs in compiled mode, the core, local, and community code pool paths are not added as include paths. Only the folder /path/to/magento/includes/src is added as an include path. Additionally, what compilation mode does is make copies of all the class files and drops them into the includes/src folder. That means the file's own original folder is no longer in the include path. Because of this, when Magento runs the require code in compilation mode, it can't find the ConfigFileManager-Model.php file, and fails. The best thing to do would be recode the module and/or custom code such that the functionality of ConfigFileManager-Model.php is incorporated into a standard Magento helper of model class. The less good, but quicker thing would be to identify all the places ConfigFileManager-Model.php is required and change the path so it's absolute instead of relative. ",Alan Storm,https://magento.stackexchange.com/users/4,http://magento.stackexchange.com/questions/3493/e-compile-error-when-enabling-magento-compilation,TECHNOLOGY,magento.stackexchange.com 1756,"Should I get my guitar re-set up when changing string brands, but not gauges?","So I've recently purchased an electric guitar, and I've been playing contentedly with it. However, I decided the factory strings were due for a change, so I had the guitar set up with strings of a certain gauge. Now, however, I've come to regret my choice of string. They just don't sound as good as the original strings from the factory. Therefore, my question is: can I just change the strings to the same gauge, or should I get the whole guitar re-set up, given that the brand might be slightly different or whatnot? ",Alex ,https://music.stackexchange.com/users/7180,"Same gauge strings = same set up. Same string mass, same tension, same speaking length. However... if you had the set up changed from original, which you liked, just changing brand will probably not do it for you. Sounds like you need to revert to the original string gauge, which will require a re-set-up. ",Tim,https://music.stackexchange.com/users/2808,http://music.stackexchange.com/questions/12137/should-i-get-my-guitar-re-set-up-when-changing-string-brands-but-not-gauges,LIFE_ARTS,music.stackexchange.com 4740,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 + changing mirror, and rebuild rpm, doesn't help. Thanks. ",Evgeny,https://serverfault.com/users/13823,"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 cautious) sudo /bin/rpm --rebuilddb After that completes, try the ""yum install squid"" again. ",Alex,https://serverfault.com/users/10057,http://serverfault.com/questions/59814,TECHNOLOGY,serverfault.com 2456,Planet orbits: what's the difference between gravity and centripetal force?,"My physics teacher says that centripetal force is caused by gravity. I'm not entirely sure how this works? How can force cause another in space (ie where there's nothing). My astronomy teacher says that gravity is (note: not like) a 3D blanket and when you put mass on it, the mass causes a dip/dent in the blanket and so if you put another object with less mass it will roll down the dip onto the bigger mass. Is this true and is this what causes the centripetal force. ",Jonathan.,https://physics.stackexchange.com/users/4,"A centripetal force is a force directed towards the centre. It's just a characterisation of an existing force. ""Centripetal"" means ""towards the centre"" in Greek. So, in the solar system, the sun exerts a gravitational force towards itself, and it is a centripetal force. Regarding your other question: how does gravity work? According to general relativity, energetic or massive objects distort space, so that other objects passing through the distorted space do not go straight, but bend their trajectory. From their point of view, they experience a force (gravity), and consequentially an acceleration which changes their trajectory. So according to general relativity the medium through which gravity acts is actually the distortion of space. This is what your astronomy teacher called ""a 3D blanket"". Instead, according to Quantum Field Theory, forces are mediated by appropriate particles actually moving through space. Gravity would be carried by particles known as gravitons. In both these theories, there is no action-at-a-distance, so body don't exert forces on one another instantaneously, but there's always something ""in the middle"" that carries or represents the force. ",Sklivvz,https://physics.stackexchange.com/users/66,http://physics.stackexchange.com/questions/321/planet-orbits-whats-the-difference-between-gravity-and-centripetal-force,SCIENCE,physics.stackexchange.com 634,Laptop wireless networking options: 1x1 vs 2x2,"I am currently customizing a Lenovo Thinkpad. Under the section ""Integrated WiFi wireless LAN adapters"" there are two options. Default: ThinkPad 1x1 b/g/n Upgraded: ThinkPad 2x2 a/b/g/n (+$10 AUD) What does the 1x1 and 2x2 mean? For reference, here is the link. 5th option from the bottom. Customize Lenovo Thinkpad ",Valamas,https://superuser.com/users/68072,"That's a no-brainer. Pay the +$10 AUD and get the 2x2 a/b/g/n. It can move data at up to twice the speed of the ""1x1 b/g/n"" solution, and it supports the much larger, less congested 5GHz frequency band, making it less likely to interfere with (or receive interference from) all the other uses of the 2.4GHz band. 1x1 and 2x2 refer to the number of transmit and receive radio chains built into the Wi-Fi card. 2x2 means it has two transmit and two receive radio chains, and usually implies that it supports 2 ""spacial streams"", which is a key way that 802.11n is faster than the previous generation of Wi-Fi technologies. 802.11n is the first standard in the 802.11 family to support MIMO (pronounced ""MY-moh""), which stands for ""Multiple Inputs, Multiple Outputs"", which is basically a way of ganging together multiple radios to get faster data rates than you can get with a single radio on each end of the connection. Because it's possible to create a wireless card with 2 transmit and 2 receive radio chains but still not do real 2 spacial stream MIMO, some people in the industry now use the notation TxR:S, where T is the number of Transmit radio chains, R is the number of Receive radio chains, and S is the number of supported ""spacial streams"". Because MIMO was the raison d'être for 802.11n, when the first N gear hit the market in 2007, it was all 2x2:2, which means it can support up to 300 megabit per second data rates when used with 40MHz-wide channels. Unfortunately, within the last year or so, some companies have been being cheap, and, in my opinion, a bit deceptive, and selling 1x1:1 radios as 802.11n. Technically they do support a few of the slowest 802.11n-style modulation schemes, but since they only have a single transmit and receive radio, they aren't MIMO, and 802.11n without MIMO is like a BLT without bacon. The maximum data rate a 1x1:1 radio can get is 150 megabits per second, and that's when using a 40MHz-wide channel (sometimes called simply a ""wide channel"", because before 802.11n, all standard 802.11 channels were never wider than about 20 or 22MHz). Wide channels are fine in the 5GHz band which is a much larger band with a lot more channels and a lot less congestion than the old 2.4GHz band. But in the 2.4GHz band, using wide channels can cause problems because it takes up like two-thirds of the entire band, leaving very little room for things like Bluetooth and neighboring 802.11 networks. Unfortunately, that 1x1 solution is only b/g/n and doesn't say ""a"", which implies it ONLY supports the small, congested 2.4GHz band. The 2x2 solution says it supports ""a"" (802.11a), which only worked in the 5GHz band, which means that radio is 5GHz capable. Since it also lists b and g, you know it's 2.4GHz capable. Also, because it's almost certainly a 2x2:2, it can almost certainly use signaling rates up to 300 megabits per second. ",Spiff,https://superuser.com/users/30792,http://superuser.com/questions/323347,TECHNOLOGY,superuser.com 5711,pdfpages breaks display of small caps,"I try to create proceedings with a uniform title page for individual pdfs that I get from the authors. I use pdfpages for this. The individual pdfs are included and I add title information (not shown in the example below). I have one paper that looks fine, but when I include it, the result does not contain the small caps letters in the attribute value matrices (see figures on page 7 and 8). \documentclass{article} \usepackage{pdfpages} \usepackage[utf8]{inputenc} \usepackage{hyperref} \setcounter{page}{335} \begin{document} \includepdf[pages=-,pagecommand=\thispagestyle{plain}]{Includes/yatabe.pdf} \end{document} This is the paper: yatabe.pdf What I get from including is yatabe-broken.pdf ",Stefan Müller,https://tex.stackexchange.com/users/18561,"use in the preamble: \pdfinclusioncopyfonts=1 otherwise the SmallCaps font is not included. From the pdftex manual: \pdfinclusioncopyfonts (integer) If positive, this parameter forces pdfTEX to include fonts from a pdf file loaded with \pdfximage, even if those fonts are available on disk. Bigger files might be created, but included pdf files are sure to be embedded with the adequate fonts; indeed, the fonts on disk might be different from the embedded ones, and glyphs might be missing. ",Herbert,https://tex.stackexchange.com/users/2478,http://tex.stackexchange.com/questions/140380/pdfpages-breaks-display-of-small-caps,TECHNOLOGY,tex.stackexchange.com 2104,How do electrical devices suck electricity?,"If the electric potential is 220V and some device needs 1500watts then how does it suck exactly that amount of electrical energy from outlet? ",Ron,https://physics.stackexchange.com/users/7253,"It is not the most straightforward viewpoint to say that a device ""needs 1500 watts"". This is more a consequence than a condition. What happens is that you create an electric circuit by plugging in a device into the outlet. That circuit follows Ohm's law: $$V = I R$$ So for a given voltage and resistance a certain current $I$ will flow. The power is simply $$P = V I = V^{2}/R = I^2 R$$The device does not know anything, it just has a property, it's resistance $R$. ",Alexander,https://physics.stackexchange.com/users/5931,http://physics.stackexchange.com/questions/19838/how-do-electrical-devices-suck-electricity,SCIENCE,physics.stackexchange.com 9089,Why is covalent bonding stronger than electrostatic attraction?,"I guess if we look at this problem from a ""conjugate"" perspective then the conjugate of a covalent bond is two elements with electrons lying around. On the other hand, with two electrostatically attracted things, the lack of a bond leaves two separate, charged particles. But that still doesn't answer the question; why are electrons less stable than ions? I guess in the case of an ion though there are still electrons but also a nucleus the stabilize the electrons. ",Dissenter,https://chemistry.stackexchange.com/users/5084,"Short answer: To quote Mehrdad: You're basically comparing an intermolecular force with an intramolecular force. Ionic bonds are two charged atoms sitting next to each other with minimal overlap of their orbitals. Covalents bonds are two atoms becoming one molecule with significant changes in orbital structure. It is not always clear cut: there are atoms with part-ionic and part-covalent character or two atoms sitting next to each other with moderate overlap of their orbitals. Here is a good explanation (for solids): Are metallic/ionic bonds weaker than covalent bonds? I was taught the opposite. Now I'm confused Long answer: Electrostatic bonds by definition are incapable of any significant bond formation. Bond formation involves the formation of a lower energy ""bonding orbital(s)"" out of two (or more) higher energy ordinary orbitals on adjacent atoms within the molecule. The formation of bonding orbitals gives covalent bonding orbitals much lower energy (not smaller, see diagram) than non-bonding orbitals which exist in the unbound state. This energy difference is larger than is possible for merely electrostatic attractions. Why is this the case? Because the electrons in bonding orbital are better able to counteract the positive charges of the adjacent nuclei. This makes sense because the negative charge on one molecule in an electrostatic arrangement is only able to neutralize the positive charge from its own nuclei. Bonding orbitals that are only present in covalent bonds share those electrons between two nuclei and thereby better neutralize the charges of both nuclei, which results in a lower energy for the bonded system than is possible in an ionic system. Image Source ",Dale,https://chemistry.stackexchange.com/users/114,http://chemistry.stackexchange.com/questions/21774/why-is-covalent-bonding-stronger-than-electrostatic-attraction,SCIENCE,chemistry.stackexchange.com 9360,Can I use a package manager of one distribution on another?,"I want to use Gentoo's packages on Fedora. Is this possible? EDIT: I meant that I want to use Gentoo's portage tree. UPDATE: How about Ubuntu's packages on Fedora? Or Fedora's on Gentoo? Or any other distribution's packages/package manager on another? ",Yktula,https://superuser.com/users/33789,"It's certainly possible with Gentoo, using Gentoo Prefix Incidentally, I just found out that there is an x86-winnt version of Gentoo Prefix, which might be interesting to try. ",Alan Pearce,https://superuser.com/users/46030,http://superuser.com/questions/132164,TECHNOLOGY,superuser.com 7466,What's the maximum will a soldier can have per rank? How much willpower does an operative gain per rank?,"I'm trying to make a squad of superhumans to fight the alien scum. To that end I would like to maximize my soldiers' will by reloading at the end of the mission until I'm satisfied with the result. How much will can an operative gain per rank? What's the maximum will a soldier can have at each rank up? Bonus questions: how likely is a soldier to get the maximum will increase when ranking up? What about high rank soldiers that come as mission rewards? ",kotekzot,https://gaming.stackexchange.com/users/19827,"According to the wiki: Soldiers also gain a randomized 2-6 point Will bonus for each rank; if the Iron Will upgrade is purchased this bonus is increased to a possible 4-12 points. You can further boost this by using some of the Second Wave option, ""Not Created Equally"", to randomize starting stats: On one hand a Rookie can start out with a Will stat of 59 and Aim of 80 which is significantly better than the standard stats while on the other hand you can also end up with one with a Will of less than 30 and Aim less than 60 which is substantially worse than standard. Note that this setting does not affect HP, but it does affect Speed - a hidden attribute that is otherwise constant throughout the game. ",l I,https://gaming.stackexchange.com/users/3917,http://gaming.stackexchange.com/questions/143912/whats-the-maximum-will-a-soldier-can-have-per-rank-how-much-willpower-does-an,CULTURE,gaming.stackexchange.com 5418,Intersection of lists of disjoint intervals,"Here is my problem: I have two very large lists of intervals (stored as many couples in the form {{""start point"", ""end point""}, ..., {""start point"", ""end point""}), and I want the result of the intersection of those lists. Here is an example : intervalsA = {{1, 2}, {3, 4}, {5, 7}, {8, 8.5}}; intervalsB = {{1.5, 3.5}, {4.1, 6}, {9, 10}}; The expected result is: overlap = {{1.5, 2}, {3, 3.5}, {5, 6}}; I tried using Interval, IntervalUnion and IntervalIntersection, but nothing worked. The only working method that I found uses Piecewise functions where each interval is set as 1. By multiplying the two piecewise functions, I have something similar to the intersection, but the solution is very inefficient. I hope I am clear and precise enough. ",Mammouth,https://mathematica.stackexchange.com/users/18816,"or more general: youFunction[intervals__] := Composition[ DeleteCases[#, Interval[]] &, DeleteDuplicates, (IntervalIntersection @@ # &) /@ # &, Subsets[#, {2}] &, Join[##] & ][intervals]; intervalsA = Interval /@ {{1, 2}, {3, 4}, {5, 7}, {8, 8.5}}; intervalsB = Interval /@ {{1.5, 3.5}, {4.1, 6}, {9, 10}}; youFunction[intervalsA, intervalsB] (*{Interval[{1.5, 2}], Interval[{3, 3.5}], Interval[{5, 6}]}*) ",molekyla777,https://mathematica.stackexchange.com/users/11981,http://mathematica.stackexchange.com/questions/56047/intersection-of-lists-of-disjoint-intervals,TECHNOLOGY,mathematica.stackexchange.com 5305,It was a pun! from the Dead parrot sketch,"In Monty Python's Dead parrot sketch when John Cleese returns to pet shop from the railway station in Bolton, he's having this dialog with Michael Palin: J.C.: I understand this is Bolton. M.P.: Yes. J.C.: But you told me it was Ipswich! M.P.: It was a pun! Then Cleese turns back and starts to look around like crazy. Why would he do that? I thought a pun was a kind of word joke. ",xaxa,https://ell.stackexchange.com/users/3494,"Here is the dialogue I found. (source) In the dialogue, C refers to customer (J.C. in OP's question), O refers to the pet shop owner (M.P.), C: I understand this IS Bolton. O: (still with the fake mustache) Yes? C: You told me it was Ipswitch! O: ...It was a pun. C: (pause) A PUN?!? O: No, no...not a pun...What's that thing that spells the same backwards as forwards? C: (Long pause) A palindrome...? O: Yeah, that's it! C: It's not a palindrome! The palindrome of ""Bolton"" would be ""Notlob""!! It don't work!! O: Well, what do you want? C: I'm not prepared to pursue my line of inquiry any longer as I think this is getting too silly! Sergeant-Major: Quite agree, quite agree, too silly, far too silly... You're right that a pun plays on the different possible meanings. But in this dialogue, it seems like M.P. (O) has a problem with his word choice, or he is trying to act so. ",Damkerng T.,https://ell.stackexchange.com/users/3281,http://ell.stackexchange.com/questions/14327/it-was-a-pun-from-the-dead-parrot-sketch,CULTURE,ell.stackexchange.com 6871,"Why Do People ""Pre-empt"" With Seven Of A Suit In Bridge?","One advantage of a ""pre-empt"" is quite clear: You take two levels of bidding away from your opponents with a ""three"" bid. But could that be cutting off your nose to spite your face? Recently, I had something like KQxxxxx, and a side queen (I forget how the other suits were distributed but was told it didn't matter). My partner was disappointed I didn't ""preempt"" (in ""third"" seat). My response was ""with seven points?"" My understanding is that people often bid three of a suit with seven cards and this little. Sometimes even less, particularly when non-vulnerable vs. vulnerable. In its extreme version, the mantra is ""with any seven (suited) cards."" Isn't this risky? What if we're doubled and only make three or four tricks? ",Tom Au,https://boardgames.stackexchange.com/users/1344,"Your response of ""With 7 points?"" makes me think you have some misconceptions about the hands the you ought to preempt on. (As an aside, I am really curious: What do you preempt on?). One normally preempts on highly offensive hands, which when played in any suit other than your long suit will offer very little defense. The position also is relevant, as in third seat you can really be aggressive in your preempts, opposite a passed hand. The vulnerability and scoring also matters: at IMPS going down 3 doubled, non-vul (-500) against a making vul game is (-600) is a great sacrifice. Don't look at the total hcp, but look at your suit length and how offensive your hand is. So a hand like Jxxxxxx, Kx , Qx, Kx (9 hcp) is not a hand to prempt (it offers nice defense and is less offensive oriented), but you should preempt on a hand like KQTxxxx, x, xxx, xx (only 5 hcp). With KQTxxxx as trumps, assuming partner holds 2 small trumps, you rate to take 5-6 tricks on average. If partner also has an outside A, you will take 6-7 tricks, which is a great bargain (going down 2 or 3) against opponents making game/slam, especially when vul. The usual point of preempting is that you rate to take away opponent's bidding space, as well as pointing the way to partner in making a sacrifice over opponents game/slam bid. Ultimately, like with any other bidding situation, it is a risk vs reward + partnership discipline scenario and if you don't go for a number sometimes, you are not preempting enough. ",Aryabhata,https://boardgames.stackexchange.com/users/1224,http://boardgames.stackexchange.com/questions/3669/why-do-people-pre-empt-with-seven-of-a-suit-in-bridge,CULTURE,boardgames.stackexchange.com 5974,Techniques for creating melodies,"I've posted this question: Learning to create melodies I've got a few ideas of techniques towards creating melodies but wanted to ask if there are any specific methods to help get better. I've read: The Complete's Idiot's Guide To Music Composition which explained a lot of details but I still find it difficult to create something 'good', whenever I play on my keyboard, it sounds rubbish. Is it something that comes with ample practice? What can I do to become better? ",MJohnson52,https://music.stackexchange.com/users/12211,"In my experience, unfortunately, writing melodies is one of the most ""magical"" parts of writing music. Some melodies just sound great, some just don't. There are, however, a few things to keep in mind that can help you deliberately write a melody for a particular emotion or style and help you understand why a particular melody sounds good. Intervallic and Stepwise Motion: Some melodies have large jumps in-between consecutive notes, and others move up or down consecutive notes in a scale. The former usually sounds more grand, especially with slow rhythms, and the latter, smoother. Rising and Falling Motion: Whether the notes in a melody generally get higher, get lower, or stay in the same range can have a big effect on the melody's emotion. Rhythm: The melody you pick for a rhythm makes a huge difference. Is it syncopated or straight? Fast or slow? Complex or simple? Does it use distinctive tricks like hemiola or tuplets? What beats does it start and end on? Instrumentation: In my experience, the instrument playing a melody makes a big difference. In one electronic song I've heard, the main melody is played by a number of bold, powerful synths, giving the melody a driving emotion. Then, at the end of the song, a lone acoustic guitar plays the same melody, which suddenly becomes very sad. Major/Minor Quality: Of course, whether a melody is written in a major or minor key makes a big difference. And the list can go on forever: tonal center, articulation, etc. The important thing isn't that every melody can be broken apart like this. Instead, you can pick out a few qualities you know you would like a melody to have based on which emotion you want to portray. For example, perhaps you need to write the leitmotif for the bad guy. It's probably going to be in a minor key, because he's so evil. Likewise, it might be played in a lower register on an instrument like a bassoon, not on a lighter instrument like a flute. And although the motif will be centered around a particular key, it might use a lot of chromatic, dissonant notes. You can play with all the other attributes of a melody while you try to figure out what you're ultimately going to go with, but starting with a plan like this might make it easier to begin writing a melody. ",Kevin,https://music.stackexchange.com/users/3265,http://music.stackexchange.com/questions/23048/techniques-for-creating-melodies,LIFE_ARTS,music.stackexchange.com 8502,saving new category programmatically with setPath,"Now this is the sort of problem I would help others with but I am flummoxed. I am creating new categories in an import routine, e.g. $this->magObject = Mage::getModel(""catalog/category""); $this->magObject->setName($item[""name""]); $this->magObject->setData(""agilityId"",$item[""id""]); $this->magObject->setIsActive($this->isActive); $this->magObject->setIsAnchor($this->isAnchor); $this->magObject->setPageLayout($this->pageLayout); $this->magObject->setStoreId(Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID)); //$this->magObject->setPath (""1/2/6"") ); //actually got by getting path of specific required parent $this->magObject->save(); Without the setPath it saves fine, but with the wrong path (obviously). When the setPath is included, nothing happens. I know that there are devious magento elements at work that prevent writing to _entity tables unless certain circumstances are met but I thought I was meeting them . I am already performing the usual define(""ADMIN_STORE_ID"",1); //... Mage::app(); Mage::setIsDeveloperMode(true); Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID)); at the start but in this instance it just is not working. I have similar scripts on other sites that do work. Only difference with this site is that there are multiple store fronts 3 UK 7 Spanish 5 German 6 French 1 Default Store View Anyone spot something obvious that I am missing, whilst I still have some hair left? Oh this is using Magento 1.9.1.1. ",Jon Holland,https://magento.stackexchange.com/users/16833,"You are not supposed to set the path. This is calculated based on the parent. Same goes for the level. Instead you should set the parent id. So you can do this: $this->magObject = Mage::getModel(""catalog/category""); $this->magObject->setName($item[""name""]); $this->magObject->setData(""agilityId"",$item[""id""]); $this->magObject->setIsActive($this->isActive); $this->magObject->setIsAnchor($this->isAnchor); $this->magObject->setPageLayout($this->pageLayout); $this->magObject->setStoreId(Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID)); $this->magObject->setParentId(2); $this->magObject->save(); ",Marius,https://magento.stackexchange.com/users/146,http://magento.stackexchange.com/questions/76245/saving-new-category-programmatically-with-setpath,TECHNOLOGY,magento.stackexchange.com 5239,What is the keyboard shortcut for 'Mark as read' in GMail?,"In the new Yahoo! mail I can select multiple checkboxes against my email subjects and press k to perform the action Mark as read. Is there a similar alternative in GMail? ",Monis Iqbal,https://webapps.stackexchange.com/users/529,"In Gmail you can use ""?"", that is shift + / for the ?, you can see the keyboard shortcuts. ",Neil,https://webapps.stackexchange.com/users/1508,http://webapps.stackexchange.com/questions/2110/what-is-the-keyboard-shortcut-for-mark-as-read-in-gmail,TECHNOLOGY,webapps.stackexchange.com 2098,How to scale entire document including Maths symbols?,"I'm trying to make a cheat-sheet for my Math class. I wonder is there a way to scale the entire document so that I can fit more formulas and theorems into it. It doesn't need to be super tiny though. I tried tiny font, but it still waste too much space. Have anyone done it before could share me some experiences? Thanks in advance. ",Chan,https://tex.stackexchange.com/users/4322,"The best way to create some space in your document is to use a combination of geometry (for setting/removing margin dimensions) and some standard documentclass font settings: \documentclass[10pt]{article}% default is 10pt font However, in terms of creating a cheat-sheet that should condense a number of pages on (say) a two-sided single piece of stock, I would suggest creating a document as per usual and then creating a second document that includes the pages of the first in ""n-up"" style, depending on your page count. Let me explain... Consider your original straight-forward document that has a bunch of content in it, including formulas and nifty how-to's: cheat-material.tex \documentclass{article} \usepackage[margin=1cm]{geometry}% http://ctan.org/pkg/geometry \usepackage{blindtext}% http://ctan.org/pkg/blindtext \usepackage[english]{babel}% http://ctan.org/pkg/babel \begin{document} \Blinddocument% Creates a 8-page document in the current style \end{document} The above is just a mock-up of your document using the blindtext package. It creates 8 pages of wholesome cheat-sheet material. Now I create my second document using the pdfpages package to insert output of cheat-material.tex in n-up style (I chose 4-up, since 8 is divisible by 4): cheat-sheet.tex \documentclass{article} \usepackage{pdfpages}% http://ctan.org/pkg/pdfpages \begin{document} \includepdf[nup=4,pages=-,frame]{cheat-material} \end{document} pages=- includes all pages of cheat-material.pdf, and frame adds a page border around each included page. This way you're not bound as much by trying to modify things - you're merely creating a document (cheat-material) and squeezing it as needed into a specific shape (cheat-sheet). This is especially helpful if you have multiple pages that you want to condense, as seems to be the case for you. ",Werner,https://tex.stackexchange.com/users/5764,http://tex.stackexchange.com/questions/33164/how-to-scale-entire-document-including-maths-symbols,TECHNOLOGY,tex.stackexchange.com 900,How are electromagnetic waves differentiated?,"I would like to know how the signals for remote controlled cars, radios, etc.. That use radio waves are told apart from each other. I know that the radio waves are modulated to encode data and the frequency or amplitude are changed, so then the waves are propagated through the air and received at another location via a receiver that is tuned to a certain frequency that the waves were emitted, but I'm sure in most places in the world by now there are numerous amounts of waves traversing at any point, why doesn't the receiver of this device happen to catch another wave of the same frequency instead of the one that was intended? or is there anything that stops me from having a device that emits a wide range of frequencies or amplitudes that would manipulate nearby electronics? ",AlanZ2223,https://physics.stackexchange.com/users/51988," why doesn't the receiver of this device happen to catch another wave of the same frequency instead of the one that was intended? It does catch other waves at the same frequency. This is called noise. Communications are engineered so that the signal is significantly stronger than the potential noise such that it can still be reliably demodulated. More generally, all wireless communications use the same medium (the electromagnetic field), and the problem of allowing multiple users access to this shared medium is multiplexing. While frequency division multiplexing is most common, it is not the only way: for example ultra-wideband communications may use time-division multiplexing, and spread-spectrum may use code-division multiplexing. These methods can also be used in combination. For example, we may tune a receiver to a particular frequency (frequency-division multiplexing), and simultaneously use a directional antenna to reduce sensitivity in directions where there is only noise (space-division multiplexing). A system's ability to distinguish the desired signal from noise is called selectivity, and the more known about the desired signal (frequency, timing, phase, polarization, etc), the more selective a receiver can be. is there anything that stops me from having a device that emits a wide range of frequencies or amplitudes that would manipulate nearby electronics? Regulatory bodies, such as the FCC, in conjunction with international bodies such as the ITU, establish licenses and laws which grant specific users or classes of users exclusive access to allocated spectrum. Violators are fined, or made by force if necessary to stop transmitting. A device that transmits over some range of frequencies with the intent of disabling other radio devices would be called a jammer. There's no technical reason you couldn't build one, but ultimately the government's monopoly on violence will discourage you. A military, having no reason to fear these consequences, makes jammers all the time. ",Phil Frost,https://physics.stackexchange.com/users/24140,http://physics.stackexchange.com/questions/129807/how-are-electromagnetic-waves-differentiated,SCIENCE,physics.stackexchange.com 410,"Was the Second Doctor's ""regeneration"" actually a regeneration?","I recently saw a mix up of all of the Doctors regeneration scenes. When the second Doctor changes to the third (from Patrick Troughton to Jon Pertwee in ""The War Games, Part Ten"" (1969)), it is forced on him as punishment before being exiled to earth. The Doctor was not critically injured or dying. The transformation was the Time Lords doing. Does this really count as one of the 12 regenerations? ",Keo,https://scifi.stackexchange.com/users/16220,"Yes, that was regeneration. There is no indication in Old Who or the New Series that regeneration is exclusively limited to being uncontrollably triggered by fatal events. Although regeneration is usually seen in the show as an ""emergency fail-safe"" feature, we're also shown very explicitly that most Time Lords choose to regenerate for reasons other than imminent death. Romana is the most prominent example, although Borusa also comes to mind (the man seems to have gone through bodies like some people go through ties). The Doctor just leads such a hard life that his regenerations come more violently than most Time Lords'. The fact that it was forced on him by the Time Lords doesn't change anything either; the High Council has repeatedly been shown to have control over the regeneration technology (for example, offering the Master a new set of regenerations if he helped them in The Five Doctors). There's no reason to assume that the process they used to change the Second Doctor into the Third was not regeneration; in fact, their dialogue in that scene makes it clear that the process is identical to that which turned the First into the Second (though ""regeneration"" wasn't yet really a term being used by the show). ",BESW,https://scifi.stackexchange.com/users/13941,http://scifi.stackexchange.com/questions/39036/was-the-second-doctors-regeneration-actually-a-regeneration,LIFE_ARTS,scifi.stackexchange.com 3667,Linux : how to redirect stdout & stderr to logger?,"I have a program I need to run at startup, it has output on stdout and stderr that I want to redirect to the system log using the logger command. What I have in my startup script is thie: /home/dirname/application_name -v|logger 2>&1 & This is redirecting the stdout to syslog just fine but stderr is coming to the console, so I need some help on refining the command. ",fred basset,https://unix.stackexchange.com/users/42163,"You need to combine the output of STDERR and STDOUT prior to piping it to logger. Try this instead: /home/dirname/application_name -v 2>&1 | logger & Example $ echo ""hi"" 2>&1 | logger & [1] 26818 [1]+ Done echo ""hi"" 2>&1 | logger $ sudo tail /var/log/messages Apr 12 17:53:57 greeneggs saml: hi You can use the abbreviated notation here as well, if used cautiously in a actual Bash shell (not to be confused with Dash): $ echo ""hi"" |& logger & NOTE: This is equivalent to <cmd1> 2>&1 | <cmd2>. Again only use the above when making use of an actual Bash shell interactively, would be a good way to approach it. excerpt from ABSG # |& was added to Bash 4 as an abbreviation for 2>&1 |. References Advanced Bash Scripting Guide - Chapter 20. I/O Redirection ",slm,https://unix.stackexchange.com/users/7453,http://unix.stackexchange.com/questions/124455/linux-how-to-redirect-stdout-stderr-to-logger,TECHNOLOGY,unix.stackexchange.com 6864,Which episodes of One Piece are filler?,"I want to watch One Piece, but the anime has a lot of filler content not in the manga. I'd rather not watch the filler content and only watch the episodes which are directly related to the plot. To be clear, I'm defining a filler episode as one which is not based on any story in the manga or based on extra manga chapters which have nothing to do with the overarching story. Which episodes are filler? This question is taken from this question. I was curious about this myself after completing the One Piece manga, but to keep uniformity between similar questions, I took the same wording as Logan-M had used in his question about Bleach filler. ",Peter Raeves,https://anime.stackexchange.com/users/6166,"One piece fillers ^ pretty much tells what what to skip and what to watch: cannon - Watch filler - don't of and if your wondering, there are about 96 filler episodes.. (14% of the series) screenshot -> ",Leigh Flix,https://anime.stackexchange.com/users/9022,http://anime.stackexchange.com/questions/20088/which-episodes-of-one-piece-are-filler,CULTURE,anime.stackexchange.com 984,What is meant by Engine Life Factor(ELF). Should I consider it while buying a vehicle? If so why is it not widely quoted?,"The term Engine life factor going by the name suggests that higher the value more is the life of the engine. If so why doesn't companies specify this as a part of their standard specifications? ",BraveNinja,https://mechanics.stackexchange.com/users/4192,"I wouldn't personally, I mean for example they try to make EFI a big deal. Here in NZ they were promoting Holdens/Potanics that they had EFI and that's how old now? So just guy with cars you know that have a good reliability behind them like Toyota or Nissan. If your looking at a performance car then read up on reviews etc... heaps of resources to look for online. ",CarlJB,https://mechanics.stackexchange.com/users/7534,http://mechanics.stackexchange.com/questions/13224/what-is-meant-by-engine-life-factorelf-should-i-consider-it-while-buying-a-ve,CULTURE,mechanics.stackexchange.com 3896,.xlsx and xls(Latest Versions) to pdf using python,"With the help of this .doc to pdf using python Link I am trying for excel (.xlsx and xls formats) Following is modified Code for Excel: import os from win32com import client folder = ""C:\\Oprance\\Excel\\XlsxWriter-0.5.1"" file_type = 'xlsx' out_folder = folder + ""\\PDF_excel"" os.chdir(folder) if not os.path.exists(out_folder): print 'Creating output folder...' os.makedirs(out_folder) print out_folder, 'created.' else: print out_folder, 'already exists.\n' for files in os.listdir("".""): if files.endswith("".xlsx""): print files print '\n\n' word = client.DispatchEx(""Excel.Application"") for files in os.listdir("".""): if files.endswith("".xlsx"") or files.endswith('xls'): out_name = files.replace(file_type, r""pdf"") in_file = os.path.abspath(folder + ""\\"" + files) out_file = os.path.abspath(out_folder + ""\\"" + out_name) doc = word.Workbooks.Open(in_file) print 'Exporting', out_file doc.SaveAs(out_file, FileFormat=56) doc.Close() It is showing following error : >>> execfile('excel_to_pdf.py') Creating output folder... C:\Excel\XlsxWriter-0.5.1\PDF_excel created. apms_trial.xlsx ~$apms_trial.xlsx Exporting C:\Excel\XlsxWriter-0.5.1\PDF_excel\apms_trial.pdf Traceback (most recent call last): File ""<stdin>"", line 1, in <module> File ""excel_to_pdf.py"", line 30, in <module> doc = word.Workbooks.Open(in_file) File ""<COMObject <unknown>>"", line 8, in Open pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, u'Microsoft Excel ', u""Excel cannot open the file '~$apms_trial.xlsx' because the file format or f ile extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file."", u'xlmain11.chm', 0, -21468 27284), None) >>> There is problem in doc.SaveAs(out_file, FileFormat=56) What should be FileFormat file format? Please Help ",eegloo,https://stackoverflow.com/users/2621678,"Link of xlsxwriter : https://xlsxwriter.readthedocs.org/en/latest/contents.html With the help of this you can generate excel file with .xlsx and .xls for example excel file generated name is trial.xls Now if you want to generate pdf of that excel file then do the following : from win32com import client xlApp = win32com.client.Dispatch(""Excel.Application"") books = xlApp.Workbooks.Open('C:\\excel\\trial.xls') ws = books.Worksheets[0] ws.Visible = 1 ws.ExportAsFixedFormat(0, 'C:\\excel\\trial.pdf') ",eegloo,https://stackoverflow.com/users/2621678,http://stackoverflow.com/questions/20854840/xlsx-and-xlslatest-versions-to-pdf-using-python,STACKOVERFLOW,stackoverflow.com 7922,"With the hook entry_submission_end, is it possible to know if the entry is inserted or updated?","I'm working on an extension that indexes the content of the entry when publish form is submitted, but I need to know if the entry is a new one or an updated one, and in both case, I need the entry_id (the new one juste created or the old one). Do you know a way to do that? Should I use an other hook? --Solution-- In fact, entry_submission_end come with 3 parameters: entry_id, meta and data. If the entry is a new one, entry_id contains the new entry_id but $data['entry_id'] is 0, so you can have a condition on that to check if you are editing or creating an entry. ",pvledoux,https://expressionengine.stackexchange.com/users/190,"You can compare $meta['edit_date'] with $meta['entry_date']. You will need to bring both dates to same format of course, as entry_date contains current timestamp, while edit_date is formatted as '%Y%m%d%H%i%s' ",Yuri Salimovskiy,https://expressionengine.stackexchange.com/users/19,http://expressionengine.stackexchange.com/questions/14217/with-the-hook-entry-submission-end-is-it-possible-to-know-if-the-entry-is-inser,TECHNOLOGY,expressionengine.stackexchange.com 5069,"Should I Cite a Journal's Page Number, or an Article's?","When I'm citing a page in a journal, and the article has an independent page numbering system, should I cite the page number of the journal or the article? ",Will Sewell,https://academia.stackexchange.com/users/715,"I'm not certain what you mean by an article with an independent page numbering system, but I assume you mean the following. The published journal article is, say, on pages 25-48 of the journal, but there is also a preprint available online with different formatting, and it is numbered from 1-23. Not only the page divisions, but even the number of pages differ, so there's no easy way to transfer a reference between these numberings except approximately. The most important rule is to be clear and correct: you should leave no doubt or ambiguity about which numbering system you are using. If you cite only one version of the paper, then you should use the same numbering used there. If you cite several versions, then you need to make sure your references are clear. The second rule is that you should focus on the ""most official"" version of the paper, whatever that is. In most cases, a journal paper is more official than a conference paper, which is more official than a numbered technical report in a series, which is more official than a random preprint. You want to cite the most final, complete, and authoritative version, and the one most likely to be accessible to future readers. There may occasionally be subtle cases (for example, a paper that has been reprinted in books with corrections or additions), but this generally means the journal version. P.S. The only other interpretation of the question I can think of is for journals like Physical Review, where an article has its own page number (like 032326) and then the individual pages are given subsidiary numbers (like 032326-1 through 032326-8). In that case, if you want to cite a specific page you could refer to it as 032326-3, or maybe just 3 if the context is clear. In the bibliography, you would write 032326:1-8 or just 032326, depending on your bibliography style. ",Anonymous Mathematician,https://academia.stackexchange.com/users/612,http://academia.stackexchange.com/questions/1240/should-i-cite-a-journals-page-number-or-an-articles,LIFE_ARTS,academia.stackexchange.com 2315,"What benefits do ""title search companies"" have over physically visiting a land records offices?","I am looking into buying my first piece of real property. Basically my question is ""why do title search companies even exist?"". Who uses them? And why? Are they doing something special apart from going to the local authoritative body and performing a title search on a parcel id number? A) Am I paying them just so they can do my due dilligence and then stamp some big ole company seal on the documents they provided me with? So I feel more confident in the documentation provided? B) Do they exist solely to service large banks and corporations who control thousands of property deeds worldwide and cannot afford to pay a staffer in every single city on earth just to perform title searches? C) Or might they exist for some other reason that I am entirely unaware of? I am not trying to be facetious. I am genuinely curious. As somebody who has never looked into the process of acquiring land in the past, they seem to be redundant as a service. I can't imagine how so many of them are still in business. Take Detroit, MI for example. There is a website called https://www.waynecountylandrecords.com (which is run by the city of Detroit) where I can go and pay them $6 for 15 minutes of access to perform as many property title searches as I can manage in 15 minutes. It costs $2 per page to print (download) documents from that database, up to a maximum of $10 per document. That, or I could physically visit the land records office listed on their website and do the same thing in person. Although it would cost me a bit more money I believe. So again my question is why would I spend more money with a title search company as opposed to performing the title search myself? Is it simply because ""performing a title search"" requires the ability to circumnavigate a bunch of legal mumbo jumbo or even know where to perform the title search in the first place? I am quite distraught over the (what seem to me to be) unnessary complications involved in purchasing a property. I'll be frank. I create and maintain extremely large computer databases for a living. So the idea of paying somebody $25+ to basically extract data from a database and then pass it on to me seems asinine. The sole fact that a city like Detroit Michigan is placing a pay wall of $6 to even perform an online title search seems ludicrous to me as well. Seeing as it's in their best interest to give potential investors full and complete knowledge of any liens on the literally thousands of properties they are in need of having purchased by tax-paying individuals. For what? A few $100k in annual revenue for the City? But, I digress. I do understand that it's literally a thousand+ year old system, so I carry on in search of knowledge. If I absolutely have to go through a title search company to receive the full benefits of a title search, please explain why below. Thank you for reading. ",islandlubber64,https://money.stackexchange.com/users/15087,"Title agencies perform several things: Research the title for defects. You may not know what you're looking at, unless you're a real-estate professional, but some titles have strings attached to them (like, conditions for resale, usage, changes, etc). Research title issues (like misrepresentation of ownership, misrepresentation of the actual property titled, misrepresentation of conditions). Again, not being a professional in the domain, you might not understand the text you're looking at. Research liens. Those are usually have to be recorded (i.e.: the title company won't necessarily find a lien if it wasn't recorded with the county). Cover your a$$. And the bank's. They provide title insurance that guarantees your money back if they missed something they were supposed to find. The title insurance is usually required for a mortgaged transaction. While I understand why you would think you can do it, most people cannot. Even if they think they can - they cannot. In many areas this research cannot be done online, for example in California - you have to go to the county recorder office to look things up (for legal reasons, in CA counties are not allowed to provide access to certain information without verification of who's accessing). It may be worth your while to pay someone to do it, even if you can do it yourself, because your time is more valuable. Also, keep in mind that while you may trust your abilities - your bank won't. So you may be able to do your own due diligence - but the bank needs to do its own. Specifically to Detroit - the city is bankrupt. Every $100K counts for them. I'm surprised they only charge $6 per search, but that is probably limited by the State law. ",littleadv,https://money.stackexchange.com/users/2998,http://money.stackexchange.com/questions/30836/what-benefits-do-title-search-companies-have-over-physically-visiting-a-land-r,LIFE_ARTS,money.stackexchange.com 2372,Solution disappearance responsive navigation after open/close,"I asked this before, but still not successful. Hope someone can help me now... In the fiddle you see a responsive menu that has 4 menu-items horizontal inline when it is larger than 1000px. Smaller than 1000px the menu shows a nav-btn (now a RED box!) that onclick shows the menu-items, but when open and close and resize to larger than 1000px the rest of the 3 menu-items don't show up. I did some tests with media queries but i think the solution must be find in the javascript part. Anyone can handle this challenge? Here the FIDDLE $(function() { $('.nav-btn').click(function(event) { $('nav ul').fadeToggle(300); }); }); ",KP83,https://stackoverflow.com/users/1925076,"You might want to add a new media query like i did here @ FIDDLE @media all and (min-width: 1000px) { nav ul { display: block; top: 60px; } } ",NMindz,https://stackoverflow.com/users/4532104,http://stackoverflow.com/questions/28394678/solution-disappearance-responsive-navigation-after-open-close,STACKOVERFLOW,stackoverflow.com 3457,Many POST requests to /xmlrpc.php from GoogleBot taking down server?,"I have several hosted wordpress blogs, and I've been trying to visit them and they are really slow. I looked at my server logs and I found this stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:28 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:28 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:28 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:28 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:29 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:29 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:29 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:29 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:31 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:31 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:31 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" I am getting ~10 hits per second to the file /xmlrpc.php from the GoogleBot to several sites, and this seems to be slowing down the server. I am running tail -f on the log file, and can just see these requests continuing. Does anyone know why this might be happening or what you could do to stop it? ",jkeesh,https://wordpress.stackexchange.com/users/36758,"""Googlebot"" has no reason to access xmlrpc.php You could add this to the top of your xmlrpc.php // Block fake Googlebot if ( strpos($_SERVER['HTTP_USER_AGENT'], ""Googlebot"") === true ) { exit(); } I'm guessing it's a core WordPress file. So it might be annoying to keep this updated. Would be nice if Automattic used Akismet to blacklist these IPs from all WP scripts, everywhere. ",PJ Brunet,https://wordpress.stackexchange.com/users/3453,http://wordpress.stackexchange.com/questions/110513/many-post-requests-to-xmlrpc-php-from-googlebot-taking-down-server,TECHNOLOGY,wordpress.stackexchange.com 8604,Articles before almost-abstract kind of nouns,"Should we use articles before nouns that are not fully generalized? For example: ""the birds of America"" or ""birds of America""? We are considering not all birds, but all American birds. So what is the truth? ""American birds"" or ""the American birds""? ",user15324,https://ell.stackexchange.com/users/15324,"They have no nationality, so we do not call them ""American birds"". They are ""birds of America"". We could entitle a book Birds of America but when speaking of those birds as a group, we would use the definite article: The birds of America include seed-eaters, insect-eaters, raptors, and scavengers. But if we were speaking of an ornithological area of study, we might say: ""Birds of America"" would be too broad a subject for a PhD dissertation. You will have to find a narrower topic. ",Tᴚoɯɐuo,https://ell.stackexchange.com/users/10264,http://ell.stackexchange.com/questions/46070/articles-before-almost-abstract-kind-of-nouns,CULTURE,ell.stackexchange.com 1478,How to find the files in magento directory,"I want to get the list of taxes to display on cart page.. The code that is using to display the tax is : This block is showing tax information: $this->renderTotals(); while this block is shwoing grand total: <?php echo $this->renderTotals('footer'); ?> But i need to made some changes... please tell me which file i have to look for so i can make the changes... I tried all the files adn check the coding.. but no success... Please help me.... ",DeDevelopers,https://magento.stackexchange.com/users/15451,"Check this file out: app/design/frontend/base/default/template/checkout/total/tax.phtml ",raduparvan,https://magento.stackexchange.com/users/15576,http://magento.stackexchange.com/questions/42073/how-to-find-the-files-in-magento-directory,TECHNOLOGY,magento.stackexchange.com 5992,What is the proper way to change the section title font in LaTeX?,"Suppose I wanted to use a different font for a title then the body text in LaTeX (pdflatex). (For example, if I wanted to use a slightly fancier font for titles, or a sans-serif one.) How would I do that, change the font of a class of thing throughout the document, in a proper way. (Likewise, if I wanted to change the document title, captions, etc. Is there a general way of doing this?) ",Canageek,https://tex.stackexchange.com/users/7880,"I would say that really much depends on what you are trying to achieve. Do you want to make a class that others can use as well? You can define your own commands for sectioning. Are there just minor changes within one of your documents? Use package etoolbox and patch your changes. Are there bigger changes to the sectioning and titles? Package titlesec is commonly used with the standard classes. KOMA-classes have their own way of defining the font for various instances of a document. The following example shows the interface. Disclaimer: This is just for demonstration, nobody should use that many stuff in just one document. \documentclass[plainheadsepline,headsepline=2pt]{scrreprt} \usepackage{blindtext} \usepackage{scrlayer-scrpage} \usepackage{xcolor} \RedeclareSectionCommand[font={\Huge\fontfamily{qhv}}]{chapter} \RedeclareSectionCommand[font={\rmfamily\footnotesize\itshape}]{section} \addtokomafont{captionlabel}{\usefont{T1}{qzc}{m}{it}} \addtokomafont{caption}{\color{red!80!black}} \addtokomafont{headsepline}{\color{red!80!black}} \begin{document} \chapter{lazy Leguan} \section{walzing wombat} \captionof{figure}{A figure caption} \blindtext \end{document} ",Johannes_B,https://tex.stackexchange.com/users/37907,http://tex.stackexchange.com/questions/252480/what-is-the-proper-way-to-change-the-section-title-font-in-latex,TECHNOLOGY,tex.stackexchange.com 128,add custom citation that differs in format than the rest,"This has been bugging me for quite some time now but can't find a nice way to work it out. I have a list of citations that follow the regular author. Year. Title. Journal. Volume: Pages layout. I have to cite a legal document (Water framework directive). How do I go about this, as the paper has no authors, journals, pages... I would like it to appear in the text as ... V Sloveniji smo leta 2000 sprejeli Vodno direktivo (2000/60/EC) (v nadaljevanju: VD), ki v evropskem prostoru enotno ureja politiko upravljanja površinskih in podzemnih celinskih voda, vključno s somornico in morjem.... and in the references as Ter Braak, C. J. F., Verdonschot, P. F. M. 1995. Canonical correspondence analysis and related multivariate methods in aquatic ecology. Aquatic Sciences 57(3): 255–289. Vodna direktiva (2000/60/EC) Wickham, H. 2009. ggplot2: elegant graphics for data analysis. Springer New York. ISBN 978-0-387-98140-6. How should I specify my BibTeX source to achieve this? EDIT This is a more or less minimal working example. Style file can be found here, and the bib file here. \documentclass{article} \usepackage{natbib} \begin{document} As specified in \citet{vd} and \citep{Fraschetti2006} \dots \bibliographystyle{custom_style} \bibliography{test} \end{document} EDIT 2 A workaround that worked for me (for now). The four questionmarks in question (hehe) were the result of missing year in the bib file. I have modified the custom_style.bst from FUNCTION {format.date} { year ""year"" bibinfo.check duplicate$ empty$ { ""empty year in "" cite$ * ""; set to ????"" * warning$ pop$ ""????"" } 'skip$ if$ extra.label * } to FUNCTION {format.date} { year ""year"" bibinfo.check duplicate$ empty$ { ""empty year in "" cite$ * ""; set to "" * warning$ pop$ """" } 'skip$ if$ extra.label * } ",Roman Luštrik,https://tex.stackexchange.com/users/72,"I suspect that even legal documents should be represented by a BibTeX entry with more than one field (and especially with a year field if one uses an author-year-style), but here goes. I used the author instead of the title field because BibTeX otherwise would typeset the label V00 in the text. The second pair of curly braces prevents BibTeX from breaking the ""author"" down in first name and last name. \documentclass{article} \usepackage{natbib} \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @misc{V00, author = {{\textit{Vodna direktiva (2000/60/EC)}}}, } \end{filecontents} \begin{document} As specified in \citet{V00} \dots \bibliographystyle{plainnat} \bibliography{\jobname} \end{document} ",lockstep,https://tex.stackexchange.com/users/510,http://tex.stackexchange.com/questions/6767/add-custom-citation-that-differs-in-format-than-the-rest,TECHNOLOGY,tex.stackexchange.com 7863,Word-order and meaning - which is correct for this notice?,"I'm creating some signs for the office car park, and one of these signs is to control access. What I'm trying to get it to indicate is that cars aren't permitted between 10 am and 4pm except for access. Which of the below mean what I want to say above? Except for access 10 am - 4 pm 10 am - 4 pm except for access Am I correct in thinking that the first one means ""Cars allowed for access between 10 am and 4 pm only "" and the second one is ""No cars between 10 am and 4 pm except for access"". I realize the ambiguity of the sign, and want to make sure what I'm saying is correct. ",AN Other,https://english.stackexchange.com/users/12429,"I'd say, stating it in a clearer way would be better: 10am - 4pm access only. No parking during this time. ",Thursagen,https://english.stackexchange.com/users/8183,http://english.stackexchange.com/questions/39494/word-order-and-meaning-which-is-correct-for-this-notice,CULTURE,english.stackexchange.com 4095,Is SourceSafe really safe?,"Having spent all morning trying to check something in - I now realise I've lost a couple of days worth of work. Its happened before - and is apparently common occurrence with SourceSafe. Can SourceSafe be used successfully, without problems, and if so, how? ",billy.bob,https://programmers.stackexchange.com/users/4630,"After 3 years of using it, complaining off and on to my manager because of all the more advanced/rational alternatives out there, I've never really had a problem with VSS, but I've never had an option either. My views are that it both sucks and blows. The most annoying part about it is not it's awful versioning and confusing branching ability, but the list box on the file menu doesn't let you hit the right arrow key to expand. Truly painful. ",Peter Turner,https://programmers.stackexchange.com/users/1973,http://programmers.stackexchange.com/questions/24910/is-sourcesafe-really-safe,TECHNOLOGY,programmers.stackexchange.com 1625,Does the a gasoline or diesel engine appy fuel at high speeds when not pressing the pedal and more,"Let say I directly connect a small engine to my bicycle, and that I'm superman who can overcome any force. Then I start cycling (using my legs...) - the engine starts to rotate, even though I haven't ""started it"" using the switch. Does it mean that if I press the pedal (or whatever) of the engine, it will apply force? Either on a diesel or a gasoline engine. Another question: Lets say I'm driving down a hill in a relatively high speed in a car, and I'm not pressing the gas pedal at all. Does the engine burn fuel at all, in both diesel and gas? If I (while in gear) turn off the engine, will something actually happen? If I would press the pedal after turning it off (while it still rotates) - will it apply force? (in both diesel and gas). If, while driving, I disconnected the idler (i.e the engine won't apply any force if I'm not pressing the pedal at any RPM and pressing the clutch will take it to zero RPM) and press the brake until I get to a complete stop, will the engine ""stall""? If I'm doing it in a hill facing down, after releasing the brakes I'd accelerate and the engine would gain RPMs, will it be able to continue applying force? Finally: What's the difference between a ""running engine"" and one thats not running, assuming both are rotating? I'm sorry if I'm asking too much so if you would at least explain the principle I'd be very happy. Thank you! ",Mark Segal,https://mechanics.stackexchange.com/users/3112,"I will explain it for an EFI engine with a manual transmission because it might not be as straight forward with a carbureted engine or automatic. For ease of explaining this I will consider the engine as ""on"" whenever the ignition switch is set to the ""on"" state. This means that the ECU is on and is monitoring the engine state and controlling it's behavior. For the bicycle example with an EFI engine if you had your ""ignition"" to on while you started cycling then the ecu would start to inject fuel and cause spark so yes it would apply force and use fuel. If the ignition were off then the ecu would be off and you wouldn't get any fuel or spark so no you won't get any force if you apply the accelerator. Going downhill not pressing the accelerator with the ignition on will use significantly less fuel (not sure if the ecu uses zero fuel though) and the engine will still be sparking for sure. If you were to turn the ignition to accessory while coasting downhill the ecu will shut off and you will stop injecting fuel and stop spark as well so the accelerator would no longer do anything. If you have the clutch in and you stop the engine will stop. If you then release the brakes and roll down a hill then one of two things will happen. 1) if your ecu is on (ingition on) then the engine will start to use fuel and spark. (It will be really rough until it gets to ~700rpm) 2) if your ecu is off then the engine will rotate but no fuel or spark so therefore no acceleration. Finally the difference between a running engine and not if they are both spinning : A running engine is one which can continue to run from the energy it is producing without an external force. Modern engines require fuel air and spark to satisfy this requirement. eg. ECU on and rotating An engine is off if when all external forces are removed then engine would stop. eg. the ecu is off so the engine isn't producing any of its own power and is only spinning because it is connected to wheels that are being accelerated by gravity. Hope this clarifies it somewhat.... ",Mike Saull,https://mechanics.stackexchange.com/users/2895,http://mechanics.stackexchange.com/questions/6612/does-the-a-gasoline-or-diesel-engine-appy-fuel-at-high-speeds-when-not-pressing,CULTURE,mechanics.stackexchange.com 31,Why does string theory have such a huge landscape?,"I was browsing through Foundations of Space and Time, a compilation of essays on various theories of quantum gravity. The following passage in the introduction intrigued me: Each compactification leads to a different vacuum state.... at least one state should describe our Universe in its entirety.... the enormous number (~10^500 at last count) of solutions, with no perturbative mechanism to select mechanism to select among them, leads some critics to question the predictive power of the theory..Even more worrying is that, while the theory is perturbatively finite order by order, the perturbation series does not seem to converge. I don't know anything about string theory and so I could not make head or tails this. All I know is that ~$10^{500}$ is a very large number. What exactly is a 'solution' in string theory? Is it a spacetime metric of some sort or the terms of a S-matrix of some sort? Why are there so many 'solutions'? I thought string theory was supposed to be finite, why do perturbative series still diverge? Is there any experimental technique to limit the number of 'solutions'? Will experimental techniques be able to pinpoint a solution within present day string theorists' lifetimes too? If not, how long will it take before we can experimentally probe these things? Are string theorists completely relaxed about these issues? Or are they in anguish? ",dj_mummy,https://physics.stackexchange.com/users/28244," ""Each compactification leads to a different vacuum state.... at least one state should describe our Universe in its entirety.... the enormous number (~10^500 at last count) of solutions, with no perturbative mechanism to select mechanism to select among them, leads some critics to question the predicitive power of the theory..Even more worrying is that, while the theory is perturubatively finite order by order, the pertrubation series does not seem to converge."" Ok. I don't know anything about string theory and so I could not make head or tails this. All I know is that ~10^500 is a very large number. That, it is. What exactly is a 'solution' in string theory? Is it a spacetime metric of some sort or the terms of a S-matrix of some sort? So, we have a non-peturbative definition of M-theory and string theories on AdS Space through the AdS/.CFT correspondence. Now, these are 10 or 11-dimensional. To get rid of the extra 6 or 7 dimensions, you need to compactify it on a 6-dimensional or 7-dimensional manifold. A particularly convinient compactifications of 11-dimensional M-theory is on $G(2)$-holonomy manifolds. Particularly convinient compactifications of 10-dimensional string theories, such as Type HE, are on $SU(3)$-holonomy Calabi-Yau manifolds. Of course, it's not necessary; e.g. if the world happens to be something with $\mathcal N=2$ supersymmetry, as opposed to $\mathcal N=1$. Why are there so many 'solutions'? Because there are lots of these manifolds! I thought string theory was supposed to be finite, why do perturbative series still diverge? Uh... Yes. But it's renormaliable. And there are non-peturbative definitions in AdS spacetime. Is there any experimental technique to limit the number of 'solutions'? Will experimental techniques be able to pinpoint a solution within present day string theorists' life times too? If not, how long will it take before we can experimentally probe these things? In principle, it's possible. But in anyone's lifetime... Do you know how big $10^{500} $ is? % See this. Are string theorists completely relaxed about these issues? Or are they in anguish? There's the branch of String Phenomenology that attempts to find the correct vacua... ",centralcharge,https://physics.stackexchange.com/users/23119,http://physics.stackexchange.com/questions/75441/why-does-string-theory-have-such-a-huge-landscape,SCIENCE,physics.stackexchange.com 5517,nm: how to show object file of a symbol in a shared library?,"I have 25 object files which are combined to form one shared library. I have generated the shared library with gcc and while I was looking for exposed symbols with nm -D libmylib.so, I found two undesirable exposed symbols with the name of i and y which are in .bss section. I have tried to find them in my source files but i cant find them so if anyone can tell me whether there is some way to find that which .o file exactly has these undesired exposed symbols? Can I do it with nm or do I need another tool? Any help would be appreciated. ",Jewel Thief,https://stackoverflow.com/users/495590,"In the directory with your object files you can run: find . -name '*.o' -exec nm -D {} \; -print This should print symbols and then file name ",Kylo,https://stackoverflow.com/users/173967,http://stackoverflow.com/questions/13365347/nm-how-to-show-object-file-of-a-symbol-in-a-shared-library,STACKOVERFLOW,stackoverflow.com 8462,SQL Agent powershell context reference,"At my new job, we have multiple named instances on each servers. Server1\Dev Server1\DevIntegrated Server1\QA I have a SQL PowerShell script in the works that calls out to the OS, invokes Foo.exe but needs to pass a command line parameter (the connection string). A SQL Agent job will exist on each instance, with a step of type PowerShell, that needs to know what the current context is. i.e. This execution began on DevIntegrated. I have no desire to have every script start with $thisInstance = ""Dev"" eespecially as I'd have to edit that as we migrate to environments (new servers and named instances) in the upcoming months. If I start SQLPS, I can determine my instance by slicing and dicing the results of Get-Location or running (Invoke-Sqlcmd -Query ""SELECT @@servername AS ServerName"" -SuppressProviderContextWarning).ServerName When the SQL Agent starts a job of type PowerShell, it starts in the C:\windows\system32 The Get-Location route doesn't work as it's not in the SQLSERVER context. I can change into that context but I'll be at the ""root"" of SQL Server and won't know what instance I should be in. Using the Invoke-Sqlcmd route won't work either for same reason (technically, it times out as there is no default instance) To the best of my knowledge, I've enumerated all the basic ""things"" I can Get into the job log but nothing seems to show SQLSERVER:\SQL\Server1\DevIntegrated Get-ChildItem Get-Host Get-Location Get-Process Get-PSDrive Get-PSProvider Get-Service Get-TraceSource Get-Variable Get-Process seems like I could use that and some voodoo of trying to cobble things together by hitting the instances and matching spids but that just sounds like a bloody-hack from hell. There must be something basic that I'm missing, can anyone shed some light? Alternatives to PowerShell investigated I had investigated using other job types and didn't get a satisfactory resolution. Research indicated the PowerShell listed under SQL Agent was SQLPS and starting an instance of it by right clicking on the Agent automagically dropped me into the correct location. It was only when I pasted my interactive code into the job step that I learned of the difference as previously mentioned. Job type of OS put me into an identical state in that I could not find a way to determine which instance dropped me into the command shell. Sure, I could sqlcmd and get the value of @@servername but if I knew what connection to start sqlcmd, I wouldn't need to to query the database ;) TSQL could probably work if we enable xp cmdshell but I'm not sure if they have it turned on---government facility and they can be persnickety on non-default settings. Even then, I'm stuck futzing with dynamic SQL and losing a lot of the expressiveness and power that PowerShell lends. While a bit ungainly, I thought defining a variable at the first step and passing that to successor steps but research turned up this article Handling Multiple Job Steps (BOL) ""Job steps must be atomic. A job cannot pass Boolean values, data, or numeric values between job steps. You can pass values from one Transact-SQL job step to another by using permanent tables or global temporary tables. You can pass values from one CmdExec job step to another by using files."" I can't use common tricks like a well-known file/environment variables/registry setting that Foo.exe looks for as that would prevent concurrent execution across instances. tl;dr In a SQL Agent Job step of type PowerShell, how can you determine the instance of SQL Server that launched the process? ",billinkc,https://dba.stackexchange.com/users/2131,"If you look in SQL Server BOL, SQL Server Agent provides a set of ""tokens"" that it will substitute into both the job step command text and the output file (the later will prevent the GUI ""view"" button from working). These tokens seem to work for any type of step except T-SQL. http://msdn.microsoft.com/en-us/library/ms175575.aspx So, if you have a SQL 2008 PowerShell step, you can start it with: $sqlInstance = ""$(ESCAPE_DQUOTE(SRVR))"" You may need to use MACH (machine name) and INST (just instance name) instead, because with the default instance SRVR == MACH, but with named instances SRVR == MACH\INST. ",David Lathrop,https://dba.stackexchange.com/users/4029,http://dba.stackexchange.com/questions/3484/sql-agent-powershell-context-reference,TECHNOLOGY,dba.stackexchange.com 7719,What is Pointer-chasing and how it is related to BFS,"While reading a PPT on BFS (Breadth First Searching) I found that BFS can be used where we have "" pointer-chasing"" . What exactly is a pointer chasing and how is it related to BFS? ",gpuguy,https://stackoverflow.com/users/486408,"I find it easiest to think of a Linked List example. Lets say we have a Linked List with 5 elements. To get to the 3rd element, you have to use Pointer-chasing to traverse through the elements. ",Andrew,https://stackoverflow.com/users/675637,http://stackoverflow.com/questions/19270414/what-is-pointer-chasing-and-how-it-is-related-to-bfs,STACKOVERFLOW,stackoverflow.com 5770,Chicken Tikka Masala tastes a bit off,"I have made chicken tikka masala recently and it turned out alright. I got the texture and look properly, but, however, the taste seems a bit off. I have used the chicken tikka masala, onions, cihlli powder, heavy cream, tomato puree and orange peppers, as per directions. However the taste is not satisfying as I had in restaurants. Anyone can suggest anything to improve my taste? Any spices that I can add or something? Thanks! ",Nick,https://cooking.stackexchange.com/users/29661,"You aren't getting the 'Indian restaurant' taste because you aren't using Indian restaurant techniques. Most Indian restaurant curries are based on a 'gravy' made with copious amounts of garlic, onions and ginger, stewed for several hours. They also use large amounts of ghee to add richness (and a boatload of calories), and finally they use marinaded chicken, cooked in a tandoor (a very hot, dry oven) which gives a unique flavour. It is simply not possible to replicate the flavours at home without using the same ingredients or similar techniques. It is not something you can knock up in half an hour. If you'd like to have a go at replicating a restaurant curry, try reading The Curry Secret by Kris Dhillion. ",ElendilTheTall,https://cooking.stackexchange.com/users/4194,http://cooking.stackexchange.com/questions/50228/chicken-tikka-masala-tastes-a-bit-off,LIFE_ARTS,cooking.stackexchange.com 7566,CASTING attributes for Ordering on a Doctrine2 DQL Query,"I am trying to get Doctrine2 Entities, ordered by their ID which apparently is a String even though it contains only Numbers. So what I would like to do is something like this: SELECT entity1, cast (entity1.id AS integer) AS orderId FROM Namespace\Bla\MyEntity ORDER BY orderId Is there a way to do something like this in Doctrine2? Or, what would be the best practise to get my Result if i can't change the type of the id (due to customer requirements of course)? Attention: I am not asking SQL Code, i am asking for a Doctrine2 Solution, preferably in DQL ",Andresch Serj,https://stackoverflow.com/users/532495,"You should be able to add your own function to implement this feature. The class would look something like this: namespace MyProject\Query; use Doctrine\ORM\Query\AST\Functions\FunctionNode; use Doctrine\ORM\Query\Lexer; use Doctrine\ORM\Query\Parser; use Doctrine\ORM\Query\SqlWalker; class CastAsInteger extends FunctionNode { public $stringPrimary; public function getSql(SqlWalker $sqlWalker) { return 'CAST(' . $this->stringPrimary->dispatch($sqlWalker) . ' AS integer)'; } public function parse(Parser $parser) { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); $this->stringPrimary = $parser->StringPrimary(); $parser->match(Lexer::T_CLOSE_PARENTHESIS); } } You'll need to register your function: $config = $em->getConfiguration(); $config->addCustomNumericFunction('INT', 'MyProject\Query\CastAsInteger'); Then you can use it: SELECT e, INT(e.id) AS HIDDEN orderId FROM Namespace\Bla\MyEntity e ORDER BY orderId PS: By adding the HIDDEN keyword, the alias orderId won't be in the results (and is only used for ordering). ",Jasper N. Brouwer,https://stackoverflow.com/users/1237411,http://stackoverflow.com/questions/7405342/casting-attributes-for-ordering-on-a-doctrine2-dql-query,STACKOVERFLOW,stackoverflow.com 7675,why wavelet is more suitable for image compression compared to DCT?,"Everyone knows that JPEG2000 can obtain much better compression result than JPEG. The fundamental transform behind JPEG2000 is wavelet while the basic transform in JPEG is DCT. So my question is why wavelet is more suitable for image compression compared to DCT. Thanks. ",feelfree,https://dsp.stackexchange.com/users/1674,"Both JPEG and JPEG 2000 use the change of basis compression type. Namely, we transform the data into a different representation assuming in this representation the number of parameters needed to describe to data is lower. Or to the least, most of the information is gathered within few parameters. Now, if you look at the energy level of the DCT coefficients of real world images you'd see most of the energy is limited to the very few coefficients. This is what JPG does, keeps only the few dominant coefficients and throws the rest. How efficient is DCT? It depends on how less coefficients are needed to describe the image in an acceptable quality. It turns out that for Wavelets the situation is better. Namely on real world images less coefficients are needed to describe the image with the same perceived quality. This property is called the ability to decorrelate the data / being energy densed, etc... At the end, it is all up to how much less parameters are needed to describe the same data. P.S. Using SVD / KLT (They are equivalent in this sense) would be even more efficient in the sense of how much less coefficients are needed for the same quality (In the $ {\ell}_{2} $ sense). The problem is those bases are adaptive to the data and hence if you use them you have to include them to be able to decompress the data. What's so nice, you can ask which, in general, approximate the SVD better? It turns out that Wavelets are better doing so. ",Royi,https://dsp.stackexchange.com/users/128,http://dsp.stackexchange.com/questions/24793,TECHNOLOGY,dsp.stackexchange.com 3397,Meteor renderList intercept? client side,"I have chat messages displayed like this: {{#each msg}} {{> chatMsg}} {{/each}} When users enter the chat I add a document to the collection with user joins the chat. When a user rapidly reenters and leaves the chat I don't want to duplicate user joins the chat over and over again. I want to display something like user joins the chat x3. Is there a way to do this on the client side by hooking into renderList? I know I can change the doc on the server side but it seems unnecessarily intensive. ",Harry,https://stackoverflow.com/users/663447,"One option is to make a method call that just updates the latest user joined message. function formatJoinMessage(username,count) {...} if (Meteor.isServer) Meteor.startup(function () {Chats._ensureIndex({modified:-1}); ...}); Meteor.methods({ join:function() { var joinMessage = Chats.find({type:MESSAGE_TYPE_JOINED,userId:this.userId}).sort({modified:-1}).fetch()[0]; if (joinMessage) Chats.update({_id:joinMessage._id},{$inc:{joins:1},$set:{text:formatJoinMessage(this.userId,joinMessage.joins+1),modified:new Date()}); else Chats.insert({user:this.userId,joins:1,modified:new Date(),text:formatJoinMessage(this.userId,1)}); } )}; Don't want to change the server doc? That's okay, but conceptually a chat join isn't a chat message. So you should definitely have a meta field for stuff like this in your chat documents. But supposing you don't want to do that. I'd do something like this: var userIdToName = function(userId) {...}; // some kind of userId to name helper Template.chatroom.msg = function() { var messages = Chat.findOne(Session.get(""currentChat"")).messages; // msg in your code? return _.reduce(messages,function (newMessages, currentMessage) { var lastMsg = newMessages[newMessages.length-1]; if (currentMessage.type == MESSAGE_TYPES_JOIN) { if (lastMsg && lastMsg.type == MESSAGE_TYPES_JOIN && currentMessage.user == lastMsg.user) { currentMessage.timesJoined = lastMsg.timesJoined+1; newMessages.shift(); } else { currentMessage.timesJoined = 1; } currentMessage.chatMsg = userIdToName(lastMsg.user) + "" joins the chat &mult;"" + currentMessage.timesJoined.toString(); } return newMessages.concat(currentMessage); },[]); } This is a bit of a doozy. Suffice it to say, it ""reduces"" all the join messages it finds in the chat's current messages down to one message. You dynamically add the property timesJoined; it does not appear in the document. But you should have a type field that lets you know the difference between a join message and a regular message is. If you don't even have that metadata at minimum, then your chat application isn't going to work very well. Don't hesitate to change your model! ",DoctorPangloss,https://stackoverflow.com/users/1757994,http://stackoverflow.com/questions/13663765/meteor-renderlist-intercept-client-side,STACKOVERFLOW,stackoverflow.com 7034,How do I export a Keynote Presentation to PDF while embedding the font,"It seems like the export to PDF option currently exists on Keynote (version '09) does not embed the font I use. What are my options besides buying Adobe Acrobat Professional? ",Tzury Bar Yochay,https://apple.stackexchange.com/users/45595,"I have tested the font you mention in exporting pdf (best quality) from keynote and it is both embedded and displays correctly on my iOS devices using Adobe Reader or iBooks to open the file. It should work for you as well. If not, feel free to send me an example of your pdf for testing (tom at bluesky dot org). ",Tom Gewecke,https://apple.stackexchange.com/users/33767,http://apple.stackexchange.com/questions/89303/how-do-i-export-a-keynote-presentation-to-pdf-while-embedding-the-font,TECHNOLOGY,apple.stackexchange.com 2722,"More colloquial term for ""confidant""","Is there a more colloquial term for a ""confidant"", or someone who has been entrusted with sensitive information to be disclosed only under certain conditions? This is related to my previous question on trusted proxies. ",Petrus Theron,https://english.stackexchange.com/users/1387,"I don't think there is a more colloquial term that fully encompasses the meaning of confidant. I can't think of a more formal one, either. Confidant and confidante are not particularly formal terms, even if they sound it. These are not uncommon in everyday parlance. If you truly require something more colloquial, you'll probably have to settle for a longer phrase. Even then, many of the terms I might use to construct such a phrase seem no less formal than confidant: privileged privy trusted counselor ",Jay,https://english.stackexchange.com/users/3313,http://english.stackexchange.com/questions/8590/more-colloquial-term-for-confidant,CULTURE,english.stackexchange.com 888,Spring security - Access to a controller method based on an attribute,"I'm configuring Spring Security across all my controllers. I want some method executions to start only when ""my system is enabled"". This information is accessible from all over the controllers via a specific static method (I can make it non-static). My point is that I want to avoid making an explicit check in java code at the beginning of every method. How can I get there via Spring Security? ",Manu,https://stackoverflow.com/users/1490144,"One approach is to use a handler interceptor. Here is general idea: (1) Configure url patterns which you want to block: <util:list id=""sysEnableCheckUrlPatterns"" value-type=""java.lang.String""> <beans:value>/module1/**</beans:value> <beans:value>/module2/**</beans:value> </util:list> (2) Write an interceptor: public class SysEnableCheckInterceptor extends HandlerInterceptorAdapter { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { /* If system enabled then return true. Otherwise return false (and optionally write something in response) */ } } (3) Configure that interceptor. In 3.1 you can do it as follows: @Configuration public class AppConfig extends WebMvcConfigurerAdapter { @Resource(name=""sysEnableCheckUrlPatterns"") /* or use @Autowired or @Inject if you like */ private String[] sysEnableCheckUrlPatterns; @Override public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(new SysEnableCheckInterceptor()).addPathPatterns(sysEnableCheckUrlPatterns); } } ",Ritesh,https://stackoverflow.com/users/530549,http://stackoverflow.com/questions/15514170/spring-security-access-to-a-controller-method-based-on-an-attribute,STACKOVERFLOW,stackoverflow.com 7565,what is exactly the difference between the Selberg class and the set of Artin L-functions?,"The question is in the title: from what I read in the answer to another question, Artin L-functions are conjecturally cuspidal automorphic L-functions for some algebraic group that can be transfered to $GL_{n}$. On the other hand, elements of the Selberg class are widely believed to be (cuspidal?) automorphic L-functions for $GL_{n}$. So where exactly lies the difference between those two sets of L-functions? Thanks in advance. ",Sylvain JULIEN,https://mathoverflow.net/users/13625,"As far as I know, the precise conjecture for what you are asking is: All the elements of the Selberg class that are not Artin L-functions are: motivic L-functions of dimension bigger than 0. transcendental L-functions Note that Artin L-functions are the 0-dimensional motivic L-functions. Also, transcendental L-function is an umbrella term for automorphic L-functions that are not motivic. ",Myshkin,https://mathoverflow.net/users/43108,http://mathoverflow.net/questions/207306,SCIENCE,mathoverflow.net 9402,"What does the inspector mean by ""Hot and Neutral are not separated""?","In an inspection report on my house, the inspector said ""hot and neutral"" are not separated. I think he meant ""neutral and ground"" are not separated. I've attached the picture, is that the case? ",themidnightwill,https://diy.stackexchange.com/users/6542,"I'm guessing from the image that this is a sub-panel, in which case the inspector is correct. The National Electrical Code (NEC) says: National Electrical Code 2008 250.24 Grounding Service-Supplied Alternating-Current Systems. (A) System Grounding Connections. (5) Load-Side Grounding Connections. A grounded conductor shall not be connected to normally non–currentcarrying metal parts of equipment, to equipment grounding conductor(s), or be reconnected to ground on the load side of the service disconnecting means except as otherwise permitted in this article. Which means the only place the ""neutral"" (grounded conductor) is bonded, is in the main service panel. If the grounded (neutral) and equipment grounding conductors (EGC) are bonded anywhere else, you can end up with neutral currents on the EGC and metal parts of equipment which is a violation of 250.6(A). 250.6 Objectionable Current. (A) Arrangement to Prevent Objectionable Current. The grounding of electrical systems, circuit conductors, surge arresters, surge-protective devices, and conductive normally non–current-carrying metal parts of equipment shall be installed and arranged in a manner that will prevent objectionable current. A second look After taking another look at this, he could mean that the white insulated wires are not marked appropriately. When you use a wire with white (gray, or with three continuous white stripes) insulation as an ungrounded (hot) conductor, you have to mark the wire in some way to indicate that it is not used as a grounded (neutral) conductor. 200.7 Use of Insulation of a White or Gray Color or with Three Continuous White Stripes. (C) Circuits of 50 Volts or More. The use of insulation that is white or gray or that has three continuous white stripes for other than a grounded conductor for circuits of 50 volts or more shall be permitted only as in (1) through (3). (1) If part of a cable assembly and where the insulation is permanently reidentified to indicate its use as an ungrounded conductor, by painting or other effective means at its termination, and at each location where the conductor is visible and accessible. Identification shall encircle the insulation and shall be a color other than white, gray, or green. Since the white wires connected to the breakers are not marked, it looks (to the untrained eye) as if the grounded (neutral) conductors are connected to the hot bus. The most common way to mark the wires, is to wrap a bit of black electrical tape around a small section of the wire. ",Tester101,https://diy.stackexchange.com/users/33,http://diy.stackexchange.com/questions/25746/what-does-the-inspector-mean-by-hot-and-neutral-are-not-separated,LIFE_ARTS,diy.stackexchange.com 1269,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? ",Matthew Jones,https://meta.stackexchange.com/users/133611,"The over 100% is intentional -- just indicates that you've gone the ""extra mile"" beyond the minimum required. ",Jeff Atwood,https://meta.stackexchange.com/users/1,http://meta.stackexchange.com/questions/24964/why-is-my-cv-145-complete,TECHNOLOGY,meta.stackexchange.com 6720,Ma'ayanah Shel Torah on the Festivals and 613 Mitzvot?,"On the title page of Ma'ayanah Shel Torah, it says that the series covers the Parshiot, Haftarot, Festivals, and 613 Commandments. I have the 5 volumes on the Parshiot and Haftarot, but they do not cover the Festivals. There is no section for the 613 Commandments either, but some are covered in the Parsha. Is there a Ma'ayanah Shel Torah on the Festivals? ",Menachem,https://judaism.stackexchange.com/users/603,"Seemingly not. The Hebrew and English Wikipedia articles say that תורה קוואל and its translation מעינה של תורה cover the parashiyos and haftaros, implying that those are the only sections. Those are all hebrewbooks.org has, too. ",msh210,https://judaism.stackexchange.com/users/170,http://judaism.stackexchange.com/questions/45183/maayanah-shel-torah-on-the-festivals-and-613-mitzvot,CULTURE,judaism.stackexchange.com 4713,How can I tell if a downloaded ISO is complete?,"I just ran into a nasty problem with an ISO download from Microsoft. I successfully burnt it to a rewritable DVD, and copied the contents to the local hard drive on another machine, but when I went to run them they were corrupt. It turns out the download had been truncated. Now, OK, sometimes that happens - but it surprised me that the truncated file (which was only slightly more than 60% of the actual ISO) burnt successfully and seemed to be presenting me with a sensible file system, to the extent that I could (apparently) successfully copy the files. So, is there some way I could have tested the file to see if it was complete or not? The MS web site did not provide any information about the expected size, so I'm looking for a generic solution: given an ISO file which may or may not be truncated, is there some way to tell? Do commonly used CD/DVD (data) formats include any embedded information about how much data is supposed to be on the disk, or even better, some kind of CRC? A solution that detects most truncated images will be accepted, it doesn't need to be perfect. (I'd prefer something that doesn't give false positives, though.) [Addendum: a comparison of the disk burnt with the truncated image with the files extracted from the full image suggests that chunks of the data from many of the files were replaced with random information, perhaps from the contents of a previous burn to the same rewritable disk.] ",Harry Johnston,https://superuser.com/users/96662,"A quick-n-dirty method: if you install 7-Zip, you can right-click an ISO and open it as an archive - something I usually do anyway to unpack it (as an alternative to burning to DVD). From there, you can test the archive using the 'Test' command in the toolbar. ",Geoff,https://superuser.com/users/60097,http://superuser.com/questions/347622,TECHNOLOGY,superuser.com 9152,Should I lap my valves if I have easy access?,"Now that I have my cylinder heads out of my V6 Tacoma, I am considering taking the valves out to inspect them in case they are bent or whatever and grind them. There is no symptoms of valves malfunctioning. They are sealed closed fine. I was just wondering if I should do it since now I have easy access to it? E.g. if I took them out and cleaned them and the housing, will it enhance the engine performance? UPDATE: What caused me to consider this are the carbon-gunky final segments of the intake passages inside the cylinder head that leads to the valves (what is the proper term for that?) and by looking inside, I could see that the same gunk was collected on the inside of the valve (wide end that actually closes the opening). I cleaned those with a toothbrush sized wire brush and Seafoam. Here is what they looked like: Dirty: Clean: ",amphibient,https://mechanics.stackexchange.com/users/2618,"Will cleaning the valves improve performance? Yes. Will you feel the difference? It really depends on the present state of the valves but the answer is probably ""no"". Is it worth going them while one's in there? That really depends on the end objective and the availability of resources like time and tools. Just to give an idea of the worth involved, here is a Jafro video which shows how to remove the valves and valve springs from a 4G63 cylinder head. Here is another one detailing how he cleans the valves and seats. ",Zaid,https://mechanics.stackexchange.com/users/675,http://mechanics.stackexchange.com/questions/18237/should-i-lap-my-valves-if-i-have-easy-access,CULTURE,mechanics.stackexchange.com 8078,Counterexample: Convergence in probability does not imply convergence in sample mean,"Consider the random variable $X_n$ defined by $X_n = 2^n$ with probability $\frac{1}{n}$ and $0$ else, for each $n >0 $. It's easy to show that $X_n$ converges to $0$ in probability. How do we show that $S_n / n $, the sample mean, fail to converge to $0$? ",Peter,https://math.stackexchange.com/users/24729,"I presume (but it definitely must be stated!) that the $X_n$ are supposed to be independent. Hint: use one of the Borel-Cantelli lemmas. ",Robert Israel,https://math.stackexchange.com/users/8508,http://math.stackexchange.com/questions/725683/counterexample-convergence-in-probability-does-not-imply-convergence-in-sample,SCIENCE,math.stackexchange.com 517,Using regular expressions to find img tags without an alt attribute,"I am going through a large website (1600+ pages) to make it pass Priority 1 W3C WAI. As a result, things like image tags need to have alt attributes. What would be the regular expression for finding img tags without alt attributes? If possible, with a wee explanation so I can use to find other issues. I am in an office with Visual Web Developer 2008. The Edit >> Find dialogue can use regular expressions. ",awrigley,https://stackoverflow.com/users/271087,"Here is what I just tried in my own environment with a massive enterprise code base with some good success (found no false positives but definitely found valid cases): <img(?![^>]*\balt=)[^>]*?> What's going on in this search: find the opening of the tag look for the absence of zero or more characters that are not the closing bracket while also … Checking for the absence of of a word that begins with ""alt"" (""\b"" is there for making sure we don't get a mid-word name match on something like a class value) and is followed by ""="", then … look for zero or more characters that are not the closing bracket find the closing bracket So this will match: <img src=""foo.jpg"" class=""baltic"" /> But it won't match either of these: <img src=""foo.jpg"" class=""baltic"" alt="""" /> <img src=""foo.jpg"" alt=""I have a value.""> ",squareman,https://stackoverflow.com/users/482263,http://stackoverflow.com/questions/4031948/using-regular-expressions-to-find-img-tags-without-an-alt-attribute,STACKOVERFLOW,stackoverflow.com 7773,Can I pass along all properties when for a GradleBuild task?,"I'm executing a GradleBuild task, and I'd like to maintain all the properties that the current script has been given. In other words, I want to package up ""these startparameters"" and pass them along to the build I'm calling. Is there any way to do this cleanly? ",Bosh,https://stackoverflow.com/users/318206,"If you mean project properties: task foo(type: GradleBuild) { startParameter.projectProperties = gradle.startParameter.projectProperties } If you mean system properties, replace projectProperties with systemPropertiesArgs (on both sides). ",Peter Niederwieser,https://stackoverflow.com/users/84889,http://stackoverflow.com/questions/19020169/can-i-pass-along-all-properties-when-for-a-gradlebuild-task,STACKOVERFLOW,stackoverflow.com 8301,CMS Uses http and so sends password in plain text,"A well known CMS called Joomla allows users to register and the password appears hidden as you register with dots a normal experience online - at this point you think just you know it. But if the site is using http then in fact the password is POSTed using plaintext. This shouldn't be allowed! I can understand that passwords are stored as salted hashes in good systems so even if the passwords are discovered on the db you cant use them to login. Is that pretty much it? Before we talk about password reset - in this case a good system cannot remind you of your password as it is not recoverable! It can only reset it for you and again isn't this sent plaintext over the net ??? So why cant that get stolen.. The issue is when the real plain text passwords are known by anyone or any system other than the user then identity is lost. ",landed,https://security.stackexchange.com/users/12050,"Joomla has had a ""Force SSL"" setting since version 1.5. You can set it up by changing either the configuration.php file, or using the admin web GUI. Its set to ""None"" by default, mostly because several hosts don't support SSL/HTTPS out of the box. You probably want to change it to ""Administrator Only"" to secure only the admin interface, or ""Entire Site"" if you want to secure even the public facing front-end (useful if you have front-end logins.) ",Suman,https://security.stackexchange.com/users/12055,http://security.stackexchange.com/questions/18254/cms-uses-http-and-so-sends-password-in-plain-text,TECHNOLOGY,security.stackexchange.com 5413,Dealing with digital circuits and their associated switching speed?,"When designing a digital one-minute counting circuit I came across a difficult problem. Basically, I designed the circuit to drive the (normally HIGH) clock of the 10s slot low if the 1s slot's current state was 9 (actually, just if the first and last bits are HIGH -> 1001) The devices I am using are positive edge, so when the 1s slot returns to zero the condition is no longer satisfied - therefore the clock returns to a HIGH state and increments the 10s slot. The problem is that I was getting double clock problems(7->8 transition and the designed clock mechanism). It turns out that there was just enough delay in the switching between 7 -> 8 (0111 -> 1000) that the first/last bit HIGH condition is satisfied: i.e., some combination occurs in the transition period to register a logical HIGH at the output 1001 1011 1101 1111 The temporary solution to the problem I came up with was to actually keep the clock for the 10s slot LOW until the condition where the 1s slot equals 0 (0000) is satisfied(So, essentially clock WHEN we get to the state as opposed to before). However, this solution requires too many gates (a 4-input NOR minimum). My previous design was actually fed from another part in the design that is already present, so it didn't require any additional circuitry. Any ideas on a more efficient solution? The IC's used in this design are the 74LS47 (7Segment decoder) and the 74LS163 (4-bit binary counter). The pull-down resistor inclusion is a mechanism to set the counters to 00 and hold while the switch is closed. ",sherrellbc,https://electronics.stackexchange.com/users/26864,"The way I see it, you're causing problems for yourself by using multiple clock domains, and worse, deriving a clock from data. The problem with data is that it has to settle. That's why we have separate clocks. A combinatorial circuit which evaluates some variables and then drives a clock invites trouble. Secondly, if you're going to kludge it, at least do it right. You cannot detect a 9 by noting that the first and last of four bits bit are 1. If you want a signal which fires when there is a 9, you must evaluate all four bits earnestly and trigger that signal only when they are 1001. There is no reason not to design this in such a way that a single clock is distributed to all the chips. Then it's a matter of running the clock slowly enough that all inputs and outputs settle before each edge arrives. Read the data sheet. The TI one clearly says ""The carry look-ahead circuitry provides for n-bit synchronous applications without additional gating. Instrumental in accomplishing this function are two count-enable inputs and a ripple carry output. Both count enable inputs P and T must be high to count [...]"". It sounds like these chips are intended to be hooked up together easily. You can prevent the upper digit from counting up on the next clock edge by de-asserting its count enable inputs. Whenever the lower digit is nine, your circuitry can enable the upper digit chip to count, and also set up the lower digit to perform a synchronous reset. When the next clock edge arrives (to all chips), the upper digit counts up, and the other flips to zero. ",Kaz,https://electronics.stackexchange.com/users/9414,http://electronics.stackexchange.com/questions/90996/dealing-with-digital-circuits-and-their-associated-switching-speed,SCIENCE,electronics.stackexchange.com 2155,Idolatry in churches allowed?,"It is very frequent to see idols of Jesus or any biblical entities in a Church , So is such idolatry allowed by the bible,considering the following verses? ""You must not make for yourself an idol of any kind or an image of anything in the heavens or on the earth or in the sea"". Exodus 20:4 History tells us that: sometimes objects that God instructed to be made were turned into idols by the Israelites. The Book of Numbers contains a narrative in which God instructed Moses to make a bronze snake as part of addressing a plague of venomous snakes that had broken out among the Israelites as a punishment for sin. The bronze snake is mentioned again in 2 Kings 18; however, rather than remaining a memorial of God's providence, it became an idol that the people named and worshiped. Thus the bronze snake was destroyed in King Hezekiah's reforms. More specifically in India I see Christians carry idols of Jesus and other biblical entities with them kiss them and revere them too. Infact they allow the Hindus in the Church and let them perform worship in their way(Like putting incense sticks, offering flowers , foodstuff to the Idol of Jesus etc) as shown below a very common view in India. I studied in a Christian school for 10 years and i am yet to see Christians not doing these things. I have seen the same on TV and in videos of people venerating the Idol of biblical entities. ",JesusBoughtIslam,https://christianity.stackexchange.com/users/3812,"You're operating under a misconception that these are idols. Most Christians don't worship these images, statues, etc. Instead, they are considered art, something that we create because we love the subject, not the work of art. Asking your question is like asking if looking at a painting of my wife means that I am allowed to cheat on her by devoting my affection to an image of her. I love her, not the painting of her. Christians love Jesus, not the statues of Him. So, the answer id no, idolatry isn't allowed in Churches. Addressing the updates to the question, the things that people are ""venerating"" are likely ""Sacrementals"". Sacramentals are material objects, things or actions (sacramentalia) set apart or blessed by the Roman and Eastern Catholic Churches, the Eastern and Oriental Orthodox Churches, the Church of the East, the Anglican Churches, the Independent and Old Catholic Churches, and the Lutheran Churches to manifest the respect due to the sacraments, and so to excite good thoughts and to increase devotion, and through these movements of the heart to remit venial sin, according to the Council of Trent (Session XXII, 15). In Roman Catholicism, sacramentals such as Holy water, the crucifix or the Saint Benedict Medal are recommended as a means of protection against evil. Again, the devotion is not to these things, but to the God they represent. There are, those that do worship them like idols, and many view the idea that these could protect us from evil as superstitious, the point remains that officially, these aren't idols. They aren't to be worshiped. They are reminders of the one we should be worshiping. ",David Stratton,https://christianity.stackexchange.com/users/721,http://christianity.stackexchange.com/questions/14615/idolatry-in-churches-allowed,CULTURE,christianity.stackexchange.com 1641,Changing package names before building in Bamboo,"I recently discovered that BlackBerry treats all classes with the same fully-qualified name as identical--regardless of whether they are in entirely different apps or not--causing apps that use different versions of our shared libraries to break when they are installed on the same phone. To solve this problem, we are planning on changing the package names to include a version number, then building. Can someone explain how, using Bamboo, I can insert a step in our build process that: changes certain packages names replaces all code references to the old package name with references to the new package name? ",Amanda S,https://stackoverflow.com/users/71421,"I'm not familiar with Bamboo and you did not include much information about your build system. If you are using maven, you could use the shade plugin: This plugin provides the capability to package the artifact in an uber-jar, including its dependencies and to shade - i.e. rename - the packages of some of the dependencies. The second example here shows how to configure package renaming. The resulting jar file would then have to be processed by rapc as in Chris Lerchers comment to his answer. It should be possible to also integrate this in a maven build using the exec plugin. ",Jörn Horstmann,https://stackoverflow.com/users/139595,http://stackoverflow.com/questions/5146365/changing-package-names-before-building-in-bamboo,STACKOVERFLOW,stackoverflow.com 6448,"Polite alternatives to ""as soon as possible""","I’ve found myself writing the phrase “as soon as possible” just too often. Sometimes I wonder if it sounds a little rude. How can I convey the same meaning in a more polite way but without losing sense of urgency? ",Albertus,https://english.stackexchange.com/users/20545,"I often need to ask for things to be returned to me. In a business setting, I have found that giving people a specific date (and sometimes a specific time) helps them. I always follow up with something like, ""If you feel you need more time than that, please let me know."" or ""If this deadline is not feasible, please let me know."" Adding that sentence shows the recipient that you are sensitive to his or her schedule. Giving a firm date helps the recipient be cognizant of your schedule. I have found writing, ""when you get a chance"" or ""as soon as possible"" leaves it too much up in the air. And, as the saying goes, if it weren't for the last minute, nothing would ever get done. Your items of business will be pushed back in the recipient's schedule and then you find yourself trying to find a polite way to write, ""where's my stuff!?!"" ",JLG,https://english.stackexchange.com/users/18655,http://english.stackexchange.com/questions/69101/polite-alternatives-to-as-soon-as-possible,CULTURE,english.stackexchange.com 3920,Isomorphism between quotient groups with normal subgroups,"I'm looking at a problem in my textbook and it says: Let $ψ : G_1 → G_2$ be a surjective group homomorphism. Let $H_1$ be a normal subgroup of $G_1$ and suppose that $ψ(H_1) = H_2$. Prove or disprove that $G_1/H_1$ is isomorphic $G_2/H_2$. So far, I know that since $H_1$ is normal in $G_1$, $H_2$ is also normal in $G_2$. I'm unsure how to proceed from here though, can someone give me a hint? ",jstnchng,https://math.stackexchange.com/users/185638,"The statement is wrong. Just take $G_1=\mathbb{Z}_2$, $H_1=\{0\}$, $G_2=\{0\}$. Then $H_2=\{0\}$ and $G_1/H_1=\mathbb{Z}_2$ is not isomorphic to $G_2/H_2=\{0\}$. ",user2097,https://math.stackexchange.com/users/170091,http://math.stackexchange.com/questions/986251/isomorphism-between-quotient-groups-with-normal-subgroups,SCIENCE,math.stackexchange.com 5822,Add authors as footnote in lncs,"please, I was asked to modify the .tex file of a manuscript. The problem is that I want to add ""supervised by ..."" as a footnote and when use \footnote{supervised by ...} in \author{} it does not work. I use a Latex lncs format. Thank you! ",Sofiane,https://tex.stackexchange.com/users/46464,"The correct way is using \thanks, not \footnote: \documentclass[runningheads]{llncs} \usepackage{kantlipsum} \begin{document} \title{LaTeX Template for Your LNCS Paper} \author{Author 1\thanks{Supervised by Author 9}, Author 2} \institute{Lab, University, Address} \maketitle \begin{abstract} Abstract is here. \end{abstract} \section{Introduction}\label{sec:Introduction} The rest goes here. \kant \end{document} I added also the runningheads option just to show that the headline containing the authors' names is not influenced by the presence of \thanks. First page Second page ",egreg,https://tex.stackexchange.com/users/4427,http://tex.stackexchange.com/questions/161232/add-authors-as-footnote-in-lncs,TECHNOLOGY,tex.stackexchange.com 6855,"Are there any good, free introductory Dungeon World adventures for a DM used to D&D?","I have been playing & GMing for some time, mostly in various versions of D&D, and other 80s-90s systems. And most of my GMing has been with published adventure modules. I want to try Dungeon World, so have been looking for a free adventure that would work as an introduction to the system (for both the players and myself). But most of what I can find are ""Dungeon Starters"": Dungeon Starters are a form of GM prep for running the first session of a Dungeon World game. Dungeon Starters don’t dictate plot, they’re not Fronts (you write those after the first session), and they don’t replace the GM playbook. They are for those times when you want to just sit down and start a game right then. Dungeon Starters provide a unified flavor to your prep but, when you get down to it, they are really just an unordered cloud of blanks and hooks with some appropriate moving parts to make sure the players don’t catch you with nothing interesting to say. Dungeon Starters are made up of questions, impressions, custom moves, items and services, spells, and monsters (among other things). Are there any free adventures with a level of detail closer to a D&D module? ",Adeptus,https://rpg.stackexchange.com/users/14988,"The only one I am aware of was produced for one of the 'Free RPG Day' a couple of years ago as a demonstration game. It was called The Slave-Pit of Drazhu, and is intended to run for approximately 2 hours. Having played through it with a DM who didn't really know what they were doing, it was extremely clear how having a good grip on the principle of the rules really was. I've since run it once with some success, although the fact that it is pre-planned to a large extent kind of misses the main point of the way Dungeon World is supposed to work. The reason for this is because stories within the system are intended to be emergent, with players having as much control about what happens next as the DM. Planning everything in advance completely shortcuts this, which is a shame, but I can see how it might help provide a way in for GMs who have no previous experience with this type of system. ",Wibbs,https://rpg.stackexchange.com/users/2253,http://rpg.stackexchange.com/questions/63741/are-there-any-good-free-introductory-dungeon-world-adventures-for-a-dm-used-to,CULTURE,rpg.stackexchange.com 56,Export error with addon,"Im trying to export a model for the Euro Truck Simulator 2 game with the Blender2SCS addon and I get the following error, any help? Traceback (most recent call last): File ""C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene _scs\__init__.py"", line 1951, in execute error = export_scs.save(filepath, origin_path, root_object, self.copy_textur es, int(self.pmg_version)) File ""C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene _scs\export_scs.py"", line 27, in save status, ob = export_pmd.save(exportpath, originpath, root_ob, copy_textures) File ""C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene _scs\export_pmd.py"", line 305, in save pmd.write(f, exportpath, originpath, copy_tex) File ""C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene _scs\export_pmd.py"", line 267, in write ret_ob = exp_mat.write(copy_tex) File ""C:\Program Files\Blender Foundation\Blender\2.72\scripts\addons\io_scene _scs\export_mat.py"", line 91, in write for option in self.__options.keys(): AttributeError: 'str' object has no attribute 'keys' location: <unknown location>:-1 location: <unknown location>:-1 ",Pumizo,https://blender.stackexchange.com/users/6311,"The addon seems to be broken due to api changes in Blender, either use the addons bug tracker or try an older version of Blender that is compatible. According to the video tutorials version 2.66 was used. ",stacker,https://blender.stackexchange.com/users/29,http://blender.stackexchange.com/questions/23314/export-error-with-addon,TECHNOLOGY,blender.stackexchange.com 5321,What is the real reason for the Joker's scars?,"In The Dark Knight, The Joker told different reasons for the scars on his cheeks. Initially he said that his father gave him the cuts on his cheek as a child after his father performed the same act on his mother, which includes the famous line ""Why so serious?"". The Joker also tells Rachel Dawes that his wife had scars due to an accident and that he cut his own cheeks with a razor blade to prove that scars did not matter. He starts to tell Batman a third story about how he might have been disfigured. Anybody knows what is the real reason? Was the real reason mentioned in any comics or other books? ",Vijin Paulraj,https://movies.stackexchange.com/users/556,"Wikipedia says : ""Though many have been related, a definitive back-story has never been established for the Joker in the comics, and his real name has never been confirmed. He himself is confused as to what actually happened; as he says in The Killing Joke, ""Sometimes I remember it one way, sometimes another... if I'm going to have a past, I prefer it to be multiple choice! Ha ha ha!"""" ",user1238523,https://movies.stackexchange.com/users/130,http://movies.stackexchange.com/questions/1428/what-is-the-real-reason-for-the-jokers-scars,LIFE_ARTS,movies.stackexchange.com 2376,C# save/retrieve an array of structures from settings file,"I have a simple question (I think) that I'm not making much progress finding an answer to with Google. I have a structure as follows: /// <summary> /// A class to represent the sync settings for a single camera. /// </summary> public class CameraSyncSettings { public string ID { get; set; } public string SyncPath { get; set; } public bool OverwriteExisting { get; set; } }; And then an array of these in the program, one for each camera: List<CameraSyncSettings> MyCameraSettings = new List<CameraSyncSettings>(); Now, what I want to do is have a property in my settings such that I can read/write this array into it to persist the information between sessions. How can I do this and what is the best/most efficient way? ",Robinson,https://stackoverflow.com/users/416274,"You can achieve it by using Properties.Settings of type ListDictionary Example: Properties.Settings.Default.Example.Add(""Setting1"", new CameraSyncSettings()); Properties.Settings.Default.Example.Add(""Setting2"", new CameraSyncSettings()); Properties.Settings.Default.Example.Add(""Setting3"", new CameraSyncSettings()); Properties.Settings.Default.Save(); see link for more information : http://msdn.microsoft.com/en-us/library/aa730869(v=vs.80).aspx NB: You can set the Scope of Properties.Settings.Default.Example to Application or User ",HatSoft,https://stackoverflow.com/users/1310467,http://stackoverflow.com/questions/11342195/c-sharp-save-retrieve-an-array-of-structures-from-settings-file,STACKOVERFLOW,stackoverflow.com 1401,To access button from another class which is in another page,"My goal is to access the button and make the visibility to false from another class in vb.net Dim obj = New MyClass() obj.btnName.Visible = False But it is throwing error as ""Object reference not set to an Instance"" ",User1674987,https://stackoverflow.com/users/1862889,"Try to debug to see if your button has been initialized the time you access it, and i think it is not. This is probably your are using this button before the form or the page has been loaded. Since instantiating the button will happen in the initialization portion of your code. Try to initialize you class in protected void Page_Load(object sender, EventArgs e) { dim obj = new Myclass(); } and inside the New function in 'MyClass' class make sure your are initializing all the stuff you want to use. ",Sanfoor,https://stackoverflow.com/users/1682327,http://stackoverflow.com/questions/14155547/to-access-button-from-another-class-which-is-in-another-page,STACKOVERFLOW,stackoverflow.com 7061,How can I export only text with a distinctive character style from InDesign to a new document?,"I had a catalog layout with 200 captions. They all have the same distinctive character style. I am searching for a solution to export only these caption texts with the distinct character style out of InDesign in a new document as for example, an RTF text. The format doesn't matter. It's more important to have only the captions out of the whole catalog. ",user12352,https://graphicdesign.stackexchange.com/users/12352,"Edit: Even though you seem to mention it multiple times, it just dawned on me that you were talking about character styles and not paragraph styles... :( I'm just going to leave this here anyways. You could do this with table of contents. You can make table contents by using paragraph styles as the ""hook"". Layout > Table of contents... Here I pretty much touched only those options that I've explained in the image. Click here for a bigger image ...and when you click OK, it will create me a nice list of all the text with the specified ""yay"" paragraph style in it: The rest should be simple. If you make text changes to your document, you can update the TOC by first selecting the table of contents text block and then selecting Layout > Update table of contents... ",Joonas,https://graphicdesign.stackexchange.com/users/2332,http://graphicdesign.stackexchange.com/questions/17623/how-can-i-export-only-text-with-a-distinctive-character-style-from-indesign-to-a,LIFE_ARTS,graphicdesign.stackexchange.com 6195,PostgreSQL bytea vs smallint[],"I'm looking to import large (100Mb -- 1 GB) multi-channel time-series data into a PostgreSQL database. The data comes from EDF format files that chunks the data into ""records"" or ""epochs"" of typically a few seconds each. Each epoch's record holds the signals for each channel of data as sequential arrays of short integers. I'm mandated to store the files within the database, in the worst case as BLOBs. Given that, I'd like to investigate options that would allow me to do something more with the data within the database, such as facilitating queries based upon the signal data. My initial plan is to store the data as one row per epoch record. What I'm trying to weigh up is whether to store the actual signal data as bytea or smallint[] (or even smallint[][]) types. Could anyone recommend one over the other? I'm interested in storage and access costs. Usage is likely to be insert once, read occasionally, update never. If one were more easily wrapped up as a custom type such that I could add functions for analysing of comparing records then so much the better. No doubt I'm low on detail, so feel free to add comments on what you'd like me to clarify. ",beldaz,https://dba.stackexchange.com/users/13111,"In the absence of any answers I've explored the issue further myself. It looks like user-defined functions can handle all base types, including bytea and smallint[], so this doesn't affect the choice of representation much. I tried out several different representations on a PostgreSQL 9.4 server running locally on a Windows 7 laptop with a vanilla configuration. The relations to store that actual signal data were as follows. Large Object for entire file CREATE TABLE BlobFile ( eeg_id INTEGER PRIMARY KEY, eeg_oid OID NOT NULL ); SMALLINT array per channel CREATE TABLE EpochChannelArray ( eeg_id INT NOT NULL, epoch INT NOT NULL, channel INT, signal SMALLINT[] NOT NULL, PRIMARY KEY (eeg_id, epoch, channel) ); BYTEA per channel in each epoch CREATE TABLE EpochChannelBytea ( eeg_id INT NOT NULL, epoch INT NOT NULL, channel INT, signal BYTEA NOT NULL, PRIMARY KEY (eeg_id, epoch, channel) ); SMALLINT 2D array per epoch CREATE TABLE EpochArray ( eeg_id INT NOT NULL, epoch INT NOT NULL, signals SMALLINT[][] NOT NULL, PRIMARY KEY (eeg_id, epoch) ); BYTEA array per epoch CREATE TABLE EpochBytea ( eeg_id INT NOT NULL, epoch INT NOT NULL, signals BYTEA NOT NULL, PRIMARY KEY (eeg_id, epoch) ); I then imported a selection of EDF files into each of these relations via Java JDBC and compared the growth in database size after each upload. The files were: File A: 2706 epochs of 16 channels, each channel 1024 samples (16385 samples per epoch), 85 MB File B: 11897 epochs of 18 channels, each channel 1024 samples (18432 samples per epoch), 418 MB File C: 11746 epochs of 20 channels, each channel 64 to 1024 samples (17088 samples per epoch), 382 MB In terms of storage cost, here's the size occupied in MB for each case: Relative to the original file size, Large Objects were about 30-35% larger. By contrast, storing each epoch as either a BYTEA or SMALLINT[][] was less than 10% larger. Storing each channel as a separate tuple give a 40% increase, as either BYTEA or SMALLINT[], so not much worse than storing as a large object. One thing I hadn't initially appreciated is that ""Multidimensional arrays must have matching extents for each dimension"" in PostgreSQL. This means that the SMALLINT[][] representation only works when all channels in an epoch have the same number of samples. Hence File C fails to work with the EpochArray relation. In terms as access costs, I haven't played around with this, but at least in terms of inserting the data initially the fastest representation was EpochBytea and BlobFile, with EpochChannelArray the slowest, taking about 3 times as long as the first two. ",beldaz,https://dba.stackexchange.com/users/13111,http://dba.stackexchange.com/questions/102456/postgresql-bytea-vs-smallint,TECHNOLOGY,dba.stackexchange.com 6003,What's the maximum will a soldier can have per rank? How much willpower does an operative gain per rank?,"I'm trying to make a squad of superhumans to fight the alien scum. To that end I would like to maximize my soldiers' will by reloading at the end of the mission until I'm satisfied with the result. How much will can an operative gain per rank? What's the maximum will a soldier can have at each rank up? Bonus questions: how likely is a soldier to get the maximum will increase when ranking up? What about high rank soldiers that come as mission rewards? ",kotekzot,https://gaming.stackexchange.com/users/19827,"All rookie soldiers start with 40 Will and gain Will increases as they gain ranks. They suffer a decrease in Will when they suffer a critical wound in battle. Therefore, there isn't really a single low number to worry about, as it varies by each rank. Also, a Squaddie (or any other low ranked soldier) who has been critically wounded can eventually gain enough Will back to be a successful soldier. The table below shows the low and high Will values a soldier can have, by rank. By checking each soldier against the table, you can determine if their will is too low for the rank they have. I've included the low and high Will values for when the Iron Will upgrade has been purchased. However, I'm not certain how helpful those will be, as you generally purchase that upgrade after your soldiers have been promoted a few times, so you won't expect to see values as high as the columns indicate. I created the table using the following assumptions: Each soldier gets a fixed +2 per level. Each soldier gets a random +1d6 per level (iRandWillIncrease=6 in the ini file). Each soldier gets another fixed +2 per level when the Iron Will upgrade is purchased (iBaseOTSWillIncrease=2 in the ini file). Each soldier gets another random +1d4 per level when the Iron Will upgrade is purchased (iRandOTSWillIncrease=4 in the ini file). (See http://wiki.tesnexus.com/index.php/XCOM:EU_DefaultGameCore.ini_settings for the ini values.) Iron Will Rank L H L H Rookie 40 40 40 40 Squaddie 43 48 46 54 Corporal 46 56 52 68 Sergeant 49 64 58 82 Lieutenant 52 72 64 96 Captain 55 80 70 110 Major 58 88 76 124 Colonel 61 96 82 138 The Second Wave options Not Created Equally and Hidden Potential change all of this. Not Created Equally changes the starting Will from a fixed 40 to a random number between 25-60. Will increases stay the same. Hidden Potential changes the Will increases (and all other stat increases) to be random, so there will be a much larger variation of Will values among your soldiers. The above table can still be used to check whether you have a soldier who is better or worse than ""normal"", though. Source. ",kotekzot,https://gaming.stackexchange.com/users/19827,http://gaming.stackexchange.com/questions/143912/whats-the-maximum-will-a-soldier-can-have-per-rank-how-much-willpower-does-an,CULTURE,gaming.stackexchange.com 5571,Offline WordPress post editor/creator,"I have a WordPress site hosted on my personal server. I will be unavailable by Internet for a little while, and I'd like to write up some posts for my blog. Normally, you need to be connected to WordPress to start writing the blog, and it will do offline-saving automatically. But this is limited to one entry, per tab. I could use Notepad, but it doesn't have spell check built in. I could use Microsoft Word, but the ""Paste from Word"" leaves a lot to be desired. What I'm looking for is a program that does the following: Start a new post while offline Lets me edit posts I created already with the program Spell check Uploads new posts when I reconnect Has the same features as the online editor (i.e. toolbars, WYSIWYG and code editor) Free (as in beer) Works on either Windows or Mac OSX Bonus features: Edit posts currently on the website (with an offline copy) ",Canadian Luke,https://softwarerecs.stackexchange.com/users/258,"As I recall the SU blog runs on wordpress, and I was using windows live writer to post on it. Its part of windows essentials, works with WP blogs and if I recall correctly did/does most of what you have listed there Start a new post while offline - yes Lets me edit posts I created already with the program yes (though I can't remember if it edits uploaded posts) Spell check - and grammar check Uploads new posts when I reconnect - yes Has the same features as the online editor (i.e. toolbars, WYSIWYG and Code editor)kind of - it has its own UI but its broadly compatible and in some ways better Free (as in beer) yes Works on either Windows or Mac OSX - windows only ",Journeyman Geek,https://softwarerecs.stackexchange.com/users/125,http://softwarerecs.stackexchange.com/questions/2696/offline-wordpress-post-editor-creator,SCIENCE,softwarerecs.stackexchange.com 1644,Errors when attempting to install a sharepoint 2010 feature,"I'm attempting to install and activate a feature containing a Timer Job. When I execute the install-spfeature cmdlet I get the following error. What is the source of my error? PS C:\Users\crmadmin> install-spfeature AltirisOpsListFeature Install-SPFeature : Required tag 'http://schemas.microsoft.com/sharepoint/:Feat ure' is missing from XML file 'feature.xml', found 'Feature' instead. At line:1 char:18 + install-spfeature <<<< AltirisOpsListFeature + CategoryInfo : InvalidData: (Microsoft.Share...tInstallFeature: SPCmdletInstallFeature) [Install-SPFeature], ArgumentException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletInstallF eature The feature folder has been added to the 14\Template\Features directory, the Feature.xml file exists and is the following, <?xml version=""1.0"" encoding=""utf-8""?> <Feature xmlns:dm0=""http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core"" dslVersion=""1.0.0.0"" Id=""58dce6e3-0444-4122-8aa6-08e35345e03e"" FeatureId=""58dce6e3-0444-4122-8aa6-08e35345e03e"" ImageUrl="""" ReceiverAssembly=""$SharePoint.Project.AssemblyFullName$"" ReceiverClass=""$SharePoint.Type.bde159bf-eac9-44cd-a06a-df7bfb0e912e.FullName$"" Scope=""Site"" SolutionId=""00000000-0000-0000-0000-000000000000"" Title=""AltirisOpsListFeature"" Version="""" DeploymentPath=""$SharePoint.Project.FileNameWithoutExtension$_$SharePoint.Feature.FileNameWithoutExtension$"" Xmlns=""http://schemas.microsoft.com/VisualStudio/2008/SharePointTools/FeatureModel"" /> I appreciate any assistance. ",1c1cle,https://sharepoint.stackexchange.com/users/7711,"The namespace of your Feature element is wrong. It should be: xmlns=""http://schemas.microsoft.com/sharepoint/"" And the next problem you're going to run into if this is how the file looks in SharePointRoot is that a lot of the attributes has tokens that isn't replaced by the real values. It seems as if the project has been created using the tool from hell (VseWss for VS 2008) and hasn't been upgraded properly see lab for upgrading here ",Per Jakobsen,https://sharepoint.stackexchange.com/users/990,http://sharepoint.stackexchange.com/questions/33351/errors-when-attempting-to-install-a-sharepoint-2010-feature,TECHNOLOGY,sharepoint.stackexchange.com 7871,The mechanics of Aspects on weapons/armor?,"Fate Core suggests one way to differentiate weapons and armor is by giving each one an Aspect. Daggers could be Quick, for instance, and maces could be Armor Piercing. I really like this idea. My question is, how would this actually work mechanically? I'm trying to picture how this would tie into ""Creating an Advantage"" or how it would modify attack rolls or shifts. A few examples to help fuel thinking caps: Quick Dagger vs. Heavy Greatsword? Long Spear vs. Balanced Longsword? Any thoughts? ",kevlar1818,https://rpg.stackexchange.com/users/6051,"It would simply give you excuses for invokes and compels, based on the aspect text. Nothing less, nothing more. — Wesroth attacks Quadron using his longsword, with Fighting 3 — Ok but Quadron has a Long Spear, here's a compel for you, this fate point says Wesroth spends this exchange trying to close in with Quadron, struggling to find an opening. — Good call, but no, I refuse your compel. Here's a fate point, Wesroth does manage to attack despite the long spear Wesroth:Attack: [Roll + + - ·] + [Fighting 3] = +4(Great) Quadron:Defend: [Roll + - · ·] + [Fighting 2] = +2(Fair) — Whoops, that's physical stress box #2 for me …err… Quadron. Fortunately Quadron can take it and live. — Not so fast, Wesroth has a Balanced longsword, and I invoke it. He feints an attack but flips the sword and uses the pommel to push Quadron's spear aside, easily getting inside his guard. That brings my roll into a fantastic +6. I guess that's a #4 stress box, which Quadron doesn't have — Oh cr*p! … … and it goes on like this ",edgerunner,https://rpg.stackexchange.com/users/554,http://rpg.stackexchange.com/questions/19783/the-mechanics-of-aspects-on-weapons-armor,CULTURE,rpg.stackexchange.com 4805,Why do Football players prefer to use their family name?,"I read that in Western countries, people prefer their first name over their family name, that is why they put their first name first, in form first name + family name For example Wayne Rooney, Steven Gerrard, ... This is contradicts with Eastern countries, where people full name is of form family name + first name But in Football (or Soccer in America), you can see in the uniform that they use their family name only. For example Rooney, Gerrard, ... Why is that? ",onmyway133,https://english.stackexchange.com/users/27111,"Because back in the days when they first invented putting names on jerseys, there would have been too many ""John's"" and ""James's"" and ""Tom's"" (and ""Dick's"" and ""Harry's"") to keep everyone sorted out. First names in the US have become much more creative since then, but the tradition stands. ",Oldbag,https://english.stackexchange.com/users/99368,http://english.stackexchange.com/questions/222066/why-do-football-players-prefer-to-use-their-family-name,CULTURE,english.stackexchange.com 9583,What is the Gorel Hagra?,"What is it? How is it performed? May one perform it? And, if so, when may it be used? ",yydl,https://judaism.stackexchange.com/users/128,"As I've heard it, it involves opening a Tanach to a random verse; I heard something it specifically being some Amsterdam printing of the Tanach (anyone back me up here?). There are some famous stories about its use, though these may be no more than hearsay: One rabbi who got the verse, ""do not use witchcraft or divinations!"" When Rabbi Joseph Breuer was ill and needed an additional name, they found the verse ""Shimon and Levi are brothers""; his ""brother"" in leading the KAJ community was Rabbi Shimon Schwab, so he became Levi Joseph Breuer. I think there's one with R' Aharon Kotlar, debating coming to America in 1941, and finding (Exodus 4:27) ""Hashem told Aharon, go greet Moshe in the desert"", referring to Rabbi Moshe Feinstein (who had made it to America in 1936). H/t Alex (see comments below). As far as how/when/why to use it, eh good question. ",Shalom,https://judaism.stackexchange.com/users/21,http://judaism.stackexchange.com/questions/1774/what-is-the-gorel-hagra,CULTURE,judaism.stackexchange.com 3926,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? ",dwjohnston,https://boardgames.stackexchange.com/users/7687,"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 chaos can in theory help both sides. ",Wolfkin,https://boardgames.stackexchange.com/users/5614,http://boardgames.stackexchange.com/questions/24688/does-the-plot-thickens-make-the-game-easier-or-harder,CULTURE,boardgames.stackexchange.com 7185,event horizons are untraversable by observers far from the collapse?,"Consider this a followup question of this one In the classical schwarszchild solution with an eternal black hole, the user falls through the event horizon in finite local time, but this event does take place for distant observers in the infinite future. As Leonard Susskind explains, measurements of objects near the horizon are subject to large uncertainties, since all the radiation used to see them is largely red-shifted and received in increasingly large intervals in the future. This is why in some still vaguely defined sense, the effective event horizon grows, even if no matter has actually yet crossed the original event horizon (the stable event horizon after the black hole collapse period) But when the event horizon radiates, the event horizon must recede faster than any infalling observer. Any infalling matter will probably be still stir-fried by the hawking radiation over the eons the evaporation takes (which in the observer frame is intensely blue shifted). The only matter that ever gets to be inside the formal event horizon (not the effective horizon) before the final evaporation is the matter that was already in the original collapsing star, around which the event horizon formed Is there still any room to say otherwise? can still be argued that matter will fall in the event horizon in finite time for distant observers (faster than the evaporation will shrink the event horizon)? ",lurscher,https://physics.stackexchange.com/users/955,"It's key to remember that the observer outside of the black hole will never see you fall into the black hole. However, this observer can jump into the black hole himself, and see what happened to you. Outside of the black hole, since he is unable to receive light signals from you, he may say that you have stopped at the event horizon. But since he can go in and see you (assuming you haven't been crushed by the singularity yet), it is a matter of philosophy of whether the infalling observer actually fell in or if he 'froze' at the event horizon. Analogy: If you are accelerating in a rocket, you don't have to believe that time on earth slowed to a stop corresponding to your Rindler horizon. If you wish, you can conclude no such thing. However, it is indisputable that no signals from earth past a certain time will reach you as long as you continue accelerating. But you can stop accelerating and then see what you missed. Similarly, you can 'stop accelerating away from the SC horizon' - i.e. fall into it - and then see all the history of infaller's you missed. You should read the entry on the Usenet Physics FAQ: http://math.ucr.edu/home/baez/physics/Relativity/BlackHoles/fall_in.html ",Mark M,https://physics.stackexchange.com/users/11176,http://physics.stackexchange.com/questions/33833/event-horizons-are-untraversable-by-observers-far-from-the-collapse,SCIENCE,physics.stackexchange.com 5724,Log out user to change home dir and then re login - Linux,"I'm trying to change git user's home directory using: sudo usermod -d /home/git git However, the response I receive is: ""user git is currently logged in"". How can I logout that user, change the home directory and then login it again? Thanks ",Lucia,https://superuser.com/users/49421,"You can edit the account database directly, using vipw. The file format is described in passwd(5). ",grawity,https://superuser.com/users/1686,http://superuser.com/questions/604627,TECHNOLOGY,superuser.com 6713,Counter-warding: how to know where wards are?,"Pro players seem to have some sixth sense when counter-warding, but I always seem to fail. For observer wards, you can try the usual ward spots (runes/rosh/hills).... however, if your five-man push fails because the enemy saw you coming, there are a lot of possible ward spots you may have walked by. And how about countering sentry wards to protect a riki/gondar/brood? ",Robert Fraser,https://gaming.stackexchange.com/users/3074,"It is pretty complex answering here without posting a tons of images. So I copy only the summary picture and suggest you to read this well written guide: Wardposition Guide on PlayDota. It contains a lot of in-game screenshots that explain in detail the positioning. Red Pins: Wards with runesight Orange Pins: Wards to block creep camps Pink Pins: Wards to monitor important places Blue Pins: Wards with basesight ",Drake,https://gaming.stackexchange.com/users/730,http://gaming.stackexchange.com/questions/47787/counter-warding-how-to-know-where-wards-are,CULTURE,gaming.stackexchange.com 3553,Why are my recovered images only 160x120 pixels?,"I am trying to recover some lost images, and with all the programs I've tried, some of the photos resulted to be in a 160x120 pixel resolution. What does this mean, and is there any possibility to recover photos in original dimensions? Any help is appreciated. ",cprogcr,https://photo.stackexchange.com/users/10908,"As others have noted, you are seeing ""thumbnails"". The originals are very likely to be there and depending on what was done to the storage medium after the photos were written, some or all may be still recoverable. File recovery programs vary widely in capability. Some are fully free, some cost substantial money. I have found that the best free ones are as good as you could hope for. Sometimes you may need to try a number of free programs to find one that works best in your situation. On one occasion I found that the fully free Undelete 360 worked superbly when nothing else did. Worth a go. On that occasion, from a largish flash card (16 GB?) I recovered not only most of the photos the user had ""lost"" when they formated the card and then continued to use it, but also many going back a year+ that they had copied and then deleted on various past occasions. You may find that some other program works better in your case, but this is a good starting point. A typical 'Undelete 360' pre-recovery screen is shown below - deleted files are shown (where possible) by name, size etc, plus likely recovery status - here you can see ""very good"", Bad and Overwritten estimates of file quality. If the storage media is used to write more files to after deletion or formating the chances of ecovery fall as files are fullyt or partially overwritten. ",Russell McMahon,https://photo.stackexchange.com/users/6263,http://photo.stackexchange.com/questions/25820/why-are-my-recovered-images-only-160x120-pixels,LIFE_ARTS,photo.stackexchange.com 2739,Solving a two point boundary problem for a piecewise system of equations,"I'm trying to solve a two point boundary value problem with a piecewise system of equations like: dx[t_] := Piecewise[{{0, y[t] <= 0}, {x[t]^(3/4) - x[t], y[t] > 0}}] dy[t_] := Piecewise[{{0, y[t] <= 0}, {(1 - y[t])/x[t]^(1/4) + y[t], y[t] > 0}}] NDSolve[{x'[t] == dx[t], y'[t] == dy[t], x[0] == 1, y[10] == 2}, {x, y}, {t, 0, 10}] which produces the error NDSolve::bvdisc: NDSolve is not currently able to solve boundary value problems with discrete variables. I tried the answers here by entering funs = ParametricNDSolveValue[{x'[t] == dx[t], y'[t] == dy[t], x[0] == 1, y[10] == yt}, {x, y}, {t, 0, end}, yt] FindRoot[funs[yt][end], {yt, 2}] which yields the same error. Is there any way to solve this system? Thanks for the help. ",Mauricio,https://mathematica.stackexchange.com/users/19635,"There is no need to use Piecewise because both $x(t)$ as well as $y(t)$ remain non negative. Furthermore, the equation for x is independent of y and can be solved analytically. The result $x(t)$ is then put into the equation for $y(t)$ which will be solved numerically. Finally we verify our first statement about the non-negativity. Ok, here we go. The eqution for $x(t)$ is sx = DSolve[x'[t] == x[t]^(3/4) - x[t] && x[0] == 1, x[t], t] We can safely ignore the error messages; they are just information which is not relevant here. (* Out[105] = {{x[t] -> E^-t (-2 + E^(t/4))^4}, {x[t] -> E^-t ((-1 - I) + E^(t/4))^4}, {x[t] -> E^-t ((-1 + I) + E^(t/4))^4}} *) Taking the real-valued solution xx[t_] = x[t] /. sx[[1]] (* Out[106]= E^-t (-2 + E^(t/4))^4 *) Plot[xx[t], {t, 0, 30}] Now solving numerically the equation for $y(t)$ using the previously obtained function $xx(t)$: sy = NDSolve[y'[t] == (1 - y[t])/xx[t]^(1/4) + y[t] && y[0] == 10, y[t], {t, 0, 50}][[1]] $\{y[t]\to \text{InterpolatingFunction}[\{\{0.,50.\}\},<>][t]\}$ Works out smoothly, no precision problems. Here's the function itself yy[t_] = y[t] /. sy $\text{InterpolatingFunction}[\{\{0.,50.\}\},<>][t]$ Finally ploting both functions together, magnifying $x(t)$ by a factor of ten for better visibility: Plot[{10 xx[t], yy[t]}, {t, 0, 30}, PlotRange -> {-1, 20}, PlotLabel -> ""blue x(t), red y(t)""] Nice problem. Hope this helps. Regards, Wolfgang ",Dr. Wolfgang Hintze,https://mathematica.stackexchange.com/users/16361,http://mathematica.stackexchange.com/questions/59205/solving-a-two-point-boundary-problem-for-a-piecewise-system-of-equations,TECHNOLOGY,mathematica.stackexchange.com 3588,Zero point fluctuation of an harmonic oscillator,"In a paper, I ran into the following definition of the zero point fluctuation of our favorite toy, the harmonic oscillator: $$x_{ZPF} = \sqrt{\frac{\hbar}{2m\Omega}} $$ where m is its mass and $\Omega$ its natural frequency. However, when I try to derive it with simple arguments, I think of the equality: $$E = \frac12 \hbar\Omega=\frac12 m \Omega^2 x_{ZPF}^²$$ (using the energy eigenvalue of the $n=0$ state) giving me: $$x_{ZPF} = \sqrt{\frac{\hbar}{m\Omega}} $$ differing from the previous one by a factor $\sqrt2$. I am just puzzled, is it a matter of conventions or is there a fundamental misconception in my (too?) naive derivation? ",Learning is a mess,https://physics.stackexchange.com/users/16890,"You can find the value of zero point fluctuations just by calculating the variance $\langle(\Delta\hat{x})^2\rangle = \langle\hat{x}^2\rangle$ in the vacuum state. You can do this either using the $x$-representation or expressing the $\hat{x}$ operator using creation and annihilation operators. These are usually introduced by $$ \hat{a} = \sqrt{\frac{m\Omega}{2\hbar}}\left(\hat{x}+i\frac{\hat{p}}{m\Omega}\right), $$ so that you get $$ \hat{x} = \sqrt{\frac{\hbar}{2m\Omega}}(\hat{a}+\hat{a}^\dagger). $$ Using this to calculate $\langle\hat{x}^2\rangle = \langle 0|\hat{x}^2|0\rangle$ indeed gives you $$x_{ZPF} = \sqrt{\langle\hat{x}^2\rangle} = \sqrt{\frac{\hbar}{2m\Omega}}.$$ ",Ondřej Černotík,https://physics.stackexchange.com/users/12623,http://physics.stackexchange.com/questions/46925/zero-point-fluctuation-of-an-harmonic-oscillator,SCIENCE,physics.stackexchange.com 6721,Sort ListBox C#,"So I have a Class ""Video"" and The users enter the video name and rate different aspects of it using a numericupdown control. There is a button that the users click and the score for the video is calculated and the video, with it's score, and number ratings for each aspect, is added to a ListBox which just shows the name. So what I want to do, is have a button, that when clicked, sorts the list by checking the score each video got, sorting the list from highest score to lowest score. I am using visual studio 2010 and coding in C#. Thanks in advance. ",cb1295,https://stackoverflow.com/users/815634,"videos = videos.OrderByDesc(x => x.Score).ToList(); Then set this sorted collection as datasource to ListBox. Edit: to answer your question from comments. You should separate presentation from data, ie have some data structures to hold data, not storing them in UI. So use for example: List<Video> videos - this collection is filled from DB, XML, NetFlix webservice, whatever. After filling this collection, bind it tu UI, in your case ListBox. Then, if you want to sort it, just use code i have posted. ",Tomas Voracek,https://stackoverflow.com/users/313199,http://stackoverflow.com/questions/6603556/sort-listbox-c-sharp,STACKOVERFLOW,stackoverflow.com 4526,Why do I have to update to the most recent iOS version?,"I have an iPhone 4s that is still running iOS 5.1.1. Why is it not possible for me to update my device to a newer version of ios without going all the way to the latest? ",Dave Long,https://apple.stackexchange.com/users/133295,"Apple has decided to remove previous versions when a new (replacement) is released. You could scan the web and find other versions from someone else but not from Apple. ",Buscar웃,https://apple.stackexchange.com/users/46541,http://apple.stackexchange.com/questions/192862/why-do-i-have-to-update-to-the-most-recent-ios-version,TECHNOLOGY,apple.stackexchange.com 7232,php escape sequence not working,"I just want to echo out some text on the webpage display with a tab space before a word. I have the following codes in php: <?php echo ""\t\t hello!<br>""; echo ""\t\t"", ""hello!<br>""; echo ""\t\t"".""hello!<br>""; ?> I tried all sorts of combinations, but it just won't show the tab spacing before the word. OUTPUT: hello! hello! hello! I visited some links like: Newline escape sequence not working on php but I am not echoing it from a function. I just simply want to echo it out from a .php file. ",user3437460,https://stackoverflow.com/users/3437460,"When you add a tab to html, it is only visible on the source code and then treated as whitespace when rendered in a browser.... just like \n is only visible in page source code and treated as whitespace when rendered... \t and \n are meaningless to html ",DLastCodeBender,https://stackoverflow.com/users/4280662,http://stackoverflow.com/questions/27111279/php-escape-sequence-not-working,STACKOVERFLOW,stackoverflow.com 8217,MVC4 jQuery UI does not work,"I cannot get jQuery UI working in my ASP.NET MVC4 application. I tried dialog and datepicker. Here is part of the code of my view. <link href=""../../Content/themes/base/jquery.ui.all.css"" rel=""stylesheet"" type=""text/css"" /> <script src=""../../Scripts/jquery-1.5.1.min.js"" type=""text/javascript""></script> <script src=""../../Scripts/jquery-ui-1.8.11.min.js"" type=""text/javascript""></script> <script language=""javascript"" type=""text/javascript""> $(document).ready(function () { alert('A'); //$('#datepicker').val('test'); $('#datepicker').datepicker(); alert('B'); }); </script> <h1>Test</h1> <form id=""testForm"" action=""#"" method=""get""> <input type=""text"" id=""datepicker"" name=""datepicker"" class=""datepicker"" /> </form> The alert A is displayed. When I uncomment the next row, the value test is assigned. But datepicker is not working and alert B does not display. Thanks, Petr ",Petr,https://stackoverflow.com/users/958557,"I spent lots of time to figure out how to make it working. Finally the steps are following: Create ASP .NET MVC4 project Internet Application. Clean some of the last lines of the _Layout.cshtml so it should look like this <footer> <div class=""content-wrapper""> <div class=""float-left""> <p>&copy; @DateTime.Now.Year - My ASP.NET MVC Application</p> </div> </div> </footer> @RenderSection(""scripts"", required: false) Change header like I did here <head> <meta charset=""utf-8"" /> <title>@ViewBag.Title - My ASP.NET MVC Application</title> <link href=""~/favicon.ico"" rel=""shortcut icon"" type=""image/x-icon"" /> <meta name=""viewport"" content=""width=device-width"" /> @Styles.Render(""~/Content/css"") @Styles.Render(""~/Content/themes/base/css"") @Scripts.Render(""~/bundles/jquery"") @Scripts.Render(""~/bundles/jqueryui"") @Scripts.Render(""~/bundles/modernizr"") <script type=""text/javascript""> $(document).ready(function () { // We will test DataPicker $('#datep').datepicker(); // We will test TABS $(function () { $(""#tabs"").tabs(); }); }); </script> </head> Delete all code after @section featured { section and add some html to Home/Index.cshtml A. Put some code from the view source link of http://jqueryui.com/tabs/ page (It is inside of < div id=""tabs"" > ... < div >) B. Add this < div > Date: < input id=""datep"" type=""text"" / > < / div > DONE!!! ",Academy of Programmer,https://stackoverflow.com/users/196919,http://stackoverflow.com/questions/13112519/mvc4-jquery-ui-does-not-work,STACKOVERFLOW,stackoverflow.com 1396,Open Source Scripting Languages that work well with Microsoft SQL Server,"I have been using PHP for a number of years now and have found it to be (relatively) well documented, easy to work with, to setup and to use. One of its main advantages is its capablility of working, without many modifications, similarly on a Windows or *nix platforms. It also has good support for connecting to Microsoft SQL Servers, in particular 2005 + 2008 through the mssql module + ntwdblib.dll or FreeTDS. That being said, the more time I spend developing PHP, the more I feel the need to pick up another scripting language to broaden my skill set and to develop better web-based applications. Because of this I've spent some time exploring alternative scripting languages in an effort to evaluate their suitability. At present the biggest hurdle I have come accross is support provided by recent versions of the Open Source scripting languages, specifically: Python 3.2.2, Ruby 1.9.2, Node 0.5.7 for the Windows OS (WinXP in my case) and Microsoft SQL Server (2005 + 2008). My existing working environ necessitates the requirement for connecting to a MSSQL database. I'm looking for answers from developers who have experience working with either Python, Ruby or Node.js and using them to interacting with a MS SQL Server. What would be your recommended Open Source scripting language which has good support for MS SQL Server. Ideas welcome. -P. ",paperclip,https://stackoverflow.com/users/156406,"Both Ruby and Python should be able to connect to MS SQL databases. Python libraries: PyTDS pymssql Ruby libraries: TinyTDS - doesn't seem to be DBI compliant, but there is an ActiveRecord adapter. ",millimoose,https://stackoverflow.com/users/41655,http://stackoverflow.com/questions/7610815/open-source-scripting-languages-that-work-well-with-microsoft-sql-server,STACKOVERFLOW,stackoverflow.com 7798,Paying for mortgage points vs investing that money,"First time home buyer here. So I've been reading about points and how an up-front payment can save you money in the long term. At first, the numbers seem pretty convincing. For example, pay $5000 upfront for a whopping saving of $20,000 over 30 years. ... But if you took that $5000 and invested it, wouldn't you get a lot more than that over 30 years, even at a modest return rate of 6-7%? Suddenly points seem worthless. Is my math wrong? Is there some other advantage regarding points that I'm missing? ",anon,https://money.stackexchange.com/users/3505,"Let me give you the benefit of my experience. I paid a bunch of points (4) when I bought my first house for similar reasons than you mentioned including: Lower interest rate would result in savings over life of 30yr loan I had a big capital gain from cashing out stocks for the house down payment and the points (as interest) would offset the tax liability. Why I wish I hadn't: (1) Interest rates plummeted (not as likely to happen today) and I wound up refinancing the loan within the fist 10 years negating the savings that I would have had over the life of the loan. Also, it made me feel stupid for paying close to $5K to knock 1% or so off the loan rate only to have an even lower rate offered to me with no points within a decade. (2) I didn't take into account that I'm the type of person who would try to pay the loan off early, and I did. Way Early. So even if I hadn't refinanced, the extra points were really a waste of money. (3) In the US, at least, you can't always deduct ALL of the money you paid in points in the first year. You may have to spread that deduction over several years. (4) You are right about the alternative being better (investing the points), since the benefit of paying them is at most 1-2% on your loan, you don't even need a 6-7% return to make it a better deal to invest them. HOWEVER, I get skeptical when people compare paying interest to returns on invested money like that. If you don't pay the points will you actually invest that money for the 30 years (or whatever the term of the loan is)? It's easy to say that when you are talking theoreticals, but $5k in your pocket is also pretty tempting when the deal is done. Good luck with the new house! ",JohnFx,https://money.stackexchange.com/users/149,http://money.stackexchange.com/questions/9620/paying-for-mortgage-points-vs-investing-that-money,LIFE_ARTS,money.stackexchange.com 139,I want to build a portable railgun and I'm a complete rookie,"I'd like to enter the world of electronic hobbies by making a railgun, and so far I know that I understand the basics of the device and that I need high amounts of direct current. However, I am puzzled, as to where to begin calculating. I'd like to set myself X amount of joules/kjoules of electric energy and work from that, but I know stuff like rail length and how the rails push eachother apart would affect performance, so I'd like to know; How Farads relate to Joules (I know the J/V^2 formula but that wasn't clear enough)? Should I opt for a single powerful capacitor or a bunch of smaller ones, especially since I want to unload the charge as fast as possible? What kind of conductive metal should I use that would be both conductive enough for acceleration and durable enough to resist the recoil and other forces involved? How should I cool it or deal with the heat? Would there be much heat to begin with in a portable railgun? Would ABS coating be a proper body for the gun, protecting the user from the lethal amperages that will be involved? How exactly does rail length help the case, as I would use a bipod for a long rifle if that will increase my efficiency? Would it be a better idea to have conductive bullets, insulated bullets with discarding and conductive sabots, or a stable aperture that will simply stop at the end of the barrel by whatever means I can come up with while letting the unbound insulated bullet out? Should I keep my circuit simple as to just use switches, a battery, capacitor, and some LEDs, or are there more efficient circuit components? I'd like to have a control mechanism that lights the Red LED when it is charging, green when it is charged, how can I do that? In my simple sketchup of the circuit I have V-switches (don't know the technical name) aligned in a way that the lights should light correctly during the course of my planned three stage trigger, but better ideas are obviously welcome. Will a capacitor lose its current when neither of the ends are connected to a complete circuit but both of them have wires attached to them? I am guessing not but better safe than sorry. Is there a way to make sure the capacitor has depleted its entire charge? What would be a good idea to improve safety and efficiency? Thanks in advance! ",lychnus,https://electronics.stackexchange.com/users/23933,"A 10g projectile moving at 100m/s has a kinetic energy given by 1/2 m (v^2), ie 50J. Assume 10% efficiency, so you need to supply 500J from the capacitor bank. Assume we're using your 16milifard suggested number. Rearrange F = J/V^2 to V = sqrt(J/F). That yields a comparatively modest 176V. Of course, that's the energy in fully charging them, and you can't use all of it due to the voltage drop. Assume a 50cm rail and a stationary projectile to start (in practice they're launched in mechanically). By s = (v1 + v2) t/2 that gives us 1/100s time of acceleration. That yields an instantaneous power of 50kW and current of ~280A. Delivering that kind of current requires extremely low resistance wiring and busbars and will be quite hard to achieve in a portable design. I suspect that a practical design will use a higher voltage to offset this problem and offset the voltage drop as the capacitors discharge. Perhaps only the top 10-20% of charge can be used effectively. Putting switches in the power path is to be avoided as the current will tend to weld them shut. Heat issues: one shot will dump a few hundred J of heat into the rails and air around them. Air cooling will do for low rates of fire. Safety: is a relative term. You're never going to get this thing CE approved. Shrouding the whole thing in ABS (or PVC piping) to keep fingers away from high voltage, temperature, and moving parts is a good start. I'd apply an insulating varnish or conformal coating to all exposed metal on the internals (except rail active surfaces) as well, as an attempt at double-insulation and to keep out moisture. Charge indicator: this is really the least of your problems. Start with a voltmeter. Cap discharge: they will stay charged to lethal voltages! ""Bleeder resistors"" are usually used to drain them off. Note that discharging a 500J pack through a 1W resistor will have to take at least 500 seconds. Voltmeter comes in handy here for watching the discharge. Sabot: I don't think this is normally done, and it complicates the whole thing hugely. Construction: you have a bit of a mechanical engineering problem in ensuring that the rails are securely fixed but at the same time electrically isolated from each other and the chassis. You can get insulators to fit around screws and bolts, but the clearance required to do this at kV levels may be a problem. Getting the rails parallel enough and contacting the projectile without too much friction or arcing is also going to be a problem. ",pjc50,https://electronics.stackexchange.com/users/2228,http://electronics.stackexchange.com/questions/69366/i-want-to-build-a-portable-railgun-and-im-a-complete-rookie,TECHNOLOGY,electronics.stackexchange.com 3506,Securely Connecting to SQL Azure,"According to this page, All communications between Microsoft Azure SQL Database and your application require encryption (SSL) at all times. If this is the case, what is the difference between using the standard connection string of: server.database.windows.net and requiring security and using the ""Secure Connection String"" of: server.database.secure.windows.net ",KevenDenen,https://stackoverflow.com/users/116927,"The link you posted talks about validating the SSL Certificates used to make the Sql Connection to validate that a ""man in the middle"" attack cannot get your Sql UserName/Password. http://en.wikipedia.org/wiki/Man-in-the-middle_attack It is your application that needs to validate the SSL Certificate to validate it is coming from SqlAzure. I don't see how changing the hostname and not requiring security will keep you safe. ",Mike Burdick,https://stackoverflow.com/users/4283637,http://stackoverflow.com/questions/27867023/securely-connecting-to-sql-azure,STACKOVERFLOW,stackoverflow.com 6333,Is it possible to setup a web tab in Salesforce which will go to this KB without needing to login using username and password?,"We have a Web KB that is built in PHP. Is it possible to setup a web tab in Salesforce which will go to this KB without needing to login using username and password? I initially thought that SAML may help and that I can use salesforce as identity provider. However, the Service Provider PHPKB does not support SAML. I am thinking of getting session ID from salesforce and pass it to KB for autohentincation. However, I don't know how to do it. just a theory ",user5380,https://salesforce.stackexchange.com/users/5380,"There are multiple approaches possible depending on what level of configurability/ code access you have on the PHP side and how you want to integrate with Salesforce. There's a PHP Toolkit for Force.com which supports multiple authentication schemes including LDAP, Radius, Active Directory etc. This link provides a good tutorial on how to deal with auth part when integrating an external PHP app with Salesforce. There's also an option to use Force.com Canvas for your external PHP applications. Canvas apps usually authenticate via either oAuth or signed requests. You can read more about it here. If you have tried these and are facing any issues, please let me know and I may be able to help further. ",Gaurav Kheterpal,https://salesforce.stackexchange.com/users/10881,http://salesforce.stackexchange.com/questions/24595/is-it-possible-to-setup-a-web-tab-in-salesforce-which-will-go-to-this-kb-without,TECHNOLOGY,salesforce.stackexchange.com 1520,How do you open a port on a cisco firewall?,"I'm sure this is simple but how do you open a port on a cisco firewall? I want to use fixup to alias a port and then actually open the port. But I don't know how to do it. Thank you. ",johnny,https://serverfault.com/users/15827,"From the ""priviledged configuration"" command prompt: static (inside_interface_name,outside_interface_name) (external ip address) (internal ip address) access-list (access list name) (""permit"" or ""deny"") (tcp or udp) any host (external_ip) eq (port number) access-group (access list name) in interface (outside_interface) Simple, right? Good old Cisco. The ""Static"" command tells the pix that the internal machine is attached to the external address, so that it will route traffic accordingly. The ""access-list"" command tells the pix that you're creating a new access-list, you're allowing or denying ""any"" external machine to talk to your new external address on (port number) using tcp or udp packets. The access-group command associates that access-list with an interface on the pix. Here is a link to Cisco's Pix Command Reference for Commands starting with A. You can refer to that, if you need to. There is an example command under ""access-group"". To wholly open a port for any machine you should do: access-list open_port_whatever permit tcp any any eq (port number) access-group open_port_whatever in interface (outside) ",Satanicpuppy,https://serverfault.com/users/21416,http://serverfault.com/questions/143379,TECHNOLOGY,serverfault.com 1440,Optimizing wireless router speed and minimizing interference,"I've been experiencing problems with my wireless connectivity lately, and want to make sure that it's not related to the abundance of other wireless routers here in my building. So, what I'm looking for is a method (probably via some application or another) to audit the wireless channels (and other factors that might be important that I don't even know of yet) that are floating through the aether around me. Ubuntu or other linux apps are preferred, but some kind of windows/mac solution is possible, since I do have other OSes around me that I could install & test on. Router: netgear WGT624 v3 Hearsay tells me that channels 1, 6, and 11 are ""non-overlapping"" (I expect they aren't used for non-wireless-router purposes or something, not sure how they couldn't overlap with other routers using other channels), so perhaps my best choices of channel are limited, so if channels aren't really a big concern, I'd be happy to get links to other optimizations that I should look into. ",Kzqai,https://superuser.com/users/7777,"About which channel to use, the book ""Wireless network coexistence"" by Robert Morrow has this to say: In north America, a non-overlapping set consisting of channels 1,6, and 11 or an overlapping set composed of channels 1, 3 5. 7, 9, and 11, can be selected. The corresponding sets in Europe are channels 1, 3, 5, 7, 9, and 11, can be selected. To detect interference, you might use a WiFi finder to map out your environment. This article discusses several such utilities. ",harrymc,https://superuser.com/users/8672,http://superuser.com/questions/57912,TECHNOLOGY,superuser.com 497,"Crossplatform ""jail"" for an application","We currently have a variety of systems (Linux, Solarix, *BSD, HP-UX ...) on which we are not allowed to install anything into / (but I have root access. That's strange, I know). But we'd like to run Puppet on all of them. So, the obvious idea is to install Puppet with all prebuilt dependencies into some isolated tree, something like ""jail"", which will allow to use dependences from some prefix and to access the host system. The big advatanges would be uniform deployment and updates. One solution that came to my mind is to deploy Gentoo Prefix, and install Puppet there with package manager. However, this requires a lot of extra space and some manual patching for each system. Maybe there are some more elegant and simple solutions? ",Alexander,https://serverfault.com/users/140063,"So you can't install things, but you can use Puppet to modify system configuration settings? That seems like a pretty arbitrary rule. You really aren't going to find one cross-platform way of doing this, it's going to be a different setup on each system. ",devicenull,https://serverfault.com/users/61431,http://serverfault.com/questions/435865,TECHNOLOGY,serverfault.com 7772,Where is the Atiyah-Singer index theorem used in physics?,"I'm trying to get motivated in learning the Atiyah-Singer index theorem. In most places I read about it, e.g. wikipedia, it is mentioned that the theorem is important in theoretical physics. So my question is, what are some examples of these applications? ",Eric,https://physics.stackexchange.com/users/37,"The equations of motion, or the equations of instantons, or solitons, or Einstein's equations, or just about any equations in physics, are differential equations. In many cases, we are interested in the space of solutions of a differential equation. If we write the total (possibly nonlinear) differential equation of interest as $L(u) = 0,$ we can linearize near a solution $u_0,$ i.e. write $u = u_0 + v$ and expand $L(u_0 + v) = 0 + L'|_{u_0}(v) + ... =: D(v)$ to construct a linear equation $D(v)=0$ in the displacement $v.$ A linear differential equation is like a matrix equation. Recall that an $n\times m$ matrix $M$ is a map from $R^n$ to $R^m$, and $dim(ker(M)) - dim(ker(M^*)) = n-m,$ independent of the particular matrix (or linear transformation, more generally). This number is called the ""index."" In infinite dimensions, these numbers are not generally finite, but often (especially for elliptic differential equations) they are, and depend only on certain ""global"" information about the spaces on which they act. The index theorem tells you what the index of a linear differential operator ($D,$ above) is. You can use it to calculate the dimension of the space of solutions to the equation $L(u)=0.$ (When the solution space is a manifold [another story], the dimension is the dimension of the tangent space, which the equation $D(v)=0$ describes.) It does not tell you what the actual space of solutions is. That's a hard, nonlinear question. ",Eric Zaslow,https://physics.stackexchange.com/users/20,http://physics.stackexchange.com/questions/1858/where-is-the-atiyah-singer-index-theorem-used-in-physics,SCIENCE,physics.stackexchange.com 1089,Lyx itemize returning to last number,"I would like to have the following output: Text (a) Text Text Text That is, after a subitem, I want to return to the last number without creating a new one. Is there any way to do this without ERT? ",LuizMMB,https://tex.stackexchange.com/users/41960,"Yes, simply use Ctrl-Enter to break the item text. This is like insert \\ in LaTeX. Lyx MWE: LyX 2.0 created this file. For more info see http://www.lyx.org/ \lyxformat 413 \begin_document \begin_header \textclass article \use_default_options true \maintain_unincluded_children false \language english \language_package default \inputencoding auto \fontencoding global \font_roman default \font_sans default \font_typewriter default \font_default_family default \use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 \font_tt_scale 100 \graphics default \default_output_format default \output_sync 0 \bibtex_command default \index_command default \paperfontsize default \use_hyperref false \papersize default \use_geometry false \use_amsmath 1 \use_esint 1 \use_mhchem 1 \use_mathdots 1 \cite_engine basic \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date false \use_refstyle 1 \index Index \shortcut idx \color #008000 \end_index \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \paragraph_indentation default \quotes_language english \papercolumns 1 \papersides 1 \paperpagestyle default \tracking_changes false \output_changes false \html_math_output 0 \html_css_as_file 0 \html_be_strict false \end_header \begin_body \begin_layout Enumerate Text \end_layout \begin_deeper \begin_layout Enumerate Text \begin_inset Newline newline \end_inset \begin_inset Newline newline \end_inset Text \end_layout \end_deeper \begin_layout Enumerate Text \begin_inset Newline newline \end_inset \end_layout \end_body \end_document LaTeX version: \documentclass[english]{article} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \usepackage{babel} \begin{document} \begin{enumerate} \item Text \begin{enumerate} \item Text \\ \\ Text \end{enumerate} \item Text \end{enumerate} \end{document} Edit: If you want the text aligned with the item (a), you are looking for a linguist package as linguex, but there are no module for LyX (but using ERT boxes are not very intrusive in this case): \documentclass{article} \usepackage{linguex} \begin{document} \ex. Text \a. Text \z. Text \ex. Text \end{document} ",Fran,https://tex.stackexchange.com/users/11604,http://tex.stackexchange.com/questions/177214/lyx-itemize-returning-to-last-number,TECHNOLOGY,tex.stackexchange.com 3845,How to configure ssh tunneling with Putty between two RHEL servers?,"I'm trying to allow ssh access from a remote RHEL server to a local RHEL box via Win/Putty gateway. Basically, I'd like to be able to do 'ssh localhost -p 512' on a remote server so that it would connect to the RHEL server in the local network. The local network is beyond a firewall so I can connect from my Win PC to the remote server with Putty/ssh but not vice verse. LclSrv----WinXP/Putty-----||-----RmtSrv So, I've added the following tunneling settings to the current RmtSrv session in Putty (actually I use Kitty but doesn't matter): R512 LclSrv:22 I expect that this would create a process on the remote server that listens port 512 and transfers the connections to a local network/LclSrv port 22. After pressing start button, Putty opens a regular ssh terminal session successfully but nothing happens. (options show active port forwarding). I've checked with netstat -l that port 512 is not listening on RmtSrv. ssh on this port returns 'connection refused'. What am I doing wrong? May be there is something in the sshd_config that needs to be changed in order to allow the tunneling? Could it be user privileges on RmtSrv that prevents me from creating tunnels? I have sudo btw. Cheers, Vlad. ",spoonboy,https://serverfault.com/users/201265,"Local port forwarding scenario (rmtsrv has access to WinXP): What you want to do in ssh terms is forward a local port to another machine and allow other hosts (rmtsrv) to connect to it. So you set up local WinXP:512 to forward to lclsrv:22. So in Putty's Tunnel settings be sure to check Local ports accept connections from other hosts and add source port 512 with the destination lclsrv:22 to the forwarded ports. Edit to accommodate comment: Remote port forwarding scenario (WinXP has access to both srvs): The configuration you suggest should work. r512 LclSrv:22 Is correct. I'd guess the issue is with the sshd security settings on rmtsrv. Check if this is enabled: AllowTcpForwarding yes If you want to enable access to the forwarded port for others on rmtsrvs network: GatewayPorts yes The config usually resides in '/etc/ssh/sshd_config ",AndreasT,https://serverfault.com/users/24526,http://serverfault.com/questions/558831,TECHNOLOGY,serverfault.com 8559,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$$ The derivative of $y$ is: $$\frac{dy}{dx} = \frac{2}{5} - \frac{x}{125}$$ Then I integrate and end up with an expression the length of $\pi$. Am I on the right track? ",Luke Taylor,https://math.stackexchange.com/users/86007,"All lengths should be in the same units, say metres. Let the radius $r$ of the cask, at height $h$ above the ground have equation $r=ah^2+bh+c$. When $h=0$ we want $r=\frac{3}{10}$. When $h=\frac{1}{2}$ we want $r=\frac{4}{10}$. When $h=1$ we want $r=\frac{3}{10}$. Putting these into $r=ah^2+bh+c$ and solving the three simultaneous equations in $a,b,c$ gives $$r = \frac{3}{10}+\frac{2}{5}h-\frac{2}{5}h^2$$ Using the formula for the volume of revolution, we get $$V = \pi \int_0^1 \left(\frac{3}{10}+\frac{2}{5}h-\frac{2}{5}h^2\right)^{\!2} \mathrm{d}h = ~???~\mathrm{m}^3$$ ",Fly by Night,https://math.stackexchange.com/users/38495,http://math.stackexchange.com/questions/901283/find-volume-of-cask,SCIENCE,math.stackexchange.com 9607,Best practice for avoiding module / theme / profile name clashes?,"We currently have our code managed such that each site has its own theme and install profile. These have naturally evolved in such a way that the names of these items (and their directories) tend to be the same. For example, one site's theme and profile are both called 'dennis' This causes problems with feature servers, and (I'm suspecting) with Aegir. Now... it's relatively easy to rename either of these (although, for various reasons it's noticeably easier to rename the profile). Is there any sort of best practice here, ie is it normal to call the theme dennis_theme, or the profile dennis_profile? Should I apply this convention to both, or just to one? ",Parsingphase,https://drupal.stackexchange.com/users/497,"In my office we usually have a site key that gets used for most things. Client: Acme Company & Co Key: acme Site Folder: /path/to/WebServer/sites/acme Custom Modules: acme_tweaks, acme_forms, acme_blocks, acme_settings Theme: acme_theme Repo: acme.git etc... For code that we re-use from site to site, we ensure that it's generalized and client ambiguous and then add it to some common modules that are part of our default module set - such as: theme_tweaks template_suggestions Our rule is that unless it can be applied to all our client sites (at least moving forward) then it shouldn't go in theme_tweaks but in acme_tweaks etc. ",electblake,https://drupal.stackexchange.com/users/463,http://drupal.stackexchange.com/questions/851/best-practice-for-avoiding-module-theme-profile-name-clashes,TECHNOLOGY,drupal.stackexchange.com 5718,Proxy.pac myIpAddress() returns local address and not ethernet adapters,"This is kinda a Part two from here. When clients VPN into my network they get assigned an Ip address which in turn gives them the 252 option from the DHCP. The auto detect then grabs this file What I need essentially is a way for the proxy.pac to figure out if a client is on a VPN connection so that it can resolve a DIRECT for them. So if I do a simple var myIp = myipAddress() and then just have it match it from a list of these fixed addresses then it would be solved. However the myIpAddress() function seems to be picking up the local Ip to the machine (eg: 192.168.10.1) and not the network adapter. In my case that local address is my MS Loopback which is needed for some of my local VMs. If I disable my Loopback adapter it starts resolving the correct address. This is not an ideal workaround. So how do I go about resolving the Ip address I want from the correct adapter? I have been conducting this testing from my local machine for now. I am aware that it is not a closed VPN solution, it is just what has been decided at the moment. Thanks in advance... ",Qwerty,https://serverfault.com/users/9492,"Unfortunately, getting myIpAddress() to return the correct address in Windows does involve changing the priority of the NICs (in Windows XP this is in the ""Advanced Settings..."" dialog of the ""Advanced"" menu of the ""Network Connections"" dialog). Here's someone else's problem that looks like what you're seeing: http://www.geurtsrus.com/gerke/2005/01/proxy-auto-configuration-blues.html You might do better to detect the IP address that need proxying, rather than the ones that don't (i.e. local subnets in the company) and assume DIRECT otherwise. Another alternative would be to pass a different PAC DHCP option to clients on the VPN. That might be easy if your VPN users are coming out of a dedicated subnet, but it might not be if they're coming out of a LAN subnet. ",Evan Anderson,https://serverfault.com/users/7200,http://serverfault.com/questions/37459,TECHNOLOGY,serverfault.com 2515,Was Toad's slime attack meant to do more than kill Jean Grey in X1?,"During the short sequence between Jean Grey and Toad. Seeing Toad spit his slimy substance on Jean's face, was it strictly supposed to suffocate Jean Grey or was it also meant to carry an odor to make Jean suffocate quicker? I heard it was written in the script that it was supposed to knock her out. Was it intentionally to gross Jean out with the ick factor? ",user21951,https://scifi.stackexchange.com/users/21951,"The script definitely does not say that: Suddenly, Toad lands in front of Jean, grabs her head and before she can react, his tongue launches at her face. His tongue covers her face with an ADHESIVE SLIME. Jean falls to the ground. Toad looks back at the main entrance, sees Cyclops emerging and LEAPS up, out of frame. ANGLE ON: Cyclops stumbles out of the smoke filled building. Seeing Jean lying on the ground, he runs to her. Cyclops turns Jean on her back, ready to perform CPR. He is shocked, the slime has now hardened to Jeanís face. She is suffocating. He desperately tries to pry it off. So, it was merely meant to immobilize and suffocate her. No smell or ick attack. ",DVK-on-Ahch-To,https://scifi.stackexchange.com/users/976,http://scifi.stackexchange.com/questions/48713/was-toads-slime-attack-meant-to-do-more-than-kill-jean-grey-in-x1,LIFE_ARTS,scifi.stackexchange.com 6628,Replace multiline string in files,"I have a number of files I want to update by replacing one multi-line string with another multi-line string. Something along the lines of: * Some text, * something else * another thing And I want to replace it with: * This is completely * different text The result would be that after the replacement the file containing the first block of text, will now contain the second string (the rest of the file is unchanged). Part of the problem is that I have to find the list of files to be updated in the file system, I guess I can use grep for that (though again that's not as easy to do with multiline strings) then pipe it in sed maybe? Is there an easy way to do this? Sed is an option but it's awkward because I have to add \n etc. Is there a way to say ""take the input from this file, match it in those files, then replace it with teh content of this other file"" ? I can use python if need be, but I want something quick and simple, so if there is an utility available, I rather use that than write my own script (which I know how to do). ",ventsyv,https://unix.stackexchange.com/users/84023,"Not to strong (because don't chech second string but it easy to settle) and can be is not posix compilant but very simple: sed '/^Some text/{:1;/another thing$/!{N;b 1} s/.*/this is completely\ndifferent text/g}' input.txt First command add lines from Some text until have met another thing then second line change it to other text. NOTE Limitation is that Some text should always be followed by another thing. ",Costas,https://unix.stackexchange.com/users/89144,http://unix.stackexchange.com/questions/181180/replace-multiline-string-in-files,TECHNOLOGY,unix.stackexchange.com 7596,Easiest way to persist data on a PHP page,"I a web application that I am developing (being developed in PHP) when a user posts any request for service the user has to fill in a very length form. Once user fills in the form and submits it another page (confirmation page) is loaded in which all values filled in by user are show. I must point out that at this stage the data is not saved to MySQL yet. Now on this page the user can either save the service request or go back. My problem starts here. When the user goes back. All data filled in is lost. BTW User tend to use Browsers Back button instead of the back button provided on the confirmation page. How can is persist data filled in by user so that user can edit/make changes to data and again submit changed data. ",Yogi Yang 007,https://stackoverflow.com/users/45951,"If you aren't persisting it to the DB yet, one thing you could do is potentially store the values in the user session. So when the user goes forward, save the information into the session, and then when they hit back, load the information from the session. Then when they are finally sure with the dat, you can send it to the DB. ",nstehr,https://stackoverflow.com/users/65864,http://stackoverflow.com/questions/1038572/easiest-way-to-persist-data-on-a-php-page,STACKOVERFLOW,stackoverflow.com 4979,"Is there a word for ""rule by criminals""?","Is there a word for ""rule by criminals""? Not kleptocracy, which is rule by thieves, but more broadly by criminals. ",EdL,https://english.stackexchange.com/users/68265,"You may be interested in kakistocracy, definition from Wiktionary: Government under the control of a nation's worst or least-qualified citizens. ",daturkel,https://english.stackexchange.com/users/68977,http://english.stackexchange.com/questions/156373/is-there-a-word-for-rule-by-criminals,CULTURE,english.stackexchange.com 3218,What is the current flowing through this switch?,"I am looking at a circuit diagram like this: simulate this circuit – Schematic created using CircuitLab Switch 1 and switch 2 never are on at the same time (they alternate) I turn on S2 and shut off S1, then after a while, I turn on S1 and shut off S2. At that point I think I can redraw the circuit like this: simulate this circuit But if I do that, I think the current through the switch would then be zero? And then the switch would be considered ""off?"" Or maybe I could arbitrarily define the current through the switch as being from either the left or right hand side circuits? But that seems to be not possible because originally the switch was shared between both of the circuits. Can someone figure out what is wrong with my reasoning? What should the current through the circuit be in the ""on"" position? Note: ignore the values of the circuit elements, they are not important. ",AAC,https://electronics.stackexchange.com/users/54447,"Do KCL at the node between C1 and L2: simulate this circuit – Schematic created using CircuitLab Then the current through the switch is just the difference (or sum, depending on sign definition) of the current in each of the two LC circuits drawn in the second diagram. It is clear in diagram 1 what is going on but possibly less clear in diagram 2. ",AAC,https://electronics.stackexchange.com/users/54447,http://electronics.stackexchange.com/questions/132001/what-is-the-current-flowing-through-this-switch,SCIENCE,electronics.stackexchange.com 3740,How can I make an X-Y scatter plot with histograms next to the X-Y axes?,"I just saw a nice plot there: How could I implement that in Mathematica — by which I mean the plot structure, not so much the styling. ",Mike Honeychurch,https://mathematica.stackexchange.com/users/77,"This doesn't have the styling and it doesn't yet enforce the plot ranges or implement the regression line, but it's a start: fakeBloombergThing[data:{{_?NumericQ, _?NumericQ}..}] := Grid[{{Histogram[data[[All, 2]], BarOrigin -> Left , AspectRatio -> 5, ImageSize -> 80], ListPlot[data, Frame -> True, AspectRatio -> 1, ImageSize -> 350]}, {Null, Histogram[data[[All, 1]] , AspectRatio -> 1/5, ImageSize -> 350]}}] Some fake data: testdata = RandomVariate[BinormalDistribution[{-1, 1}, {1, 2}, -.6], 100]; fakeBloombergThing[testdata] ",Verbeia,https://mathematica.stackexchange.com/users/8,http://mathematica.stackexchange.com/questions/2984/how-can-i-make-an-x-y-scatter-plot-with-histograms-next-to-the-x-y-axes,TECHNOLOGY,mathematica.stackexchange.com 6881,How do I attach a GPS receiver?,"I would like to hookup a GPS receiver to my Pi so that I can: Get my geographical position Synchronise clock when not connected to network What are my options? Will any hardware supported by gpsd work with the Pi? ",Maria Zverina,https://raspberrypi.stackexchange.com/users/188,"Useful GPS Module for Raspberry Pi Tutorial! ",alex,https://raspberrypi.stackexchange.com/users/2882,http://raspberrypi.stackexchange.com/questions/547/how-do-i-attach-a-gps-receiver,TECHNOLOGY,raspberrypi.stackexchange.com 7892,Chaining deferreds,"I have a lot of functions that currently look like this: function LoadFromURL(url) { var d = $.Deferred(); $.get(url).then(function(text) { LoadFromText(text).then(function(obj) { d.resolve(obj); }, function(err) { d.reject(err); }); }, function(err) { d.reject(err); }); return d.promise(); } This function takes a URL and loads the text within a promise. The text is then passed to the LoadFromText function which returns another promise. If this succeeds, the outer deferred is resolved. If the URL cannot be loaded, or the LoadFromText function fails then the outer deferred is rejected. Is there a way that I can chain the result of the resolve / reject and end up with something like this: function LoadFromURL(url) { return $.get(url).then(function(text) { return LoadFromText(text); }, function(err) { return $.Deferred().reject(err); }).promise(); } I've seen some implementations of promises that allow this - returning a promise within 'then', means that the eventual result of the promise is used. I realise this doesn't work at the moment (the result is the promise, rather than the result of the promise), but hopefully someone can suggest a way to make this work so I can tidy up the sometimes confusing mess of the first example. I hope this makes sense. Thanks. ",Barguast,https://stackoverflow.com/users/283445," Is there a way that I can chain the result Yes, that is the default behaviour of then! function LoadFromURL(url) { return $.get(url).then(LoadFromText); } I've seen some implementations of promises that allow this - returning a promise within 'then', means that the eventual result of the promise is used. jQuery does support this behaviour since version 1.8. For 1.5 to 1.7 you could use .pipe. ",Bergi,https://stackoverflow.com/users/1048572,http://stackoverflow.com/questions/17946391/chaining-deferreds,STACKOVERFLOW,stackoverflow.com 8930,"Google Fonts loading on desktop, but not on mobile?","Per Google PageSpeed's recommendation, I inlined much of my CSS. Previously, I had minified all of my CSS through W3 Total Cache, but now I inlined much of my CSS, plus all of the CSS that controls Google Fonts. Now Google Fonts aren't appearing on mobile devices, but they do appear on desktops. Any reason why this is the case? The mobile screen cap here shows the fonts not loading. <style>@font-face{font-family:'Pathway Gothic One';font-style:normal;font-weight:400;src:local('Pathway Gothic One'),local(PathwayGothicOne-Regular),url(https://fonts.gstatic.com/s/pathwaygothicone/v4/Lqv9ztoTUV8Q0FmQZzPqaA6LSHyyJAN5JIFgwWnj0Az3rGVtsTkPsbDajuO5ueQw.woff2) format(""woff2"");unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20AB,U+20AD-20CF,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Pathway Gothic One';font-style:normal;font-weight:400;src:local('Pathway Gothic One'),local(PathwayGothicOne-Regular),url(https://fonts.gstatic.com/s/pathwaygothicone/v4/Lqv9ztoTUV8Q0FmQZzPqaHT0-GP0evTJPrdxn7U7ioo.woff2) format(""woff2"");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}@font-face{font-family:'Quicksand';font-style:normal;font-weight:400;src:local('Quicksand Regular'),local(Quicksand-Regular),url(https://fonts.gstatic.com/s/quicksand/v5/sKd0EMYPAh5PYCRKSryvW5Bw1xU1rKptJj_0jans920.woff2) format(""woff2"");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}@font-face{font-family:'Roboto Condensed';font-style:normal;font-weight:400;src:local('Roboto Condensed'),local(RobotoCondensed-Regular),url(https://fonts.gstatic.com/s/robotocondensed/v13/Zd2E9abXLFGSr9G3YK2MsIPxuqWfQuZGbz5Rz4Zu1gk.woff2) format(""woff2"");unicode-range:U+0460-052F,U+20B4,U+2DE0-2DFF,U+A640-A69F}@font-face{font-family:'Roboto Condensed';font-style:normal;font-weight:400;src:local('Roboto Condensed'),local(RobotoCondensed-Regular),url(https://fonts.gstatic.com/s/robotocondensed/v13/Zd2E9abXLFGSr9G3YK2MsENRpQQ4njX3CLaCqI4awdk.woff2) format(""woff2"");unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Roboto Condensed';font-style:normal;font-weight:400;src:local('Roboto Condensed'),local(RobotoCondensed-Regular),url(https://fonts.gstatic.com/s/robotocondensed/v13/Zd2E9abXLFGSr9G3YK2MsET2KMEyTWEzJqg9U8VS8XM.woff2) format(""woff2"");unicode-range:U+1F00-1FFF}@font-face{font-family:'Roboto Condensed';font-style:normal;font-weight:400;src:local('Roboto Condensed'),local(RobotoCondensed-Regular),url(https://fonts.gstatic.com/s/robotocondensed/v13/Zd2E9abXLFGSr9G3YK2MsMH5J2QbmuFthYTFOnnSRco.woff2) format(""woff2"");unicode-range:U+0370-03FF}@font-face{font-family:'Roboto Condensed';font-style:normal;font-weight:400;src:local('Roboto Condensed'),local(RobotoCondensed-Regular),url(https://fonts.gstatic.com/s/robotocondensed/v13/Zd2E9abXLFGSr9G3YK2MsDcCYxVKuOcslAgPRMZ8RJE.woff2) format(""woff2"");unicode-range:U+0102-0103,U+1EA0-1EF1,U+20AB}@font-face{font-family:'Roboto Condensed';font-style:normal;font-weight:400;src:local('Roboto Condensed'),local(RobotoCondensed-Regular),url(https://fonts.gstatic.com/s/robotocondensed/v13/Zd2E9abXLFGSr9G3YK2MsNKDSU5nPdoBdru70FiVyb0.woff2) format(""woff2"");unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20AB,U+20AD-20CF,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Roboto Condensed';font-style:normal;font-weight:400;src:local('Roboto Condensed'),local(RobotoCondensed-Regular),url(https://fonts.gstatic.com/s/robotocondensed/v13/Zd2E9abXLFGSr9G3YK2MsH4vxAoi6d67T_UKWi0EoHQ.woff2) format(""woff2"");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}@font-face{font-family:'Roboto Condensed';font-style:normal;font-weight:700;src:local('Roboto Condensed Bold'),local(RobotoCondensed-Bold),url(https://fonts.gstatic.com/s/robotocondensed/v13/b9QBgL0iMZfDSpmcXcE8nBYyuMfI6pbvLqniwcbLofP2Ot9t5h1GRSTIE78Whtoh.woff2) format(""woff2"");unicode-range:U+0460-052F,U+20B4,U+2DE0-2DFF,U+A640-A69F}@font-face{font-family:'Roboto Condensed';font-style:normal;font-weight:700;src:local('Roboto Condensed Bold'),local(RobotoCondensed-Bold),url(https://fonts.gstatic.com/s/robotocondensed/v13/b9QBgL0iMZfDSpmcXcE8nIT75Viso9fCesWUO0IzDUX2Ot9t5h1GRSTIE78Whtoh.woff2) format(""woff2"");unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:'Roboto Condensed';font-style:normal;font-weight:700;src:local('Roboto Condensed Bold'),local(RobotoCondensed-Bold),url(https://fonts.gstatic.com/s/robotocondensed/v13/b9QBgL0iMZfDSpmcXcE8nL8EBb1YR1F8PhofwHtObrz2Ot9t5h1GRSTIE78Whtoh.woff2) format(""woff2"");unicode-range:U+1F00-1FFF}@font-face{font-family:'Roboto Condensed';font-style:normal;font-weight:700;src:local('Roboto Condensed Bold'),local(RobotoCondensed-Bold),url(https://fonts.gstatic.com/s/robotocondensed/v13/b9QBgL0iMZfDSpmcXcE8nAro84VToOve-uw23YSmBS72Ot9t5h1GRSTIE78Whtoh.woff2) format(""woff2"");unicode-range:U+0370-03FF}@font-face{font-family:'Roboto Condensed';font-style:normal;font-weight:700;src:local('Roboto Condensed Bold'),local(RobotoCondensed-Bold),url(https://fonts.gstatic.com/s/robotocondensed/v13/b9QBgL0iMZfDSpmcXcE8nACS0ZgDg4kY8EFPTGlvyHP2Ot9t5h1GRSTIE78Whtoh.woff2) format(""woff2"");unicode-range:U+0102-0103,U+1EA0-1EF1,U+20AB}@font-face{font-family:'Roboto Condensed';font-style:normal;font-weight:700;src:local('Roboto Condensed Bold'),local(RobotoCondensed-Bold),url(https://fonts.gstatic.com/s/robotocondensed/v13/b9QBgL0iMZfDSpmcXcE8nGPMCwzADhgEiQ8LZ-01G1L2Ot9t5h1GRSTIE78Whtoh.woff2) format(""woff2"");unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20AB,U+20AD-20CF,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:'Roboto Condensed';font-style:normal;font-weight:700;src:local('Roboto Condensed Bold'),local(RobotoCondensed-Bold),url(https://fonts.gstatic.com/s/robotocondensed/v13/b9QBgL0iMZfDSpmcXcE8nPX2or14QGUHgbhSBV1Go0E.woff2) format(""woff2"");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215,U+E0FF,U+EFFD,U+F000}</style> Can be seen here. ",eclipsis,https://stackoverflow.com/users/1350424,"You only have definitions for woff2. This probably will not only not work on mobile but as well not in many other Desktop browsers. For example, Internet Explorer requires eot, Safari requires ttf. I think only Chrome uses woff2. Depending on which mobile browser you use you need a different font format. I believe Safari on IOS even uses svg! I think what you did is, you opened the CSS file Google Fonts gave you and simply copied the content. The problem is, this CSS depends on the User Agent. It has different content with the correct font format for the Browser which requested. You could use a tool like http://localfont.com to generate the correct CSS with all font formats. They have different formats for downloading fonts as well only generating CSS for inline use. ",udondan,https://stackoverflow.com/users/2753241,http://stackoverflow.com/questions/28490837/google-fonts-loading-on-desktop-but-not-on-mobile,STACKOVERFLOW,stackoverflow.com 7275,Are scientifically detached professors referred to as ‘clinical’?,"I have come across this term fairly often, where full/associate/assistant professors are referred to by the term ‘clinical’. Given that their departments had nothing to do with medicine, I thought the term referred to the second meaning of clinical: scientifically detached; strictly objective Is this interpretation correct? If yes, isn’t such a branding offensive? ",Sheeba,https://academia.stackexchange.com/users/37947,"Clinical Law Faculty usually supervise one or two law clinics where law students can get practical experience getting indigent or immigrant clients. In this case, ""clinical"" means that their responsibilities are mainly focused in the teaching and running of said clinics and that they are not full faculty in the law school in terms of voting and tenure rights. Clinical Writing Faculty is a term I've recently come across for some professional staff (with PhDs) who work in university writing/tutoring clinics. They help students with their essays and may also teach some composition courses. These people are also not full faculty in terms of voting and tenure rights. Note: ""Adjunct"" is not appropriate for these faculty as they are often full time with renewing terms. ""Visiting"" is inappropriate as they are on renewing terms that could span decades of service. ""Staff"" is inappropriate as they have terminal degrees and are teaching/supervising students. ""Professor of Practice"" is a mostly equivalent term to ""clinical faculty,"" again with the emphasis on teaching rather than research. ",RoboKaren,https://academia.stackexchange.com/users/14885,http://academia.stackexchange.com/questions/49759/are-scientifically-detached-professors-referred-to-as-clinical,LIFE_ARTS,academia.stackexchange.com 781,Is pretending to want to trade before playing a monopoly card objectionable?,"In Settlers of Catan, I sometimes try to ask people if they want to trade a certain resource, tricking them into revealing the approximate amount of that resource in everyone's hand. After this I play the monopoly card. This has on some occasions not been received very well. Is this fair play? ",Matthijs Wessels,https://boardgames.stackexchange.com/users/117,"To counter the move, I make it clear at the begining of the game that if you ask if I have any brick, I may not tell you the truth. If you ask if I want to trade, that's a different question, and I can say no without implying I don't have any. I may also say, 'maybe,' when I don't have the requested resource, then turn down the ensuing trade offer. Doesn't work if you're playing with people with good memories, but how many of us pay scrupulous attention to every resource people pick up? ",shawnschirmer,https://boardgames.stackexchange.com/users/967,http://boardgames.stackexchange.com/questions/577/is-pretending-to-want-to-trade-before-playing-a-monopoly-card-objectionable,CULTURE,boardgames.stackexchange.com 5451,Is there any documentation about using Client ID / Token with REST API to access Group and Professional Editions?,"I have seen information about using Token with SOAP API, but REST API documentations doesn't say anything about it. Did anybody find useful hints on getting Token to work with Rest API? ",Mark Kofman,https://salesforce.stackexchange.com/users/55," If you have a partner app you should now be able to get your OAuth client whitelisted for api access, talk to your contact in the partner group. Source: Does the REST API support Client ID? ",Daniel Ballinger,https://salesforce.stackexchange.com/users/102,http://salesforce.stackexchange.com/questions/6/is-there-any-documentation-about-using-client-id-token-with-rest-api-to-access,TECHNOLOGY,salesforce.stackexchange.com 9346,What's the common cause for trojan downloaders on linux servers?,"On several of the webservers i'm responsible for there's a javascript virus, a trojan downloader according to the antivirus i'm using. It's a minified javascript that's on the bottom of every page requested from the server. I don't know what the cause is. How can I prevent this from happening again? ",Valentin Brasso,https://serverfault.com/users/38439,"Well, learn how to either protect your servers (if the server was hacked) or write safe application code (if that was injected via the application, like ""SQL injection"" - you may want to google for that). If using third party softweare, update versions - maybe some popular piece you use is outdated with known security holes. There is no general answer. Some bot picked one of the hundreds of possible errors / security holes and installed itself into your website. Hope noone sues you ;) Especially if not maintaining your applications. ",TomTom,https://serverfault.com/users/37059,http://serverfault.com/questions/124986,TECHNOLOGY,serverfault.com 1987,Why are the ringwraiths fearful of coming in contact with water?,"At least twice in LoTR:FotR, ringwraiths cower away from bodies of water. The second time (the ford of Bruinen) can be explained away by their fear of some Elvish magical trap through the enchantment of the water; but what about the first time, at the ferry? One of the Nazgul could have easily made the jump onto the barge and quickly dispatched those pesky Hobitsses. ",einpoklum,https://scifi.stackexchange.com/users/16835,"It is common in folklore for evil or ""unnatural"" creatures to be unable to cross running water. For example, this is a traditional attribute of vampires: http://en.wikipedia.org/wiki/Vampire Tolkien himself noted that this idea was difficult to sustain for the Ringwraiths. In particular, they would have had to cross the river Greyflood (which had no bridge or ferry) in order to travel from Mordor to the Shire. (I don't have the citation to hand, it may have been in Unfinished Tales.) He seems to have gone ahead with it anyway, in order to emphasise that the Ringwraiths were inhuman, undead creatures. ",Royal Canadian Bandit,https://scifi.stackexchange.com/users/21600,http://scifi.stackexchange.com/questions/48656/why-are-the-ringwraiths-fearful-of-coming-into-contact-with-water,LIFE_ARTS,scifi.stackexchange.com 154,Solving the recurrence relation $T(n)=4T\left(\frac{\sqrt{n}}{3}\right)+ \log^2n$,"How we calculate the answer of following recurrence? $$T(n)=4T\left(\frac{\sqrt{n}}{3}\right)+ \log^2n.$$ Any nice solution would be highly appreciated. My solution is: $n=3^m \to T(3^m)=4T(\frac{3^{m/2}}{3})+log^2 3^m = O(Log^2 n log n log n)$ ",Mouna Mokhiab,https://math.stackexchange.com/users/170408,"Introduce the auxiliary (sub)sequence $(S(k))$, defined for every $k\geqslant1$ by $$S(k)=4^{-k}\cdot T(3^{2^k-2}),$$ then the recursion on $(T(n))$ becomes $$S(k)=S(k-1)+4^{-k}\cdot(\log(3^{2^k-2}))^2,$$ for every $k\geqslant2$, that is, $$S(k)=S(k-1)+4^{-k}\cdot(\log3)^2\cdot(2^k-2)^2=S(k-1)+(\log3)^2\cdot(1-2^{-(k-1)})^2.$$ Since $(\log3)^2\cdot(1-2^{-(k-1)})^2\to(\log3)^2\ne0$ when $k\to\infty$, this yields $$S(k)\sim(\log3)^2\cdot k,$$ that is, $$T(3^{2^k-2})\sim(\log3)^2\cdot k\cdot4^k.$$ Let $n=3^{2^k-2}$, then $2^k=2+\log_3n$ hence $2^k\cdot\log3\sim\log n$, thus, $4^k\cdot(\log3)^2\sim(\log n)^2$, and $k\sim(\log\log n)/\log2$, hence $$T(n)\sim(\log\log n)(\log n)^2/(\log2),$$ in particular, $$T(n)=\Theta((\log\log n)(\log n)^2).$$ One sees that $T(n)$ is $O((\log\log n)(\log n)^2)$ and that $T(n)$ is not $O((\log n)^2)$. ",Did,https://math.stackexchange.com/users/6179,http://math.stackexchange.com/questions/902759/solving-the-recurrence-relation-tn-4t-left-frac-sqrtn3-right-log2n,SCIENCE,math.stackexchange.com 2628,where to put .sty and .cls file for project,"I want to use my own .sty and .cls file in a project. I know of the following two possibilities of placing them: in my local tex tree (or the general tex tree, which is worse) in the same directory as the .tex file Both of these I find unsatisfactory for the following reasons: The local tex tree is unsatisfactory since the .sty file is specific for the project, so I want it to be close to the project, so I easily remember where it is etc. Also, I am using dropbox to synchronize the project files between different computers automatically, so the .sty file should be in the dropbox folder. The 'same directory' is unsatisfactory since the project is in a directory with many subdirectories. The .tex files in all these subdirectories should be able to access the same .sty file. What I would like to do is: create a subdirectory 'style files' in the project directory, where I put style and class files (there are several for the project), then tell tex somehow where to find them. How can I do this? I am using a recent TexLive on Mac OS X.6 I know there have been questions about placement of .sty files, but I did not find an answer to this question. ",Daniel,https://tex.stackexchange.com/users/9171,"there is a third possibility and for projects the best one: put all in a texmf directory which is located inside your documents directory. Then do a export TEXMFHOME=texmf before running pdflatex or something else and the texmf tree will be searched first. Inside this local texmf you must have the same TeX Directory Structure as usual: http://tug.org/tds For a local texmf tree you do not need to run texhash because files are searched recursively in that tree ",Herbert,https://tex.stackexchange.com/users/2478,http://tex.stackexchange.com/questions/34203/where-to-put-sty-and-cls-file-for-project,TECHNOLOGY,tex.stackexchange.com 940,What impedances do graphics cards expect on H-Sync and V-Sync for VGA monitors?,"I have a graphics card for a laptop whose driver kills itself if it runs for longer than two minutes with no external monitor attached. To solve that, I decided to make a sort of dummy plug that would be detected as a monitor by PC. I have managed to find out what impedances video card expects for most of the pins, but for H-Sync and V-Sync, Google brought up numerous conflicting answers, mostly from people who are guessing. ",AndrejaKo,https://electronics.stackexchange.com/users/1240,"According to the VESA Plug and Display standard, which uses compatible electrical signaling for analog video, the host is supposed to detect a minimally-capable monitor by looking for 75 Ohm termination on the video lines. Anything beyond basic functionality is determined by reading EDID information over the I2C lines. Because EDID is so old, the video card may not even bother checking for a monitor without it. You could probably fool the video card into believing a monitor with any desired capability is present with an appropriately programmed I2C EEPROM or microcontroller. ",Theran,https://electronics.stackexchange.com/users/1409,http://electronics.stackexchange.com/questions/61517/what-impedances-do-graphics-cards-expect-on-h-sync-and-v-sync-for-vga-monitors,SCIENCE,electronics.stackexchange.com 3748,How many times do the two given curves intersect at the origin?,"I'm reading/studying on my own a book about algebraic curves. I'm trying to find a way for Mathematica help me with the following (the book, ISBN: 038731802X, allows me to use any CAS / program. Here is a question: How many times do the two given curves intersect at the origin? $\quad(a)\quad y = x^3$ which I can rewrite as $y-x^3 = 0$ $\quad(b)\quad y^4 + 6x^3*y + x^8 == 0 $ I can view both curves using: ContourPlot[{y^4 + 6 x^3*y + x^8 == 0, y - x^3 == 0}, {x, -5, 5}, {y, -5, 5}] However, I have no idea how to find the the multiplicity of the zeros at the origin. I'm really stuck. ",Luiz Meier,https://mathematica.stackexchange.com/users/10618,"Count[Solve[y^4 + 6 x^3*y + x^8 == 0 /. {y -> x^3}], {x -> 0}] (* 6 *) ",Dr. belisarius,https://mathematica.stackexchange.com/users/193,http://mathematica.stackexchange.com/questions/57472/how-many-times-do-the-two-given-curves-intersect-at-the-origin,TECHNOLOGY,mathematica.stackexchange.com 736,When should I use archaic and obsolete words?,"I'm learning the English language, and while reading Merriam-Webster I often see common words with additional ""obsolete"" and ""archaic"" descriptions added to their definitions. When should I use them, should I use them at all, and what's the difference between these descriptions? Also, should I spend time to remember these archaic and obsolete meanings? ",Daniel Ganiev,https://english.stackexchange.com/users/722,"You should use obsolete or archaic words when: No other word will serve (as in a scholarly piece about history or linguistics, for example). You want to confuse your audience or make them laugh. You want to sound pretentious or pedantic. ",Robusto,https://english.stackexchange.com/users/2303,http://english.stackexchange.com/questions/28878/when-should-i-use-archaic-and-obsolete-words,CULTURE,english.stackexchange.com 4817,Driving 3 LEDs at 1000mA. Is this circuit / driver ok?,"I want to drive 3 LEDs in Series at constant current of approx 900mA - 1000mA. Will this circuit work? The LEDs are Vf 3.55V @ 1000mA. LED Diagram R1 = 0.25W 100k Ohm Resistor R2 = 2W 0.47 Ohm Resistor Z1 = 4.7V 1.3W 5% Zener Diode Q1 = Fairchild KSP13 Darlington NPN 30V 500mA 625mW transistor - Datasheet: https://www.fairchildsemi.com/ds/KS/KSP13.pdf Q2 = Vishay IRF830PBF Power Mosfet 500V 4.5A 75W - Datasheet: http://www.vishay.com/docs/91063/91063.pdf ",fizzy drink,https://electronics.stackexchange.com/users/35178,"You don't need the zener diode because Q1 will limit the gate drive if too much current is about to be drawn. I think this circuit is intended for a 12V dc supply This looks like it should run from a 12V dc supply just fine. With 1A flowing through the 0.47 ohm source resistor this should just about start to turn on the BJT transistor which will hold the gate voltage at the right amount to maintain the 1A thru the LEDs. Overall volt drop across the MOSFET will be about 0.9V (from a 12V dc supply) so it'll dissipate about 1W in heat - maybe consider a small heatsink. If the dc supply is more like 15V dc then the MOSFET will get considerably warmer and maybe you should consider using a buck type constant current regulator. EDIT - check also the maximum current that the LEDs can take - you might be running them too close if the max current is only a bit above 1 A. If this is the case, increase the 0.47 ohm resistor to maybe 0.68 ohm. A little bit of careful testing might be needed. ",Andy aka,https://electronics.stackexchange.com/users/20218,http://electronics.stackexchange.com/questions/99298/driving-3-leds-at-1000ma-is-this-circuit-driver-ok,TECHNOLOGY,electronics.stackexchange.com 2355,Integrate a division of polynomials,"Hi I have the following integral: $$\int \frac{2x}{x^2+6x+3}\, dx$$ I made some changes like: $$\int \dfrac{2x+6-6}{x^2+6x+3}\, dx$$ then I have: $$\int \dfrac{2x+6}{x^2+6x+3}\, dx -\int\dfrac{6}{x^2+6x+3}\, dx$$ and thus: $$\ln(x^2+6x+3)-\int\dfrac{6}{x^2+6x+3}\, dx$$ Ok, I have decomposed $$\frac{2x}{x^2+6x+3} $$ in: $$ \frac{3+\sqrt6}{\sqrt6(x+\sqrt 6+3)} + \frac{3-\sqrt6}{\sqrt6 (-x+\sqrt6-3)}$$ How can I integrate this expressions? ",Luis Armando,https://math.stackexchange.com/users/162185,"Another idea (just reducing it to another form): Let $$I=6\int \frac{1}{x^2+6x+3} dx=6\int \frac{1}{(x+3)^2-6} dx=\int \frac{1}{(\frac{1}{\sqrt{6}}(x+3))^2-1} dx$$. Now let $$\frac{1}{\sqrt{6}}(x+3)=\cosh a$$, hence using $$\cosh^2 a - 1 = \sinh ^2 a$$ and $$\frac{1}{\sqrt{6}} = \sinh a \frac{da}{dx}\Leftrightarrow dx = da \sinh a \sqrt{6}$$ we get $$I=\int \frac{1}{\sinh ^2 a} da \sinh a\sqrt{6} = \sqrt{6} \int \frac{1}{\sinh a} da$$. EDIT: Can someone please show me how to write bigger LaTeX? EDIT2: Neat! ",Is Ne,https://math.stackexchange.com/users/47912,http://math.stackexchange.com/questions/882692/integrate-a-division-of-polynomials,SCIENCE,math.stackexchange.com 3735,Ad layout for programs - Illustrator or InDesign,"today I'm looking for some advice from folks who have laid out event programs. In this case, the client (a local nonprofit) has a famous keynote speaker at their event, and have solicited donations from local businesses. Each donation over a certain level = a full page ad in the program for the event. Most of them are ""Congratulations to on your anniversary"", etc. with a company logo sitting somewhere (the businesses that send in their own camera-ready artwork will just have them dropped into place). I'm going to be laying each ad out in a template so they look consistent; my question to the GD crowd is, ""Should I lay the template out in Illustrator and bring each ad individually in to InDesign or should I create a template page for an ad in InDesign and lay each ad out in InDesign?"" Based on your experience, what are the pros and cons of each approach? Obviously it would be easier to lay each ad out in Illustrator (that's what it's there for) but I lose a certain amount of flexibility once I hit InDesign (the program will ultimately be laid out in InDesign). ",lawndartcatcher,https://graphicdesign.stackexchange.com/users/575,"Depends entirely upon ad style. If the ads are more illustrative in nature, I'd use Illustrator for the ad, then place then in a master Indesign document. Ads with text transforms, image interactions (cutouts) or with other non-critical design elements such as spot illustrations or flourishes can often be easier to create in Illustrator. If the ads are more text-based, I'd use Indesign for the ads as well as a master document. There is no set rule as to which one is better or should be used - Illustrator or Indesign. It really all comes down to personal preference and features needed. ",Scott,https://graphicdesign.stackexchange.com/users/3270,http://graphicdesign.stackexchange.com/questions/20355/ad-layout-for-programs-illustrator-or-indesign,LIFE_ARTS,graphicdesign.stackexchange.com 741,Is this a bug? Angular removes object params when corresponding input is not valid,"Please see this: http://plnkr.co/edit/soubKCayeLAqgDOel8AL?p=preview <!DOCTYPE html> <html ng-app=""testApp""> <head> <script data-require=""angular.js@1.4.1"" data-semver=""1.4.1"" src=""https://code.angularjs.org/1.4.1/angular.js""></script> <script src=""script.js""></script> </head> <body ng-controller=""testCtlr""> <pre>{{contacts | json}}</pre> <div ng-repeat=""contact in contacts""> <div ng-repeat=""email in contact.emails""> <input type=""email"" name=""email"" ng-model=""email.email""> <input type=""text"" name=""text"" ng-model=""email.text""> </div> </div> </body> </html> var app = angular.module('testApp', []); app.controller('testCtlr', [""$scope"", function ($scope) { $scope.contacts = [ { id:'', name:'', emails:[ { email: 'e1', text: 'fghfgh' }, { email: 'e2', text: 'hjkhjk' } ], } ]; }]); you see if you change the text in the email text box it is removed from the obj unless it is a valid email... ",user1804318,https://stackoverflow.com/users/1804318,"It is not a bug, this is by design. The input type email uses regex to validate email address inputs. If the input is not valid it is removed from the model. On another note - if you wrap your stuff in a form - you can determine the validation state of the inputs. Also, as you are using a repeat, you will need an index. Here is an example of what I mean: <form name=""myForm""> <div ng-repeat=""contact in contacts""> <div ng-repeat=""email in contact.emails track by $index""> <div ng-show=""myForm.email{{$index}}.$invalid"">Invalid email.</div> <input type=""email"" name=""email{{$index}}"" ng-model=""email.email""> <input type=""text"" name=""text"" ng-model=""email.text""> </div> </div> </form> I have updated your Plunker here. These are the validation states you can use: //[formName].[inputFieldName].property myForm.email1.$pristine; // Boolean. True if the user has not yet modified the form. myForm.email1.$dirty // Boolean. True if the user has already modified the form. myForm.email1.$valid // Boolean.True if the the form passes the validation. myForm.email1.$invalid // Boolean. True if the the form doesn't pass the validation. myForm.email1.$error ",Donal,https://stackoverflow.com/users/379855,http://stackoverflow.com/questions/31062344/is-this-a-bug-angular-removes-object-params-when-corresponding-input-is-not-val,STACKOVERFLOW,stackoverflow.com 9002,Can I use an Apple remote to control a keynote presentation?,"Is it possible to use the Apple remote to control Keynote presentations? How so? I have a mid-2010 white plastic unibody MacBook. (I've been told that this isn't supported, but perhaps there are third party solutions.) ",Moshe,https://apple.stackexchange.com/users/638,"Yes - although most people are using the iOS based Keynote Remote these days, the old infrared (which is very thin / physically touchable and very reliable in dark rooms and easily hidden in a hand) works just fine. The Keynote '09 help shows what functions the various buttons will perform when you are in the various modes: Keynote window itself, presentation mode and slide switcher mode. ",bmike,https://apple.stackexchange.com/users/5472,http://apple.stackexchange.com/questions/44359/can-i-use-an-apple-remote-to-control-a-keynote-presentation,TECHNOLOGY,apple.stackexchange.com 8299,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 off, then switch 2 does nothing. ",Doug Porter,https://diy.stackexchange.com/users/255,"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 'in' wire. The next two wires are the traveler. The third wire in the other box at the far end of the traveler is the wire that goes to the Fixture. It sounds like the traveler on the far side of the box might have gotten swapped with one of the wires to the fixture. Just take it apart, figure out which wire is supposed to be which, and put it back together right. ",Karl Katzke,https://diy.stackexchange.com/users/3450,http://diy.stackexchange.com/questions/8240/how-should-i-rewire-a-miswired-3-way-switch,LIFE_ARTS,diy.stackexchange.com 2290,Tic Tac Toe implementation in Objective-C,"First off, here's the code: main.m #import <Foundation/Foundation.h> #import ""PSBoard.h"" #import ""PSPlayer.h"" #import ""PSInputHandler.h"" int main(int argc, const char * argv[]) { @autoreleasepool { NSLog(@""Enter Player 1 Name:""); NSString *playerOneName = [PSInputHandler getString]; NSLog(@""Enter Player 2 Name:""); NSString *playerTwoName = [PSInputHandler getString]; NSLog(@""How many rows and columns will you play with?""); NSUInteger numberOfRowsAndColumns = [PSInputHandler getInteger]; PSPlayer *playerOne = [[PSPlayer alloc] initWithSymbol:PSBoardSymbolX name:playerOneName]; PSPlayer *playerTwo = [[PSPlayer alloc] initWithSymbol:PSBoardSymbolO name:playerTwoName]; PSBoard *board = [[PSBoard alloc] initWithRows:numberOfRowsAndColumns columns:numberOfRowsAndColumns players:@[playerOne, playerTwo]]; do { PSPlayer *currentPlayer = [board playerUp]; BOOL validInputEntered = NO; //Loop until valid input is entered while(!validInputEntered) { //Get input coordinates NSLog(@""%@, enter a row (1-%lu)."", currentPlayer.name, (unsigned long)numberOfRowsAndColumns); NSUInteger row = [PSInputHandler getInteger]; NSLog(@""Now enter a column (1-%lu)."", (unsigned long)numberOfRowsAndColumns); NSUInteger column = [PSInputHandler getInteger]; //Verify that nothing is already placed there PSBoardSymbol symbolOfPlayerAtCoordinates = [board playerAtRow:row-1 column:column-1].symbol; if((symbolOfPlayerAtCoordinates != PSBoardSymbolX && symbolOfPlayerAtCoordinates != PSBoardSymbolO) && row > 0 && row <= numberOfRowsAndColumns && column > 0 && column <= numberOfRowsAndColumns) { [board setPlayer:currentPlayer atRow:(row-1) column:(column-1)]; validInputEntered = YES; } } //Show the board [board display]; } while(!board.winner); NSLog(@""Congrats %@! You won."", [board winner].name); } return 0; } PSBoard.h #import <Foundation/Foundation.h> @class PSPlayer; @interface PSBoard : NSObject @property (nonatomic) NSUInteger rows; @property (nonatomic) NSUInteger columns; @property (nonatomic, strong) PSPlayer *winner; -(instancetype)initWithRows:(NSUInteger)rows columns:(NSUInteger)columns players:(NSArray *)players; -(PSPlayer *)playerAtRow:(NSUInteger)row column:(NSUInteger)column; -(void)setPlayer:(PSPlayer *)player atRow:(NSUInteger)row column:(NSUInteger)column; -(void)display; -(PSPlayer *)playerUp; @end PSBoard.m #import ""PSBoard.h"" #import ""PSPlayer.h"" @interface PSBoard () @property (nonatomic, strong) NSMutableArray *internalBoardRepresentation; @property (nonatomic, strong) NSArray *players; @property (nonatomic, strong) PSPlayer *oldPlayerUp; @end @implementation PSBoard -(instancetype)initWithRows:(NSUInteger)rows columns:(NSUInteger)columns players:(NSArray *)players { if(self = [super init]) { self.rows = rows; self.columns = columns; self.players = players; self.internalBoardRepresentation = [[NSMutableArray alloc] initWithCapacity:rows]; PSPlayer *null = [[PSPlayer alloc] initWithSymbol:PSBoardSymbolNone name:nil]; for(NSUInteger row = 0; row < rows; row++) { NSMutableArray *currentColumn = [NSMutableArray array]; for(NSUInteger column = 0; column < columns; column++) { [currentColumn addObject:null]; } [self.internalBoardRepresentation addObject:currentColumn]; } self.oldPlayerUp = players[0]; } return self; } -(PSPlayer *)playerAtRow:(NSUInteger)row column:(NSUInteger)column { return self.internalBoardRepresentation[row][column]; } -(void)setPlayer:(PSPlayer *)player atRow:(NSUInteger)row column:(NSUInteger)column { self.internalBoardRepresentation[row][column] = player; [self checkForWinner]; } -(void)checkForWinner { NSUInteger numberOfPiecesInARowToWin = MAX(self.rows, self.columns); //Check horizontal lines for(NSUInteger row = 0; row < self.rows; row++) { PSPlayer *playerInFirstColumn = [self playerAtRow:row column:0]; NSUInteger playerPiecesInRow = 0; for(NSUInteger column = 0; column < self.columns; column++) { if([[self playerAtRow:row column:column] isEqualTo:playerInFirstColumn]) { playerPiecesInRow++; } } if(playerPiecesInRow >= numberOfPiecesInARowToWin && playerInFirstColumn.symbol != PSBoardSymbolNone) { self.winner = playerInFirstColumn; return; } } //Check vertical lines for(NSUInteger column = 0; column < self.columns; column++) { PSPlayer *playerInFirstRow = [self playerAtRow:0 column:column]; NSUInteger playerPiecesInColumn = 0; for(NSUInteger row = 0; row < self.rows; row++) { if([[self playerAtRow:row column:column] isEqualTo:playerInFirstRow]) { playerPiecesInColumn++; } } if(playerPiecesInColumn >= numberOfPiecesInARowToWin && playerInFirstRow.symbol != PSBoardSymbolNone) { self.winner = playerInFirstRow; return; } } //Check top left to bottom right diagonal PSPlayer *playerInFirstSlotOfLeftDiagonal = [self playerAtRow:0 column:0]; NSUInteger playerPiecesInLeftDiagonal = 0; for(NSUInteger row = 0, column = 0; row < self.rows; column++, row++) { if([[self playerAtRow:row column:column] isEqualTo:playerInFirstSlotOfLeftDiagonal]) { playerPiecesInLeftDiagonal++; } } if(playerPiecesInLeftDiagonal >= numberOfPiecesInARowToWin && playerInFirstSlotOfLeftDiagonal.symbol != PSBoardSymbolNone) { self.winner = playerInFirstSlotOfLeftDiagonal; return; } //Check bottom left to top right diagonal PSPlayer *playerInFirstSlotOfRightDiagonal = [self playerAtRow:self.rows-1 column:0]; NSUInteger playerPiecesInRightDiagonal = 0; for(NSInteger row = self.rows-1, column = 0; row >= 0; row--, column++) { if([[self playerAtRow:row column:column] isEqualTo:playerInFirstSlotOfRightDiagonal]) { playerPiecesInRightDiagonal++; } } if(playerPiecesInRightDiagonal >= numberOfPiecesInARowToWin && playerInFirstSlotOfRightDiagonal.symbol != PSBoardSymbolNone) { self.winner = playerInFirstSlotOfRightDiagonal; return; } } -(void)display { NSMutableString *displayString = [NSMutableString stringWithFormat:@""\n""]; for(NSUInteger row = 0; row < self.rows; row++) { NSMutableString *rowDisplayString = [[NSMutableString alloc] init]; NSString *innerFillerString = (row == self.rows-1) ? @"" "" : @""_""; for(NSUInteger column = 0; column < self.columns; column++) { NSString *columnSeparator = (column == self.columns-1) ? @"" "" : @""|""; NSString *playerSymbol = ([self playerAtRow:row column:column].symbolStringRepresentation); if(playerSymbol.length == 0) { playerSymbol = innerFillerString; } [rowDisplayString appendString:[NSString stringWithFormat:@""%@%@%@%@"", innerFillerString, playerSymbol, innerFillerString, columnSeparator]]; } [displayString appendString:[NSString stringWithFormat:@""%@\n"", rowDisplayString]]; [rowDisplayString setString:@""""]; } NSLog(@""%@"", displayString); } -(PSPlayer *)playerUp { PSPlayer *nextPlayerUp = self.players[1-([self.players indexOfObjectIdenticalTo:self.oldPlayerUp])]; PSPlayer *previousPlayerUp = self.oldPlayerUp; self.oldPlayerUp = nextPlayerUp; return previousPlayerUp; } @end PSPlayer.h #import <Foundation/Foundation.h> typedef NS_ENUM(NSInteger, PSBoardSymbol) { PSBoardSymbolX = 0, PSBoardSymbolO, PSBoardSymbolNone }; @interface PSPlayer : NSObject -(instancetype)initWithSymbol:(PSBoardSymbol)symbol name:(NSString *)name; @property (nonatomic) PSBoardSymbol symbol; @property (nonatomic) NSString *symbolStringRepresentation; @property (nonatomic, strong) NSString *name; @end PSPlayer.m #import ""PSPlayer.h"" @implementation PSPlayer -(instancetype)initWithSymbol:(PSBoardSymbol)symbol name:(NSString *)name{ if(self = [super init]) { self.symbol = symbol; self.symbolStringRepresentation = (symbol == PSBoardSymbolO) ? @""O"" : ((symbol == PSBoardSymbolX) ? @""X"" : @""""); self.name = name; } return self; } @end PSInputHandler.h #import <Foundation/Foundation.h> @interface PSInputHandler : NSObject +(NSString *)getString; +(NSInteger)getInteger; @end PSInputHandler.m #import ""PSInputHandler.h"" @implementation PSInputHandler +(NSInteger)getInteger { int temp; scanf(""%i"", &temp); return (NSInteger)temp; } +(NSString *)getString { char input[256]; scanf(""%s"", input); return [NSString stringWithUTF8String:input]; } @end So my questions are: In the PSInputHandler.m class, I wasn't so sure about how to get input from the command line. I read that fgets() is a potential alternative to scanf(), but is there any reason for me to use one over the other? The method in PSBoard.m that checks for a winner, checkForWinner, is very long. Is there a simplified design I can use to shorten it? I struggled to name the playerUp method, which returns the player whose turn it is. Is there a more suitable name? When the user inputs which row and column to place an X or O in, I made it so that the coordinates they enter are from 1 to the number of rows and not 0 to the number of rows minus one (like with zero-based array indexing). Is this more user-friendly, or should I change it to zero-based indexing? In PSPlayer.m, I use nested ternary operators. Is this too hard to understand? Should I change it to if statements? When getting the user's input for how many rows and columns to use, which I expect to be an integer, how can I sanitize the input so that the program doesn't crash when a string (for example) is inputted? Any other critique welcome! ",pasawaya,https://codereview.stackexchange.com/users/24129,"I will update this post over the weekend as I go through your question more and come up with some examples to iterate over my points, but I thought for now, I'd answer some of the easier questions. Question 1. I'm not sure and cannot remember (I will try to find out). At the end of the day, you might consider implementing this with a GUI. If you're using Xcode, it's quite easy to develop a GUI for either OSX or iOS, and most of your logic is already in place. You'd just have to write the logic to hook the GUI up to the business logic. Question 2. One immediate thought on speeding up this process would be to use a flag to mark whether or not a row/column is a potential winner. AND, if you do find a row that's a winner, immediately return the winner. For a row to be a winner, every piece in the row must belong to the same player, correct? So set the owner of the piece in the first box, and check every box. As soon as you get to a box that doesn't match the first box, break;. You don't need to check any more boxes in that row/column/diagonal. You can move to the next row/column/diagonal. And if you get to the end of the inner loop and haven't had to break; because you've found the winner, then you can set the winner and return; and stop checking. So basically, refactor into something more like this: for(NSUInteger row = 0; row < self.rows; row++) { PSPlayer *playerInFirstColumn = [self playerAtRow:row column:0]; BOOL winnerFound; for(NSUInteger column = 0; column < self.columns; column++) { if(![[self playerAtRow:row column:column] isEqualTo:playerInFirstColumn]) { winnerFound = false; break; } else { winnerFound = true; } } if (winnerFound) { self.winner = playerInFirstColumn; return; } } This will improve performance some. You can probably still do better, but this is still a drastic improvement, especially for exceptionally large boards. Now... the BEST performance improvement I can think of would actually mean you're running this check after every turn (which you're already doing, right?). In this case, you only need to check ONE row, ONE column, and ZERO, ONE, or TWO diagonals. And this would be a massive performance boost. You only need to check a the row the piece was played in, the column the piece was played in, and the diagonal the piece was played in. Every other row, column, and diagonal has been checked on a previous turn and a winner was not found otherwise the game would be over and we wouldn't've had this turn. AND, even if we modified the rules to continue playing after a winner has been found, you can just use an array to keep track of each row and column and diagonal and who won that row/column/diagonal, and still only need to check the relevant rows (and only check them for the player who played the piece). Question 3. playerUp is probably an alright method name. Maybe activePlayer? If you feel it's not descriptive enough, don't hesitate to leave a comment explaining it. // returns the player whose turn it is Question 4. As a programmer, I am used to 0-based indexing systems, but your assumption is correct. Most people who use programs aren't programs and would be more comfortable with a 1-based coordinate system. Though... back to question 1... if this were given a GUI, it wouldn't matter. ;) Question 5. Personally, I hate the ternary operators and never use them. Whether or not they're acceptable would depend largely on who you're working with though. In this case, it's a simple one. Again, personally, I hate them and I wouldn't use it, because I never use it, but this one is simple enough that if you and everyone working on the project are comfortable with them, then go ahead and keep it. Question 5.1. The exact way you want to handle non-number input is an implementation detail that'd be up to you. Do you want to request another input? Do you want to just strip out the non-numbers and use the numbers that are there? But as for actually checking the string itself, once you've got it into an NSString, it's quite easy: NSCharacterSet *nonNumbers = [[NSCharacterSet decimalDigitCharacterSet] invertedSet]; if([yourString rangeOfCharactersFromSet:nonNumbers].location == NSNotFound) { // string is all numbers and is good to go } else { // string contains non-number characters } ",nhgrif,https://codereview.stackexchange.com/users/36366,http://codereview.stackexchange.com/questions/40820/tic-tac-toe-implementation-in-objective-c,TECHNOLOGY,codereview.stackexchange.com 5720,"Should the public website be inside the VPN, with its associated private website?","On the near future I will have a WordPress blog, public and visible to anyone, that has a members area. This members area accesses some private data on a special database with financial data, so this kind of info should only be viewable to customers of the site. The private site will be running inside a VPN on a business LAN and a little server, and I wonder if hosting that private part together with the public site would be a good idea. In fact, due to WordPress vulnerabilities (it is a desired target right now) I think that if an attacker gains access to the WP site and that's inside the VPN, then he would be able to attack ""from inside"" and eventually he could even access to the private site and its data. Wouldn't it be more appropiate to have the public site outside, on a VPS for example? The members area would be accessed through a secure protocol (HTPPS), and I wonder if there are some recommendations on this subject. ",javipas,https://serverfault.com/users/49697,"The first question is whether the public and private sites actually have to be run together. Ideally they would be run separately, with the public site on an external server and the private site on a server in the LAN. If they have to be run on the same server then the risk of the private data being compromised is the same regardless of whether it is hosted externally or internally. The question is whether the compromised server can be used to access data and systems unrelated to the site. In order to protect against this you want to host the server in a DMZ if you host it internally. ",mgorven,https://serverfault.com/users/115189,http://serverfault.com/questions/390712,TECHNOLOGY,serverfault.com 1921,Have to set multiple displays on every start,"I have a HP DV7 with an ATI graphic card and I have a Samsung monitor connected to the laptop. Every time I turn on the laptop the displays are mirrored and I have to go to the Catalyst control centre (Administrative) and change the displays configuration, I have to do this EVERY TIME I turn on the computer. I Didn’t try the solution suggested here ( Settings for multiple monitors are not stored ) because it took me a lot to make the graphics card work properly and I want to make sure that I have the right solution ( or the ""rightest"") Thanks! ",elunicotomas,https://askubuntu.com/users/77595,"I had a similar problem which I solved quite easily. Although I've a different video card it might works for you. I've set an .xprofile file in my home directory with the following content: xrandr --output LVDS1 --mode 1366x768 --primary xrandr --output VGA1 --mode 1280x1024 --left-of LVDS1 I think the lines are quite self explaining and you could easily modify it so that it fits your situation. A graphical way to setup your screens using XrandR is ArandR The settings will be applied when you log in. ",OrangeTux,https://askubuntu.com/users/38150,http://askubuntu.com/questions/282211/have-to-set-multiple-displays-on-every-start,TECHNOLOGY,askubuntu.com 6248,What happens if I destroy a minipet placed in the Devotion monument in Guild Wars?,"Will I lose my statue? Will I lose my Hall of Monuments point progression? Or is it safe? What happens if I destroy a minipet dedicated at the Hall of Monuments? ",Bastien Vandamme,https://gaming.stackexchange.com/users/7346,"Nothing, once you have dedicated the minipet to your monument, you can trade, give away, or destroy the minipet with no consequences. Your monument statue will always be there and count towards your account. It just can't be rededicated by anyone else. Typically dedicated minipets are worth only 10-20% of the undedicated value because of this reason. ",l I,https://gaming.stackexchange.com/users/3917,http://gaming.stackexchange.com/questions/19224/what-happens-if-i-destroy-a-minipet-placed-in-the-devotion-monument-in-guild-war,CULTURE,gaming.stackexchange.com 5394,Other ways to increment a variable in JavaScript," Possible Duplicate: Why avoid increment (“++”) and decrement (“--”) operators in JavaScript? I'm a big fan of Douglas Crockford and his excellent book, JavaScript: The Good Parts. I also use his JSLint tool on an hourly basis before checking in any code to our repository, as is good sense. One thing I've noticed when running code through JSLint is its insistence that the ++ increment operator is somehow evil. I know I can turn certain rules off, but that's cheating ;). Crockford mentions his dislike on page 112 of JS: TGP... In my own practice, I observed that when I used ++ and --, my code tended to be too tight, too tricky, too cryptic. So, as a matter of discipline, I don't use them any more. I think that as a result, my coding style has become cleaner. That's all very lovely, but he doesn't give any examples of the way he codes them now. I assume he's doing something like... var i; i = 0; i = i + 1; Again, great, but I've got a few basic 'for loops' in my JS code, as I imagine many people have, and I've always used the standard syntax... for (i = 0; i < myArray.length; i++) { // Loop Stuff } Am I missing something? What's the cleanest and/or best way to increment/decrement? ",Daniel Attfield,https://stackoverflow.com/users/545030,"In C/C++ this is important, especially with arbitrary iterators and pre/post increment semantics. Also, random access vs forward-iterators. In Javascript it's more about aesthetics than anything else. Unless you're dealing with strings. ""1""+1 is ""11"". I would say that ++i is an idiom that's worth being consistent with. JSLint is wrong. ",spraff,https://stackoverflow.com/users/458742,http://stackoverflow.com/questions/6594325/other-ways-to-increment-a-variable-in-javascript,STACKOVERFLOW,stackoverflow.com 5033,Tags to Post-ID mysql query. Tag Search,"Im trying to implement a tag-based search. When i specify certain tags, tagged posts will be searched and the post-id will be displayed that matches the searchcriteria. Currently it only works for a single tag. $query = ""SELECT DISTINCT $wpdb->posts.ID FROM $wpdb->terms LEFT JOIN $wpdb->term_taxonomy ON ($wpdb->terms.term_id = $wpdb->term_taxonomy.term_id) LEFT JOIN $wpdb->term_relationships ON ($wpdb->terms.term_id = $wpdb->term_relationships.term_taxonomy_id) LEFT JOIN $wpdb->posts ON ($wpdb->term_relationships.object_id = $wpdb->posts.ID) WHERE $wpdb->term_taxonomy.taxonomy = 'post_tag' "" . $substring; Substring looks like following: $substring = ""AND $wpdb->terms.slug IN ('tag1','tag2')"" And here is the problem. It does not look for single posts that match all criteria. Instead it 'collects' all posts with all tags searched. For example: // postid1 -> tag1 // postid2 -> tag2 // postid3 -> tag1, tag2 $substring = ""AND $wpdb->terms.slug IN ('tag1')"" //Output: postid1, postid3 - - - CORRECT $substring = ""AND $wpdb->terms.slug IN ('tag1','tag2')"" //Output: postid1, postid2, postid3 - - -WRONG! //Expected: postid3 So far i have no idea howto solve it in a single mysql query. Maybe im missing something. Thanks for your help in advance. ",proxylittle,https://wordpress.stackexchange.com/users/2669,"These are normal IN mechanics - it matches anything in set, not all of set combined. Type of match you want is called tag_slug__and in WP query arguments. You can see code that generates SQL for it in source of WP_Query->&get_posts() method. Resulting SQL is like this: SELECT p.ID FROM wp_posts p INNER JOIN wp_term_relationships tr ON (p.ID = tr.object_id) INNER JOIN wp_term_taxonomy tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id) INNER JOIN wp_terms t ON (tt.term_id = t.term_id) WHERE tt.taxonomy = 'post_tag' AND t.slug IN ('is', 'filler') GROUP BY p.ID HAVING count(p.ID) = 2 ",Rarst,https://wordpress.stackexchange.com/users/847,http://wordpress.stackexchange.com/questions/7509/tags-to-post-id-mysql-query-tag-search,TECHNOLOGY,wordpress.stackexchange.com 288,Is this backscatter?,"I noticed a mail is hanging in the mailq, so my question is if that is backscatter. The mail in question: Jul 1 10:38:48 a1a postfix/qmgr[30971]: F2C95230470: from=<compromiseh42@ebok.upc.pl>,size=125817, nrcpt=1 (queue active) Jul 1 10:38:53 a1a amavis[24301]: (24301-10) Blocked BANNED (.exe,.exe-ms,dokument 0503279005.xml.exe), ORIGINATING LOCAL [197.254.27.150] [219.69.130.6] <compromiseh42@ebok.upc.pl> -> <foerster@domain.com>, quarantine: t/banned-tdxHoTNjn7FG, Message-ID: <7316761242.25598.116038936739@lmxmxtcv.ftirrejnsjg.su>, mail_id: tdxHoTNjn7FG, Hits: -, size: 125817, 4642 ms Now postfix is trying to connect to ebok.upc.pl and the connection gets refused. Jul 1 10:47:14 a1a postfix/smtp[23733]: connect to ebok.upc.pl[81.18.192.65]:25: Connection refused Jul 1 10:47:14 a1a postfix/smtp[23733]: 4D1BA2304EF: to=<compromiseh42@ebok.upc.pl>, relay=none, delay=501, delays=501/0.02/0.03/0, dsn=4.4.1, status=deferred (connect to ebok.upc.pl[81.18.192.65]:25: Connection refused) and it keeps trying to connect. ",user345234674567,https://serverfault.com/users/216987,"Yes, that is a backscatter. Your antivirus caught the virus (or a simple ban on exe's), so it sends a bounce saying the email was rejected since it contained a virus (a typical response from an innocent mailserver). The bounce fails as you see, and Postfix will keep trying to deliver it until it times out. ",Nathan C,https://serverfault.com/users/173547,http://serverfault.com/questions/609278,TECHNOLOGY,serverfault.com 6470,Can symmetry be restored in high energy scattering?,"Suppose you have a field theory with a real scalar field $\phi$ and a potential term of the form $\lambda \phi^4 - \mu \phi^2$ that breaks the symmetry $\phi \to - \phi$ in the ground state. Is this symmetry restored in a scattering with high momentum transfer in any physically meaningful way? My problem is that there is no background field for which I could take a mean field approximation, so the usual argument for phase transitions does not work. One thing that came to my mind is that the potential will have higher order corrections, so maybe one could ask which way these corrections work in the limit $\Lambda \to \infty$, where $\Lambda$ is a UV scale? I know the first order correction for small $\phi$ does actually contribute to the breaking rather than to restoration, but then that doesn't seem to be the right limit for the scattering. If you don't know the answer I'd also be grateful for a reference. (Please do not point me to references that are for in-medium effects, nuclear matter etc, as I have plenty of these and it's not addressing my problem.) ",WIMP,https://physics.stackexchange.com/users/1458,"First of all, the vev of $\phi$ scales like a positive power of $\mu$ which has the units of mass. So all the effects of the symmetry breaking scale like a positive power of the mass scale $\mu$. At energies $E$ satisfying $E\gg \mu$, i.e. much higher than $\mu$, the value of $\mu$ itself as well as vev and other things may simply be neglected relatively to $E$: all the corrections from the symmetry breaking go to zero, relatively speaking. In the UV, i.e. at short distances, the dimensionless couplings (and interactions) such as $\lambda$ are much more important than the positive-mass-dimension dimensionful couplings such as $\mu$. It's still true that the high-energy theory wasn't exactly symmetric in the treatment above; it was just approximately symmetric. However, in fact, sometimes it is exactly symmetric under the sign flip of $\phi$. That's because the value of $\mu$ runs, as in the renormalization group, and in many interesting theories, $\mu$ actually switches the sign at energies exceeding some critical energy scale $E_0$. So the high energy theory may have a single symmetry-preserving minimum of the potential and the symmetry breaking may be a result of the flow to low energies. It's legitimate you want to know the higher-loop corrections to the Higgs potential but the subtlety you should appreciate is that all these calculations proceed relatively to some renormalization (mass) scale. If the scale is low, the behavior of the theory at much higher energies may only be deduced by the (inverted) RG flows. However, the deduction of the short-distance theory from its long-distance effective field theory approximation is never exact; it's the high-energy theory that is the legitimate starting point and the low-energy physics is its consequence. ",Luboš Motl,https://physics.stackexchange.com/users/1236,http://physics.stackexchange.com/questions/29216/can-symmetry-be-restored-in-high-energy-scattering,SCIENCE,physics.stackexchange.com 365,What's the difference between Fermi Energy and Fermi Level?,"I'm a bit confused about the difference between these two concepts. According to Wikipedia the Fermi energy and Fermi level are closely related concepts. From my understanding, the Fermi energy is the highest occupied energy level of a system in absolute zero? Is that correct? Then what's the difference between Fermi energy and Fermi level? ",Eddy,https://physics.stackexchange.com/users/10158,"Fermi energy is difference of energies of highest and lowest occupied single state particle. But, Fermi level is the sum of total energy of a particle (i.e) the sum of kinetic and potential energies. ",Raushan Kumar,https://physics.stackexchange.com/users/34033,http://physics.stackexchange.com/questions/30922/whats-the-difference-between-fermi-energy-and-fermi-level,SCIENCE,physics.stackexchange.com 1547,Opening a file on unix using c++,"I am trying to open a file in c++ and the server the progam in running on is based on tux. string filename = ""../dir/input.txt""; works but string filename = ""~jal/dir1/dir/input.txt""; fails Is there any way to open a file in c++ when the filename provided is in the second format? ",Jaelebi,https://stackoverflow.com/users/92682,"Here is a ready piece of code, that performs this task: How do I expand `~' in a filename like the shell does? ",Alex Ott,https://stackoverflow.com/users/18627,http://stackoverflow.com/questions/932519/opening-a-file-on-unix-using-c,STACKOVERFLOW,stackoverflow.com 980,What is the limit on the number of INSERT statements you can paste into SSMS and run?,"I am currently creating a stored procedure that populates a table with a list of insert statements so that my DBAs can export the contents of the table to a text file and then paste the statements into SSMS and run (it is to copy data from test environment to live enviroment - I am constricted by the fact the 2 environments cannot see each other, bcp is not configured on the environment My question is that the table I am going to export could have up to 2,000,000 insert statements. Is there a limit to what can be pasted in and run? ",Mike,https://dba.stackexchange.com/users/32050," bcp is not configured on the environment BCP is an exe that comes with SQL Server. The default path is C:\Program Files\Microsoft SQL Server\100\Tools\Binn\bcp.exe You can refer to my BCP and BULK INSERT script here. I am going to export could have up to 2,000,000 insert statements. SSMS wont be able to support this. You have to use SQLCMD. Highly suggest you to use BCP or SSIS to do the task. ",Kin,https://dba.stackexchange.com/users/8783,http://dba.stackexchange.com/questions/55511/what-is-the-limit-on-the-number-of-insert-statements-you-can-paste-into-ssms-and,TECHNOLOGY,dba.stackexchange.com 3196,Rails not rendering a partial on webpage,"total newbie trying to work through the rails tutorial on lynda.com The code is really short and exactly the way it is on the video, yet I can't get my page to render the partial. When I pull run it on the server it does not render the partial at all, but just skips it. No error messages. Thanks in advance this is edit.html.erb <%= link_to(""<< Back to List"", {:action => 'list'}, :class => 'back=link')%> <div class=""subject edit""> <h2>Edit Subject</h2> <%= form_for(:subject, :url => {:action => 'update', :id=>@subject.id}) do |f| %> <% render :partial => 'form', :locals => {:f => f} %> <div class=""form-buttons""> <%= submit_tag(""Update Subject"")%> </div> <% end %> </div> and this is _form.html.erb <table summary=""Subject form fields""> <tr> <th>Name</th> <td><%= f.text_field(:name) %></td> </tr> <tr> <th>Position</th> <td><%= f.text_field(:position) %></td> </tr> <tr> <th>Visible</th> <td><%= f.text_field(:visible) %></td> </tr> </table> ",James Lin,https://stackoverflow.com/users/714411,"You need the = sign: <%= render :partial => 'form', :locals => {:f => f} %> (you had <% render ....) ",robotcookies,https://stackoverflow.com/users/941500,http://stackoverflow.com/questions/7935510/rails-not-rendering-a-partial-on-webpage,STACKOVERFLOW,stackoverflow.com 4397,Mystery cards in Magic 2015 card list,"If you look at the full card list for Magic 2015, at Gatherer or elsewhere, you'll see a bunch of cards listed with collectors number 270-284. What are these cards, and why are they listed as being part of Magic 2015? I played enough M15 Limited to be pretty sure that they aren't actually present in packs, and they're listed after the basic lands, which is very unusual. Is there some secret, bonus release of M15 that had these extra cards? ",JSBձոգչ,https://boardgames.stackexchange.com/users/156,"You are correct, these cards are not in booster packs. For the past few years, Wizards has put out 30 card sample decks to introduce new players into the game. This year they decided to put into these packs a number of reprinted cards not actually present in M15: see here for decklists. Like the article mentions, the Deck Builder's Toolkit for M15 also has the extra cards. Since putting two of these sample decks together gives a basic 60 card, two-color deck, Wizards expects a number of people to do just that to build their first standard deck. They made those extra cards explicitly standard legal to allow people that option; most people would assume by default that such a deck is playable. ",Michael Snook,https://boardgames.stackexchange.com/users/7613,http://boardgames.stackexchange.com/questions/19165/mystery-cards-in-magic-2015-card-list,CULTURE,boardgames.stackexchange.com 4649,How do I make my camera follow my cube?,"I've recently started to learn some C# scripting in Unity. I've been able to make my PlayerCube move around using Vector3 Transform.translations, but I want my camera to follow my cube while moving around, and it's not working since Unity can't find PlayerCube. How do I make make it so it understands that there's a PlayerCube? using UnityEngine; using System.Collections; public class CameraScript : MonoBehaviour { Player = GameObject.Find(""PlayerCube""); // Use this for initialization void Start () { // GameObject.Find(PlayerCube); } // Update is called once per frame void Update () { Transform.LookAt (PlayerCube); } } ",Sindre,https://gamedev.stackexchange.com/users/63072,"By looking at your script and if it's the exact same in Unity you have a problem with the variable Player (no type and wrong name in Update ()). And you need to pass a Transform and not a GameObject in tranform.LookAt (). using UnityEngine; using System.Collections; public class CameraScript : MonoBehaviour { GameObject Player = GameObject.Find(""PlayerCube""); void Update () { transform.LookAt (Player.tranform); } } I don't recommand making the camera a child of the cube as suggest @dnk-drone.vs.drones. If you only want your camera to look at your object then the transform.LookAt () is what you need. If you want to move the camera with the object you need to write it in your script. You can also use a public reference for your object and drag it by using the Unity inspector. Also, you can watch in the Unity/Standard Assets, a CameraFollow script exist already. ",Dexyne,https://gamedev.stackexchange.com/users/64419,http://gamedev.stackexchange.com/questions/97061/how-do-i-make-my-camera-follow-my-cube,TECHNOLOGY,gamedev.stackexchange.com 6277,Can a Canon T3 DSLR be used with my TAMRON AF TELE-MACRO 90-300mm lens?,"Can a Canon T3 DSLR be used with my Tamron AF tele-macro 90-300mm lens? I am trying to find a lower cost new camera (less than $500) to use with this lens that I previously used with a film camera. 1) Can the Canon T3 be used with this lens? and/or 2) Does anyone have another camera recommendation within this price range to use with this lens? ",Ana Crippa,https://photo.stackexchange.com/users/11531,"You can use this lens, with a few trade offs. 1. You will have to buy a lens mount adapter. Try searching the mount it is in ""to canon ef"" on amazon. 2. Neither autofocus, nor auto exposure will work for this lens. This is because the adapter won't have electrical contacts. Depending on the lens, it may be possible to find an adapter with the contacts, but it will probably cost about ten times as much. Despite these trade offs, using an old lens is great! I use an old 50mm with my canon, and using manual focus forces me to be more creative. You also save a lot of money, by not having to buy a new lens. ",Evan Pak,https://photo.stackexchange.com/users/13254,http://photo.stackexchange.com/questions/27081/can-a-canon-t3-dslr-be-used-with-my-tamron-af-tele-macro-90-300mm-lens,LIFE_ARTS,photo.stackexchange.com 4990,Bulk exporting/archiving collections in Lightroom,"Is there any way to export images from my collections, where the images are automatically placed into a folder tree that mimics their collections? I'm not comfortable with having all that organization data locked away in Lightroom -- I switch computers a lot and oftentimes data sidecars like Lightroom's DB get lost in the shuffle. I'd like to export all my images into folders that can then be fed into Crashplan, etc. Ideally I want it to archive only images in each collection that match a Smart search criteria, like 4+ stars. jF's Collection Publisher plugin looks nice but it has its own collection tree that must be maintained separately. This solution is not DRY (Don't Repeat Yourself) enough for me: I don't want to maintain two separate hierarchies of collections. EDIT: To clarify, let's assume I have images sorted in collections as such: < Collection root > |- California | |- Surfers | |- Hipsters | |- Beaches |- Holland |- Windmills |- Stroopwaffels |- Coffeeshops |- Grachten I am looking for something that exports images into a folder tree identical to the one above, without any extra maintenance or work. So JPG or TIFF files would be exported/published to: /Users/tom/Photography/California/Surfers /Users/tom/Photography/California/Hipsters /Users/tom/Photography/California/Beaches /Users/tom/Photography/Holland/Windmills /Users/tom/Photography/Holland/Stroopwaffels /Users/tom/Photography/Holland/Coffeeshops /Users/tom/Photography/Holland/Grachten In accordance with the collections they live in in LR. jF's plugin is nice but it works from its own collection tree, which makes it unsuitable for this kind of request. ",Tom Corelis,https://photo.stackexchange.com/users/11542,"First, note that any Export in Lightroom is a RAW conversion***. So, attempting to get organization data from an export will result in getting that data into the JPG, but losing it in the RAW. A better solution is to use Smart Collections, and have them be generated on metadata that can be associated with both RAW and JPEG. Collections are convenient to create via drag and drop, so creating Smart Collections involves more work. So I create Collections first, then create metadata tags for those images in the Collection, then create a Smart Collection from the tags, I then delete the Collection. This way, XMP sidecars associated from your RAW images contain the metadata for another application to create equivalent of Smart Collections later, and your JPG images also contain this information in IPTC tags. ***Original JPEGs won't get RAW conversion of course ",cmason,https://photo.stackexchange.com/users/4880,http://photo.stackexchange.com/questions/27258/bulk-exporting-archiving-collections-in-lightroom,LIFE_ARTS,photo.stackexchange.com 3110,Shared memory: shmget fails: No space left on device -- how to increase limits?,"I call shmget many times in my program, to get shm of of average size 85840 bytes. I obtain about 32771 shm ok, then shmget doesn't return a shm, but the error: ""No space left on device"". I have increased the kernel limits to: $ sysctl -A|grep shm kernel.shmmax = 33554432 kernel.shmall = 1677721600 kernel.shmmni = 409600 But still get the issue. Why? Do I have to put something into /etc/security/limits.conf too? I only have ""user - nofile 1000000"" because the program also opens about as many files as shms. This is the output of free $ free total used free shared buffers cached Mem: 8150236 7261676 888560 0 488100 3270792 -/+ buffers/cache: 3502784 4647452 Swap: 12287992 554692 11733300 And ipcs $ ipcs -lm ------ Shared Memory Limits -------- max number of segments = 409600 max seg size (kbytes) = 1638400 max total shared memory (kbytes) = 6710886400 min seg size (bytes) = 1 Since I assume shm is capable of being swapped out, there should be enough space. ",j13r,https://serverfault.com/users/64249,"It turns out shmmni is limited to 32768 in the kernel: define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */ in the file ...version.../include/linux/ipc.h So short of recompiling the kernel, that is the hard limit on the number of shared memory segments. Sorry. ",ramruma,https://serverfault.com/users/28126,http://serverfault.com/questions/371068,TECHNOLOGY,serverfault.com 248,How common is it for cameras to have a gyroscope?,"How many cameras apart from the iPhone have a gyroscope for orientation? Am I right to assume that there is a standard way to “tag” an image with the direction the camera was pointing in, as well as the GPS position? Do any cameras have positional tracking better then a GPS? I am thinking about a method to join photos when the subject does not have enough “random” detail for the current software. ",Ian,https://photo.stackexchange.com/users/623,"The gyroscope in an iPhone doesn't actually let you track the direction the camera was facing at the time of a shot. All it does it track motion--it has no frame of reference to determine what point of the compass the camera is actually facing. The ""digital compass"" in the iPhone 3G S onwards can give some idea of that, except that it's designed to be used when the iPhone is more or less flat. It would thus require a mirror to be fitted to the camera lens to be useful, and in any case compass data isn't included in the EXIF info. I would expect that any camera providing directional capabilities would be using an equivalent ""digital compass"" using a magnetometer. ",Endareth,https://photo.stackexchange.com/users/5266,http://photo.stackexchange.com/questions/12121/how-common-is-it-for-cameras-to-have-a-gyroscope,LIFE_ARTS,photo.stackexchange.com 4659,"Good travel games for two players, especially for playing on trains?","I would be interested to hear if anyone had recommendations for 2-player games that are particularly suitable for playing while travelling on trains. (I ask this as someone who mostly enjoys games like Carcassonne, Power Grid, Agricola, Pandemic, etc. around the table at home.) To be specific, the things that I think are important properties for these games are: Needing minimal table space. Most trains have a small table you could use, but not much more. Being quiet to play, so that other passengers won't be disturbed. For example, I imagine that games that involve repeatedly rolling dice wouldn't be appreciated. Packing down small, so that they don't take up much luggage space. Not requiring batteries or a power socket. (I appreciate that an iPhone or a Nintendo DS for each player might be a good solution more generally, but it's not what I'm after in this case.) Not being so delicate to arrange that motion from the train will unduly disrupt the play. I think it would be best to recommend one game (or class of games) per answer, if that's appropriate, and explain why you think it's particularly suitable. (Incidentally, I've read the guidance on good questions about game recommendations and hope this question meets the criteria.) Update: Thanks for so many excellent suggestions - we certainly won't be short of games for our next long train journey :) Update 2: Unfortunately, I can't really playtest this many great games in any reasonable time period, so I'm going to accept the top-voted answer (Cribbage) and try out the others as soon as I can. Thanks again... ",Mark Longair,https://boardgames.stackexchange.com/users/685,"blokus I haven't been on a ton of trains, but blokus should meet your requirements pretty well. The pieces stay well enough on the board you should be fine even with a bumpier ride. ",Gordon Gustafson,https://boardgames.stackexchange.com/users/191,http://boardgames.stackexchange.com/questions/2211/good-travel-games-for-two-players-especially-for-playing-on-trains,CULTURE,boardgames.stackexchange.com 2216,"Can a card be un-cast, if the player realises it was a bad decision?","Let's say a player casts a spell, completely allows it to resolve, and accepts its consequences - then realises that was a bad idea, or there was something better to do. That player realises there was a better card to play, or that the spell will do something they don't want to happen, such as deal enough damage to that player to kill them. Does the caster have the opportunity to go back and fix that mistake (and to stay alive), even though they already accepted the consequences? ",Marath the commander,https://boardgames.stackexchange.com/users/7225,"It would entirely depend on the type of game you're playing. If you're playing in any sort of tournament or other ""serious"" venue, you're SOL. In a casual setting, it would depend on your opponent, I suppose. If they agree to rewind, then you're good. But to put a proper answer in, strict RAW says that once you've done it, you've done it. ",Allen Gould,https://boardgames.stackexchange.com/users/916,http://boardgames.stackexchange.com/questions/15042/can-a-card-be-un-cast-if-the-player-realises-it-was-a-bad-decision,CULTURE,boardgames.stackexchange.com 3842,Presentation of discrete upper triangular group,"Let $G$ be the nilpotent Lie group consisting of matrices $$ \begin{pmatrix} 1 & a_{12} & \cdots & a_{1,n}\\ 0 & 1 & \ddots & \vdots\\ \vdots & \ddots & \ddots & a_{n-1,n}\\ 0 & \cdots & 0 & 1 \end{pmatrix} $$ where $a_{ij}\in\mathbb R$. I would like to find a presentation of the group $\Gamma=G\cap\mathrm{GL}_n\mathbb Z$. The entries on the superdiagonal play a crucial role, in that the $n-1$ matrices with a single $1$ on the superdiagonal ($1$s on the diagonal and $0$s elsewhere) generate all of $\Gamma$. Trying to write down a presentation, I would start by choosing $n-1$ generators, $a_{12},\dotsc,a_{n-1,n}$ (named after the matrix entries). It is also clear that we need commutation relations, like $$ [\cdots[[[a_{12},a_{23}],[a_{23},a_{34}]],\ldots]\cdots]=\cdots=e. $$ (If $n=3$, this would just be $[[a_{12},a_{23}],a_{12}]=[[a_{12},a_{23}],a_{23}]=e$.) I am just not sure, though, if I explicitly need to require that, say, $$ [a_{12},a_{34}]=e, $$ which seems to be directly related to the embedding I am thinking of. I would like a presentation in which any generators can be mapped to any of the matrices with a $1$ in the $(i,i+1)$ position. Is this possible? ",Earthliŋ,https://math.stackexchange.com/users/33855,"There is a paper by D. Biss and S. Dasgupta (A Presentation for the Unipotent Group over Rings with Identity, J. Algebra, vol. 237, 691-707 (2001)) which gives a presentation of the group of upper triangular matrices over $R$ with diagonal entries equal to 1, where $R$ is any ring with identity. (Moreover, in some cases they show that their presentations are minimal both in the sense of having no redundant relations, and in the stronger sense of having the fewest possible number of generators and relations.) In the case $R=\mathbb{Z}$, their generators are the same as the ones in the question above, and the relations are $$[a_{i,i+1},a_{j,j+1}] =1\ \ (i<j-1\leq n-2)$$ $$[a_{i,i+1},[a_{i,i+1},a_{i+1,i+2}]]=[a_{i+1,i+2},[a_{i,i+1},a_{i+1,i+2}]]=1$$ $$[[a_{i,i+1},a_{i+1,i+2}],[a_{i+1,i+2},a_{i+2,i+3}]]=1.$$ ",Shane O Rourke,https://math.stackexchange.com/users/15447,http://math.stackexchange.com/questions/172432/presentation-of-discrete-upper-triangular-group,SCIENCE,math.stackexchange.com 5411,How does Christianity deal with biblical criticism related to the Old Testament?,"As an orthodox Jew I have seen quite a stir lately regarding the topic of biblical criticism, specifically towards the Old Testament (Torah). I have perused several questions in this stack which seem to address this topic in general, and learned a lot about apologetics, but I have not seen answers that address some of the major claims of biblical criticism, especially as it pertains to the Old Testament. For example: The story of Noah and the flood seems to be contradicted by archaeological evidence as well as having been 'borrowed' from earlier flood narratives such as the Gilgamesh story Many of the portions of the Old Testament seem to be borrowed from earlier near eastern texts such as the Hammurabi code The notion that there are multiple authors (documentary hypothesis) of the Old Testament. In short, how does Christianity deal with some of the major contentions of biblical criticism towards the Old Testament? I apologize if any parts of my question offend any sensibilities to which I am unaware. ",user5796,https://christianity.stackexchange.com/users/5796," Archaeology does not contradict a worldwide flood. There are different opinions on the matter. For more in-depth information watch these presentations as they present an alternate view. Especially presentations 2 (A Universal Flood) and 3 (Bones in Stones). The complete presentation can be seen here, they are by a Researcher and Professor in Zoology. This is also a matter of opinion. Many different people could write about a different event and that does not necessarily mean they borrowed from one another. They merely wrote about the event. The Epic of Gilgamesh could just easily be a story ""based on true events."" Just like today's movies, much of it could've been made up just for entertainment value, or to fit into a certain belief system. One more thing about this. Just because they were written first, does not necessarily mean they are more truthful. The reason we believe that the Genesis account is truthful is because we believe that the whole Bible is inspired. Jesus spoke about Noah, Lot, Adam, and other Old Testament characters as historical figures, not simply characters from a fable. Also along with what Narnian said about literary analysis that suggests that there were multiple authors, in the New Testament some of the writings are attributed to the people that we believe today. For example, Luke attributes the quotation from Isaiah to Isaiah; Luke 4:16-18. ",jlaverde,https://christianity.stackexchange.com/users/5568,http://christianity.stackexchange.com/questions/19110/how-does-christianity-deal-with-biblical-criticism-related-to-the-old-testament,CULTURE,christianity.stackexchange.com 8121,Changing LED color for notifications,"I am basically just experimenting with Android development, and a couple of days ago I came across this app called ""Go SMS Pro"", which, among other things, can set up notifications in different colors (blue, green, orange, pink and light blue). So, I have tried to do this myself in my own app, however I cannot change neiher the color nor the blinking internal of the LED. I currently use this code: public class MainActivity extends Activity { static final int NOTIFICATION_ID = 1; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button button = (Button) findViewById(R.id.button); button.setOnClickListener(buttonOnClick); } public OnClickListener buttonOnClick = new OnClickListener() { @Override public void onClick(View v) { String ns = Context.NOTIFICATION_SERVICE; NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns); Notification notification = new Notification(R.drawable.icon, ""Hello"", System.currentTimeMillis()); notification.flags = Notification.FLAG_SHOW_LIGHTS | Notification.FLAG_AUTO_CANCEL; notification.ledARGB = Color.BLUE; notification.ledOnMS = 1000; notification.ledOffMS = 300; Context context = getApplicationContext(); CharSequence contentTitle = ""My notification""; CharSequence contentText = ""Hello World!""; Intent notificationIntent = new Intent(MainActivity.this, MainActivity.class); PendingIntent contentIntent = PendingIntent.getActivity(MainActivity.this, 0, notificationIntent, 0); notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent); mNotificationManager.notify(NOTIFICATION_ID, notification); } }; } But as I said, it doesn't work the way I want it to; instead it just blinks in regular green with the default delay, and not the one I have set in my code. Can anyone see what is wrong with my code, or know if I have to do something else to achieve this? ",Frxstrem,https://stackoverflow.com/users/423170,"Support for the LED colors is really spotty. Try unplugging your USB cable and making sure that no other app is trying to modify the LED at the same time. Also turn off the screen. ",Ed Burnette,https://stackoverflow.com/users/357521,http://stackoverflow.com/questions/6169291/changing-led-color-for-notifications,STACKOVERFLOW,stackoverflow.com 4266,possible different ways to get the kanto starters and ways to get fossils in x and y,"hi there I was wondering if you guys would happen to know the most effective ways to get the kanto starter pokemon because using friend safari seems kind of ineffective and slow. also how would one obtain fossils aside from the original glittering cave ones thanks ",that guy,https://gaming.stackexchange.com/users/79887,"'Most effective' ways might be subjective. I do prefer the Friend Safari because of the guaranteed 31 IVs in at least 2 stats; which can't be easily obatined otherwise unless you search thoroughly. Usually you can trade; friend, GTS, acquaintance and people sometimes put pokemon with 31 IVs in particular stats in GTS (you can identify them with their description, for example 31 HS usually means 31 IVs in HP and Speed). You could say that this one's a lot faster, but it really depends on when you check GTS out. For instance, starters would be easily obtained early after the release, and I haven't been there lately but I think that the GTS activity might have died down a bit when compared to before. For the fossils, again you can use the GTS if you don't have someone willing or able to trade you one. Another option though is to check out the Glittering Cave and Rock Smash boulders again and again (just exit the main cave and come back in to have the boulders appear again) though you might consider this as taking a long time. Took me a few days to be able to get at least one of each fossil (of course I didn't just look for fossils) ",Jerry,https://gaming.stackexchange.com/users/58396,http://gaming.stackexchange.com/questions/173022/possible-different-ways-to-get-the-kanto-starters-and-ways-to-get-fossils-in-x-a,CULTURE,gaming.stackexchange.com 4550,Why do I have to update to the most recent iOS version?,"I have an iPhone 4s that is still running iOS 5.1.1. Why is it not possible for me to update my device to a newer version of ios without going all the way to the latest? ",Dave Long,https://apple.stackexchange.com/users/133295,"Short answer: Because that's Apple's update policy. Longer answer: Maintaining and supporting several major iOS versions is a lot of work, even if the older versions would just get security fixes. It's not just about the source code, any update also needs testing, dealing with apps which may break, update of various support documents etc. So you get both new functionality and security fixes by staying with the most recent version. In your case, running iOS 8 on an 4S actually works quite fine. ",patrix,https://apple.stackexchange.com/users/9058,http://apple.stackexchange.com/questions/192862/why-do-i-have-to-update-to-the-most-recent-ios-version,TECHNOLOGY,apple.stackexchange.com 3759,How can a flag be helpful without any action taken?,"I flagged this question to be duplicate of this one and my report was marked as helpful: But I do not see any action taken. I suppose the duplicate question should be closed. Then how is the flagged question still open if my report was helpful? ",Meysam,https://meta.stackexchange.com/users/172611,"In addition to your specific scenario, there are other cases where a flag can be marked as helpful even if no action was taken. For example, I am a moderator on DBA.se and I have marked flagged as helpful in these situations: a flag has notified me of some behavior that I don't need to act on, but perhaps make a note of for later in case the behavior repeats. If doesn't always justify immediate action. a flag as a duplicate or for migration is accompanied by close votes of the same type. In some of these cases I'd rather let the community continue to decide rather than make a binding decision. Not as a cop-out, but because I still want the community to decide how the community should work, when it makes sense for them to do so. Especially in cases where I am not familiar enough with the topic to truly determine, on my own, whether two questions really are identical. I can usually tell with SQL Server, but not so much with Oracle or MySQL. ",Aaron Bertrand,https://meta.stackexchange.com/users/165455,http://meta.stackexchange.com/questions/217519/how-can-a-flag-be-helpful-without-any-action-taken,TECHNOLOGY,meta.stackexchange.com 5446,"'Trying to help someone, but the other party doesn't appreciate it'","What is a word that best describes trying to help someone, but the other party doesn't appreciate it? I'm looking for a word. ",yuritsuki,https://english.stackexchange.com/users/21921,"A thankless task. Not sure there's a single noun that covers it. The obvious adjective would be unappreciated. ",Leon Conrad,https://english.stackexchange.com/users/64481,http://english.stackexchange.com/questions/149521/trying-to-help-someone-but-the-other-party-doesnt-appreciate-it,CULTURE,english.stackexchange.com 3691,Will I damage the command dial on my D5200 if I rotate it quickly?,"In a Youtube video on the D5200 I saw that the guys handling the camera rotated the command dial very fast. I used to rotate the dial one jump at a time fearing that otherwise I would damage the dial or the internal circuit. Is my assumption right or wrong? ",Baskaran,https://photo.stackexchange.com/users/26934,"I don't know what specific model rotary wheel Nikon used in that camera, but moving it fast shouldn't cause any excessive wear. These rotary wheels are usually just rather simple mechanical switches. There are usually two separate switches. Each goes thru one complete cycle each detent, but the two are off from each other by 1/4 cycle. The fancy name for that is quadrature. With two quadrature signals, there are 4 states that get sequenced thru for each whole increment. It is quite easy to decode these two signals to keep track of the position of the wheel, regardless of what direction it is being moved in. One part of the switch usually rubs against a part of the wheel so that it is moved into and out of contact with the other part of the switch. The wear on the device is therefore mostly related to total revolutions, not how fast those revolutions are, at least not for something you can do by hand. If you spin it too fast, about the worst that is likely to happen is that the firmware gets confused and looses track of where the wheel is. It may miss increments, or even think you are spinning it the other direction. Most likely the rotaty wheel will outlast your ability to spin it, whether you spin it fast or slow. ",Olin Lathrop,https://photo.stackexchange.com/users/7603,http://photo.stackexchange.com/questions/48842/will-i-damage-the-command-dial-on-my-d5200-if-i-rotate-it-quickly,LIFE_ARTS,photo.stackexchange.com 8031,Keypad to set a counter,"Is there a way to use a standard Matrix Keypad to set a synchronous counter IC without having to use a micro controller? ",user120404,https://electronics.stackexchange.com/users/41188,"Here's a generic logic diagram for scanning a matrix keypad; I'll leave it up to you to translate it to your favorite implementation technology, which could be anything from SSI/MSI logic to a CPLD to part of an FPGA. simulate this circuit – Schematic created using CircuitLab This circuit scans the keys, one at a time, at a 1 kHz rate. When a key is pressed, the output of the multiplexer goes true and triggers U5. U5 is retriggerable, which means that its output remains true for as long as its input is true, plus another 10 ms or so after it goes false. This serves to debounce the keypresses. The QN output stops the scanning as long as a key is held down, and the Q output (data strobe) indicates to the external logic that the key location is available on the data out lines. Ideally, you arrange the keys so that their locations are also the values you want them to represent; otherwise, use a lookup table to translate. Note that U5 could be an analog multivibrator if you're using SSI/MSI logic; or it could be a digital counter driven by the 1 kHz clock if you're using a CPLD or FPGA. ",Dave Tweed,https://electronics.stackexchange.com/users/11683,http://electronics.stackexchange.com/questions/153555/keypad-to-set-a-counter,TECHNOLOGY,electronics.stackexchange.com 3152,BJT switch connections,"If an NPN BJT is being used as a switch, why is the load usually connected between +Vcc and collector? How is the performance affected if the load is connected between emitter and ground? ",user34482,https://electronics.stackexchange.com/users/34482,"I think you will see the problem yourself if you remember that for an NPN transistor to pass large currents from the collector to the emitter you must cause current to flow into the base terminal. Because there is a PN junction between the base and the emitter, it is therefore necessary to raise the voltage of the base terminal about 0.6V above the voltage of the emitter terminal. Don't make the mistake of thinking that you just need to bring the base to a voltage about 0.6V above ground. That's a common misconception because you usually see the NPN transistor used with its emitter tied to ground. You can also think of this from the emitter's point of view. If the voltage at the emitter starts to rise for some reason then the transistor will stop conducting current once the emitter voltage rises to about 0.6V below the base voltage. So, the emitter voltage can't ever be higher than the base voltage when the transistor is conducting. Now, think about the voltage you are using to turn the transistor on and off. The emitter voltage must always be lower than that voltage. ",Joe Hass,https://electronics.stackexchange.com/users/11791,http://electronics.stackexchange.com/questions/94315/bjt-switch-connections,TECHNOLOGY,electronics.stackexchange.com 426,Shalom alecha rebbi (u'mori),"What is the significance of the time it takes to say Shalom Alecha Rebbi (U'mori)? ",shlomo,https://judaism.stackexchange.com/users/107,"I once heard from my rabbi in high school that it was about 3 seconds. Not sure the source, but it always made sense to me. Witnesses also must recite their identical testimony within that same timeframe. ",Seth J,https://judaism.stackexchange.com/users/5,http://judaism.stackexchange.com/questions/955/shalom-alecha-rebbi-umori,CULTURE,judaism.stackexchange.com 8949,Is my interval training routine effective for mountain bike training?,"During these winter months I am currently attending the gym 3 times a week. On each of the days I start my training on an exercise bike with the following: 5 minute warm up 30 minutes, 1 minute hard, 1 minute recovery 5 minute warm down I am using a specific interval training setting on the bike. I preset the training to level 15, which is a high resistance and as much as I can take. Hard is a cadence of between 80-90rpm high resistance. Recovery is a cadence of 60prm and the resistance backs off considerably, I imagine to approximately level 7. My heart rate towards the end of the session reaches 170–190bpm, and I am working flat-out. I turn 30 in March, am 5' 8"" and weigh approx 168lbs. Does this training routine seem sensible for building strength and speed on the mountain? Should I be changing up the training with other types of bike training? It is also worth noting that after the interval training I perform free weight strength training too. ",DigiKev,https://bicycles.stackexchange.com/users/3323,"Whether an interval training is effective or not depends mostly on your particulars relative to the interval. Heart rate is only a very inexact measure of effort, but you seem to be roughly in the ballpark. However, such quick switching between on/off interval state does not generally produce interval-like results and should be viewed as a single 30-minute interval at the average power of this period. A better gauge of interval quality would be this: how long can you keep up the effort? A more typical interval training might be e.g. 6-7 times 3-8 minute efforts, with 2-5 minute rests, at such intensity that you simply cannot complete another interval round. A goal of ""strength and speed"" on the mountain is unspecific enough that you can be sure it's being helped somewhat, and in some way, by the intervals. However, it's counterproductive to do interval training and weight training both in one session. If you are still in shape to do weight training after your intervals, it means the intervals weren't done hard enough. Do intervals and weights on alternate days. ",ttarchala,https://bicycles.stackexchange.com/users/130,http://bicycles.stackexchange.com/questions/7801/is-my-interval-training-routine-effective-for-mountain-bike-training,CULTURE,bicycles.stackexchange.com 1846,Create and open file with one command?,"I want to create a text file and open it in a text editor with a single command. I know touch file.txt creates a file and open file.txt opens the file, but is there a way to do this with a single command? ",Marcus McLean,https://unix.stackexchange.com/users/36377,"Like everyone is telling you, this depends on your editor. And if you don't like the way your editor handles this, that can probably be configured, as well. With Emacs, emacs new_file.txt (for a nonexistent new_file.txt in the current directory) will bring up Emacs and display a buffer that refers to a new_file.txt. However, until you save, there will be no such file. If you don't do anything and quit, no file will have been created. While this is certainly one way, I think an even better way is to always have an instance of Emacs running. So, whenever you feel the need for a new file, go to Emacs, hit C-x C-f (or M-x find-file RET), then write the path to the nonexistent file, and you're at the same point as after the CLI command (above, in the second paragraph). ",Emanuel Berg,https://unix.stackexchange.com/users/13136,http://unix.stackexchange.com/questions/70973/create-and-open-file-with-one-command,TECHNOLOGY,unix.stackexchange.com 247,How to speed up publishing papers?,"In my field, good journals often seem to take around 12-20 weeks to review papers. As was suggested in a previous post, ""How is it in my best interest not to submit a paper to two journals simultaneously?,"" one should not submit same paper to two journals. But none is omniscient to do multiple papers on various topics. Can any one kindly suggest how to speed up the publication process? Can journals reduce time? Or is this suggestion acceptable only after acceptance? ",Searcher,https://academia.stackexchange.com/users/35322,"If I'm understanding correctly, the problem you're concerned about is what to do when you've just submitted a paper, and now you have a long wait before you can submit the follow-up paper. Your question then presumes that a good solution to this problem is to try to accelerate the publication process. I think that is a bad assumption. There is no reason that you need to be stalled on your forward progress just because a paper is under review. Here are two good alternatives that work within the system. You can continue directly building on the same direction. If you get to a major milestone and are ready to submit a new paper before the previous one is finished reviewing, you can submit a paper citing the one under review as ""submitted,"" and include the draft paper as supplementary review-only information. Research typically has a lot of ""branching path"" options getting catalogued in your ""future work"" sections. Why not take a secondary path that you've wanted to investigate but isn't in the same exactly line of progression as the paper currently under review? That will likely lead to its own interesting results that can be published without dependency on the paper currently under review. It also seems possible to me that this concern may have arisen due to trying to publish too incrementally. If you cluster your work into larger ""publication units"" the time lag will likely be less problematic and a smaller number of significant papers is generally better for your career than a bunch of little incremental papers that nobody cares about. ",jakebeal,https://academia.stackexchange.com/users/22733,http://academia.stackexchange.com/questions/46430/how-to-speed-up-publishing-papers,LIFE_ARTS,academia.stackexchange.com 8682,What's a common mechanism for emailing in the background?,"When users sign up to my site, the connection from my server to our 3rd-party SMTP provider is very bad and the app takes from a few seconds to a few minutes to connect. While it is trying to connect and send, users are forced to wait there and sometimes they would just give up and leave the site. This is horrible user experience. What is a good way to make this seem instantaneous (having to host our own mailserver is not an option at this point)? Some way to execute this in the background? Maybe using some type of queuing mechanism? I'm using the LNAMP stack on a CentOS 5 x64 machine. App is using CodeIgniter. EDIT: It seems using a local mailserver to use as a relay is a common solution. But how does one log or track whether or not email was delivered correctly by using this method? Sidenote: Some ESPs provide a REST API for email delivery (ours do too). We currently use SMTP and not their REST API. ",lamp_scaler,https://serverfault.com/users/87326,"You can use Postfix as a nullmailer (relay only to ISP). This is nothing more than a four-liner: main.cf myorigin = $mydomain relayhost = $mydomain inet_interfaces = loopback-only local_transport = error:local delivery is disabled Reference: http://www.postfix.org/STANDARD_CONFIGURATION_README.html#null_client ",mailq,https://serverfault.com/users/75291,http://serverfault.com/questions/318374,TECHNOLOGY,serverfault.com 721,Is a Photoshop EPS file a vector format?,"If I save my file from Photoshop as a Photoshop EPS is that going to be okay as a vector across the board (ie will it be resizeable in whatever it's opened in)? I know if you open a .psd in Photoshop and resize the image, it holds it's quality, so that's fine, but when people need an EPS file because they might want to print it on the side of a building one day (or whatever) is a Photoshop EPS going to be okay? Or is there something else I need to be doing? All my designs are always vectors within Photoshop, so text/shapes/designs done with the pen tool - I just need to know that they'll still be a vector for people who don't have Photoshop and can't open it in there to resize it. ",Willow,https://graphicdesign.stackexchange.com/users/3494,"It can be. It may also not be. And EPS file is really just a wrapper around whatever the image is itself. So an EPS an include raster images, vector images, or both. When places ask for 'EPS' files they often are asking for vector files, of which an EPS may or may not be. ",DA01,https://graphicdesign.stackexchange.com/users/306,http://graphicdesign.stackexchange.com/questions/7726/is-a-photoshop-eps-file-a-vector-format,LIFE_ARTS,graphicdesign.stackexchange.com 1581,Silicone caulk for shower and tub?,"I am about to seal the gap between my tub and the wall tile with caulk (it was originally grout which cracked so I chiseled out what I could). I was planning to use silicone caulk (GE II), but a contractor suggested that pure silicone is not ideal since all caulk will eventually need to be removed and replaced and silicone is very difficult to remove. There's some logic to this, so I'm wondering - is he right? If so, what kind of caulk should I use? ",Jonathan,https://diy.stackexchange.com/users/25390,"Whether it is hard or easy to remove is really not that important, when it comes to choosing materials for this type of operations. One other thing is far more important: Silicone is organic matter, and like anything organic it disintegrates, especially in rooms like bathroom, which are humid. You should use grouting materials, same (if possible) like you have used for ceramic tiles. ",python starter,https://diy.stackexchange.com/users/32618,http://diy.stackexchange.com/questions/62566/silicone-caulk-for-shower-and-tub,LIFE_ARTS,diy.stackexchange.com 4676,How do you score the Mayor in an unfinished city?,"How do you score the Mayor in an unfinished city at the end of a game of Carcassonne? ",Mat,https://boardgames.stackexchange.com/users/3722,"The Mayor's ability allows him to count as more than one follower. So at the end of the game, an unfinished city is scored as normal - compare the Mayor's effective follower number with that of any other player present in the city. The player(s) with the most followers each score one point per city tile, and one point for each pennant. The only special case is that if the city has no pennants, then the Mayor doesn't count as a follower, and can't score anything. Here are the relevant rules: On his turn, a player may place his mayor instead of a follower. He may only place his mayor in a city, which has no knight or follower. The usual follower placing rules apply. When a city is scored, the mayor counts for as many followers as there are pennants in the city. For example, if the city has 3 pennants, the mayor counts as 3 followers. If the city has no pennants, the mayor counts as no followers. A normal follower counts as 1 follower. The large follower from Inns & Cathedrals counts as 2 followers. The value of the city is not changed by the presence of a mayor. After scoring the city, the player takes his mayor back. ",ire_and_curses,https://boardgames.stackexchange.com/users/50,http://boardgames.stackexchange.com/questions/9685/how-do-you-score-the-mayor-in-an-unfinished-city,CULTURE,boardgames.stackexchange.com 48,Tips for finding SPAM links injected into the_content,"I'm working on a client's site and I noticed that posts have a hidden <div> filled to SPAM links to dick pills, etc. Hoping to get lucky, I searched for some of the keywords in the database tables, but found no matches. I also searched the code in all the files, and also found no matches. I know that Wordpress hacks can be very tricky to remove, and they go to great lengths to make them hard to find. But perhaps there are some ""usual suspects"" that I could check, or maybe some tell-tale signs I could look for. I'm not asking for anyone to solve this specific hack. I'm just looking for advice on where (in general) to look. In case it's useful, here's the unauthorized <div> which is injected right before the close of the first <\p>: <div id='hideMeya'> At that requires looking for how you http://www.cialis.com <a href=""http://wwxcashadvancecom.com/"" title=""want $745? visit our site."">want $745? visit our site.</a> sign any of money. Visit our secure bad creditors that cialis levitra sales viagra <a href=""http://www10525.c3viagra10.com/"" title=""viagra australia online"">viagra australia online</a> payday lenders know otherwise. But the black you stay on discount price levitra <a href=""http://www10385.x1cialis10.com/"" title=""what is impotence in men"">what is impotence in men</a> duty to their lives. Citizen at one online or after receiving their research viagra online <a href=""http://www10675.80viagra10.com/"" title=""www.viagra.com"">www.viagra.com</a> to just take just wait until monday. This specifically relates to shop every pay stubs get viagra without prescription <a href=""http://www10154.40cialis10.com/"" title=""cialis overnight delivery"">cialis overnight delivery</a> and only used or faxing required. We will turn double checked by some small business loans viagra for woman <a href=""http://www10077.x1cialis10.com/"" title=""cialis india"">cialis india</a> sites that works the business before approval. Living paycheck went out cash there would generate levitra <a href=""http://www10450.a1viagra10.com/"" title=""viagra cialis levitra"">viagra cialis levitra</a> the scheduled maturity day method. Own a short application on when money also buy cialis online <a href=""http://buy4kamagra.com/"" title=""kamagra"">kamagra</a> plenty of personal initial limits. Even those loans quick because lenders realize http://cialis-ca-online.com <a href=""http://levitra4au.com/"" title=""levitrafroaustraila"">levitrafroaustraila</a> you notice a payday advance. A loan applications are more common thanks http://www.cialis2au.com/ <a href=""http://buy-7cialis.com/"" title=""cialis"">cialis</a> to only apply online website. Third borrowers will use your paycheck to levitra online pharmacy <a href=""http://www10675.30viagra10.com/"" title=""viagra online purchase"">viagra online purchase</a> utilize these individuals can cover. Often there must also referred to ensure online pharmacy viagra usa <a href=""http://www10600.90viagra10.com/"" title=""viagra effectiveness"">viagra effectiveness</a> you with financial expenses. Thanks to checking account also merchant cash loan wwwwviagracom.com <a href=""http://www10075.90viagra10.com/"" title=""levitra viagra cialis"">levitra viagra cialis</a> comparison to state or from there. At that they pay them in mere viagra <a href=""http://www10225.30viagra10.com/"" title=""cheapest generic viagra"">cheapest generic viagra</a> seconds and to comprehend. If a repossession or limited to see if approved www.cashadvances.com | Apply for a cash advance online! <a href=""http://www10385.70cialis10.com/"" title=""cialis dosage"">cialis dosage</a> the risks associated at your current address. Second borrowers should not start and struggle http://www.cashadvance.com <a href=""http://levitra-online-ca.com/"" title=""levitra for sale"">levitra for sale</a> at least a button. Thanks to send the benefits of everyday living cheapest viagra order online <a href=""http://www10462.70cialis10.com/"" title=""tadalafil"">tadalafil</a> from being foreclosed on its benefits. Finally you get help rebuild the original loan buy cialis viagra <a href=""http://viagra5online.com/"" title=""viagra without prescription"">viagra without prescription</a> can really only to surprises. Bank loans out you will take http://wviagracom.com/ <a href=""http://www10539.40cialis10.com/"" title=""erectile dysfunction supplements"">erectile dysfunction supplements</a> the conditions are a. Bills might provide an unexpected car cialis uk suppliers <a href=""http://kamagra-ca-online.com/"" title=""kamagra"">kamagra</a> broke a repayment length. Third borrowers repay because payday industry has the results http://www.buy9levitra.com/ <a href=""http://www10075.20viagra10.com/"" title=""viagra recreational use"">viagra recreational use</a> by the middle man and check process. After verifying your question with dignity and credit cards www.levitra.com <a href=""http://www10300.b2viagra10.com/"" title=""overnight viagra delivery"">overnight viagra delivery</a> or drive to secure loan online. Most people for dollars you between bad and free cialis <a href=""http://viagra7au.com/"" title=""http://viagra7au.com/"">http://viagra7au.com/</a> instead these applicants is available. Social security against your payday the larger sums buying viagra online <a href=""http://payday7online.com/"" title=""direct lenders installment loans no credit check"">direct lenders installment loans no credit check</a> of gossip when working telephone calls. Face it provides hour payday industry levitra online <a href=""http://www10150.30viagra10.com/"" title=""buy viagra now"">buy viagra now</a> has high credit score? Within minutes during your best score range from http://cashadvance8online.com <a href=""http://www10450.60viagra10.com/"" title=""viagra dosage instructions"">viagra dosage instructions</a> fees if there for them most. To avoid paperwork you in crisis arise from wwwpaydayloancom.com | Online Payday Loans application form! <a href=""http://www10225.80viagra10.com/"" title=""super active viagra"">super active viagra</a> online from paying the bank? Funds will know to throwing your cash advance no credit check <a href=""http://orderviagrauaonline.com/"" title=""viagara online"">viagara online</a> finances there that purse. Companies realize that asks for which can become cialis online <a href=""http://www10375.60viagra10.com/"" title=""sublingual viagra"">sublingual viagra</a> eligible to paycheck some lenders. Medical bills that be much easier than actually need only online cash advance <a href=""http://cashadvance8online.com"" title=""online cash advance"">online cash advance</a> your funds via the freedom you out. </div><script type='text/javascript'>if(document.getElementById('hideMeya') != null){document.getElementById('hideMeya').style.visibility = 'hidden';document.getElementById('hideMeya').style.display = 'none';}</script> </p> ",emersonthis,https://wordpress.stackexchange.com/users/11363,"In general, the best place to look is in your theme folders, specifically the main theme and in the index.php file. Then the footer and header files. Also, check your modified dates and start with the most recently modified. Especially if there are several that were all modified around the same date/time. I've seen, and had to fix, this problem several times on people's servers. The false data is normally loaded via a script inserted into the php files of the template. First, you should definitely read over the Wordpress FAQ for dealing with a hacked site. Common entry points for gaining the ""access"" required to pull the injection off are outdated themes and/or plugins. It's best to run production servers with only the one active theme on the server, as well as removing unused plugins and replacing outdated active plugins. There are a few scripts out there that you can upload to your server to help you find infected files so you can replace, clean or delete them. (Links listed below) Again, try looking at file modified dates and check out ones you haven't modified/installed recently yet have a recent date on the. Look for Bad Guys : I've used this one. It takes a bunch of configuration to root out all the false positives ... but it can at least help you get a general idea of which files to check out. Wordfence offers the ability to scan your files with their free plugin, I can't personally endorse it though, since I haven't used it myself. https://www.wordfence.com/docs/how-to-clean-a-hacked-wordpress-site-using-wordfence/ Sucuri is linked on the Wordpress forums frequently and they have a plugin for scanning as well, but once again... haven't personally used it. But I'm a hands-on kind of person. ",Squish,https://wordpress.stackexchange.com/users/28821,http://wordpress.stackexchange.com/questions/134825/tips-for-finding-spam-links-injected-into-the-content,TECHNOLOGY,wordpress.stackexchange.com 946,Cyclic group of order $6$ defined by generators $a^2=b^3=a^{-1}b^{-1}ab=e$.," The cyclic group of order $6$ is the group defined by the generators $a,b$ and relations $a^2=b^3=a^{-1}b^{-1}ab=e.$ For this problem I am assuming that it must be $a,b \neq e$. I will show the $a^ib^j$ are distinct for $i=0,1$ and $j=0,1,2$. If $i=0$, $b^0=e,b,b^2$ are distinct. We know order of $b$ is not $2$ as $b^3=e$ as the order of an element divides powers that make $b$ the identity, this would mean $2\mid 3$ a contradiction. For $i=1$, $$ab^i=ab^k \rightarrow b^i=b^k \rightarrow i\equiv k \mod{3}$$ but as $0\leq i,k < 3$, $i=k$ so $a,ab,ab^2$ are distinct. So we have that $G \supseteq \{e,a,b,b^2,ab,ab^2\}.$ So $$G=\left<a,b\right> =\{ a^{n_1}b^{n_2}\cdots a^{n_r}b^{n_{r+1}}\mid n_i \in \mathbb{Z}\}$$ and as $a^{-1}b^{-1}ab=e$, $ab=ba$ and so we can write $G$ as $$G=\{a^nb^m \mid n,m \in \mathbb{Z}.$$ We then also have by $a^{-1}b^{-1}ab=e$ that $$a^{-1}b=ba^{-1},\,a^{-1}b^{-1}=b^{-1}a^{-1},\,ab^{-1}=b^{-1}a$$ and so any $$a^nb^m=a\cdots a\cdot b\cdots b =b^ma^n$$ as we can commute the elements to get $b^ma^n$ so $G$ is abelian. To show there are exactly $6$ elements, if we pick any $a^nb^m \in G$, we can assume that $0\leq n\leq 1$ and $0\leq m \leq 2$ and then this element is already accounted for above so $$G=\{e,a,b,b^2,ab,ab^2\}.$$ As $G$ is a finite abelian group of order $6$, $G$ can be written uniquely up to permutation as a direct sum of $\mathbb{Z}_{p_i^{k_i}}$'s where the $p_i$ are prime but there is only one way to do this for $6=2\cdot3$ so this means $$G\cong \mathbb{Z}_2\oplus\mathbb{Z}_3\cong\mathbb{Z}_6$$ as $\gcd(2,3)=1$. I am just wondering of nicer ways to argue this in the case I would need to do this on an exam. Also if everything looks correct too. ",Frudrururu,https://math.stackexchange.com/users/43138,"Your arguments work just fine, but we can do a bit better. Let's define $$G=\langle a,b\mid a^2=b^3=a^{-1}b^{-1}ab=e\rangle.$$ As you noted, $a^{-1}b^{-1}ab=e$ if and only if $ab=ba.$ Hence, $a$ and $b$ commute, and so since $G$ is generated by $a$ and $b,$ then it follows immediately that $G$ is an abelian group, and in particular $$G=\{a^mb^n\mid m,n\in\Bbb Z\}.$$ Since $a^2=e$ and $b^3=e,$ then we can conclude that $$G=\{e,a,b,ab,b^2,ab^2\}.$$ At this point, there are a few ways we can proceed: Show that $e,a,b,ab,b^2,ab^2$ are distinct, then note that the abelian group of order $6$ is cyclic. Show that $e,a,b,ab,b^2,ab^2$ are distinct, then apply Structure Theorem for Finite Abelian groups, as you did, together with the fact that $\gcd(2,3)=1,$ so that $G$ is cyclic. Show that $e,a,b,ab,b^2,ab^2$ are distinct, then demonstrate an element of $G$ of order $6.$ Show that $H:=\langle a\rangle\cong\Bbb Z_2,$ $K:=\langle b\rangle\cong\Bbb Z_3,$ and that $H\cap K=\{e\},$ so since $H,K$ are normal subgroups of $G$ (since $G$ abelian) and $HK:=\{hk\mid h\in H,k\in K\}=G,$ then $G\cong H\times K.$ (Have you seen this result before?) Thus, $G\cong\Bbb Z_2\times\Bbb Z_3\cong\Bbb Z_6.$ That last is arguably the simplest. It suffices to show that $a\ne e,$ $b\ne e,$ $b^2\ne e,$ $a\ne b,$ and $a\ne b^2.$ ",Cameron Buie,https://math.stackexchange.com/users/28900,http://math.stackexchange.com/questions/564974/cyclic-group-of-order-6-defined-by-generators-a2-b3-a-1b-1ab-e,SCIENCE,math.stackexchange.com 839,Force Dispatch to generate dispatch tables,"Dispatch creates hash tables only for lists of length larger than 3. Is there any way to force MMA to create hash tables even for lists of length smaller than 4? Table[Head@Dispatch@Table[Rule[a[i], i], {i, n}], {n, 5}] (* {List, List, List, Dispatch, Dispatch} *) ",Hector,https://mathematica.stackexchange.com/users/8803,"In version 10 even a single Rule will produce a Dispatch object: Dispatch[ a -> 1 ] // InputForm Dispatch[{a -> 1}] Dispatch[ a -> 1 ] // AtomQ True Association is also a hash structure and provides a comparably fast alternative to Dispatch, which an interface for adding, deleting and updating rules. In many cases Associations may be used like Dispatch tables and they can also be used like functions. For some performance points see: Is there a faster way to Map an Association? ",Mr.Wizard,https://mathematica.stackexchange.com/users/121,http://mathematica.stackexchange.com/questions/30028/force-dispatch-to-generate-dispatch-tables,TECHNOLOGY,mathematica.stackexchange.com 5244,Why is RSS distributed chi square times n-p?,"I would like to understand why, under the OLS model, the RSS (residual sum of squares) is distributed chi square times n-p (p being the number of parameters in the model, n the number of observations). I apologize for asking such a basic question, but I seem to not be able to find the answer online (or in my, more application oriented, textbooks). ",Tal Galili,https://stats.stackexchange.com/users/253,"I consider the following linear model: ${y} = X \beta + \epsilon$. The vector of residuals is estimated by $$\hat{\epsilon} = y - X \hat{\beta} = (I - X (X'X)^{-1} X') y = Q y = Q (X \beta + \epsilon) = Q \epsilon$$ where $Q = I - X (X'X)^{-1} X'$. Observe that $\textrm{tr}(Q) = n - p$ (the trace is invariant under cyclic permutation) and that $Q'=Q=Q^2$. The eigenvalues of $Q$ are therefore $0$ and $1$ (some details below). Hence, there exists a unitary matrix $V$ such that (matrices are diagonalizable by unitary matrices if and only if they are normal.) $$V'QV = \Delta = \textrm{diag}(\underbrace{1, \ldots, 1}_{n-p \textrm{ times}}, \underbrace{0, \ldots, 0}_{p \textrm{ times}})$$ Now, let $K = V' \hat{\epsilon}$. Since $\hat{\epsilon} \sim N(0, \sigma^2 Q)$, we have $K \sim N(0, \sigma^2 \Delta)$ and therefore $K_{n-p+1}=\ldots=K_n=0$. Thus $$\frac{\|K\|^2}{\sigma^2} = \frac{\|K^{\star}\|^2}{\sigma^2} \sim \chi^2_{n-p}$$ with $K^{\star} = (K_1, \ldots, K_{n-p})'$. Further, as $V$ is a unitary matrix, we also have $$\|\hat{\epsilon}\|^2 = \|K\|^2=\|K^{\star}\|^2$$ Thus $$\frac{\textrm{RSS}}{\sigma^2} \sim \chi^2_{n-p}$$ Finally, observe that this result implies that $$E\left(\frac{\textrm{RSS}}{n-p}\right) = \sigma^2$$ Since $Q^2 - Q =0$, the minimal polynomial of $Q$ divides the polynomial $z^2 - z$. So, the eigenvalues of $Q$ are among $0$ and $1$. Since $\textrm{tr}(Q) = n-p$ is also the sum of the eigenvalues multiplied by their multiplicity, we necessarily have that $1$ is an eigenvalue with multiplicity $n-p$ and zero is an eigenvalue with multiplicity $p$. ",ocram,https://stats.stackexchange.com/users/3019,http://stats.stackexchange.com/questions/20227/why-is-rss-distributed-chi-square-times-n-p,SCIENCE,stats.stackexchange.com 5981,C++ return to main,"I want to be able to get back to the main.cpp file from another. For example. // Main.cpp #include ""Globals.h"" int main() { otherFile(); } // Globals.h #include <iostream> #include <stdlib.h> bool otherFile(); //otherFile.cpp #include ""Globals.h"" bool otherFile() { // do stuff // Here I want to be able to go back to the main.cpp file. } Sorry if my question makes no sense ",Luke Berry,https://stackoverflow.com/users/422287,"if you create a function in main.cpp and add declaration to Globals.h, then you can call this function from otherFile.cpp. If you don't need any statements after ""do stuff"", then your program logic automatically will return to the main(), because end of function call, so just add instructions after otherFile(); call in main, and they will be executed after this function. You decalred otherFile() as returning bool, so put and end of your function return true; or return false; ",Piotr Müller,https://stackoverflow.com/users/403759,http://stackoverflow.com/questions/5282024/c-return-to-main,STACKOVERFLOW,stackoverflow.com 9268,Is the intersection of two star-shaped sets star-shaped?,"Is the intersection of two star-shaped sets star-shaped? I don't think so but can't think of an example. ",user24883,https://math.stackexchange.com/users/24883,"Intersection of two star shaped domain is again a star shaped domain provided previous two domains are star shaped with respect to same point. Otherwise the result is not true in general.See the counterexample given by Scott. ",timon,https://math.stackexchange.com/users/39274,http://math.stackexchange.com/questions/200152/is-the-intersection-of-two-star-shaped-sets-star-shaped,SCIENCE,math.stackexchange.com 512,Automatic internationalization in Java,"I have an issue with automatic internationalization in java, using netbeans. In actionListener I am chaging locale with this: String s = (String)langBox.getSelectedItem(); switch(s){ case ""Čeština"": BP_evolution.language = ""cs""; BP_evolution.currentLocale = new Locale(BP_evolution.language); break; case ""English"": BP_evolution.language = ""en""; BP_evolution.currentLocale = new Locale(BP_evolution.language); break; } Actually, the issue is, that I don't know what function should I call for switching language in my application. I am using Java SE and Swing. Like I already said, ResourceBundle has been created automatically. ",Martin Plávek,https://stackoverflow.com/users/4153493,"My issue with this has been resolved by SwingWorkers. When I put the function of switching languages, it started to work. You can read about it here -> java doc Problem was probably that main thread stucked with running GUI itself and it was not able to do anything else. ",Martin Plávek,https://stackoverflow.com/users/4153493,http://stackoverflow.com/questions/26573709/automatic-internationalization-in-java,STACKOVERFLOW,stackoverflow.com 5338,Need Quartis II CPLD tutorial for learning VHDL from ZERO,"I am learning VHDL from zero using Altera CPLD. Already got Quartis II 12.1 and a 15-lines example VHDL (like Hello World for C learner). To avoid learning bad coding style or digging too deep too early, what should I look out for? ",EEd,https://electronics.stackexchange.com/users/17167,"This page has a (PDF) book that is quite good on the process of learning the tools and the stages between VHDL and a working design. It uses the Xilinx tools and an FPGA but the steps are similar for Altera. Plus it costs nothing except disk and bandwidth to download the Xilinx tools and have them on hand for comparison. In particular he says quite a lot that I skipped over, on the process of diagnosing and optimising performance problems. ",Brian Drummond,https://electronics.stackexchange.com/users/16324,http://electronics.stackexchange.com/questions/52229/need-quartis-ii-cpld-tutorial-for-learning-vhdl-from-zero,TECHNOLOGY,electronics.stackexchange.com 3235,Visual Studio profiler not finding symbols when I run it in Azure,"I am trying to profile my Windows Azure application using the Visual Studio Profiler in Windows Azure. I followed the instructions at http://msdn.microsoft.com/en-us/library/windowsazure/hh369930.aspx#BK_ProfilingCloudService, but I run into this problem where when I download the profiling report from an instance it can't find the symbol information and I get nothing but hex values for the function names. The profiler outputs the following errors: Warning VSP2701: F:\approot\MyApp.MyLib.dll could not be found when looking for symbol information. Warning VSP2701: D:\windows\system32\MSASN1.dll could not be found when looking for symbol information. Warning VSP2701: D:\windows\system32\slc.dll could not be found when looking for symbol information. Warning VSP2701: D:\windows\assembly\NativeImages_v4.0.30319_64\Microsoft.Build.Fra#\d172e68980f5b5930d83fc1bccfc07e3\Microsoft.Build.Framework.ni.dll could not be found when looking for symbol information. Warning VSP2701: D:\windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Build.Framework\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.Build.Framework.dll could not be found when looking for symbol information. Warning VSP2701: D:\windows\assembly\NativeImages_v4.0.30319_64\System.Runtime.Cach#\5cf803aa1b791b9c6cf2d5167fe7d63b\System.Runtime.Caching.ni.dll could not be found when looking for symbol information. Warning VSP2701: D:\windows\assembly\NativeImages_v4.0.30319_64\System.Web.Applicat#\fdc3ab5c1ff60542a20b6950f64eeb29\System.Web.ApplicationServices.ni.dll could not be found when looking for symbol information. Warning VSP2701: D:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll could not be found when looking for symbol information. Warning VSP2701: D:\windows\assembly\NativeImages_v4.0.30319_64\System.DirectorySer#\770f4419204ad7db44842c6dbb86a336\System.DirectoryServices.Protocols.ni.dll could not be found when looking for symbol information. Warning VSP2701: D:\windows\Microsoft.Net\assembly\GAC_MSIL\System.DirectoryServices.Protocols\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.DirectoryServices.Protocols.dll could not be found when looking for symbol information. Warning VSP2701: D:\windows\assembly\NativeImages_v4.0.30319_64\System.DirectorySer#\7f7a77e6e63a5169626f3c0c8c7d72a8\System.DirectoryServices.ni.dll could not be found when looking for symbol information. Warning VSP2701: D:\windows\Microsoft.Net\assembly\GAC_MSIL\System.DirectoryServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.DirectoryServices.dll could not be found when looking for symbol information. Warning VSP2701: D:\windows\assembly\NativeImages_v4.0.30319_64\System.Drawing\741fda6371303be2c86d23b8dcf88cc3\System.Drawing.ni.dll could not be found when looking for symbol information. Warning VSP2701: D:\windows\assembly\NativeImages_v4.0.30319_64\System.Data.SqlXml\2d6a784738e5d67e70feb68f0c53a3d8\System.Data.SqlXml.ni.dll could not be found when looking for symbol information. Warning VSP2701: D:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.SqlXml\v4.0_4.0.0.0__b77a5c561934e089\System.Data.SqlXml.dll could not be found when looking for symbol information. Warning VSP2701: D:\windows\assembly\NativeImages_v4.0.30319_64\System.Security\b7ad9cb6010b93a853dd647d9e1f3857\System.Security.ni.dll could not be found when looking for symbol information. Warning VSP2701: D:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Security\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Security.dll could not be found when looking for symbol information. And so on. Looking at the paths, this is clearly the path that is being looked for on the actual Azure instance (I've been in via RDP enough times to recognize what D:\windows and F:\approot means). But I'm viewing this performance report on my own machine. So how can I tell the profiler to look for symbols using MY machine's settings, and not the Azure instance's settings? For the record, I AM following the instructions in the linked pages, and I have googled this extensively and found nothing. Not to say there's nothing out there, but I'm following the instructions in the profiling blogs and such and still getting the errors. I asked this question on the MSDN forums and a Microsoft rep basically told me that if I followed the instructions it would definitely work. ",Mike,https://stackoverflow.com/users/227675,"Sorry I didn't see this earlier. Basically the issue is that when your app is profiled, many of the binaries are ngened. Because of this, the system cannot interpret the function addresses without the correct pdb hence you see Hex. You will need to generate the ngen pdb on the same machine where the ngenbinary exist (see http://blogs.msdn.com/b/visualstudioalm/archive/2012/12/10/creating-ngen-pdbs-for-profiling-reports.aspx ). That should take care of most of the binaries listed as *.ni.dll . As for your own application, setting the Symbol location in Visual Studio should be sufficient to locate the symbols for your own application. Hope this helps ",Andre Hamilton,https://stackoverflow.com/users/2279049,http://stackoverflow.com/questions/14360543/visual-studio-profiler-not-finding-symbols-when-i-run-it-in-azure,STACKOVERFLOW,stackoverflow.com 4775,Layman's guide to getting started with Forex (foreign exchange trading)?,"How should I get started with Forex (foreign exchange trading)? How should I prepare myself for it? Please give your answer thinking of me as a layman. ",harvardfail,https://money.stackexchange.com/users/4311,"There are various indexes on the stock market that track the currencies. Though it is different than Forex (probably less leverage), you may be able to get the effects you're looking for. I don't have a lot of knowledge in this area, but looked some into FXE, to trade the Euro debt crisis. Here's an article on Forex, putting FXE down (obviously a biased view, but perhaps will give you a starting point for comparison, should you want to trade something specific, like the current euro/dollar situation). ",Ray K,https://money.stackexchange.com/users/4722,http://money.stackexchange.com/questions/12446/laymans-guide-to-getting-started-with-forex-foreign-exchange-trading,LIFE_ARTS,money.stackexchange.com 1908,What Defines Opponent Behaviour in 'Quick Battle'?,"When I play the 'quick battle' offline mode of Soul Calibur V, I get the impression that I'm fighting real player's characters being controlled by the game's AI, based on the character names, and costumes. Some of these characters behave wildly different from one another, to the point that it almost feels like I'm fighting actual human players (impossible, as I don't have Xbox Live Gold). Some of these characters are much more 'skilled' than others, as well. What defines the behaviour of someone's character in quick-play mode? Does the game 'watch' them play, and then try to use the same combos the player used in their games? ",GnomeSlice,https://gaming.stackexchange.com/users/3114,"I doubt that the computer copies players from elsewhere. Maybe the A.I. is varied to the point that it imitates varying types of players. ",Bryce,https://gaming.stackexchange.com/users/20794,http://gaming.stackexchange.com/questions/52979/what-defines-opponent-behaviour-in-quick-battle,CULTURE,gaming.stackexchange.com 3695,What brass band instruments can a cornet player feasibly cover on short notice?,"Is it reasonable to expect that an experienced cornet player should be able to pick up a ""middle of the band"" instrument, like a baritone, or an Eb horn and become reasonably proficient in a few hours across a day or two? How large is the shock to the embouchure and how costly is it to then move back? ",Nathan Cooper,https://music.stackexchange.com/users/5757,"If the player has a good ear (and you're not asking them to do really virtuosic playing), then the ""embouchure shock"" should be fairly minimal. As long as they're still reading transposed treble clef music, the fingerings will be exactly the same, with the notable exception of french horn (or is that a brass band instrument to start with?). Tuba doesn't read treble clef traditionally, but a treble clef, transposed part could be easily created that would work just fine for the player. If the player is brand new at brass instrument doubling, then yes, they may need a few days to get used to it, just for the fact that it's different from a cornet. A more experienced doubler can usually switch around at will with no ""adjustment period"". ",NReilingh,https://music.stackexchange.com/users/133,http://music.stackexchange.com/questions/13994/what-brass-band-instruments-can-a-cornet-player-feasibly-cover-on-short-notice,LIFE_ARTS,music.stackexchange.com 276,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. ",Irwin,https://academia.stackexchange.com/users/5944,"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 time -, and it's also bad for their reputation. Each time someone gets an offer from universities A and B and chooses to accept the offer from A, this contributes to the reputation of A and harms the reputation of B. Whether it's good for you if the committee at one university know where else you have applied and how you are doing there, depends very much on the relative reputations of these universities and how they are judging you. You want them to think that you are the perfect fit, not that you are overqualified and therefore likely to reject their offer (doing well with an application at a much better university) or underqualified and going to harm their reputation that way (as could happen if they make you an offer and at the same time you are rejected by a university with much lower reputation). ",Hans Adler,https://academia.stackexchange.com/users/27799,http://academia.stackexchange.com/questions/8766/should-i-tell-other-interviewers-where-else-ive-interviewed,LIFE_ARTS,academia.stackexchange.com 353,Teletext Subtitles on Romanian Television,"There is a teletext feature on the televisions in the hotel rooms. In England there was a way to get subtitles to appear by going to the teletext interface and entering 888. As far as I know this is no longer available. In Romania, is there a special code you can enter into the teletext interface to enable subtitles? I've tried 888 but it doesn't do anything. ",Alex,https://travel.stackexchange.com/users/11934,"Bad news. While 888 will get you the teletext subtitles in Greece, Belgium and other countries, and Austria is 777, for example, Romania is one of the few EU members to have NONE for Teletext subtitling. Source: State of subtitling access in EU report - European Federation of Hard of Hearing People (page 20). ",Mark Mayo,https://travel.stackexchange.com/users/101,http://travel.stackexchange.com/questions/38429/teletext-subtitles-on-romanian-television,CULTURE,travel.stackexchange.com 4964,Lock for extremely frequent use,"Are there lock products out there specifically designed for easy handling when locked unlocked dozens of times a day? I'm using a normal, chain-based lock at the moment and I'm annoyed because I'm doing constant slight damage to the frame when removing the lock from the bicycle I need to carry a key at all times, fumble it from my pocket when it's time to go (often in a thankless, noisy, roadside environment), and fumble the lock back onto the bicycle Are there any solutions out there that make frequent use as painless, and still as secure, as possible? I'm thinking about something that works like a remote-controlled car door lock. It should, however, still be possible to attach the bike to an object to prevent it from getting carried away. Related: best bike lock ",Pekka 웃,https://bicycles.stackexchange.com/users/40,"I'd recommend kryptonite. The Evolution Mini is used by a number of my friends (messengers) and they use it many times in a day. Keeps things secure and it's small. If you want a bit more flexibility in what you can attach to then go for a larger sized one. https://www.kryptonitelock.com/products/list.aspx?cid=1001&scid=1000 ",curtismchale,https://bicycles.stackexchange.com/users/30,http://bicycles.stackexchange.com/questions/236/lock-for-extremely-frequent-use,CULTURE,bicycles.stackexchange.com 8071,"In set theories where Continuum Hypothesis is false, what are the new sets?","So, say we are working with non-CH mathematics. This means, AFAIK, that there is at least one set $S$ in our non-CH mathematics, whose cardinality is intermediate between $|\mathbb{N}|$ (card. of naturals) and $|\mathbb{R}|=2^\mathbb{N}$, the continuum. Question: what kind of objects would we find in this set $S$? Also: is this mathematics radically different from the one where CH holds? Specifically, are there results that are used in everyday math , at a relatively introductory level, which do not hold on our non-CH math.?. What results that we find in everyday math would not hold in our new math? Would there, e.g., still exist non-measurable sets? Maybe more specifically: what results depend on the CH? ",tony,https://mathoverflow.net/users/2915,"A very natural question for algebraists is the Whitehead problem: is there an abelian group A which is not free but for which Ext^1(A, Z) = 0? Shelah showed that this natural problem was independent of ZFC. If you assume CH is false and Martin's axiom is true, then such a group exists. On the other hand, V=L, which implies CH, also implies such a group does not exist. ",Gene Ward Smith,https://mathoverflow.net/users/26327,http://mathoverflow.net/questions/10227,SCIENCE,mathoverflow.net 8370,geometric margin derivation with unit vector?,"In the following graph I would like to obtain the point B: According to the author this B is equal to: The question that I have is how the author obtain that result. It says that in A is a point x_(i), so I suppose that he projects A onto the unit vector w; and because B can be any point on the hyperplane he uses Euclidean distance to perform its calculations; something like: B=A-dist(A,B) B=x_(i)-Y_(i).w/||w|| Is that ok? but I am not quite sure why he multiply the value of Y_(i) with the unit vector, why is that? Thanks ",Little,https://stackoverflow.com/users/1960266,"This is because dist(A,B) is a scalar. What you need is a vectorial operation to infer the position of a point from another point in the space, so: point(A) - Vector(W) = point(B) Therefore, you need to convert the scalar ""dist(A,B)"" with the magnitude |dist(A,B)|, into a vector, with the direction of W to be able to perform the operation above. Therefore, Vector(W) above would become: Vector(W) = dist(A,B) * unitVector(W) Leading to the equation proposed by the author. Please let me know if this is clear enough. ",Jorge Torres,https://stackoverflow.com/users/4413370,http://stackoverflow.com/questions/28908404/geometric-margin-derivation-with-unit-vector,STACKOVERFLOW,stackoverflow.com 3373,How prove this equation $\alpha=\aleph_{0}\alpha$,"Question: let $\alpha$ be a infinite cardinal , show that: $$\alpha=\aleph_{0}\alpha$$ where $\aleph_{0}$ is the cardinality of the natural numbers is denoted aleph-null this equation is from a book,and I can't prove it,and the author say this is important equation,and can't prove it.Thank you for you help ",china math,https://math.stackexchange.com/users/94077,"First of all take well-ordered set — every non-empty subset has a least element. Then, for every (with the exception of the greatest element) element $x$ there is the ""next"" element $x+1$ — the least of all which are greater than $x$. For some elements there may be no predecessor — let us call them limit elements (or points). And every element of a well-ordered set has a form $x=a+n$ where $a$ is a limit element, $n$ is a natural number and $+$ means the same as above. OK, now Zermelo's theorem, which is equivalent to an axiom of choice, every set can be well-ordered. Also, $|\mathbb N \times \mathbb N|=|\mathbb N|$. And we want to prove that for infinite $A:\;A\times \mathbb N$ equinumerous to $A$. $A$ could be well-ordered, then $A$ is equinumerous to $B\times \mathbb N$ where $B$ is the set of all limit elements. And we have $|A\times\mathbb N|=|(B\times \mathbb N)\times\mathbb N|=|B\times(\mathbb N\times\mathbb N)|=|B\times\mathbb N|=|A|$. ",sas,https://math.stackexchange.com/users/21699,http://math.stackexchange.com/questions/690798/how-prove-this-equation-alpha-aleph-0-alpha,SCIENCE,math.stackexchange.com 6244,How can I open a window on a different monitor?,"With multiple monitors, I have so far been dragging windows manually around. Is there a way to make a window open on a specific screen in a dual-head setup? (Not to be confused with multiple X server displays.) Something like: SCREEN=2 firefox or open-in-screen 2 firefox. If it matters, my environment is KDE using the KWin window manager. KWin window rules can only match some properties like title, but I could not find an environment variable as filter. The secondary display extends the primary screen: $ xrandr -q Screen 0: minimum 320 x 200, current 3520 x 1080, maximum 32767 x 32767 LVDS1 connected 1600x900+0+0 (normal left inverted right x axis y axis) 382mm x 214mm 1600x900 60.1*+ 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 VGA1 disconnected (normal left inverted right x axis y axis) HDMI1 connected 1920x1080+1600+0 (normal left inverted right x axis y axis) 477mm x 268mm 1920x1080 60.0* 50.0 59.9 1920x1080i 60.1 50.0 60.0 1680x1050 59.9 1280x1024 75.0 60.0 1440x900 59.9 1280x960 60.0 1280x720 60.0 50.0 59.9 1024x768 75.1 70.1 60.0 832x624 74.6 800x600 72.2 75.0 60.3 56.2 720x576 50.0 720x480 60.0 59.9 640x480 75.0 72.8 66.7 60.0 59.9 720x400 70.1 DP1 disconnected (normal left inverted right x axis y axis) ",Lekensteyn,https://unix.stackexchange.com/users/8250,"I did come across this method which makes use of xdotool, xprop, & wmctrl. Here’s what the below script will do: Find the active window Get its maximized state and remember it Remove maximization Get its geometry Calculate the new position Move it Maximize based on the previous state Raise it Here’s a script that does that: script This will move the active window to the other monitor. It can only handle a side by side, aka. horizontal, configuration of monitors. wid=`xdotool getactivewindow` max_state=`xprop -id $wid _NET_WM_STATE` wmctrl -ir $wid -b remove,maximized_vert,maximized_horz eval `xdotool getwindowgeometry --shell $wid` new_x=1600 if [[ ""$X"" -ge ""$new_x"" ]]; then new_x=0 fi xdotool windowmove $wid $new_x $Y if [ -z ""${max_state/*_NET_WM_STATE_MAXIMIZED_*/}"" ]; then wmctrl -ir $wid -b add,maximized_vert,maximized_horz fi xdotool windowraise $wid Source: Xubuntu – moving windows between monitors ",slm,https://unix.stackexchange.com/users/7453,http://unix.stackexchange.com/questions/106793/how-can-i-open-a-window-on-a-different-monitor,TECHNOLOGY,unix.stackexchange.com 6450,How to avoid being asked passphrase each time I push to Bitbucket,"I set up my ssh stuff with the help of this guide, and it used to work well (I could run hg push without being asked for a passphrase). What could have happened between then and now, considering that I'm still using the same home directory. $ cat .hg/hgrc [paths] default = ssh://hg@bitbucket.org/tshepang/bloog $ hg push Enter passphrase for key '/home/wena/.ssh/id_rsa': pushing to ssh://hg@bitbucket.org/tshepang/bloog searching for changes ... ",Tshepang,https://unix.stackexchange.com/users/688,"A way to solve this is with ssh-agent and ssh-add: $ exec ssh-agent bash $ ssh-add Enter passphrase for ~/.ssh/id_rsa: After this the passphrase is saved for the current session. and won't be asked again. ",stefano,https://unix.stackexchange.com/users/6680,http://unix.stackexchange.com/questions/12195/how-to-avoid-being-asked-passphrase-each-time-i-push-to-bitbucket,TECHNOLOGY,unix.stackexchange.com 4779,"In PHP, how to detect the execution is from CLI mode or through browser ?","I have a common script which Im including in my PHPcron files and the files which are accessing through the browser. Some part of the code, I need only for non cron files. How can I detect whether the execution is from CLI or through browser (I know it can be done by passing some arguments with the cron files but I dont have access to crontab). Is there any other way ? ",binoy,https://stackoverflow.com/users/227740,"There is a constant PHP_SAPI has the same value as php_sapi_name(). (available in PHP >= 4.2.0) ",just somebody,https://stackoverflow.com/users/209605,http://stackoverflow.com/questions/1991346/in-php-how-to-detect-the-execution-is-from-cli-mode-or-through-browser,STACKOVERFLOW,stackoverflow.com 2214,Can i customize add/edit page for list in sharepoint?,"Hi SharePoint Experts, Can use my custom page to add/Edit item from sharepoint list? if yes how? Do i need to do any config changes? ",gauravghodnadikar,https://stackoverflow.com/users/234479,"Sure you can! Check Create a custom list article form from Microsoft site. You will use SharePoint Designer 2007 for all the customizations. It also allows you to convert every form to HTML/XSLT and to customize it even further. ",Toni Frankola,https://stackoverflow.com/users/15626,http://stackoverflow.com/questions/1978769/can-i-customize-add-edit-page-for-list-in-sharepoint,STACKOVERFLOW,stackoverflow.com 6825,Visual Studio Schema Compare repeats table on update,"When comparing our production database to our database project, one table always shows up as ""Add"" action, even though the file is already part of the project. Updating the schema then produces the same file again with an underscore and increment (dbo.Data.sql => dbo.Data_1.sql) I noticed that when I open the individual table creation scripts, all scripts open in [Design] mode while the offending table opens as plain T-SQL. How do I add topsheet.Data to my project without it showing up on my next schema compare? The offending table: topsheet.Data A normal table: topsheet.Property ",Mario Tacke,https://stackoverflow.com/users/2859367,"Does it do this if you rename the table Data to something else? I saw here that Data is a future reserved keyword, maybe this is making it act all weird? ",sovemp,https://stackoverflow.com/users/713865,http://stackoverflow.com/questions/24275280/visual-studio-schema-compare-repeats-table-on-update,STACKOVERFLOW,stackoverflow.com 626,Channel Entries & Relationships,"I am trying to display a video and beneath it a series of related videos. All video are currently separate entries in the video channel. In another channel, ""video_courses"" I am using a relationship field to collate all video that belong to that course. At present I can get the video to display and a list of related videos but it shows all videos and is not restricted to just the related videos. How can I get the list to honour the relationship. Current code: {exp:channel:entries channel=""videos"" limit=""1""} <h1>{title}</h1> {exp:channel_videos:videos entry_id=""{entry_id}"" prefix=""cv"" limit=""1""} <section> <div class=""video-container""> {cv:embed_code} </section> {/exp:channel_videos:videos} {/exp:channel:entries} <ul id=""carousel"" class=""elastislide-list""> {exp:channel:entries channel=""video_courses"" disable=""categories|category-fields|member-data|pagination"" dynamic=""no""} {related_videos} {exp:channel_videos:videos prefix=""cv"" entry_id=""{related_videos:entry_id}""} <li><a href=""{related_videos:title_permalink='videos/view'}"" class=""image""><img src=""{cv:img_url_hd}{/exp:low_replace}"" alt=""image01"" /><h2><span>{cv:title}</span></h2></a></li> {/exp:channel_videos:videos} {/related_videos} {/exp:channel:entries} </ul> Any help appreciated. N ",Niall Thompson,https://expressionengine.stackexchange.com/users/527,"Try this: {exp:channel:entries channel=""videos"" limit=""1""} <h1>{title}</h1> {exp:channel_videos:videos entry_id=""{entry_id}"" prefix=""cv"" limit=""1""} <section> <div class=""video-container""> {cv:embed_code} </div> </section> {/exp:channel_videos:videos} <ul id=""carousel"" class=""elastislide-list""> {parents channel=""video_courses"" field=""related_videos""} {parents:related_videos entry_id=""not {entry_id}""} {exp:channel_videos:videos prefix=""cv"" entry_id=""{parents:related_videos:entry_id}""} <li> <a href=""{cv:title_permalink='videos/view'}"" class=""image""> <img src=""{cv:img_url_hd}"" alt="""" /> <h2><span>{cv:title}</span></h2> </a> </li> {/exp:channel_videos:videos} {/parents:related_videos} {/parents} </ul> {/exp:channel:entries} You may have to experiment with prefixes inside of the Channel Videos loop, not sure if you might need parents:related_videos prefixes inside of it - but this should get you most of the way. ",Derek Hogue,https://expressionengine.stackexchange.com/users/55,http://expressionengine.stackexchange.com/questions/18033/channel-entries-relationships,TECHNOLOGY,expressionengine.stackexchange.com 4760,Versioning with folders and document sets?,"According to this question SharePoint doesn't version folders. Is the same true of Document Sets? I know there is a ribbon command to manually capture a version of a document set, but does nothing happen automatically when the document set item is changed? I have custom document set content types and custom folder content types in my library which have various metadata fields. Versions are not being created when these fields are edited. Is this working as intended? ",HamHamJ,https://sharepoint.stackexchange.com/users/32661,"If you use document sets and versioning you should be aware of this: If the version of a document inside a document set changes, the version of the document set remains unchanged. Versioning of a document set can be done manually (by using the document set's ribbon) Versioning of a document set is like creating a snapshot http://www.sharepointeurope.com/blog/2013/5/2/sharepoint-2013-versioning-and-document-sets ",Amal Hashim,https://sharepoint.stackexchange.com/users/34350,http://sharepoint.stackexchange.com/questions/125322/versioning-with-folders-and-document-sets,TECHNOLOGY,sharepoint.stackexchange.com 1918,Ideal location to practice soldering,"Sounds like a stupid question, but really hasn't been asked before, or I haven't found a post about it. Either way, here it is: I bought a soldering iron recently and am looking for a place in my house to do my soldering. Of course the first thing in my mind would be to solder in the basement or garage and as close to a window/outdoors with good circulation, however I plan on working with arduino boards and would like to everything in my upstairs ""computer room"" near my gadgets. Do you think opening up my window in my room and having a fan suck out the fumes aimed at the window would be suffice to be safe, or should I stick with the basement/garage idea. Let me know on your thoughts. ",ProspectiveEng,https://electronics.stackexchange.com/users/27170,"Good circulation and a fume extractor/absorber. I use one of these guys: http://www.amazon.com/Weller-WSA350-Bench-Smoke-Absorber/dp/B000EM74SK/ref=pd_sim_sbs_hi_1 There are also smaller ones available that can be put right above the work area to absorb more: http://www.amazon.com/dp/B00012YSDW/ Carbon activated filter takes a lot of the fumes and chemicals out of the air. Also helps to turn on a ceiling fan, or your HVACs fan and get good air moving around. ",Kris Bahnsen,https://electronics.stackexchange.com/users/7598,http://electronics.stackexchange.com/questions/79605/ideal-location-to-practice-soldering,TECHNOLOGY,electronics.stackexchange.com 6506,What is the cardinality of the family of unlabelled bipartite graphs on n vertices?,"I have attempted to calculate the number of unlabelled bipartite graphs as follows: Let $G = (V_1, V_2, E)$ be a bipartite graph on $n$ vertices with $|V_1| = m$ and $|V_2| = n-m$. Assume without loss of generality that $|V_1| \leq |V_2|$ so $m \leq \left\lfloor \frac{n}{2} \right\rfloor$. If $G$ is complete bipartite then it has $m(n-m)$ edges since each of the vertices in $V_1$ is connected to each in $V_2$. Thus, the total number of bipartite graphs with parts of size $m$ and $n-m$ is $2^{m(n-m)}$. In order to find the total number of possible bipartite graphs on $n$ vertices we sum over all possible $m$: \begin{align} \sum^{\left\lfloor \frac{n}{2} \right\rfloor}_{m=1} 2^{m(n-m)} \end{align} However, I notice that I have counted labelled bipartite graphs where I need the number of unlabelled graphs. I'm struggling to see how to account for this. ",Andrew,https://mathoverflow.net/users/31128,"It seems that what Andrew wants to count are what are called in enumerative contexts ""bicolored graphs"". A bicolored graph is a graph in which the vertices have been colored black and white so that every edge joins two vertices of different colors. A bipartite (or bicolorable) graph is a graph that has a bicoloring. A bicolorable graph with $k$ connected components has $2^k$ bicolorings. (In nonenumerative contexts the distinction between bipartite and bicolored is usually unimportant.) In addition, in counting bicolored graphs one might or might not consider switching the two colors to give an equivalent graph. All of the versions of the enumeration problem have been solved. Counting unlabeled bicolored graphs (with no color-switching equivalence) is a straightforward application of Burnside's lemma; counting unlabeled bipartite graphs is tricky. It's not too hard to find appropriate references by searching MathSciNet. (Hint: ""color"" is sometimes spelled ""colour"".) Incidentally, the number of labeled bicolored graphs on $n$ vertices is $$\sum_{m=0}^n 2^{m(n-m)}\binom{n}{m}.$$ ",Ira Gessel,https://mathoverflow.net/users/10744,http://mathoverflow.net/questions/120674,SCIENCE,mathoverflow.net 8991,Unix C++: get time at a different zone,"I'm trying to get the time in a different timezone (PST) using C++. #define PST (-8); char* Time::getSecondSystemTime() { time_t rawtime; struct tm * timeinfo; char buffer[80]; time(&rawtime); timeinfo = gmtime(&rawtime); timeinfo->tm_hour = timeinfo->tm_hour + PST; strftime(buffer, 80, ""%I:%M %p"", timeinfo); std::string temp = std::string(buffer); // to get rid of extra stuff std::string extraInfo = "" Pacific Time ( US & Canada )""; temp.append(extraInfo); return (char*) (temp.c_str()); } The problem here is that when the GMT time is less than 8 hours (for example, right now, the time there is 3AM in the morning), subtracting 8 hours from it does not work! What is the proper way to get time at a different time zone in Unix? ",Shrouk Khan,https://stackoverflow.com/users/533631,"Here is a cleaner way of doing this (this example gets GMT time including DST bias): struct STimeZoneFromRegistry { long Bias; long StandardBias; long DaylightBias; SYSTEMTIME StandardDate; SYSTEMTIME DaylightDate; }; static SYSTEMTIME GmtNow() { FILETIME UTC; GetSystemTimeAsFileTime(&UTC); SYSTEMTIME GMT; TIME_ZONE_INFORMATION tz = {0}; STimeZoneFromRegistry binary_data; DWORD size = sizeof(binary_data); HKEY hk = NULL; TCHAR zone_key[] = _T(""SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones\\GMT Standard Time""); if ((RegOpenKeyEx(HKEY_LOCAL_MACHINE, zone_key, 0, KEY_QUERY_VALUE, &hk) == ERROR_SUCCESS) && (RegQueryValueEx(hk, ""TZI"", NULL, NULL, (BYTE *) &binary_data, &size) == ERROR_SUCCESS)) { tz.Bias = binary_data.Bias; tz.DaylightBias = binary_data.DaylightBias; tz.DaylightDate = binary_data.DaylightDate; tz.StandardBias = binary_data.StandardBias; tz.StandardDate = binary_data.StandardDate; } SystemTimeToTzSpecificLocalTime(&tz, &UTC, &GMT); return GMT; } ",Craig Jones,https://stackoverflow.com/users/2808254,http://stackoverflow.com/questions/14049047/unix-c-get-time-at-a-different-zone,STACKOVERFLOW,stackoverflow.com 6104,"Does ""surfeit"" have an adjectival counterpart?","I’m thinking of something like surfeitous, but obviously that’s not a word. ",mipadi,https://english.stackexchange.com/users/151,"The OED attests (what it calls) the participial adjective surfeited, meaning: Fed or filled to excess; oppressed or disordered by or as by over-feeding. The first citation is from Shakespeare, and two of the later ones are: 1842 Manning Serm. (1848) I. 22 — Take a watchful, self-denying man..and compare him with the heavy, surfeited man. 1886 H. F. Lester Under Two Fig Trees 182 — And then divide the morsel among these already surfeited gluttons. The now rare word surfeiting is not an adjective, but a verbal noun (or “gerund”) with the same sense as surfeit itself. For example: 1821 Lamb Elia Ser. i. Grace before Meat, — Gluttony and surfeiting are no proper occasions of thanksgiving. ",tchrist,https://english.stackexchange.com/users/2085,http://english.stackexchange.com/questions/18531/does-surfeit-have-an-adjectival-counterpart,CULTURE,english.stackexchange.com 8493,When are Unity scripts actually disabled?,"When I disable an active script in unity, will it be disabled then and there, or will it only be disabled at the end of the frame? For example, if I disable a certain script from within a ""OnCollisionEnter"" event method, will the ""disabled"" script still perform it's Update method for this frame? ",Ben,https://gamedev.stackexchange.com/users/30331,"I think this document from the Unity help should be useful. Look to the diagram at the bottom of the page. Physics and collisions are processed before the game logic so if you disable an object during collision it will become disabled after its next update. ",sydan,https://gamedev.stackexchange.com/users/55141,http://gamedev.stackexchange.com/questions/87495/when-are-unity-scripts-actually-disabled,TECHNOLOGY,gamedev.stackexchange.com 6836,does every right-angled coxeter group have a right-angled artin group as a subgroup of finite index?,"I thought that I read a paper making this claim a few months ago, but now I can't find it. If the answer is yes, is there a nice way to go from the presentation of the right-angled coxeter group to a presentation of its right-angled artin subgroup? Thanks. ",david mccune,https://mathoverflow.net/users/4027,"As James points out, the paper of Davis and Januskiewicz proves the inverse. To see that the answer to your question is 'no', consider the right-angled Coxeter group whose nerve graph is a pentagon. That is, it's the group with presentation $\langle a_1,\ldots, a_5 \mid a_i^2=1, [a_i,a_{i+1}]=1\rangle$ where the indices are considered mod 5. This group acts properly discontinuously and cocompactly on the hyperbolic plane, and it's not hard to see that it has a finite-index subgroup which is the fundamental group of a closed hyperbolic surface. Every finite-index subgroup of a right-angled Artin group is either free or contains a copy of $\mathbb{Z}^2$, but the fundamental group of a closed hyperbolic surface has no finite-index subgroups of this form. ",HJRW,https://mathoverflow.net/users/1463,http://mathoverflow.net/questions/18558,SCIENCE,mathoverflow.net 5605,awk - Group by and sum column values,"I have command to list system process by memory usage: ps -A --sort -rss -o comm,pmem Which list a table like COMMAND %MEM firefox 28.2 chrome 5.4 compiz 4.8 atom 2.5 chrome 2.3 Xorg 2.3 skype 2.2 chrome 2.0 chrome 1.9 atom 1.9 nautilus 1.8 hud-service 1.5 evince 1.3 I would like to get total memory share per programs instead of per process of same programs. So I could get output like COMMAND %MEM firefox 28.2 chrome 11.6 compiz 4.8 atom 4.4 Xorg 2.3 skype 2.2 nautilus 1.8 hud-service 1.5 evince 1.3 I thought about using awk, which I don't know much. Ended up with something like: ps -A --sort -rss -o comm,pmem | awk -F ""\t"" ' {processes[$0] += $1;} {End for(i in processes) { print i,""\t"",processes[i]; } }' But it didn't work. How can I correct this? ",Junaid,https://unix.stackexchange.com/users/15519,"processes[$0] += $1; use the whole line as key in your associative array, which is not unique. You must use $1, which is command name as key. Try: $ ps -A --sort -rss -o comm,pmem | awk ' NR == 1 { print; next } { a[$1] += $2 } END { for (i in a) { printf ""%-15s\t%s\n"", i, a[i]; } } ' If you want to sort the output by the second field, try: $ ps -A --sort -rss -o comm,pmem | awk ' NR == 1 { print; next } { a[$1] += $2 } END { for (i in a) { printf ""%-15s\t%s\n"", i, a[i] | ""sort -rnk2""; } } ' ",cuonglm,https://unix.stackexchange.com/users/38906,http://unix.stackexchange.com/questions/167280/awk-group-by-and-sum-column-values,TECHNOLOGY,unix.stackexchange.com 5380,How to remove a directory and its contents using NSFileManager,"New to Objective C. I have created a few directories which contain pdf files for an iPhone app. How can I delete a directory and its contents using NSFileManager? Do I need to loop through and remove the contents first? Any code samples would be much appreciated. Thanks in advance. ",booboo-a-choo,https://stackoverflow.com/users/393465,"To start off, it would be wise to look through Apple's NSFileManager documentation for the iPhone: NSFileManager Class Reference. Second, look at NSFileManager's -removeItemAtPath:error: method and its documentation. That's what you're looking for. ",Itai Ferber,https://stackoverflow.com/users/169394,http://stackoverflow.com/questions/3664694/how-to-remove-a-directory-and-its-contents-using-nsfilemanager,STACKOVERFLOW,stackoverflow.com 4930,How does multitasking work,"I am completely clueless about the inner workings of an operating system, but I can more or less guess the approximate behaviour of many functions. One thing that I am not able to figure out, though, is multitasking. In theory, the operating system manages time, according the CPU for small intervals to the various programs running. But it is not clear how this really works. Say the operating system wants to start my program. The machine code is loaded somewhere in RAM, starting at a certain address. I guess then a jump should be performed to that address, allowing my code to execute. But in this way, the OS cannot regain control until I jump back. Basically, I can imagine just two ways of making this work, but neither seems really suitable: The operating system could read the machine instructions I want to perform and emulate them instead of executing them directly. I am intentionally vague, since I do not know how this would work, but it seems like it would slow down the program considerably. Alternatively, the operating system could wait until I make a system call. In that moment it regains control and can check how long I have been running and do its timesharing stuff. This may work, but it seems unreliable, as I could make a long calculation which does not involve system calls and hang everything for a while. So, it seems neither mechanism would work very well. How is multitasking actually performed? ",Andrea,https://programmers.stackexchange.com/users/15072,"Timer interrupts can be generated by computer hardware to interrupt CPU. In this way, based on the scheduling algorithm used by Operating System, OS can decide whether to continue executing your current program or context switch to another one that is ready to run. ",nevayeshirazi,https://programmers.stackexchange.com/users/27001,http://programmers.stackexchange.com/questions/82432/how-does-multitasking-work,TECHNOLOGY,programmers.stackexchange.com 1042,Natty freezes constantly after install,"I've just installed 11.04 and now at random everything freezes. The keyboard responds but the only thing that seems to unlock it is a reisub. I never had this problem before and I've had this computer for almost a year. I'm using gnome 3 but it also happens when I'm using unity. Even if I don't have any programs running soon or later it freezes. I've seen some similar questions here like this and this but no solution. ",Blomkvist,https://superuser.com/users/79522,"Sounds like a sync issue (which I thought they'd already patched). Try this and see if it helps: Grab the compiz settings manager like so: sudo apt-get install compizconfig-settings-manager Open it up and browse to the openGL plug-in. Look for the ""Sync to VBlank"" option and uncheck it. ",Blomkvist,https://superuser.com/users/79522,http://superuser.com/questions/282746,TECHNOLOGY,superuser.com 3711,Can Noether's theorem be understood intuitively?,"Noether's theorem is one of those surprisingly clear results of mathematical calculations, for which I am inclined to think that some kind of intuitive understanding should or must be possible. However I don't know of any, do you? Independence of time <=> energy conservation. Independence of position <=> momentum conservation. Independence of direction <=> angular momentum conservation. I know that the mathematics leads in the direction of Lie-algebra and such but I would like to discuss whether this theorem can be understood from a non-mathematical point of view also. ",Gerard,https://physics.stackexchange.com/users/139,"Here are my two cents. Read the proof it will help you understand and build intuition because it is constructive. It explicitly shows you what the conserved quantity is, given the group of symmetries. If it is too hard to follow and you can't see the forest because of the trees, try a few examples it should help. Also here is a link that may help a bit. http://math.ucr.edu/home/baez/noether.html ",MBN,https://physics.stackexchange.com/users/1382,http://physics.stackexchange.com/questions/4959/can-noethers-theorem-be-understood-intuitively,SCIENCE,physics.stackexchange.com 882,Redirecting users to referrer page after logging in using custom login form,"I am using a custom wordpress login form using the following code. I have this form in the sidebar of my site: <?php if ( ! is_user_logged_in() ) { // Display WordPress login form: $args = array( 'redirect' => admin_url(), 'form_id' => 'loginform-custom', 'label_username' => __( 'Username' ), 'label_password' => __( 'Password ), 'label_remember' => __( 'Remember Me' ), 'label_log_in' => __( 'Log In' ), 'remember' => true ); wp_login_form( $args ); } else { // If logged in: echo 'you are already logged in'; wp_loginout( home_url() ); // Display ""Log Out"" link. echo "" | ""; wp_register('', ''); // Display ""Site Admin"" link. } ?> And in the functions.php page, I am using the following code to redirect users to the homepage after they log in: function my_login_redirect( $redirect_to, $request, $user ){ //is there a user to check? if( isset( $user->roles ) && is_array( $user->roles ) ) { //check for admins if( in_array( ""administrator"", $user->roles ) ) { // redirect them to the default place return $redirect_to; } else { return home_url(); } } else { return $redirect_to; } } add_filter(""login_redirect"", ""my_login_redirect"", 10, 3); My question is:, Is there a way to redirect users to the 'referrer page (page from where they logged in)' after they login by making changes to the above code or perhaps using a better code? Thanks in advance. ",theshorttree,https://wordpress.stackexchange.com/users/30729,"The key part is right here-- 'redirect' => admin_url(), in your first block of code. Whatever you set that to is where you will redirect. I don't see a reason for the second block if you are redirecting everyone. There is no function that I can find for ""this page"" so you probably want $_SERVER['REQUEST_URI'] $args = array( 'redirect' => esc_url($_SERVER['REQUEST_URI']), 'form_id' => 'loginform-custom', 'label_username' => __( 'Username' ), 'label_password' => __( 'Password' ), 'label_remember' => __( 'Remember Me' ), 'label_log_in' => __( 'Log In' ), 'remember' => true ); wp_login_form( $args ); Be careful with $_SERVER vars: http://markjaquith.wordpress.com/2009/09/21/php-server-vars-not-safe-in-forms-or-links/ ",s_ha_dum,https://wordpress.stackexchange.com/users/21376,http://wordpress.stackexchange.com/questions/94465/redirecting-users-to-referrer-page-after-logging-in-using-custom-login-form,TECHNOLOGY,wordpress.stackexchange.com 3083,How much water should I expect to be left in a dishwasher?,"After every load there is always some water left in the bottom of the drain basket/filter. It's not up into the dishwasher itself, but when I reach into the filter to clean it, there's always water in it. I have a GE QuietPower 3. Is this expected? If not, what can I do about it? ",Aaron,https://diy.stackexchange.com/users/2669,"I had exactly the same issue with my dishwasher. Standing water at the bottom after the wash cycle almost every time, yet the dishwasher appeared to be draining correctly. Nevertheless, the first thing to verify is that the dishwasher is indeed draining properly. Start a cycle to partially fill the washer, then manually engage the drain cycle. Does the water drain quickly and completely? If you're so inclined, you can (carefully) leave the door open while the dishwasher is draining and hold down the door lock mechanism with a small screw driver so that you can watch the process. Another option is to disconnect the drain from your disposal and place the end into a bucket to observe how the water is draining. It's also a good opportunity to clean out any sludge that may have formed in drain hose. If the draining appears to be functioning normally (as it was in my case) the next step is to verify the filter, food chopper blade and mesh grate that is in front of the sump pump/pump inlet housing is not clogged - this is slightly more involved, but still fairly easy to do. Here's a video to give you the general idea of the process: http://www.youtube.com/watch?v=lRDbTgBOtIE. This is not for your model specifically, but it should be fairly close. In my case, the mesh grate was almost 100% clogged with debris and hard water deposits, and the food chopper blade had a piece of string wrapped around it that kept it from spinning freely (no idea how that got there). After soaking the grate in a vinegar solution, cleaning the it with a toothpick and unwrapping the string from the blade, I haven't had any more issues with water remaining in the dishwasher. This may not fix your problem, but it's fairly easy to do yourself and may just save you a service call. Good luck. ",James H,https://diy.stackexchange.com/users/1920,http://diy.stackexchange.com/questions/6338/how-much-water-should-i-expect-to-be-left-in-a-dishwasher,LIFE_ARTS,diy.stackexchange.com 8751,Displaying additional User Contact Information,"I have been advised how to add additional contact info fields to the User admin area here (Click here). However, I am not entirely sure how I can display the the field contents in a link within my template files. Here is the code in my functions.php: add_filter( 'user_contactmethods', 'more_contactmethods' ); function more_contactmethods( $contactmethods ) { $contactmethods['twitter'] = 'Twitter URL'; $contactmethods['facebook'] = 'Facebook URL'; $contactmethods['linkedin'] = 'LinkedIn URL'; return $contactmethods; } And here's the code in one of my template files, but it doesn't seem to work, so I wonder whether I can actually do it this way? <?php $twitter = get_usermeta( $user_id, 'facebook' ); $facebook = get_usermeta( $user_id, 'twitter' ); $linkedin = get_usermeta( $user_id, 'linkedin' ); ?> <a href=""<?php echo $twitter ?>"" id=""twitterBtn"" title=""Visit our Twitter page"">Visit our Twitter page</a> ",remi90,https://wordpress.stackexchange.com/users/5883,"// Add/Remove Contact Methods function add_remove_contactmethods( $contactmethods ) { $contactmethods['twitter'] = 'Twitter'; $contactmethods['facebook'] = 'Facebook'; $contactmethods['Youtube'] = 'YouTube'; $contactmethods['linkedin'] = 'LinkedIn'; $contactmethods['skype'] = 'Skype'; // Remove Contact Methods unset($contactmethods['aim']); unset($contactmethods['yim']); return $contactmethods; } add_filter('user_contactmethods','add_remove_contactmethods',10,1); This works fine in Thesis. Here's the full tutorial http://wpsites.net/how-to-wordpress/how-to-addremove-custom-user-profile-contact-info-links-to-your-author-box/ ",Brad Dalton,https://wordpress.stackexchange.com/users/9884,http://wordpress.stackexchange.com/questions/32505/displaying-additional-user-contact-information,TECHNOLOGY,wordpress.stackexchange.com 6790,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. ",Irwin,https://academia.stackexchange.com/users/5944,"I cannot speak for faculty interviews personally and this may be redundant information but I interviewed at multiple ""top ranked"" schools for PhD admissions and in everyone of them I was asked where else I was interviewing and I told them the truth. Having said this, nowadays, most job talk notifications are available on the website of the university or college or institution where you are interviewing and it is relatively easy to determine this from a google search of your name. For instance, this year our department is hiring for 2 different job lines and there are quite a few faculty candidates giving talks every week. We always Google their names to find out where else they are interviewing. In the case of one particular candidate it was very useful to find out that that that candidate had put up a list of other institutions where he/she was interviewing this particular season. I do not think personally that giving them information about where else you are interviewing will add or subtract from your overall job application materials and probabilities. Best of luck for getting a job ! ",Shion,https://academia.stackexchange.com/users/1429,http://academia.stackexchange.com/questions/8766/should-i-tell-other-interviewers-where-else-ive-interviewed,LIFE_ARTS,academia.stackexchange.com 2119,Resonance stabilization and size of ligand atoms,"I am told that for these two molecules, one of them is not as resonance stabilized as the other. Apparently it's the chlorine one, and it's because of the mismatch in the size of chlorine and carbon. This makes sense prima facie, but can someone confirm this is true? I can see how carbon and nitrogen have similarly sized p orbitals and thus have good overlap, and how chlorine and carbon might have poor p orbital overlap, like a BB pellet with a basketball. ",Dissenter,https://chemistry.stackexchange.com/users/5084,"Yes, this is true. The $\pi$ overlap between a valence $\ce{p}$ orbital of a second row element and one of a higher row element is much smaller than the $\pi$ overlap between two second row elements. One reason is that the bond length is generally higher when higher row elements are involved (due to their size). Another reason is, that the $3 \ce{p}$ or $4 \ce{p}$ orbitals are much more diffuse than the $2 \ce{p}$ orbitals. If you want to read deeper into the topic have a look at: [1] W. Kutzelnigg, Angew. Chem. Int. Ed. Engl., 23, 272 (1984). [2] N. C. Norman, Polyhedron, 12, 2431 (1993). ",Philipp,https://chemistry.stackexchange.com/users/189,http://chemistry.stackexchange.com/questions/15920/resonance-stabilization-and-size-of-ligand-atoms,SCIENCE,chemistry.stackexchange.com 129,JQuery - Select exact class structure,"I am working on some functionality for a website. I am designing, and I am kind of stuck on something small. I want to hide divs that contain an exact class structure. For example, if I give it the class selector "".class1.class2.class3"", it will ONLY hide elements that have exact class structure. What I am doing now would hide elements like "".class1.class2.class3.class4"", and I don't want that. Any help would be greatly appreciated! ",Giovonni,https://stackoverflow.com/users/675074,"I you want to match objects that ONLY have exactly those three class names and you want to be insensitive to the order of the class names or the amount of white space between them, then you can do it like this: $('.class1.class2.class3').filter(function() { return(this.className.replace(/class1|class2|class3/g, """").replace(/\s*/g, """") == ''); }); If you want to only exclude a specific other class, then you can do it like this: $('.class1.class2.class3').not('.class4') ",jfriend00,https://stackoverflow.com/users/816620,http://stackoverflow.com/questions/9476822/jquery-select-exact-class-structure,STACKOVERFLOW,stackoverflow.com 7320,What types of sauces would pair well with boiled pork knuckles?,"I'm going to be boiling some pork knuckles. What type of sauce would be a good pairing? I am guessing that because pork knuckles are fatty, the sauce should tend to be sour or pepper-ish to balance out the fatty taste? ",KMC,https://cooking.stackexchange.com/users/8434,"One traditional accompaniment for pork is apple sauce. This follows the convention that a fruity sauce cuts through the fattiness of meat - duck a l'orange is another example. Apple sauce is easy to make - just taking a cooking apple, chop it up, stew it down with a little water, then stir in some sugar and butter to taste. ",ElendilTheTall,https://cooking.stackexchange.com/users/4194,http://cooking.stackexchange.com/questions/19918/what-types-of-sauces-would-pair-well-with-boiled-pork-knuckles,LIFE_ARTS,cooking.stackexchange.com 4741,Can monsters make multiple attacks in a single action?,"In the bestiary for the new D&D Next playtest packets, some creatures look as though they get multiple attacks per round. e.g.: An owl bear gets Melee Attack: Claws +5/+5 (etc.) and Bite +5 (etc.) along with a special power says that if both claw attacks hit, then extra damage is done. However, the basic rules don't seem to cover this situation. I can't tell if the owlbear is able to use both claws AND bite in one action, or if it can only use one claw OR a bite, or 2 claws OR A bite. So, do monsters get multiple attacks per action? And what are the rules for the owl bear, or other monsters that have a +x/+x description for an attack? One possible way to answer this question would be to explain how this worked in earlier editions of D&D. If you can tell from the rules test how this is supposed to work, that would be a better answer. ",GMNoob,https://rpg.stackexchange.com/users/2064,"It gets all the attacks. In earlier pre-3e editions that kind of notation meant simply that the monster got all those attacks, and I'm sure that's the intent in D&D Next. In 3e and later there were more complex action types but those are not in 5e (yet). ",mxyzplk,https://rpg.stackexchange.com/users/140,http://rpg.stackexchange.com/questions/14653/can-monsters-make-multiple-attacks-in-a-single-action,CULTURE,rpg.stackexchange.com 9216,Do volcano blast changes earth's course?,"Volcano blasts are one of the most powerful calamities on earth. When they blast they release large amount of mass in the air just like a jet does. Does such a blast have any effect on the course of the Earth? Does it change the Earth's orbit in any way? If not then how big a blast is needed to do it? Would a full eruption of the Yellowstone Supervolcano do it? ",Dimensionless,https://physics.stackexchange.com/users/9023,"Shoot out a pea attached with a spring to the big lead ball. Nothing will change for the course of earth as the (minimal shifted) centre of mass of the whole system keeps it initial course it always had. If the force is so great that the spring snaps and the pea does get detached, the c.m. wouldn't change either as the recoil moment would push it back. Earth will have a wobble for a while, being dampened by releasing heat. Entropy is rising so thermodynamically sound. ",Ger,https://physics.stackexchange.com/users/27575,http://physics.stackexchange.com/questions/72451/do-volcano-blast-changes-earths-course,SCIENCE,physics.stackexchange.com 1115,Tooltip pointer in ParametricPlots,"ParametricPlot[{ Cos[u]^v , u}, {v, 0, 1}, {u, 0, Pi/2 }, Mesh -> {5, 5}] ParametricPlot[Tootip[{ Cos[u]^v , u}, {v, 0, 1}], {u, 0, Pi/2 }] How to introduce Tooltip pointers? ( ParametricPlot3D Tooltip may not be available yet? ). EDIT1: Updating my question. Please ignore everything above the EDIT1: ParametricPlot[ { u Cos[v], u Sin[v]}, {u, 1, 2}, {v, 0, Pi/2}, Mesh -> {3, 5}] It is a two parameter plot. So I like to see either of $ u,v $ parameter lines being pointed at with the value of the set constant only. To make clear with an example, when I mouse over circles, like to see Tooltips in the above ParametricPlot pointing with SINGLE values {$ 1,1.25,1.5,1.75,2 $} and also when mousing over radial lines SINGLE {$ 0, \pi/12, 2 \pi/12,...5 \pi/12, \pi/2 $ } for the radial lines. It is a very simple requirement that I believe could cater to a common requirement of a majority of users. I am not looking at high frequency sophisticated dynamic motion picture display. Not even looking at double parameter display at intersection/junction of parameter lines. Just like the way height is displayed for ContourPlots. Here it is required for both parameters, with or without Shading. Asked this because it is not (yet) a standard feature. EDIT2: Based on Michael E2's lines, tried to depict eccentric circles.In the space between parameter lines it may need to be somewhat changed. {umin, umax, ustep, vmin, vmax, vstep} = {0, 2 Pi, Pi/8, 0.25, 1.25, .25}; ParametricPlot[{Sqrt[2 + v^2] + v Cos[u], v Sin[u]}, {u, umin, umax}, {v, vmin, vmax}, Mesh -> {Table[{u, Tooltip[Null, u]}, {u, umin, umax, ustep}], Table[{v, Tooltip[Null, v]}, {v, vmin, vmax, vstep}]}] /. {g___, Tooltip[_, label_], l_Line} :> {g, Tooltip[l, label]} ",Narasimham,https://mathematica.stackexchange.com/users/19067,"Add a dummy graphic to each mesh line with the appropriate tooltip label and combine them via post-processing: ParametricPlot[{u Cos[v], u Sin[v]}, {u, 1, 2}, {v, 0, Pi/2}, Mesh -> { Table[{u, Tooltip[Null, u]}, {u, 1, 2, 0.25}], Table[{v, Tooltip[Null, v]}, {v, 0, Pi/2, Pi/12}]} ] /. {g___, Tooltip[_, label_], l__Line} :> {g, Tooltip[{l}, label]} Update notice: The pattern was changed from l_Line to l__Line to handle multiple instances of Line in a mesh line, as pointed out by Mr.Wizard in a comment, along with a change in the Tooltip code to handle the sequence l. ",Michael E2,https://mathematica.stackexchange.com/users/4999,http://mathematica.stackexchange.com/questions/79095/tooltip-pointer-in-parametricplots,TECHNOLOGY,mathematica.stackexchange.com 6273,PHP and MySQL calendar issue,"I'm writing trying to build a calendar right from scratch. I'm using the function written by David Walsh (see link) and it's great. He does a query for each day's cell. But, I'm afraid that when the script's gonna have to run 30 queries in each render, it's gonna be sloooow. So, I was trying to think in another logic, for example, make a big query from X date to Y date at the begining of the script and then, at each day, check if that particular day has an event in the previous query. But I have no idea of how to do this... So, if anyone can help, please shout! Thanks. ",fedeisas,https://stackoverflow.com/users/227927,"Yes, I would go with your...uh...bold suggestion. As posted above, it makes no sense to run the query in a loop. What exactly do you need help with, then? ",Franz,https://stackoverflow.com/users/192741,http://stackoverflow.com/questions/1873340/php-and-mysql-calendar-issue,STACKOVERFLOW,stackoverflow.com 3834,I am or was a religious jew and purposely ate non kosher,"I'm a religious Jew. I kind of lost faith and ate non-kosher purposely, and now I feel so bad with myself that I want to die. What should I do? Is there any type of repentance I should take upon myself so that I feel better and stop in general to eat non kosher? ",jim,https://judaism.stackexchange.com/users/2774,"I'm more concerned that you want to die. Why would you want to die after eating non kosher food? You can break nearly any mitzvah to save your life, certainly kashrut laws are included in Pikuach Nefesh. So I just find it concerning that you'd want to lose your life after committing an aveira. Do teshuvah and you're fine. ",rosen,https://judaism.stackexchange.com/users/2781,http://judaism.stackexchange.com/questions/28655/i-am-or-was-a-religious-jew-and-purposely-ate-non-kosher,CULTURE,judaism.stackexchange.com 8047,How to ask a question according to the specific sections?," (1)I get up early in order to catch a bus. (2)I get up early because I can catch a bus. How to ask a question according to “in order to catch a bus ” and ""because I can catch a bus""? ",user48070,https://ell.stackexchange.com/users/2065,"What do you want to achieve by getting up early? I get up early in order to catch the morning bus. What is your reason for wanting to get up early? I get up early because if I don't, I will miss the morning bus. Note that the question can really the same: why? The difference is how the answer is worded: Why do you X? I do X in order to . Why do you X? I do X because of . I think your intended answers are based on the fact that you must catch the morning bus to arrive to work on time. - I get up early in order to catch the morning bus. - I get up early because if I don't, I'll miss the morning buss. - I get up early so I can make it to work on time. - I get up early because I want to make it to work on time. Following is a bunch of examples. I'm not sure if it's just me, but it seems that often the ""because"" answer is kind of worded in the opposite sense of the ""in order to answer"". It seems like ""because"" is the driving force or reason, and ""in order to"" is a goal state. Also, the ""in order to"" answer seems more cold/clinical/unemotional/to-the-point while the ""because"" has more emotion and a broader set of reasons. I don't know if this is just me though: Why do you eat hamburgers? I eat hamburgers because I like hamburgers. Why do you eat hamburgers? I eat hamburgers because [I'm trying | I want | I need] to gain weight. Why do you eat hamburgers? I eat hamburgers in order to gain weight. Why are you eating hamburgers right now? Because their only $1 each. Why are you eating hamburgers right now? In order to save money; they're only $1 each. Why are you eating hamburgers right now? Because [I want | I need] to save money, and their only $1 each. Why do you eat food? I eat food in order to live. Note how well ""in order to"" answers an abstract question. Why do you eat food? I eat food because I need to eat food in order to live. Not a great answer. Why do you eat food? I eat food because if I don't, I will starve to death. Because is using the opposite sense to mean the same thing. Why do you eat food? I eat food in order to avoid starving to death. In order to sounds more awkward this way than the first line. Why do you eat food? I eat food because I get hungry. Because is more simple here, based on base emotion or desire. Why do you eat food? I eat food in order to satisfy my hunger. In order to has to carefully consider the goal state. Why do you watch James Bond movies? I watch James Bond movies because I like James Bond. Why do you watch movies? I watch movies in order to gain enjoyment. In order to is more cold/passive way of describing things. Why do you watch movies? I watch movies because it's fun. Why do you smoke? I smoke because I'm addicted to nicotine. Why do you smoke? I smoke in order to satisfy my nicotine cravings. Why are you trying to quit smoking? I'm trying to quit smoking because smoking is bad for me. What are you trying to quit smoking? I'm trying to quit smoking in order to get more healthy. ",CoolHandLouis,https://ell.stackexchange.com/users/3796,http://ell.stackexchange.com/questions/22934/how-to-ask-a-question-according-to-the-specific-sections,CULTURE,ell.stackexchange.com 2730,Adjustable sample size in clinical trial,"Most clinical trials I see have a fixed sample size. In some cases they have prior data that allows estimating the effect size and the variance or distribution of values, and calculate the sample size from that for a certain power. In other cases it is just a guess. Why wouldn't people run a clinical trial in which the sample size was determined during the trial? (for example, by increasing it until the confidence interval narrowed to a certain size specified in advance) Is there any reason this would not be a valid design? Are there any examples of trials like that, and any references for designing a trial like that? ",Alex I,https://stats.stackexchange.com/users/43106,"I think AdamO's answer is great, but I think it's also worth emphasizing out that this adaptive sample size design is how many (maybe even most? I've done theoretical work during internships at pharm companies, but can't say I've ever planned a real study...) clinical trials are run. That is to say, if a sequential design is used, initial patients are recruited and treated. Part way through the study, the currently collected data gets analyzed. Three possible actions can occur at this point: the data may show a statistically significant result and the study will be stopped because efficacy has been demonstrated, the data many statistically significantly show that there is no strong effect (for example, the upper end of the confidence interval is below some clinically significant threshold) and the study is stopped due to futility or the data is not yet conclusive (i.e. both a clinically significant effect and a clinically insignificant effect are contained in the confidence interval) in which more data will be collected. So you can see that in this case, the sample size is not fixed. An important note about this: you can't just run a standard test each time you ""check"" your data, otherwise you are doing multiple comparisons! Because the test statistics at different times should be positively correlated, it's not as big an issue as standard multiple comparison issues, but it still should be addressed for proper inference. Clinical trials, being regulated by the FDA, must state a plan for how they will address this (as @AdamO points out, SeqTrial provides software for this). However, often times academic researchers, not being regulated by the FDA, will continue to collect data until they find significance without adjusting for the fact that they are doing several comparisons. It's not the biggest abuse of statistical practice in research, but it still is an abuse. ",Cliff AB,https://stats.stackexchange.com/users/76981,http://stats.stackexchange.com/questions/159373/adjustable-sample-size-in-clinical-trial,SCIENCE,stats.stackexchange.com 2254,Layman's guide to getting started with Forex (foreign exchange trading)?,"How should I get started with Forex (foreign exchange trading)? How should I prepare myself for it? Please give your answer thinking of me as a layman. ",harvardfail,https://money.stackexchange.com/users/4311,"I definitely can recommend you a site called babypips. Their beginner course section is great to get a good overview what you ""could"" do in FOREX trading. For starting out I definitely recommend a dummy account! (NEVER use real money in the beginning!) ",Kare,https://money.stackexchange.com/users/10583,http://money.stackexchange.com/questions/12446/laymans-guide-to-getting-started-with-forex-foreign-exchange-trading,LIFE_ARTS,money.stackexchange.com 1129,Flask-SQLAlchemy many-to-many ordered relationship in hybrid_property,"I am trying to get the first object out of an ordered many-to-many relationship using Flask-SQLAlchemy. I would like to accomplish this using hybrid properties, so I can reuse my code in a clean way. Here is the code, with some comment: class PrimaryModel2Comparator(Comparator): def __eq__(self, other): return self.__clause_element__().model2s.is_first(other) class model2s_comparator_factory(RelationshipProperty.Comparator): def is_first(self, other, **kwargs): return isinstance(other, Model2) & \ (db.session.execute(select([self.prop.table])).first().id == other.id) model1_model2_association_table = db.Table('model1_model2_association', db.Column('model1_id', db.Integer, db.ForeignKey('model1s.id')), db.Column('model2_id', db.Integer, db.ForeignKey('model2s.id')), ) class Model1(db.Model): __tablename__ = 'model1s' id = db.Column(db.Integer, primary_key=True, autoincrement=True) model2s = db.relationship('Model2', order_by=desc('Model2.weight'), comparator_factory=model2s_comparator_factory, secondary=model1_model2_association_table, backref=db.backref('model1s', lazy='dynamic'), lazy='dynamic' ) @hybrid_property def primary_model2(self): return self.model2s.order_by('weight desc').limit(1).one() @primary_model2.comparator def primary_model2(cls): return PrimaryModel2Comparator(cls) class Model2(db.Model): __tablename__ = 'model2s' id = db.Column(db.Integer, primary_key=True, autoincrement=True) weight = db.Column(db.Integer, nullable=False, default=0) And the usage: Model1.query.filter(Model1.primary_model2 == Model2.query.get(1)) The problems are: In my comparator factory is_first method I can't get the actual instance, so I don't know which are the Model2s associated In the same method I want to order my select against the weight attribute of Model2, and then take the first Something is not clear in my head, maybe there's a simpler solution? ",Michele Gargiulo,https://stackoverflow.com/users/619373,"Perhaps looking at a working many-to-many example might help. Flask-Security is a great one. https://pythonhosted.org/Flask-Security/quickstart.html#sqlalchemy-application ",jwogrady,https://stackoverflow.com/users/1569010,http://stackoverflow.com/questions/24147353/flask-sqlalchemy-many-to-many-ordered-relationship-in-hybrid-property,STACKOVERFLOW,stackoverflow.com 5181,Is there any granular way to change decisions made in ME1/ME2 to see different outcomes in ME3?,"In ME1 and ME2, I had to make decisions not really understanding their impact on the series as a whole. Now that I'm partway through ME3, I find myself curious as to what would have happened had I made a different choice previously. What if I'd done X? What if I'd let Y live/die? I can't just replay ME3, import my ME2 save, and make different choices to see these outcomes - I'd have to make changes to the way I played ME/ME2. Likewise, importing no save would make wholesale changes to my experience that I'm not sure I'd appreciate. Besides starting the entire series over again, and running through each game dozens of times to explore the various permutations, what can I do to change the way things play out in ME3? Do I get the option to edit the imported starting state on New Game+? I'm on the Xbox, so save file editing or importing from the internet is likely to be at least challenging, if not impossible. ",agent86,https://gaming.stackexchange.com/users/13845,"Theoretically your best bet would be using a save game editor to change the flags regarding those pre-ME3 decisions and outcomes. There was one for ME2, but I admit I haven't checked if ME3 has one. Alternately, I recall an archive of all possible ME1 variant ending saves that people could import into ME2 to get the start they wanted, hang on.. Bingo. Your second best bet would probably be to use that site, download the save you want to import, play through, download next save, etc. ",Shadur,https://gaming.stackexchange.com/users/7864,http://gaming.stackexchange.com/questions/55368/is-there-any-granular-way-to-change-decisions-made-in-me1-me2-to-see-different-o,CULTURE,gaming.stackexchange.com 731,Can I expect my e-mail to be routed securely?,"If I connect to my e-mail server via SSL (SMTP/SSL) and the recipient also only checks his e-mail via SSL (web/https or IMAP/SSL), does this - generally speaking - increase the security for the message content in any way? That is, will the communication between my providers e-mail server and the recipients e-mail server be ""secure""(*), or will the e-mail be delivered plain text between the servers? (*) Secure in the context of: encrypted throughout it's transit. Not secure in the sense that I'd put any really sensitive info in there. ",Martin,https://security.stackexchange.com/users/3785,"The SMTP servers may (probably will) still transfer the email as plain text. Sometimes SSL is used, but you cannot count on this being the case unless you specifically know the configuration of the specific servers on both ends. This means that in your scenario, an adversary capable of monitoring Internet backbone traffic could intercept the email. (Generally adversaries with this level of capability are state actors.) SSL is still important on both ends to protect account credentials, and it will protect you against adversaries monitoring the traffic on your local network. Many attacks are going to be at this level - someone on the same wireless network as you, for instance, or who has compromised a local server on your LAN. However, SSL will do nothing to protect you against a compromised SMTP server. Message-level encryption is required if you want to avoid any transmission of the message in plaintext, and importantly means that the message will not be stored in plaintext on either server. For non-state adversaries this is the biggest attack vector - just compromise the SMTP server on either end and you can read all the plaintext mail even if every transmission along the way used SSL. S/MIME and PGP (GnuPG) are the two standards for doing this. Even then, the message envelope will be visible. You cannot prevent an adversary who can sniff the traffic between the SMTP servers from reading the envelope, so they would know things such as the to, from, and subject line. To directly answer your question, both parties using SSL to send and retrieve their email does improve your security - and it improves your security versus non-state adversaries a lot - but to secure the message content as much as possible you should use message-level encryption to fully encrypt the message body, and accept that the email headers will still be transmitted in the clear. An adversary capable of seeing the traffic between the SMTP servers would still be able to tell who you were emailing and what the subject line was - there's no way around that besides ""don't use email"" - but they would not be able to read the body of the message. ",Ian,https://security.stackexchange.com/users/3089,http://security.stackexchange.com/questions/8289/can-i-expect-my-e-mail-to-be-routed-securely,TECHNOLOGY,security.stackexchange.com 6352,Grouping by day + events spanning several days,"This is a question that has already been asked on Drupal.org. It's exactly what I need on my view, but it hasn't been answered yet. Posted by Amanda-333 on April 12, 2011 at 5:58am I wanted to ask how I can group events by day in a view. It works fine if I only have events that have their start- and endtime on the same day. 2011-04-12 2011-04-12 10:00 – 2011-04-12 18:00 Event 1 2011-04-12 12:00 – 2011-04-12 14:00 Event 2 2011-04-13 2011-04-13 10:00 – 2011-04-13 18:00 Event 5 2011-04-13 12:00 – 2011-04-13 14:00 Event 8 The problem: I have some events that take several days or weeks. Example: I create one event with the start date of 2011-04-12 10:00 and the end date of 2011-04-15 19:00 for example. This event now shows up in the grouped view as 2011-04-12 - 2011-04-18 2011-04-12 10:00 - 2011-04-15 19:00 Event 11 I would like to have that event sorted into the regular day groups (split that event into day parts): 2011-04-12 2011-04-12 10:00 - 2011-04-15 19:00 Event 11 2011-04-13 2011-04-12 10:00 - 2011-04-15 19:00 Event 11 2011-04-14 2011-04-12 10:00 - 2011-04-15 19:00 Event 11 2011-04-15 2011-04-12 10:00 - 2011-04-15 19:05 Event 11 Similar to how it is done in the calendar – day view. But with a simple text list format. I can not find a way to do this? Perhaps someone can give me a little help? https://www.drupal.org/node/1124616 ",Johnny Martin,https://drupal.stackexchange.com/users/32218,"Make 2 or 3 computed view fields (which will require some php): 1field for day of event 1 or 2 fields for start time and end time dates. You can group the View output by the first field. Then create the event time range by inlining the 2 other fields. With these 3 pieces of info the calendar should be able to see the start and end datetimes and make a line representing the event duration. ",tenken,https://drupal.stackexchange.com/users/3279,http://drupal.stackexchange.com/questions/120378/grouping-by-day-events-spanning-several-days,TECHNOLOGY,drupal.stackexchange.com 2908,Prevent internet access except for one server?,"I want to see if the HTTP proxy support for an application is working correctly. In order to check this I have installed a Ubuntu VirtualBox on my Mac laptop and I want to configure the virtual machine so that it has no access to any other internet host except my test proxy server. How can I configure the virtual machine? From what I've read it sounds like ""route add ..."" should be able to do it but I'm not sure exactly how to use it. Please advise! Thanks! ",Aaron Watters,https://serverfault.com/users/174183,"You could do following things : Set environment variable, provided that you are talking only about HTTP proxy http_proxy=""http://username:password@host:port"" ; export http_proxy Route all traffic through some host on the IP level with route route add default gw 12.12.12.12 where 12.12.12.12 should be substituted by your gateway ip address that has it's proxy server running at. Drop all traffic to other hosts, but your database with iptables ",wojciechz,https://serverfault.com/users/132907,http://serverfault.com/questions/508608,TECHNOLOGY,serverfault.com 2327,"Is the following usage of ""matter-of-factly"" correct?","Most of the usage of ""matter-of-factly"" that I've seen is to describe a manner of speaking - ""He said, matter of factly,..."", etc. A friend brought up the following usage, which seems wrong, but I can't pinpoint exactly what is wrong. ""Matter of factly, I don't know. I know from my dad's experience."" What's the view on this? Couple of points: The adjective form ""As a matter of fact, I don't know. ..."" seems correct. Similar usage of literally works: ""I literally don't know."" or ""Literally, I don't know"" ",ak86,https://english.stackexchange.com/users/3850,"I've never heard it, and BYU's COCA has but one example of it (and q.v., as I'm not sure even it's in this sense). So, short answer, maybe it's an up-and-coming usage or maybe it's a one-off your friend heard, but in any event don't put it in your written work — yet. ",msh210,https://english.stackexchange.com/users/3461,http://english.stackexchange.com/questions/9361/is-the-following-usage-of-matter-of-factly-correct,CULTURE,english.stackexchange.com 1875,How do I counter support Zyra?,"I main support, usually opting for poke supports such as Lulu and Sona or aggressive supports such as Blitzcrank and Leona. Since the various Regional Finals, however, I've begun to encounter support Zyras in my bot lane. This is a very difficult lane for me. I can't establish lane dominance, since Zyra just sits in her bush and puts seeds in mine. I've tried a rune page with flat MR for when I play against Zyra to counter some of her harass, but it doesn't help against her cc. How can I effectively counter a support Zyra? ",Schism,https://gaming.stackexchange.com/users/31508,"I just played as Janna against Zyra in a MF vs MF match-up. Key was to sheld in time of the damage that was comming while being in range of friendly MF and also well positioned. I simply wasnt skillfull enough with the sheld, so we got pushed back and Tower fell. You are now be thinking that I should sheld the Tower, but trying to sheld MF or myself (often too late) made the skill go on cooldown when the Tower was taking damage. Janna should be a useful counter, but it takes more skills than me and most supports players have. ",user54534,https://gaming.stackexchange.com/users/54534,http://gaming.stackexchange.com/questions/88816/how-do-i-counter-support-zyra,CULTURE,gaming.stackexchange.com 6638,Make the compare list work without filling the log_* tables?,"The Magento compare list feature only works, when the log_* tables are being filled. If they are not, the compare list is global, which means, whenever a customer adds to the list, every other customer can see that recently added item. I disabled (and cant enable) this feature by putting this in my local.xml: <controller_action_predispatch> <observers><log><type>disabled</type></log></observers> </controller_action_predispatch> <controller_action_postdispatch> <observers><log><type>disabled</type></log></observers> </controller_action_postdispatch> Removing this makes the compare list work right away. The question is, is there a workaround for that? Is there a way to make the compare list work and not fill the log_* tables? Thanks! ",user1638055,https://magento.stackexchange.com/users/5479,"Sadly the compare items are tightly linked to the visitor information. The table catalog_compare_item has a column for visitor_id which when you disable the observers mentioned in your question, is set to 0 and so all visitors can see these items. When you add an item to the compare list the visitor is linked into that item. Mage_Catalog_Model_Product_Compare_List::addProduct calls the protected function _addVisitorToItem which gets the visitor id set from the log/visitor and attaches this to the item, as well as the customer id when you are logged in. protected function _addVisitorToItem($item) { $item->addVisitorId(Mage::getSingleton('log/visitor')->getId()); if (Mage::getSingleton('customer/session')->isLoggedIn()) { $item->addCustomerData(Mage::getSingleton('customer/session')->getCustomer()); } return $this; } Without limiting the compare functionality to logged in customers only I cannot see a way around filling these log tables as Magento needs to know what visitor is actually requesting the items to be compared. ",David Manners,https://magento.stackexchange.com/users/158,http://magento.stackexchange.com/questions/16221/make-the-compare-list-work-without-filling-the-log-tables,TECHNOLOGY,magento.stackexchange.com 7801,"Running Linux inside Windows XP, ie no dual booting","What are the best options that allow running a Linux distribution, such as Ubuntu inside Windows XP, i.e. within a window? By ""best"" I mean quick startup time, low memory requirement, good graphical performance, easy access to the main (host) Windows XP file system. I know about Wubi and standard Ubuntu with the dual boot capability, but I'd prefer to be able to switch from XP to Linux without a reboot. I know the Linux experience may not be ideal this way, but it would be pefectly good for my needs. I've downloaded VirtualBox and the latest Ubuntu and will try the virtual machine approach; however are there any specifically customised Linux versions for this purpose? I think this would be a great way for people new to Linux to get used to the OS while still having the ""safety net"" of Windows. ",Ash,https://superuser.com/users/1129,"What you are after is virtualization, such as VMWare or, like you said, VirtualBox. These allow you to run any guest operating system within a host operating system, inside a window, just like you are after. If you set the virtual machine to suspend (or 'save state') every time you are finished with it, you can have 'boot times' of something like 15 seconds. VMWare and VirtualBox are probably the most reputable cross-platform virtual machine offerings (that are 'consumer friendly'). You could always give Xen a go, which is more for servers, instead of desktops PCs. Here is a guide on installing Windows XP on a Xen VM ",Josh Hunt,https://superuser.com/users/919,http://superuser.com/questions/10694,TECHNOLOGY,superuser.com 9549,CMOS 4066 Question,"This is my first post here and I have a question about a CMOS circuit I have been designing for I while using the 4066 (I'm a noob to digital electronics). I am using a 4066 to pass random pulses I generated by feeding a noise generator with two two outputs (the generator is connected to a JFET amp and then clamped with diodes to two different dc voltages) into a 4050 (one buffer for each noise gen output). The pulses work perfectly. The only problem is, when the 4066 is not enabled, about 1 volt of the pulses pass through each switch. I was wondering if there was any way to fix that! Here is my circuit: ",Zack Frost,https://electronics.stackexchange.com/users/37971,"As noted, adding a resistor to the desired ""idle state"" voltage will cause the output to swing to that voltage when the 4066 is disabled. If one would like the output to stay at its present voltage when the 4066 is disabled, and if one is driving a high-impedance load, one may instead use a capacitor. If a capacitor is used, then while the 4066 is enabled the cap voltage will swing toward the input, and when it is disabled it will tend to stay more or less where it is (though it will likely drift away from its present voltage at some speed). The larger the cap, the more slowly the cap will switch to the desired voltage, but the more slowly it will drift away. Feeding the output of the 4066 into an op amp wired as a voltage follower may also slow down the drift. I'm not sure exactly what you are intending your circuit for, but some kinds of ""random computer noise"" were historically generated by feeding a noise source through an analog switch which was turned on briefly about 5-10 times/second, and then a cap; the voltage on that cap was then used to control the frequency of an oscillator. ",supercat,https://electronics.stackexchange.com/users/3123,http://electronics.stackexchange.com/questions/101311/cmos-4066-question,SCIENCE,electronics.stackexchange.com 2527,How are pixels actually shown on display,"I spend a lot of time looking at raw-video in YCbCr-format. Started thinking about what is really shown on the display and how the pixels end up there. No display can handle YCbCr-data so I guess everything gets converted to RGB somewhere. YCbCr->RGB is however tricky business, see e.g. http://www.fourcc.org/fccyvrgb.php If I do the YCbCr- to RGB-conversion, am I guaranteed that the pixel-values I have are the ones being displayed? Short of getting a hardware-calibrated Eizo-display like the ones shown here: http://www.eizo.com/global/products/coloredge/ is there a way to have as much control as possible over the ""pipeline"" to the display (i.e. my pixels do not get converted on the way) I'm thinking perhaps nvidia/gpu/opengl and moving everything as close to the HW as possible; then for my graphic-card at least I know what I'm looking at. Is there a RGB-format that is native for graphics card and that doesn't require any further conversion? YCbCr is 8bpp and I'm thinking 32-bit RGB 4:4:4. I'm mainly on an linux-system if that makes a difference. Currently I'm using http://www.libsdl.org/ There's also http://directfb.org/ but I haven't explored that path yet. Or, perhaps all this is just stupid and paranoid :-) ",Fredrik Pihl,https://superuser.com/users/84828,"That's a lot of questions, I'll try to answer at least some of them. No display can handle YCbCr-data so I guess everything gets converted to RGB somewhere. All displays use RGB. On LCDs each pixel consists of three subpixels in three basic colors. So you're right, everything must be converted to RGB to be displayed. If I do the YCbCr- to RGB-conversion, am I guaranteed that the pixel-values I have are the ones being displayed? It depends what you mean. You are guaranteed that exact results of the conversion are displayed. So it depends on the results of conversion and those depend on the gamma you're using. is there a way to have as much control as possible over the ""pipeline"" to the display (i.e. my pixels do not get converted on the way) I'm thinking perhaps nvidia/gpu/opengl and moving everything as close to the HW as possible; then for my graphic-card at least I know what I'm looking at. Once the image is converted to RGB, it's not modified anymore (unless you use f.lux or similar software). It doesn't really matter if it's closer to hardware or not, it's just a bunch of pixels and nothing will modify them after conversion to RGB (unless you ask something to, like with the mentioned f.lux, color correction software or video editing programs that can apply color filters). YCbCr is 8bpp and I'm thinking 32-bit RGB 4:4:4. I think you're mixing few things up or I don't get what you mean. First, 32-bit RGB can't be 4:4:4, because you can't equally split 32 bits to 3 color channels. (10 bits for R, 11 bits for G, 11 bits for B?) 32-bit RGB actually consists of three 8-bit color channels and one 8-bit transparency channel. Videos don't have transparency, so they work with 24-bit RGB. (8 bits for each channel) I don't know how YCbCr is saved in digital format, but I'm sure it's not 8-bit, at least assuming we're talking about total size of a pixel. (if you mean 8-bit color channels, then it's exactly as much as in RGB) 8-bit pixels could hold up to 256 colors. 24-bit RGB is over 16 million colors. Is there a RGB-format that is native for graphics card and that doesn't require any further conversion? So you want raw, uncompressed RGB pixels? Well, there are such picture and video formats, but uncompressed videos take up really A LOT of space. Let's do a quick calculation for a 24-bit 24fps 1080p video: 3B * 1920px * 1080px * 24fps = 149299200B So every second of raw uncompressed 1080p video weights over 140 MB. It means you could have up to 5 and a half minute of video on an industry-standard Blu-Ray disc. Not really a good deal I think ;) ",gronostaj,https://superuser.com/users/194694,http://superuser.com/questions/599661,TECHNOLOGY,superuser.com 5092,Getting information from database and giving it to javascript,"The main thing I want to achieve is that my module makes a google map with markers. For now im doing this: drupal_add_js('https://maps.googleapis.com/maps/api/js?key=AIzaSyDcl28Qcn9GTi02rRtQaLgVS4GWZbGcQ8E', 'external'); $locations = db_query('SELECT * FROM {locations}')->execute(); $script = '<script> function initialize() { var mapOptions = { center: { lat: 56.9714744, lng: 24.1291624}, zoom: 9 }; var map = new google.maps.Map(document.getElementById(\'map-canvas\'), mapOptions); var locations = ['; for($i = 0; $i < $locations->length;$i++){ $string = '['.$locations[$i]['locationsTitle'].','.$locations[$i]['locationsLat'].','.$locations[$i]['locationLng'].'],'; $script = $script.$string; } $script = $script.']; for (var i = 0; i < locations.length; i++) { var loc = new google.maps.LatLng(locations[i][1], locations[i][2]); var marker = new google.maps.Marker({ position: loc, map: map, title: locations[i][0] }); }; } google.maps.event.addDomListener(window, \'load\', initialize); </script> '; $html = ' <div id=""map-wrapper"" style=""width:100%;height:500px;margin:auto""> <ul id=""map-list""></ul> <div id=""map-canvas"" style=""width:100%;height:100%;margin:auto></div> </div> '; return array('#markup' => $script.$html); As you can see in the third line of code im trying to get information from the database that I have saved. The problem is I dont know how would i get it properly. And then I want to pass it down in the var locations part in the script.. I have tried finding some tutorials where they explain how would this work but most of them is just how to show some posts or somthing like that and that doesnt help me. Thanks for help already! :) // EDIT This is the script that i have now in js file (function($) { Drupal.behaviors.myModule = { attach: function(context, settings) { function initialize() { var mapOptions = { center: { lat: 56.9714744, lng: 24.1291624}, zoom: 9 }; var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var locations = [ ['Mājas',56.956344, 24.197409], ['Domina',56.966058, 24.162004] ]; for (var i = 0; i < locations.length; i++) { var loc = new google.maps.LatLng(locations[i][1], locations[i][2]); var marker = new google.maps.Marker({ position: loc, map: map, title: locations[i][0] }); }; } //google.maps.event.addDomListener(window, 'load', initialize); } } )(jQuery); I have the ""google.maps.event.addDomListener(window, 'load', initialize);"" commented becouse I think i dont need it..? And becouse there is no function initialize anymore? Or should i add that back? The problem now is that my script seems to be added.. But it doesnt seem to be run becouse the google map dosnt show up.. ",DaveLV,https://drupal.stackexchange.com/users/42301,"You should never need to build javascript with PHP, there's just no need (especially in Drupal, which already has a mechanism). What you should do instead is put your JS in an external file, then use Drupal's JS settings to pass the data. So the JS file might look like: (function($) { Drupal.behaviors.myModule = { attach: function(context, settings) { var locations = Drupal.settings.myModule.locations; // Do something with the locations var. } } )(jQuery); And in your page callback or whatever: $settings['myModule']['location'] = db_query('SELECT * FROM {locations}')->fetchAll(); drupal_add_js($settings, 'setting'); ",Clive,https://drupal.stackexchange.com/users/2800,http://drupal.stackexchange.com/questions/144668/getting-information-from-database-and-giving-it-to-javascript,TECHNOLOGY,drupal.stackexchange.com 3846,"Does ""surfeit"" have an adjectival counterpart?","I’m thinking of something like surfeitous, but obviously that’s not a word. ",mipadi,https://english.stackexchange.com/users/151,"Excessive, intemperate, superfluous. ",Kelly Hess,https://english.stackexchange.com/users/6100,http://english.stackexchange.com/questions/18531/does-surfeit-have-an-adjectival-counterpart,CULTURE,english.stackexchange.com 8422,How can locators be added to the points on a 3D grid?,"Here is a pared down example of some 3D data that I want to make dynamic and add locators to each set of points. Is that possible? dimension1 = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, {4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, {5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}, {6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6}, {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, {8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8}, {9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9}, {10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}}; dimension2 = {{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}}; dimension3 = {{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}}; firstDimension = ListPlot3D[dimension1, BoxRatios -> {1, 1, 1}, PlotStyle -> {Cyan, Opacity[0.2]}, Background -> White]; secondDimension = ListPlot3D[dimension2, BoxRatios -> {1, 1, 1}, PlotStyle -> {Magenta, Opacity[0.2]}, Background -> White]; thirdDimension = ListPlot3D[dimension3, BoxRatios -> {1, 1, 1}, PlotStyle -> {Yellow, Opacity[0.2]}, Background -> White]; Show[firstDimension, secondDimension, thirdDimension] The locators should move the points on the grid, and affect the other surrounding points depending on a variable. ",R Hall,https://mathematica.stackexchange.com/users/686,"Not meant as an answer to the question, but MousePosition[""Graphics3DBoxIntercepts""] will be the key piece one will need in a full answer. Possibly inside an EventHandler as in @Szabolcs's MathGroup post for moving a point on a 3D surface. (Please hold onto your votes till Szabolcs posts his own answer.) fun[x_, y_] := x^2 + y^2; DynamicModule[{f, b}, EventHandler[ Show[ Plot3D[fun[x, y], {x, -1, 1}, {y, -1, 1}], Graphics3D[ Dynamic @ Quiet @ Check[ Sphere[((f - b) t + f) /. FindRoot[fun[#1, #2] == #3 & @@ ((f - b) t + f), {t, 0}], .1], {} ] ], BoxRatios -> {1, 1, 1}], {""MouseMoved"" :> ({f, b} = MousePosition[""Graphics3DBoxIntercepts""])} ] ] screenshot: ",kglr,https://mathematica.stackexchange.com/users/125,http://mathematica.stackexchange.com/questions/5802/how-can-locators-be-added-to-the-points-on-a-3d-grid,TECHNOLOGY,mathematica.stackexchange.com 9173,"Can one meet criteria, or satisfy requirements?","I usually see 'satisfy the criteria' and 'meet the requirements', but is it acceptable to use 'meet the criteria', or 'satisfy the requirements'? ",Superstringcheese,https://english.stackexchange.com/users/8909,"The Oxford Collocations Dictionary says the following: VERB+criterion: fit, fulfill, meet, satisfy. The Macmillan Collocations Dictionary gives one more verb, ""match"". VERB+requirement: comply with, fit, fulfill, match, meet, satisfy, suit. The Macmillan Collocations Dictionary gives three more verbs, ""achieve"", ""adhere to"", ""conform to"". ",Alex B.,https://english.stackexchange.com/users/19046,http://english.stackexchange.com/questions/67349/can-one-meet-criteria-or-satisfy-requirements,CULTURE,english.stackexchange.com 3374,Linux: limits.conf values are not honored,"I set some values in /etc/security/limits.conf as below: * hard stack 204800 * hard nofile 8192 Then rebooted the server. Also I have removed the file /etc/security/limits.d/90-nproc.conf However, the ulimit command still lists some old/default values: # ulimit -s 10240 # ulimit -n 1024 I running RHEL 6.2 64-bit What is wrong here? Is my syntax in limits.conf wrong? Why after server reboot it does not honor limits.conf values? BTW, I had posted this question earlier on superuser but failed to get the hits, so trying my luck on serverfault. ",slayedbylucifer,https://serverfault.com/users/114516,"limmits are loaded upon logon. change /etc/security/limits.conf ...... logout and log back in. ",nandoP,https://serverfault.com/users/190933,http://serverfault.com/questions/556669,TECHNOLOGY,serverfault.com 6860,How do I force a tight globe-valve water shutoff to fully close?,"I tried to close off the water valve (a multi-twist globe-valve) leading to my back-yard water supply (the shutoff valve is inside the house) but it will not twist fully shut. Is it safe to give the screw a shot of WD-40 to loosen up the valve? Will that help? Note: the valve is not leaking so I don't want to replace it. I am just trying to shut off the water supply for the winter. ",Haphazard,https://diy.stackexchange.com/users/2708,"I agree with the spirit of Fiasco Labs' answer. But the truth is that if a valve is almost off (just a few drips) then careful ""snugging"" via a pair of channel-locks is the first thing your plumber would try. And it'll work... 61.4 percent of the time. Ok, it's not that scientific. But in my experience it'll work slightly more often than not. But if a good snugging doesn't help, then give up. Don't go for herculean twisting. That's when you make a bad situation worse. ",Bob,https://diy.stackexchange.com/users/3222,http://diy.stackexchange.com/questions/9905/how-do-i-force-a-tight-globe-valve-water-shutoff-to-fully-close,LIFE_ARTS,diy.stackexchange.com 3455,Enclosure for whole house water filter,"I plan to install a whole house water filter system. I will buy the cartridges separately and have a plumber hook it up. I don't want to trench from one end of the house to the other to put them on the garage wall, so I plan to just have it installed outside in the bushes where the water line comes in from the street. I will have 3 cylinder cartridges that are about 7"" diameter and 24"" tall. For reference, 3 of these: http://www.purewaterproducts.com/whole-house-filters-compact (Style C + Style B). One particulate filter + 2 carbon filters in parallel. Any ideas on enclosures I can use to protect them from the weather? ",David I.,https://diy.stackexchange.com/users/21025,"So if I understood you correctly then you want to dig in the ground, raise the water pipe to a filter, then back down into the ground? I have to say that doesn't seem like a good idea to me. If I were doing this I would just cut a pipe in the basement and put the filter there. In particular I would cut just the pipe going to the kitchen, and not the whole house. But if you really want too... For the enclosure use double layer (4 inches) extruded foam sheets including on the ground! Then cover them in some exterior-grade plywood on the outside to protect from damage. i.e. build a plywood box without beams/poles inside it (put them on the outside), then glue the foam sheets to the inside. Lay some plastic on the ground with small holes for the pipe, tape the plastic to the pipe, then foam sheets on top of that, and put the whole plywood box on top of it. You'll probably need a 3rd hole for some sort of support to hold the filters. I would suggest you wrap the pipe first in electrical heating tape (they sell it to protect pipes from freezing, it's what you want) then in waterproof (i.e. closed cell) foam rated for underground use several inches think and bury it. Taxes is rather large - if you happen to live in a place that doesn't get very cold then this might not be necessary. I checked and record low in taxes was -23F, but that's probably not where you live. ",Ariel,https://diy.stackexchange.com/users/19728,http://diy.stackexchange.com/questions/57477/enclosure-for-whole-house-water-filter,LIFE_ARTS,diy.stackexchange.com 4041,Most effective way to increase programmer salary besides just doing your job?,"If you have the time and resources, what would be the most effective way to increase your salary as a full-time programmer, outside of just doing your job? By ""salary"" here, I mean salary (adjusted for location cost-of-living) coming from a single programming job. ",T. Webster,https://programmers.stackexchange.com/users/19936,"If you want to raise your salary, raise your value to your employer/customer. Continuously align yourself with your company's goals (answer: how am I bringing aiding in bringing in more revenue?) and your client's goals (answer: how am I making the customer's life easier?). At times you will need to go to bat for yourself to remind those with the checkbook of how you can answer those questions above. And as @bleakcabal stated, you've got to play the social aspect of your job. That will open more opportunities to increase your value to employeer and customers. ",jayraynet,https://programmers.stackexchange.com/users/25019,http://programmers.stackexchange.com/questions/76254/most-effective-way-to-increase-programmer-salary-besides-just-doing-your-job,TECHNOLOGY,programmers.stackexchange.com 2732,Mathematics of Ritardando,"Beyond feel & experience, is there a rule conductors use for ritardando in terms of (a) its rate, (b) its change in rate, and/or (c) the relationship between the final tempo and the tempo of the piece? (In getting my software to execute a ritardando, I employed over four measures a measure-by-measure decrease in tempo, and what sounded ""right"" to me ultimately was decreasing the tempo by 4 bpm, then a further 9, then a further 16 (pleasing pattern) to arrive at 127/156 (close to 3/4) the original tempo.) ",commonhare,https://music.stackexchange.com/users/16938,"""...is there a rule conductors use for ritardando in terms of (a) its rate, (b) its change in rate, and/or (c) the relationship between the final tempo and the tempo of the piece?"" Not that I'm aware of. Such a rule would be of little value, because -- unless you're practicing with a drum machine, or other device that permits varying tempo -- there's generally no good way (other than feel) to for conductors or performers to accurately measure their tempo during a performance. They're certainly not likely to be thinking ""Now this beat has to be played 10% longer than the previous one, and the following beat has to be 17.4% longer than that..."" However, if I had to guess a general shape of a tempo curve in a ritard, they generally seem to be monotonically decreasing (you don't speed up again in the middle of a ritard), and concave downward (i.e., the most ritard'ing comes just before the end of the ritard). But to what degree this is true is up to the conductor or performers to decide. On the other hand, about the most prescriptive that I've usually seen music notation get is poco rit. (just a little bit of ritardando), or molto rit. (much ritardando). And of course, the dashed line that Richard mentions, to indicate the duration of the ritard. That said, I am interested in what the tempo curves of actual performances would look like. I know that approximate tempo maps can be created for real performances, and I'd be surprised if someone, somewhere, hasn't researched what these curves look like. ",Caleb Hines,https://music.stackexchange.com/users/10637,http://music.stackexchange.com/questions/27009/mathematics-of-ritardando,LIFE_ARTS,music.stackexchange.com 3518,"Why does the C++ standard algorithm ""count"" return a ptrdiff_t instead of size_t?","Why is the return type of std::count a ptrdiff_t? Since count can never be negative, isn't size_t technically the right choice? And what if the count exceeds the range of ptrdiff_t since the theoretical possible size of an array can be size_t? EDIT: So far there is no suitable answer as to why the function returns ptrdiff_t. Some explanation gathered from the answers below is that the return type is iterator_traits<InputIterator>::difference_type which is generic and can be anything. Up until that point it makes sense. There are cases where the count may exceed size_t. However, it still does not make sense why the return type is typedef ptrdiff_t iterator_traits<InputIterator>::difference_type for the standard iterators instead of typedef size_t iterator_traits<InputIterator>::difference_type. ",Samaursa,https://stackoverflow.com/users/368599,"If the iterator was an array, it would imply the result is within the range of the array. For this specific algorithm I can't think of a reason that is interesting. For someone using this as a component it may be interesting, though. The page does say that it would do something equivalent. So for the case of an array it may do something like a direct pointer difference. This would be a pretty fast specialization if it were applicable. ",Tom Kerr,https://stackoverflow.com/users/839436,http://stackoverflow.com/questions/7505083/why-does-the-c-standard-algorithm-count-return-a-ptrdiff-t-instead-of-size-t,STACKOVERFLOW,stackoverflow.com 7342,Jewish Leap Year,"Why when we add an additional month to the year do we only add it in Adar? Why not have a second Chesvon or a second Shevat, etc.? ",Gershon Gold,https://judaism.stackexchange.com/users/200,"Adar is the last month in the year. So from a simple technical standpoint it's the easiest to add a month then. Especially if you want all the other months' numbers to remain like they should be (and more importantly - compatible with what the Torah calls them) ",yydl,https://judaism.stackexchange.com/users/128,http://judaism.stackexchange.com/questions/3345/why-do-we-use-adar-specifically-for-the-jewish-leap-year,CULTURE,judaism.stackexchange.com 6622,Javascript looping behaviour,"The alltones array contains all the possible notes in music scale. var alltones = [""C"", ""C#"", ""D"", ""D#"", ""E"", ""F"", ""F#"", ""G"", ""G#"", ""A"", ""A#"", ""B"" ]; I want to take the user's input of a tone, and then construct a list that contains certain elements of the array. Say I start at alltones[5] or ""F"", and want to take every second element of the array from that point and put it into my list, until I get back around to ""F"". The array is more like a circle than straight list. I'm a little unsure of how the array operates once the loop reaches the last element. Do I approach the problem by generating a new array, based on the users input. Or is there a way that JavaScript knows to loop back to the start of an array once it reaches the end such that it treats the array like a circle? An example: User input = F The output that I am seeking is to count (every two items) from F until we get back around the array to F so the desired output would be => F G A B C# D# ",moonman,https://stackoverflow.com/users/687500,"There isn't an existing Array method to do what you want, but one is easily defined using Array.prototype.slice and Array.prototype.concat: // move i elements from the start of the array to the end of the array Array.prototype.lcycle = function(i) { var xs = this.slice(0,i); var ys = this.slice(i); return ys.concat(xs) }; // move i elements from the end of the array to the start of the array Array.prototype.rcycle = function(i) { var xs = this.slice(0,-i); var ys = this.slice(-i); return ys.concat(xs); }; And then you can use lcycle and rcycle as normal array methods: >>> alltones.lcycle(3) [ ""D#"" , ""E"" , ""F"" , ""F#"" , ""G"" , ""G#"" , ""A"" , ""A#"" , ""B"" , ""C"" , ""C#"" , ""D"" ] >>> alltones.rcycle(4) [ ""G#"" , ""A"" , ""A#"" , ""B"" , ""C"" , ""C#"" , ""D"" , ""D#"" , ""E"" , ""F"" , ""F#"" , ""G"" ] Note that both of these methods return a new array. If you wanted to mutate the original array, you could define similar methods using Array.prototype.splice. // move i elements from the start of the array to the end of the array, mutating the original array Array.prototype.lcycle_m = function(i) { var args = this.splice(0,i); args.unshift(0); args.unshift(this.length); this.splice.apply(this, args); }; // move i elements from the end of the array to the start of the array, mutating the original array Array.prototype.rcycle_m = function(i) { var args = this.splice(-i); args.unshift(0); args.unshift(0); this.splice.apply(this, args); }; And again, you can can use lcycle_m and rcycle_m as normal array methods: >>> alltones.lcycle_m(3) >>> alltones [ ""D#"" , ""E"" , ""F"" , ""F#"" , ""G"" , ""G#"" , ""A"" , ""A#"" , ""B"" , ""C"" , ""C#"" , ""D"" ] >>> alltones.rcycle_m(3) >>> alltones [ ""C"" , ""C#"" , ""D"" , ""D#"" , ""E"" , ""F"" , ""F#"" , ""G"" , ""G#"" , ""A"" , ""A#"" , ""B"" ] ",rampion,https://stackoverflow.com/users/9859,http://stackoverflow.com/questions/14789157/javascript-looping-behaviour,STACKOVERFLOW,stackoverflow.com 8327,How to get Javadoc to include documentation for a sub-project?,"I have two projects in Netbeans that are closely linked. They are separate projects because one of the projects is a util package that could be used in the future for another project. Is there a way to configure Netbeans so that the Javadoc generated for the main project will include links to the objects defined in the util project instead of listing the full package path? Edit: I have found how to do it. In Project Properties > Build > Documenting you can set Additional Javadoc Options. The option to use is -link and then the URL of the documentation directory. However, I can only get it to work with an absolute link and am having trouble getting the relative link to work. -link file:///A:\B\C\Util\dist\javadoc //this works -link file: ..\..\..\Util\dist\javadoc //this doesn't works Both project folders are in directory C, so I think that should be the correct relative path based on the documentation. ",unholysampler,https://stackoverflow.com/users/210526,"I realize that this suggestion lies outside of the implied constraints of your question, but it might be better to use an SCM tool (and not your IDE) to publish javadoc that covers dependent projects. For example, Maven has a plugin specifically designed to publish javadoc for modular projects. ",chb,https://stackoverflow.com/users/148680,http://stackoverflow.com/questions/1731682/how-to-get-javadoc-to-include-documentation-for-a-sub-project,STACKOVERFLOW,stackoverflow.com 2426,"""wouldn't"" vs. ""won't"" & ""couldn't"" vs ""can't""","If we were talking about the importance of energy and that even machines need it what should we say? What's the difference between these two sentences: Machines wouldn't work without energy & Machines won't work without energy and between: Machines couldn't work without energy & Machines can't work without energy ",user37421,https://ell.stackexchange.com/users/3962,"This serves as a complement to the MMJZ's answer. Without contexts, the first sentence in the second group could be paraphrased in the following ways: We all know that machines couldn't work without energy. (It is impossible that machines work without energy.) We're running out of fossil fuels. Machines couldn't work without energy. (Machines would not possibly work without energy.) In fourteenth century people didn't know machines couldn't work without energy. (Machines weren't able to work without energy.) ",Kinzle B,https://ell.stackexchange.com/users/2312,http://ell.stackexchange.com/questions/49597/wouldnt-vs-wont-couldnt-vs-cant,CULTURE,ell.stackexchange.com 1373,Do you start writing GUI class first or reverse?,"I want to write my first Java program, for example Phonebook, and I wonder what to do first. My question is should I write GUI classes first or util classes first? I am database developer and want to know best practice in building program. ",Иван Бишевац,https://programmers.stackexchange.com/users/34008,"Start with the part of the project you find most interesting. If you start with the part you don't like you might quit before you make progress. Where you start is mostly a matter of preference so you might as well choose what you most want to work on. ",Bryan Oakley,https://programmers.stackexchange.com/users/6586,http://programmers.stackexchange.com/questions/119561/do-you-start-writing-gui-class-first-or-reverse,TECHNOLOGY,programmers.stackexchange.com 8497,How can I get to view the North Face of the Eiger in Switzerland?,"I can't seem to find information online about trains, buses, to take to get there etc. I would be travelling in from Stainach in Austria. Is there a mountain station or similar that I can view it from? e: I see from VMA's comment that I can go there via Grindelwald. What is the best way to get there from Stainach? I'm thinking the train in the way of Stainach - Salzburg - Zurich - Bern - Grindelwald, but I can't get fares online for the Salzburg-Zurich-Bern portion. Anyone have an idea of the rough estimate of the fare? ",victoriah,https://travel.stackexchange.com/users/30,"According to Google maps and sbb.ch, the most closer railroad station is Alpiglen: . According sattelite map, you'll get beautiful view from there. Not sure where are you getting from to the Eiger, so you can search trains by youself. If you have more specific information, please provide it. Update: According oebb.at, route and prices are (used local time just for example): 30.06.11 Stainach-Irdning 09:37 - Bischofshofen 10:48 - from 15.70 euro for 2d class without VORTEILScard 30.06.11 Bischofshofen 11:08 - Mannheim Hbf 16:56 - from 106.80 euro for 2d class without VORTEAILScard 30.06.11 Mannheim Hbf 17:36 - Interlaken Ost 21:56 - unknown by oebb.at, unfortunately, but by http://bahn.de - from 95.60 euro for 2d class 01.07.11 Interlaken Ost 06:04 - Grindelwald 06:38 - unknown by oebb.at, unfortunately, but by http://sbb.ch - from CHF 5.20 (near 4.4 euro) for 2d class 01.07.11 Grindelwald 07:17 - Alpiglen 07:38 - unknown by oebb.at, unfortunately, and by http://sbb.ch there is a bug with no founded station, but I think it is not very expensive Also you can see [this question][11] to get some more sites to search prices and trains. ",VMAtm,https://travel.stackexchange.com/users/19,http://travel.stackexchange.com/questions/539/how-can-i-get-to-view-the-north-face-of-the-eiger-in-switzerland,CULTURE,travel.stackexchange.com 2643,How to bone lamb breast,"I've got a recipe that calls for a boned lamb breast. Unfortunately, the lamb my wife got from the butcher is not boned, so I need to remove the bones myself. However, I can't find any guidance on how to do this. Before I dive in and probably ruin a perfectly good lamb breast, can anyone offer any tips? ",user13414,https://cooking.stackexchange.com/users/14662,"If I'm correct, the cut you have should resemble a rack of ribs. If this is the case, you should be able to simply push the bones out, perhaps with a bit of loosening with a small sharp knife. I assume you need it boned to facilitate stuffing, but on the off chance it's not, you could just slow-cook the lamb for 4 or 5 hours by which point the bones will just pull easily out of the meat. ",ElendilTheTall,https://cooking.stackexchange.com/users/4194,http://cooking.stackexchange.com/questions/29036/how-to-bone-lamb-breast,LIFE_ARTS,cooking.stackexchange.com 1955,"cURL is unable to use client certificate , in local server","I set up a local server using XAMPP. I have two php scripts , a sender and a receiver. I am trying to send an XML file from the sender to the receiver using HTTP over SSL (HTTPS). I created a self signed certificate , i configured XAMPP and i use this code on my sender : <?php /* * XML Sender/Client. */ // Get our XML. You can declare it here or even load a file. $xml = file_get_contents(""data.xml""); // We send XML via CURL using POST with a http header of text/xml. $ch = curl_init(); //curl_setopt($ch, CURLOPT_SSLVERSION,3); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_CAINFO, getcwd().'ipm.crt'); curl_setopt($ch, CURLOPT_SSLCERT, getcwd().'ipm.pem'); curl_setopt($ch, CURLOPT_SSLCERTPASSWD,'pass'); //i use this line only for debugging through fiddler. Must delete after done with debugging. curl_setopt($ch, CURLOPT_PROXY, '127.0.0.1:8888'); // set URL and other appropriate options curl_setopt($ch, CURLOPT_URL, ""https://ipv4.fiddler/iPM/receiver.php""); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml')); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $xml); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0); curl_setopt($ch, CURLOPT_REFERER, 'https://ipv4.fiddler/iPM/receiver.php'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $ch_result = curl_exec($ch); echo ""Result = "".$ch_result; echo 'Curl error: ' . curl_error($ch); curl_close($ch); // Print CURL result. ?> However i always get this error : Curl error: unable to use client certificate (no key found or wrong pass phrase?) What can i possibly do wrong? The passphrase IS the word pass . I created my .crt by doing : openssl req -config openssl.cnf -new -out ipm.csr -keyout ipm.pem openssl rsa -in ipm.pem -out ipm.key openssl x509 -in ipm.csr -out ipm.crt -req -signkey ipm.key -days 365 I dont want to put the SSL_VERIFYPEER and SSL_VERIFYHOST to false. ",donparalias,https://stackoverflow.com/users/1372498,"The key must be a filename, not a passphrase. ",Rygu,https://stackoverflow.com/users/217782,http://stackoverflow.com/questions/14470225/curl-is-unable-to-use-client-certificate-in-local-server,STACKOVERFLOW,stackoverflow.com 4978,How do I save as .osm in QGIS?,"The directions in http://docs.qgis.org/2.2/en/docs/user_manual/osm/openstreetmap.html#saving-osm-data seem to have been written before the OSM plugin was merged into QGIS proper. I can locate no OSM plugin or toolbar, and the vector menu only has options for opening a .osm file in QGIS. ",NE2,https://gis.stackexchange.com/users/19607,"Since the update of the OSM plugin, all editing and uploading functions of the plugin are removed. The standard OSM editors have much better capabilities of editing and internal checking than QGIS can provide. The manual page you mentioned has been forgotten to be dropped. Maybe underdark can do something about that. ",AndreJ,https://gis.stackexchange.com/users/9159,http://gis.stackexchange.com/questions/107061/how-do-i-save-as-osm-in-qgis,TECHNOLOGY,gis.stackexchange.com 8170,Is it okay to vacuum a laptop keyboard?,"Is it okay to vacuum a laptop keyboard? Would it cause any damage? ",dsafdsf,https://superuser.com/users/97559,"There are small (usually USB-powered) vacuums that you can use that do not generate enough force, nor have large enough intakes, to suck the keys of the board. Most laptops keyboards have pop-off keys and a normal vacuum will take those keys right off. Those that have what are sometimes called ""chiclet"" keys do not generally pop off and should be safe from this particular hazard. However, a more serious problem is the static charge that the friction from the airflow will create. For this reason it is never recommended to use a normal vacuum for cleaning any computer, ever. Canned air does not create this problem, and there are special electronics vacuums that are properly grounded and use other special components that are much less likely to generate enough of a static charge to damage the sensitive electronic components in a computer. Even these electronics vacuums, though, have no protection against sucking keys off keyboards. For these reasons, I would recommend against using a vacuum to clean any part of any computer. Canned air should be sufficient for your needs. It's also cheap. ",music2myear,https://superuser.com/users/74026,http://superuser.com/questions/334626,TECHNOLOGY,superuser.com 5775,"How to use ""sous vide"" in a sentence","First, I'm not sure if sous vide is a trademark or just a cooking method like boil or fry. How should I use sous vide in a sentence when writing a recipe? ",Horaciux,https://english.stackexchange.com/users/78230,"It can be a trade mark: Set the temperature of the Sous-vide Pro to 65C Place the sealed bag in the water.... It can be just a pan of water Prepare a sous-vide by heating a pan of water to 65C Place the sealed bag in the water.... ",mplungjan,https://english.stackexchange.com/users/2022,http://english.stackexchange.com/questions/203930/how-to-use-sous-vide-in-a-sentence,CULTURE,english.stackexchange.com 8527,"What do you call a customer's customer in a specification document, use case, or scenario?","My team and I develop software that our customers will use to interact with their customers. Additionally, we also eat our own dogfood and use the software ourselves to interact with our customers. Therefore, it can sometimes be difficult to explain use cases and scenarios, as our employees can be operators, our customers can be operators, and our customers' customers can be visitors. However, our customers can also be visitors interacting with our operator employees, our customers' customers can be visitors interacting with our customer or our employee. Here is a model where: A is an employee B is a customer C is our customers' customer X interacts with Y Operator --> Visitor A --> B A --> C B --> C Because sometimes our customers can play different roles, it's sometimes necessary to refer to the specific role, Operator or Visitor, instead of Employee and Customer. It's also a mouthful to say ""customer's customer"" all the time. I was wondering how other development shops handle these semantic details when writing their use cases and scenarios. Are there any one-word, generic terms that can apply to any product that involves a third-level actor? Other than using the specific roles, Operator and Visitor, what words could be used to identify a customer of a customer? The word would need to be short enough as to be adopted within an organization. If longer than a couple syllables, it's shortened form must still differentiate it from the other actors. ",jmort253,https://programmers.stackexchange.com/users/12611,"So the question becomes simpler when think of Roles as being relative entity a performs a role in relation to entity b. Your Customer consider's themselves to be a User and their Customer's are Customers to them. The only person who cares about your Customer as a Customer is you. You have two roles in the system as an Administrator and as a User. I saw the explanation that you have Employees who interact with the End Customers through your chat software (let's call this role Agent). For clarification, does the Agent represent himself as an employee of your User? I would argue that the role is still Agent, User, Customer. Referring to your User as a customer just confuses things. (As you can see). I've had it worse...I had to work on three levels of indirection. There was a Company entity which in some cases were direct Users of our application. They had Accounts that they sold various packages from our offerings to and they tracked Customers for those Accounts. ",Michael Brown,https://programmers.stackexchange.com/users/13181,http://programmers.stackexchange.com/questions/37973/what-do-you-call-a-customers-customer-in-a-specification-document-use-case-or,TECHNOLOGY,programmers.stackexchange.com 7068,Get IP network range after reverse DNS?,"For analytics purposes, I'm looking at large sets of IP addresses in server log files. I'm trying to perform reverse-DNS lookups to understand where traffic is coming from - e.g. what percentage of IPs resolve to corporations, schools, government, international etc. Despite a bunch of optimizations, individually reverse-DNS'ing every IP address still appears to be fairly expensive though. So - is there any way to obtain an entire range of IPs from a reverse-DNS? If yes, this could greatly reduce the number of actual reverse-DNS lookups. Example (numbers slightly obfuscated): Log file contains a request from an IP 128.151.162.17 Reverse DNS resolves to 11.142.152.128.in-addr.arpa 21599 IN PTR alamo.ceas.rochester.edu (So this is a visitor from Rochester University, rochester.edu) Now, would it be safe to assume that all at least all IPs from 128.151.162.* will also resolve to rochester.edu? What about 128.151.*.*? Is there a way to get the exact IP range? ",Max,https://serverfault.com/users/28167,"General advice about this kind of algorithm: Generally you'll find the data is nearly infinitely cacheable. The data changes so rarely that you might as well do it in batch and save the data to a on-disk cache that all your code uses. The TTL on the data might be 1 hour, but when I was on the internet mapping project we found that as far as domains changing, the data was stable for more than a year. If you are doing a lot of DNS queries, rate-limit how many you send to any particular DNS server. Otherwise it is rude at best, and a DoS attack at worst. If you can generate all the DNS queries you plan on doing ahead of time, and they'll fit in RAM or on disk, generate the list, randomize it, then do the lookups in random order. A lazy way to do it, that doesn't require enumerating every query in advance, is to spread out the queries among all the CIDR blocks. That is, if you are doing 500 CIDR blocks, do the .1 address in all of them, then the .2 address in all of them, then the .3 address, etc. The result is that you put less stress on the individual DNS servers. (this works particularly well if you are doing thousands of lookups on millions of CIDR blocks) If you are doing the lookups ""on demand"", just use some kind of write-through cache and you should be fine. ",TomOnTime,https://serverfault.com/users/6472,http://serverfault.com/questions/604104,TECHNOLOGY,serverfault.com 77,AES using derived keys / IVs. Does it introduce a weakness?,"I'm looking for an efficient way to encrypt multiple fields in a database with AES using a single global key, used throughout a large web application. Obviously in order to re-use this key, a unique random IV is required for each field that is to be encrypted. I'd rather not introduce more fields to the database to store each of these IVs, so the programatic approach seems to be to derive these IVs some how. I'm toying with using either: key = sha256(global_key + table_name) iv = sha256(column_name + primary_key) Or even simply: key = global_key iv = sha256(table_name + column_name + primary_key) I'm leaning towards the former to generate per-table keys. I've already read that the IVs do not need to be kept secret. So I'm working on the assumption that a derived key or IV (even if the algorithm becomes known), is no more insecure than any other non-secret IV, as long as the original key remains secret. The question is: Is there a fatal flaw in my approach? Am I introducing any serious weaknesses that, in the event that an adversary obtains a copy of the database, would make it easier for them to retrieve the plaintext data? I realise that is potentially soliciting one word answers. Suggestions for alternate / better schemes very much welcomed, as well as references to existing works and how they implement similar scenarios. ",Leigh,https://security.stackexchange.com/users/1349,"A potentially better approach would be to store the IV and ciphertext in one column. This way, you can generate IVs in the way most appropriate for your choice of encryption mode while also not having to add columns. Something like ""$AES-128-CBC$"" + Base64.encode64(iv) + ""$"" + Base64.encode64(ciphertext) is similar to the format used in crypt, easily parseable, and being Base64-encoded is slightly more convenient when doing queries on the database using command-line clients. ",Stephen Touset,https://security.stackexchange.com/users/12407,http://security.stackexchange.com/questions/23937/aes-using-derived-keys-ivs-does-it-introduce-a-weakness,TECHNOLOGY,security.stackexchange.com 6520,JavaScript Equivalent Of PHP __invoke,"I'm developing a small framework (in JS) and for esthetic reasons and simplicity I was wondering if there could be a way to implement something like PHP ""__invoke"". For example: var myClass = function(config) { this.config = config; this.method = function(){}; this.execute = function() { return this.method.apply(this, arguments); } } var execCustom = new myClass({ wait: 100 }); execCustom.method = function() { console.log(""called method with ""+arguments.length+"" argument(s):""); for(var a in arguments) console.log(arguments[a]); return true; }; execCustom.execute(""someval"",""other""); Desired way to execute: execCustom(""someval"",""other""); Any ideas? Thanks. ",lepe,https://stackoverflow.com/users/196507,"Just return a function that will form the public interface: function myClass(config) { var pubif = function() { return pubif.method.apply(pubif, arguments); }; pubif.config = config; pubif.method = function() { }; return pubif; } The rest of the code remains the same. ",Ja͢ck,https://stackoverflow.com/users/1338292,http://stackoverflow.com/questions/19018912/javascript-equivalent-of-php-invoke,STACKOVERFLOW,stackoverflow.com 9531,Grapple + Totemic Attunement (Eagle) = Zangief's Spinning Atomic Piledriver?,"Could a Barbarian with Totemic Attunement (eagle) use grapple to perform the iconic move by dragging the enemy straight up as far as the fly speed allows and ending the turn in the air? If so, who would take fall damage? ",ZHDarkstar,https://rpg.stackexchange.com/users/16224,"Yes, you can do this. No you won't get very far, and I'd definitely rule that both of you take the falling damage. First, yes you are allowed to move a target you are grabbing. So you can feasibly grab them with your action, then use your movement to fly with them. However, since you are moving with a grabbed target, your movement speed is halved, so you only get 15 feet up. This means that the falling damage is at most 2d6 damage (though some DMs may rule it to be 1d6, I'd be inclined to) and you'll be prone.. Ultimately, it looks like you both fall. I'd definitely rule that since you're falling the grab is up. And, since there is not a direct way to negate falling damage, unless your caster friend is shooting feather fall as a reaction, you're both taking damage here. If I may editorialize here: this is not a good strategy. It consumes your action with the grab which is then most likely broken, and only does 1d6, maybe 2d6 damage, which is what your weapon does, and it's likely less reliable since it relies on an opposed check rather than an attack against AC. Stick to what you're good at: hitting things with metal attached to sticks. ",wax eagle,https://rpg.stackexchange.com/users/1084,http://rpg.stackexchange.com/questions/49223/grapple-totemic-attunement-eagle-zangiefs-spinning-atomic-piledriver,CULTURE,rpg.stackexchange.com 1734,Does tagging content affect SEO?,"Tagging content (i.e. categorizing content using ""tags"") is a sensible way to group content on a web site, but does tagging actually affect SEO? From an SEO standpoint, how does tagging content affect search ranking? Is there any way to optimize the set of tags for SEO? Should I limit the number of tags in any way? ",Ken Liu,https://webmasters.stackexchange.com/users/1837,"Here's what Matt Cutts from Google has to say on the subject. http://www.youtube.com/watch?v=A96yDPqa2rs ",Amit Agarwal,https://webmasters.stackexchange.com/users/3229,http://webmasters.stackexchange.com/questions/5437/does-tagging-content-affect-seo,TECHNOLOGY,webmasters.stackexchange.com 1162,"GIN/GiST Full Text searches through openlayers, geoserver and postgres","I have a a web app that automatically maps recent tweets and allows you to search for certain keywords. it uses Postgres for the database, geoserver as the server, and openlayers as the cartographic library. Right now tweet keywords are done using the ILIKE query. This works pretty well if the keyword i'm looking for is a commonly used word, like 'love' , 'friend', 'OMG', etc. but less common words like ""geospatial"" need to search through a lot more data in order to find the last n instances of the word. This is dead slow. To combat my slowness I'm building a GIN index on my tweet field in postgres. Two days later and i'm still waiting for the index to complete. Once it's built though, I'll try a few queries using SQL view parameters and hopefully this will dramatically speed things up. Even if this approach works though, it's not going to be all that useful if the index takes so long to create -- the maintenance of it will not be able to keep up will the incoming flood of data. I think I will try out the GiST index next and see how long it takes as I understand it is much faster to this build index. Beyond this, what can I do next? Do options like Solr work with Geoserver?? Are there any common approaches to this type of problem and data size/rate? ",mikedotonline,https://gis.stackexchange.com/users/24616,"You could also try the Full Text Search PostgreSQL capabilities and that would still match your architecture (OL, GeoServer and PostgreSQL). Here you have a very nice resource on PostgreSQL FTS: http://blog.lostpropertyhq.com/postgres-full-text-search-is-good-enough/ According to it, you should build a GiST (and not a GIN) index because it works better with dynamic data. By the way, avoid LIKE/ILIKE queries if you want good search performance, they are one of the SQL Anti-patterns! See p.135: http://www.scribd.com/doc/2670985/SQL-Antipatterns Better use PostgreSQL FTS! ",Germán Carrillo,https://gis.stackexchange.com/users/4972,http://gis.stackexchange.com/questions/82627/gin-gist-full-text-searches-through-openlayers-geoserver-and-postgres,TECHNOLOGY,gis.stackexchange.com 9087,In-game rewards for game-related work?,"The other GM in my group and I are both big fans of giving XP rewards for things done out of the game. Ex: We have an artist who will draw and design all sorts of stuff to ""fluff out"" our campaign. We noticed participation spiked when we offered rewards like this. Eventually, we even offered XP to our ""scribe"" for recording everything that happened each session. At the most, though, this gives bonus XP for up to two of our players. We do not plan to remove these bonuses, but want to be fair to all our players. What are some fun things your players can do out of game that you can reward as GM? The goal is to have them be engaged in our game even when we aren't playing. ",pblock,https://rpg.stackexchange.com/users/8116,"For our group, we usually went for non-xp or level related rewards. Usually, we tried to keep them related to the real-life activity. We were playing in a magic rich campaign, so if these rewards seem high, remember these items were relatively common (though expensive) in our world: The player giving rides to everyone would find himself with a fairly regular supply of short-lived (they'd expire after limited in-game time) Haste potions, to do with as he pleased. The cartographer would get a choice of one of several items per session, such as find-item scrolls, detect magic wands. Since he put in a lot of work and proved useful to the party, the rewards both scaled up, and were often augmented by in-game tips from other players (the highest reward were single use teleportation items) Snack providers would get bonus healing potions etc... As a DM, I particularly liked that the rewards: didn't mess up my planned levelling-up curve fit in with the game-play it was fairly easy to account for the rewards usually it was items the players would try and stock up on anyways since they were all consumable, usually with an expiration date, the players were encouraged to deplete their own supplies regularly. ",blueberryfields,https://rpg.stackexchange.com/users/1056,http://rpg.stackexchange.com/questions/25167/in-game-rewards-for-game-related-work,CULTURE,rpg.stackexchange.com 5865,Converting Qt compliant C++ to ui XML(QtDesigner) format:,"I have C++ widget code that was generated by QtDesigner (Qt open source v 4.7.3, using the Form->View Code menu in QtDesigner). I have modified that code in a manner that is entirely Qt compliant - just hand coded a few more signals, slots and wigdets based on the patterns of the generated code - code runs perfectly when built with Code::Blocks. Now I'd like to convert my modified C++ source back into the ui XML format that QtDesigner uses. I'm looking for a quick way of doing that (Win7-32 platform). Any suggestions? TIA ",Vector,https://stackoverflow.com/users/712579,"The c++ is a really complex language to parse, so it would be really hard / long / expensive to develop such a tool I guess. The general rule is to never modify generated code ( in your case the code is generated by Qt designer) You can Subclass the generated class and put your modifications in the sub class Code all your interfaces by yourself from scratch. If you think Qt designer lack features you can request them or submit patches to Qt. But I don't think Qt intend to extend that, since QML has become the new way to go with interfaces. The best option for you is probably the first. ",cor3ntin,https://stackoverflow.com/users/877556,http://stackoverflow.com/questions/7060862/converting-qt-compliant-c-to-ui-xmlqtdesigner-format,STACKOVERFLOW,stackoverflow.com 7271,Scatterplots for subsets of multivariate data [Updated],"Update/Re-write There has been a lot of ambiguity over what i'm am trying to do with this question so I have decided to give it a full rewrite. I'm really sorry for the confusion. If you want to see the background please see the edit history. I hope things are clearer now.. I have some data made up into the following fashion: datac = { data1 = RandomReal[1, {7, 3}], data2 = RandomReal[1, {13, 3}], data3 = RandomReal[1, {19, 3}], data4 = RandomReal[1, {16, 3}], data5 = RandomReal[1, {5, 3}] }; data1 through data5 are subsets of a multivariate dataset with 3 independent variables. data1, for example, is composed of 7 individual data points (each with 3 variables). If I use the following function: Needs[""StatisticalPlots`""] pairwisecol[data_, col_] := PairwiseScatterPlot[data, PlotStyle -> col, DataTicks -> True, DataLabels -> {""x"", ""y"", ""z""}] I can create a combined plot comparing the various subsets. E.g. Show[{pairwisecol[data1, Red], pairwisecol[data2, Blue], pairwisecol[data3, Green], pairwisecol[data4, Purple], pairwisecol[data5, Orange]}] This curently has the major drawbacks that each subset has to be defined and have a colour explicitly assigned to it. Also, Show in this instance overlays all of the DataTicks etc, rather than just the elements from the first plot (as is normally the case with Show[{Plot1,Plot2}]). What I'm looking for is a way to use the whole (partitioned) dataset datac to generate such a plot/diagram. i.e. something like, Show[pairwisecol[#, Red] & /@ datac] but, with Red being replaced by a series of colours to represent each subset (like in the plot shown). ...Alternatively, starting with a 2-level list e.g. datap = RandomReal[1, {60, 3}]; and a definition of sublist partitions, parts = {7, 13, 19, 16, 5}; or partspos = {[[1;;7]], [[8;;20]], [[21;;39]], [[40;;55]], [[56;;60]]}; then defining a function something like: pairwiseP[data_, partlist_] := ... that would partition datap into appropriate sublists, create a series of PairwiseScatterPlot's (each with a different plot colour) and then combine them using Show. Note that this example has n = 3 independent variables. I am looking for a method that works for 1 < n < ~20. Can anyone suggest how to do this? ",geordie,https://mathematica.stackexchange.com/users/4626,"I'm still uncertain whether this is what you want. Just make an array of plots and wrap it in Grid. Fiddle with the options to get axes, dividers, etc. the way you want them. The way I understand it, the data is really four subsets, each a group of datasets. For each group, you want to plot one group vs. another group, for each pair of groups, data[[1, All, i ]] vs data[[1, All, j ]]. I'm still unsure about the desired coloring. I've colored the plots by subset (which gives no extra information, except colors are pretty :). The question states The individual colouring of the subsets is what i'm aiming for. In the example plot, there are mixed colors. I can only think that the plot is an amalgamation of subsets. With my current understanding of the question, I don't how to use color to add more to each plot. I feel like I'm missing something here. Some random data with some structure: SeedRandom[1]; data1 = Map[(# + RandomReal[{-0.1, 0.1}, 3])^Range[3] &, RandomReal[{-1, 1}, {4, 4}], {-1}]; Dimensions[data1] Plotting functions: colorFn[subset_] := Hue[subset/4]; plot[subset_, datasets_] := Graphics[{colorFn[subset], Point[#]}, AspectRatio -> 1/GoldenRatio, ImageSize -> 100] & /@ datasets; Mapping the plotting functions: Grid[ MapIndexed[plot[First@#2, Thread /@ Subsets[Transpose[#], {2}]] &, data1], Dividers -> All] It's more interesting with 40 points instead of 4: SeedRandom[1]; data1 = Map[(# + RandomReal[{-0.1, 0.1}, 3])^Range[3] &, RandomReal[{-1, 1}, {4, 40}], {-1}]; Grid[ MapIndexed[plot[First@#2, Thread /@ Subsets[Transpose@#, {2}]] &, data1], Dividers -> All] Just to show the data is being processed as indicated: foo = MapIndexed[Thread /@ Subsets[Transpose@#, {2}] &, data1]; foo[[1, 1]] == Transpose@{data1[[1, All, 1]], data1[[1, All, 2]]} foo[[1, 2]] == Transpose@{data1[[1, All, 1]], data1[[1, All, 3]]} foo[[1, 3]] == Transpose@{data1[[1, All, 2]], data1[[1, All, 3]]} (* etc. *) True True True ",Michael E2,https://mathematica.stackexchange.com/users/4999,http://mathematica.stackexchange.com/questions/26595/scatterplots-for-subsets-of-multivariate-data-updated,TECHNOLOGY,mathematica.stackexchange.com 2044,Removing blanks from a column in Excel," ",Mike,https://superuser.com/users/79906,"Could you sort the data in its existing location? ",Diem,https://superuser.com/users/66246,http://superuser.com/questions/271627,TECHNOLOGY,superuser.com 5956,how to combine two objects using path finder in illustrator?,"i want it to be like this but when i click the minus front, both objects got cut out like this; so how? how do you combine it like in the first picture? here the 2 original objects before i click minus front; ",hastings,https://graphicdesign.stackexchange.com/users/20110,"The Pathfinder Toolset is very good for some tasks, but it's not the only boolean operator in Illustrator. The Shape Builder Tool (Shift+M by default) is what I would recommend in this case. If you hold down Shift, you can delete the sections of lines that are between intersections of selected Items. ",Alex Blackwood,https://graphicdesign.stackexchange.com/users/16448,http://graphicdesign.stackexchange.com/questions/27643/how-to-combine-two-objects-using-path-finder-in-illustrator,LIFE_ARTS,graphicdesign.stackexchange.com 4034,Why would one shoot a fully blurred picture?,"Focus and blur have a reason in a picture when they come together. Blur alone is just a loss of an important element in the photography art, unless it has a reason, like obscuring nudity or creating an additional value... but what is the value of an entirely blurred picture? ",mohamad machnouk,https://photo.stackexchange.com/users/7423,"I'll add another possibility to @Imre's excellent list: full-image blur can give impressions of disconnectedness, loneliness, mental haze, etc. All of these are potential emotions that you wish to convey. ",Craig Walker,https://photo.stackexchange.com/users/48,http://photo.stackexchange.com/questions/17504/why-would-one-shoot-a-fully-blurred-picture,LIFE_ARTS,photo.stackexchange.com 7987,Prepare SD card for Wifi on Headless Pi,"I need to SSH my Pi over wifi but because it is a model A board (using a usb hub is not possible - ever) and I have no ethernet, i can't configure the Pi to connect to my secured wifi network. I want to have the SD card plugged into my laptop and I want to edit a file with the wifi configuration information in it so my Pi will connect to my network automatically at start-up so I can then SSH it to get control. I know how to enable SSH on a headless system thanks to this answer. Edit. Ive been searching around and I'm wondering if I'm able to just edit the file /etc/network/interfaces while the SD card is in my PC and put in all the network ssid, psk and wlan0 stuff in it. Will this work? Thanks ",11chubby11,https://raspberrypi.stackexchange.com/users/966,"You need to edit the wpa_supplicant.conf file on the sdcard (it's in /etc or /etc/wpa_supplicant depending on your distribution version). The format of the file is explained here: http://linux.die.net/man/5/wpa_supplicant.conf ",hogliux,https://raspberrypi.stackexchange.com/users/10164,http://raspberrypi.stackexchange.com/questions/10251/prepare-sd-card-for-wifi-on-headless-pi,TECHNOLOGY,raspberrypi.stackexchange.com 9577,Why does not the derailleur adjustment work the same way while riding?,"I suppose most of the people have noticed it. While adjusting both front and rear derailleurs, it will shift accordingly, when you have adjusted or are adjusting it, but when you test it by riding, the adjustment fail to perform the same way, Why does this happen? How does the added weight affect the shifters? ",Starx,https://bicycles.stackexchange.com/users/847,"Frame flex under the added weight affects the relative position of derailleurs and shifters, which is reflected in the cable length. Movements of the cable when changing gears are on the millimeter scale, so even lengthening of the cable by a fraction of a mm due to frame flex can have an effect. ",ttarchala,https://bicycles.stackexchange.com/users/130,http://bicycles.stackexchange.com/questions/4590/why-does-not-the-derailleur-adjustment-work-the-same-way-while-riding,CULTURE,bicycles.stackexchange.com 4684,Why would you use the __LINE__ macro in C++,"I am trying to figure out how people use the __LINE__ macro at work. How do you guys use it? ",Scott J,https://stackoverflow.com/users/209201,"Most of the answers so far have involved some sort of debugging code. Another use of __LINE__ (and possibly __FILE__) is to enable a macro to generate a unique identifier each time it's called. This implementation of coroutines in C uses these macros to generate labels for a case statement, so it can jump to the last line you called yield from. ",Josh Lee,https://stackoverflow.com/users/19750,http://stackoverflow.com/questions/1719281/why-would-you-use-the-line-macro-in-c,STACKOVERFLOW,stackoverflow.com 6264,Is the ability cost of the commander part of the color identity?,"Consider the card Rhys the Exiled. Are you allowed to play black (and green) cards in your deck with this commander? Or are you only allowed to play cards that are the same color as the commander's cost? If so, would this then make it impossible to use his ability? ",SirDuckduck,https://boardgames.stackexchange.com/users/3616,"The colour identity of Rhys the Exiled is Green and Black. As per the Commander colour identity rules: A card's colour identity is its colour plus the colour of any mana symbols in the card's rules text. The colour doesn't have to be just in the casting cost (which determines the card's colour), any mana symbol cost in the rules text counts towards the card's colour identity. See also Comprehensive Rule 903.4: 903.4. The Commander variant uses color identity to determine what cards can be in a deck with a certain commander. The color identity of a card is the color or colors of any mana symbols in that card's mana cost or rules text, plus any colors defined by its characteristic-defining abilities (see rule 604.3) or color indicator (see rule 204). Example: Bosh, Iron Golem is a legendary artifact creature with mana cost {8} and the ability ""{3}{R}, Sacrifice an artifact: Bosh, Iron Golem deals damage equal to the sacrificed artifact's converted mana cost to target creature or player."" Bosh's color identity is red. ",ghoppe,https://boardgames.stackexchange.com/users/632,http://boardgames.stackexchange.com/questions/11220/is-the-ability-cost-of-the-commander-part-of-the-color-identity,CULTURE,boardgames.stackexchange.com 3129,Looking for story where weather control makes snow fall once in warm climate,"I am looking for a very good story I read many years ago. The story was about a request to a politician that an old dying man would like to see snow fall before he died. The world now had weather control (maybe by controlling sunspots?) but he was in a warm climate (southern California?) and could not be moved and was near death. The man had been instrumental in the early days of weather control. I think the story starts by following the politician who decided to try to honor the man's request and passes a special bill thru the world legislature to make it happen. It then moves to a women (I think) in the weather service who needs to do something radical (in boats on the sun?) to make it happen. I think there were 3 vignettes but I'm forgetting one of them. The story ends with snow falling on 1 acre and the man gets to see the snow before he dies (which may occur at the end of the snowfall). Does anyone else recall this story and could provide title and author? ",Duncan,https://scifi.stackexchange.com/users/11101,"L Thomas's novelette ""The Weather Man"" (June 1962 Analog), - See more at: http://www.sf-encyclopedia.com/entry/weather_control#sthash.c6oiuviS.dpuf ",louisa,https://scifi.stackexchange.com/users/41859,http://scifi.stackexchange.com/questions/39410/looking-for-story-where-weather-control-makes-snow-fall-once-in-warm-climate,LIFE_ARTS,scifi.stackexchange.com 8907,asynchronously loaded images in uitableview disappear on scrolling up,"i am able to fetch images asynchronously on to uitableview.i am fetching these images are from a url.on scrolling up uitableview these images disappear and they take time to load again and sometimes they dont load at all.i dont want to use any 3rd party libraries.i dont want to go with synchronous approach.please suggest any correct approach to improve performance.thanks for help in advance.my code is below: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ static NSString *identifier=@""cell""; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@""identifier""]; } UIImageView *imgVw=[[UIImageView alloc]initWithFrame:CGRectMake(250, 10, 40, 30)]; [cell.contentView addSubview:imgVw]; Attributes *att = [listOfObjects objectAtIndex:indexPath.row]; strImgUrl=@""http:image url""; strImgName=att.classifiedImg; if (strImgName == nil) { UIImage *myImg=[UIImage imageNamed:@""user_circle.png""]; imgVw.image=myImg; } else{ strImg=[strImgUrl stringByAppendingString:strImgName]; } dispatch_async(dispatch_get_global_queue(0,0), ^{ NSData *data = [[NSData alloc] initWithContentsOfURL: [NSURL URLWithString:strImg]]; if ( data == nil ) return; dispatch_async(dispatch_get_main_queue(), ^{ UIImage *img=[UIImage imageWithData: data]; imgVw.image=img; }); }); return cell; } ",user2552751,https://stackoverflow.com/users/2552751,"It seems like your reuse code contains bug, which causes everytime to create new cells. The following code uses reuseIdentifier as @""identifier"" if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@""identifier""]; } Change it to: if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:identifier]; } EDIT: On reusing tableView cells, you dont need to create and add subviews to cell each time. Instead, just create the subview when creating cell and then if cell is reusing, just get the subview using tag and update your content from datasource. Your code can be modified like below: if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:identifier]; UIImageView *imgVw=[[UIImageView alloc]initWithFrame:CGRectMake(250, 10, 40, 30)]; imgVw.tag = indexPath.row; [cell.contentView addSubview:imgVw]; } UIImageView imgVw = (UIImageView*)[cell.contentView viewWithTag:indexPath.row]; //Rest is same as you posted. Hope this will fix the issue. ",HRM,https://stackoverflow.com/users/1672927,http://stackoverflow.com/questions/21013058/asynchronously-loaded-images-in-uitableview-disappear-on-scrolling-up,STACKOVERFLOW,stackoverflow.com 5491,Align tikzpicture to body text with node as reference,"In a example like the one below I would like to adjust the figure horizontally so that the grid aligns with the surrounding text and the y-axis and the label protrudes into the margin. Note that the width of the x-axis is exactly \textwidth so it should fit comfortably. I could do this manually with a negative \hspace, but this is not very exact and also un-TeXy. Ideally what I would like to do is to define a point within the tikzpicture environment to serve as reference point for external alignment. Thin I could experiment with aligning the y-axis with the text and whatnot. I did not find a way to this in the Tikz manual. \documentclass[a4paper,onesided]{article} \usepackage{tikz} \usepackage{blindtext} \begin{document} \blindtext \begin{figure}[h!] \begin{tikzpicture}[y=0.5mm, x=0.333\textwidth] \def\axissep{5mm} \def\tickl{2mm} \def\xlabsep{3mm} % y-axis \draw (-\axissep,0) -- (-\axissep,100); % y-ticks \foreach \x in {10,20,30,40,60,70,80,90} % avoids double inking on 0, 50 and 100 that becomes thicker \draw (-\axissep,\x) -- ++ (-\tickl,0); % y-tickslabels \foreach \x in {0,50,100} \draw (-\axissep,\x) -- ++ (-\tickl*2,0); \foreach \x in {0,50,100} \node[anchor=east] at (-\axissep-\tickl*2,\x) {\x}; % x-axis \draw (0,-\axissep) -- ++ (3,0); \foreach \x in {0,1,...,3} \draw (\x,-\axissep) -- ++ (0,-\tickl); % x-labels \node[below] at (0,-\axissep-\tickl){1}; \node[below] at (1,-\axissep-\tickl){2}; \node[below] at (2,-\axissep-\tickl){3}; \node[below,align=center] at (3,-\axissep-\tickl){4}; % grid \foreach \x in {0,10,...,100} \draw[very thin, color=gray] (0,\x) -- (3,\x); \draw (0,10) -- (1,14) --(2,45) -- (3,23) ++ (1mm,0) node[anchor=west] {\tiny Some label}; \end{tikzpicture} \end{figure} \blindtext \end{document} ",Andreas,https://tex.stackexchange.com/users/44517,"You can add trim left to tikzpicture: \documentclass[a4paper,oneside]{article} \usepackage{tikz} \usepackage{blindtext} \begin{document} \blindtext \begin{figure}[h!] \makebox[0pt][l]{\begin{tikzpicture}[y=0.5mm, x=0.333\textwidth,trim left] \def\axissep{5mm} \def\tickl{2mm} \def\xlabsep{3mm} % y-axis \draw (-\axissep,0) -- (-\axissep,100); % y-ticks \foreach \x in {10,20,30,40,60,70,80,90} % avoids double inking on 0, 50 and 100 that becomes thicker \draw (-\axissep,\x) -- ++ (-\tickl,0); % y-tickslabels \foreach \x in {0,50,100} \draw (-\axissep,\x) -- ++ (-\tickl*2,0); \foreach \x in {0,50,100} \node[anchor=east] at (-\axissep-\tickl*2,\x) {\x}; % x-axis \draw (0,-\axissep) -- ++ (3,0); \foreach \x in {0,1,...,3} \draw (\x,-\axissep) -- ++ (0,-\tickl); % x-labels \node[below] at (0,-\axissep-\tickl){1}; \node[below] at (1,-\axissep-\tickl){2}; \node[below] at (2,-\axissep-\tickl){3}; \node[below,align=center] at (3,-\axissep-\tickl){4}; % grid \foreach \x in {0,10,...,100} \draw[very thin, color=gray] (0,\x) -- (3,\x); \draw (0,10) -- (1,14) --(2,45) -- (3,23) ++ (1mm,0) node[anchor=west] {\tiny Some label}; \end{tikzpicture}} \end{figure} \blindtext \end{document} I also placed the tikzpicture inside a \makebox of 0pt width to prevent the overfull bad box and changed the incorrect onesided to oneside (though that is the default for article). ",Gonzalo Medina,https://tex.stackexchange.com/users/3954,http://tex.stackexchange.com/questions/176723/align-tikzpicture-to-body-text-with-node-as-reference,TECHNOLOGY,tex.stackexchange.com 4424,Isn’t the FAQ label obsolete by now?,"Don’t get me wrong in the beginning of reading this. I really mean the label and not the content of FAQ. The content is very useful if its’ made the right way (as here on ux.se), but there are plenty of examples where it isn’t. The real question concerns the label which is a convention I’d like to challenge. History In 1647 Matthew Hopkins wrote The Discovery of Witches which were introduced as ""Certain Queries answered"" and had the form of a list of Question and Answer, even if the topic is inappropriate by today’s standards. The label FAQ origins from the early 1980s mailing lists where NASA hoped to get new users read the old mail conversations, which were not the case. Instead the same questions were answered again and again and the need for FAQ was born. The acronym FAQ was invented by Eugene Miya and FAQ were later used in mail on a weekly basis at first and later on as a daily mail. Today FAQ is more frequently used to refer to the list, and a text consisting of questions and their answers is often called an FAQ regardless of whether the questions are actually frequently asked, if they are asked at all.[1] Problem Acronyms are generally bad, since it excludes those who do not know the meaning. They either have to search for the acronym, if they are interested, or just ignore it. If a label is ignored, there is not much use of it and an entire section of valid content is lost by bad labeling. However, it is a very strong web convention which might lead to confusion over time for experienced users. Also the original meaning have changed (see quote), which also implies that the label would be wrong. Question Isn’t the FAQ label obsolete by now? and if so How do we relabel it to suit both experienced and new users? Edit: I’d really like to know why we can or cannot change the label FAQ. Current answer does not meet that criterion. [1] http://en.wikipedia.org/wiki/FAQ ",Benny Skogberg,https://ux.stackexchange.com/users/4679,"I think the problem is the reverse--the fact that FAQ lists are no longer actually lists of frequently asked questions. FAQs are still important, but all to often the FAQs are incredibly poorly written or just plain irrelevant. A new label won't fix that problem. ",DA01,https://ux.stackexchange.com/users/1740,http://ux.stackexchange.com/questions/18600/isn-t-the-faq-label-obsolete-by-now,TECHNOLOGY,ux.stackexchange.com 1635,How can I detect collision between a circle and a rectangle?,"i'm trying to make a clone of brick breaker, one problem that i am running in to is to do with collision. i know how to detect if a collision has happened but i do not know how to check what side of the brick is hit. some general background from the program. all the bricks are just 2 points (x,y) a top right point and a bottom left point. the ball is just 1 point with a radius. for my current collision detection i'm just checking if the balls coordinates is at or in between the two box coordinates any help is appreciated and thanks in advance ",user979490,https://gamedev.stackexchange.com/users/10334,"assuming you are at a place where the ball is just contacting the brick; You will have to create a structure that holds a point located on each edge, and a vector for each edge that is the edge's normal. Give that structure a method that iterates through each point, creates a vector that is the difference between the ball's center & the point, dot it to the corresponding normal, and only one of the 4 results will be a positive number, that's the edge that has intersected. pseudo code: struct brick Vector min, max, L, R, T, B; //letters repre points on edges Vector normalLeft, normalRight, normalTop, normalBottom; //ctor Brick(min, max) { //generate values for all the fields above } vector normalOfEdgeHit(Vector ballCtr) { foreach(point i = L, R, T, B) { if(Dot(ballCtr - i, normal[i]) > 0) { return normal[i]; } } } in the following diagram, it would return normalB. notice how all the other normals point away from the ball (thus would return values less than 0). The points can be located anywhere on the edge, they do not need to be in the center. It is possible to have two normals return positive when close to the corner. In that case, you must determine distance from point to line (as if the brick's edge were an infinitely long line) for both edges. Whichever is a greater distance is the edge that has intersected. ",Steve H,https://gamedev.stackexchange.com/users/1923,http://gamedev.stackexchange.com/questions/18222/how-can-i-detect-collision-between-a-circle-and-a-rectangle,TECHNOLOGY,gamedev.stackexchange.com 8259,Prevent internet access except for one server?,"I want to see if the HTTP proxy support for an application is working correctly. In order to check this I have installed a Ubuntu VirtualBox on my Mac laptop and I want to configure the virtual machine so that it has no access to any other internet host except my test proxy server. How can I configure the virtual machine? From what I've read it sounds like ""route add ..."" should be able to do it but I'm not sure exactly how to use it. Please advise! Thanks! ",Aaron Watters,https://serverfault.com/users/174183,"You're looking for iptables and firewall rules. Could work like that iptables -A OUTPUT -j DROP iptables -I OUTPUT -d 192.168.0.1 -j ACCEPT But keep in mind, this will block ALL other traffic, so you'll need to have console access to the machine. and replace 192.168.0.1 with the proxy IP for sure. If the proxy server is also the gateway you can also add the port to the 2nd iptables statement p.e. -p 3128 for squid proxy so the server can only connect to the port. 2nd you also have to keep in mind, that DNS requests will be blocked as well, to enable them you'll need to add a second rule to enable DNS requests iptables -A OUTPUT -j DROP iptables -I OUTPUT -d 192.168.0.1 -p 3128 -j ACCEPT iptables -I OUTPUT -d 192.168.0.1 -p 53 -j ACCEPT ",Meiko Watu,https://serverfault.com/users/158099,http://serverfault.com/questions/508608,TECHNOLOGY,serverfault.com 9316,"Can I delete my fork of a BitBucket repository, after the owner has accepted and merged my pull request?","I created a fork of a public repository on BitBucket, with the sole purpose of committing a pull request that fixed some bug. The pull request was accepted and merged. Now, I want to delete the repository, that has outlived its purpose. If I do that, will the changes be lost? There is already a question about this same issue, but for GitHub. Apparently, on GitHub you can delete the repository before the request has been even merged, as it gets automatically saved in the target repository. I guess that on BitBucket, things will be similar, but I wanted to be sure. ",user8792354,https://stackoverflow.com/users/3497081,"I would say if things work as expected on GitHub, then they would work on BitBucket. If the pull request was ""accepted and merged"", then nothing you do to your personal repository will modify the repository that has merged in your changes. ",Uxonith,https://stackoverflow.com/users/1217236,http://stackoverflow.com/questions/22857212/can-i-delete-my-fork-of-a-bitbucket-repository-after-the-owner-has-accepted-and,STACKOVERFLOW,stackoverflow.com 6725,Looking for advanced GeoServer tutorials,"What are sources where I can learn how to use GeoServer? I know of these two sites: http://geoserver.org/ - which in fact is not working (at least at the moment) http://workshops.opengeo.org/geoserver-intro/ - not only (tutorials) for GeoServer But I am interested in more complex information, and not to read only documentation. ",com,https://gis.stackexchange.com/users/465,"I have some notes and tutorials on setting GeoServer up and building web mapping apps at http://ian01.geog.psu.edu. ",Ian Turton,https://gis.stackexchange.com/users/79,http://gis.stackexchange.com/questions/7987/looking-for-advanced-geoserver-tutorials,TECHNOLOGY,gis.stackexchange.com 3230,Reftex \cite command binding,"I have a computer where the char [ is made with AltGr+è so I can't use the command Ctrl+[ of RefTeX. Is there a solution to this? ",Alessandro,https://tex.stackexchange.com/users/25121,"I'm moving my comment here as it gives me more space: But then again, there are quite a lot of Emacs + reftex users reading this site as well. C-c [, runs reftex-citation, you you could just define your own short cut. Here is what I would do ; unset C-z, to be used to make my own C-z prefix (global-unset-key [(control z)]) (global-set-key [(control z) (c)] 'reftex-citation) (untested) The above is how I normally add my own short cuts. By using C-z as a prefix, I'm usually not messing with some existing ones. ",daleif,https://tex.stackexchange.com/users/3929,http://tex.stackexchange.com/questions/95680/reftex-cite-command-binding,TECHNOLOGY,tex.stackexchange.com 2207,What platform can I use to establish a users support forum?,"I was asked to develop a users support community forum for a small and young hi-tech company. This kind of forums is very popular with companies these days and is a great alternative to the official product support lines. An example of what we look for is the Analog Devices' Engineer Zone forums. I am totally noob to this area so any advice will be appreciated - how to start developing such a site, what platforms are available (preferably open-source/free) and what are the advantages and disadvantages of these platforms. Is a stackexchange style forum appropriate for such site? * If you think there is a better SE site to post this question, please let me know. ",ysap,https://webmasters.stackexchange.com/users/9535,"We have been using OSQA (a free software StackExchange clone) which is quite useful for public-access queries. (Note however that OSQA is not very actively developed, so AskBot might be a better choice these days.) However, we haven't seen a lot of buy-in from our clients and partners, which may be related to our non-consumer industry, so they may not be used to using the public web professionally (in some cases, not even LinkedIn). So we're in the process of putting together a login-only bbPress forum, since our sysadmin suggested they might feel a bit more secure there (emotionally and technologically). We are planning to treat posts something like tickets, for example by encouraging users to mark them as solved, etc. So the short answer is, the Q&A interface has incredible utility and I hope it becomes the norm, but if you find it doesn't gain traction with your userbase, a forum (possibly private) might be a better answer. ",d3vid,https://webmasters.stackexchange.com/users/27825,http://webmasters.stackexchange.com/questions/18090/what-platform-can-i-use-to-establish-a-users-support-forum,TECHNOLOGY,webmasters.stackexchange.com 3465,Private IP getting routed over Internet,"We are setting up an internal program, on an internal server that uses the private 172.30.x.x subnet... when we ping the address 172.30.138.2, it routes across the internet: C:\>tracert 172.30.138.2 Tracing route to 172.30.138.2 over a maximum of 30 hops 1 6 ms 1 ms 1 ms xxxx.xxxxxxxxxxxxxxx.org [192.168.28.1] 2 * * * Request timed out. 3 12 ms 13 ms 9 ms xxxxxxxxxxx.xxxxxx.xx.xxx.xxxxxxx.net [68.85.xx.xx] 4 15 ms 11 ms 55 ms te-7-3-ar01.salisbury.md.bad.comcast.net [68.87.xx.xx] 5 13 ms 14 ms 18 ms xe-11-0-3-0-ar04.capitolhghts.md.bad.comcast.net [68.85.xx.xx] 6 19 ms 18 ms 14 ms te-1-0-0-4-cr01.denver.co.ibone.comcast.net [68.86.xx.xx] 7 28 ms 30 ms 30 ms pos-4-12-0-0-cr01.atlanta.ga.ibone.comcast.net [68.86.xx.xx] 8 30 ms 43 ms 30 ms 68.86.xx.xx 9 30 ms 29 ms 31 ms 172.30.138.2 Trace complete. This has a number of us confused. If we had a VPN setup, it wouldn't show up as being routed across the internet. If it hit an internet server, Private IP's (such as 192.168) shouldn't get routed. What would let a private IP address get routed across servers? would the fact that it's all comcast mean that they have their routers setup wrong? ",WernerCD,https://serverfault.com/users/53719," What would let a private IP address get routed across servers? Let's define what a private IP address is first: It's an address that, by convention, is agreed to not be routed on the Internet. That means that we agree as a community to never advertise those routes over BGP. It also means that that an ISP will probably kill those routes at the borders to their network to prevent them from possibly propagating. That doesn't mean, however, that a private IP can't cross routers. It is very possible and even highly likely that Comcast uses private IP address ranges for networking equipment that isn't ever supposed to communicate with the Internet as a whole. Those routes may be forwarded by interior routing protocols throughout the entire Comcast network. All in all, I'm going to guess that it's the case that your router performs NAT translation and then default-routes all traffic that isn't local to the next hop router, including private IP space. It's not very likely, though, that there are many Comcast routers sporting default routes that accidentally go all the way to a responding host with a private IP. It's my strong assumption that this is something purposeful. It might be a temperature sensor with remote monitoring or some other equally innocuous device that never needs to be talked to by anybody outside of Comcast. Would the fact that it's all Comcast mean that they have their routers setup wrong? Since your traceroute shows that all the packets remain within the Comcast network, it's actually not a very surprising circumstance that you've run into. It's staying within a single autonomous system and not violating any standards. ",Jeff Ferland,https://serverfault.com/users/3139,http://serverfault.com/questions/374126,TECHNOLOGY,serverfault.com 1284,I need help! PopUp with only OK button,"I need help! I have an Ipad. A pop up came on my screen giving an htpp : ip adress and a nasty sexual message. There is only an OK button and I cannot close it. It seems to be have frozen my web browser . I'm using Safari. I read some examples on this site. I tried to download AVAST but finally I unstalled it. I cannot find ClamXAV. Should I click the ok button and then close all the Windows? Since I have no access to internet can I download G-Whizz Apps Browser? Can I have two browsers on the same Ipad, or will I loose all my favorites and stuff from Safari? I'm 61, not very familiar with all this computer language, but willing to learn even if I find this very difficult! p.s. Now I seem unable to send this message because I need a tag.... now what is a tag. I can see many suggestions so I will chose ipad, because this is what I have, but why I'm doing it, is a mystery??? ",Suzanne,https://superuser.com/users/230037,"Mobile Safari will disable the browser controls (new tab, back, etc.) when a JavaScript popup is opened. Unfortunately, this locks the browser until you press ""OK"" or ""Cancel"" (if available). To get rid of the popup without clicking ""OK"" or ""Cancel"": If you are in Mobile Safari, close it by pressing the home button. Kill Mobile Safari by double-tapping the home button to bring up the bottom panel, tapping and holding the Mobile Safari icon, and then tapping the minus sign (-) at the top left of the icon. Open the Settings app. Click on ""Safari"". Click on ""Advanced"" Uncheck/Turn off ""Java Script"" Go into Flight mode or turn the Wlan off Open Safari and close the tab (of the former bugging popup - it wont open this time, because JavaScript is disabled :-) ) Turn Wlan and Java Script on again enjoy the lack of the stupid popup in your Browser. ;-) So this way you dont have to clean your cache. ",iglvzx,https://superuser.com/users/100787,http://superuser.com/questions/605463,TECHNOLOGY,superuser.com 8961,How often do I need to change my oil in a VW TDI?,"The manual for my 2003 VW TDI says to change the oil every 12 months or 10,000 miles. My dealer says every 6 months or 5,000 miles. Are they just trying to make twice as much money off my oil changes, or is there a legitimate reason to change the oil twice as often as VW originally printed in the book? ",Ken,https://mechanics.stackexchange.com/users/3547,"I change the oil every 18,000 miles. My tdi is on longlife service plan and I use only the best long life oil. ",Tom,https://mechanics.stackexchange.com/users/7389,http://mechanics.stackexchange.com/questions/6856/how-often-do-i-need-to-change-my-oil-in-a-vw-tdi,CULTURE,mechanics.stackexchange.com 384,How does arbitary code execution work?,"I'm unable to understand how arbitrary code execution vulnerabilities are supposed to work. Wikipedia mentions: Arbitrary code execution is commonly achieved through control over the instruction pointer of a running process. Say, the vulnerability is being triggered by some maliciously crafted file that said process is reading. How could it modify the instruction pointer, or, otherwise, corrupt the internal state of the application so as to cause it to execute the attacker's code? Also, given that modern OSes implement DEP and ASLR, how is this even feasible? The data loaded from the application would not even be executable, and additionally, it's also difficult to determine the offset of the shellcode/payload. Brownie points for showing a small snippet of code that would be vulnerable to such an exploit. ",user2064000,https://security.stackexchange.com/users/22260,"Code injection / Code execution is any attack that involves tricking a node in a distributed system into running code specified in a network message that was supposed to be treated as plain text/bytes. The arbitrary part means that the vulnerability allows the attacker to make use of the full authority of the running process or of some privileged principle like root. given that modern OSes implement DEP and ASLR, how is this even feasible Code injection relies on some other kind of vulnerability to inject the payload. You're probably thinking of injection via buffer overflow but there are other ways to inject code that memory address space tricks don't help against. Code injection doesn't necessarily mean injecting instructions in the processor's instruction set into a code/data segment. It can mean injecting source code in a scripting language which the program foolishly interprets. For example, shell injection involves injecting bytes that are passed to a shell. Shell injection (or Command Injection[10])is named after Unix shells, but applies to most systems which allow software to programmatically execute a command line. Typical shell injection-related functions include system(), StartProcess(), and System.Diagnostics.Process.Start(). Some systems have used string tainting * to try to mitigate code injections that aren't covered by DEP/ASLR and it does help but isn't foolproof: taint bits aren't serialized when strings are serialized to files/DBs and, under maintenance, more untaint instructions are added to a program to fix high visibility non-security bugs than are removed to fix low-visibility security vulnerabilities. The concept behind taint checking is that any variable that can be modified by an outside user (for example a variable set by a field in a web form) poses a potential security risk. If that variable is used in an expression that sets a second variable, that second variable is now also suspicious. The taint checking tool proceeds variable by variable until it has a complete list of all variables which are potentially influenced by outside input. Systems that label strings based on information flow have also been used to secure distributed systems that have to mix strings of different provenance, but information-flow is more of an all-or-nothing approach: harder to retrofit onto systems that were not designed around it. Information flow control protects information security by constraining how information is transmitted among objects and users of various security classes. These security classes are expressed as labels associated with the information or its containers. Taint-checking, above, is a very simple kind of information flow analysis in which the labels are restricted to (tainted, untainted). ",Mike Samuel,https://security.stackexchange.com/users/227,http://security.stackexchange.com/questions/63315/how-does-arbitary-code-execution-work,TECHNOLOGY,security.stackexchange.com 8925,"Was Rakata's ""Force-enhanced"" hyperdrive technology ever replicated (or something similar used)?","We know that Rakatan empire in Star Wars EU was one of the earliest hyperdrive capable species, and their hyperdrive was powered by the Dark Side of the Force: The first interstellar space drive known to make use of hyperspace was developed by the Rakata, who built their Infinite Empire around technology using the dark side of the Force to travel through hyperspace. (Wikia). Has anyone used hyperdrive technology that was powered by the Force (any side) since the Rakata? It could have been a clone of Rakata's, or totally different, as long as it wasn't simply someone taking and using existing surviving Rakatan unit. If not, was there an explicit in-universe explanation as to why the Force was never used to enhance Hyperspace travel? (the predictable ""well the Rakata were screwed up via their use of Dark Side"" doesn't seem to be plausible in a universe full of Sith, and assorted other Dark Force users). ",DVK-on-Ahch-To,https://scifi.stackexchange.com/users/976,"Around 200 years after the fall of the Rakata's Empire (the Infinite Empire) the civilizations from both the planets Correllia and Duro managed to build workarounds using the Rakata's force-based technology, making it common use in around twenty years or so. Even the Tionese managed to build a really basic form of hyperspace technology around the Rakata's force-only requirement. As for a reason why force sensitive hyperdrive was not further looked into, a huge problem the Rakata's had was because the hyperdrive relied on the use of the force, they could only travel to planets with high-force signatures, allowing other civilizations to take control of the planets in between. Hope this helps! ",Mahmud Mourad,https://scifi.stackexchange.com/users/16259,http://scifi.stackexchange.com/questions/33212/was-rakatas-force-enhanced-hyperdrive-technology-ever-replicated-or-somethin,LIFE_ARTS,scifi.stackexchange.com 320,File version number of .NET 3.5 Service Pack 1 installer,"I have a very large executable (237 MB) called dotnetfx35.exe. This may be .NET 3.5, or it may be .NET 3.5 service pack 1. How can I tell which one it is? (Short of downloading the .NET 3.5 SP1 file and doing a comparison). On the version tab I have: File version: 3.5.30729.1 Description: .NET Framework 3.5 Setup If you have downloaded the SP1 full installer file (not the bootstrapper), could you please tell me the file version number? Then I'll know if I have to download it or not. ",Andrew Shepherd,https://serverfault.com/users/18371,"What architecture is it? I have the .NET 3.5 SP1 redistributables, and their details are: x86: 3.5.30729.1 x64: 3.5.30729.1 IA64: 3.5.30729.1 Hmm I see a pattern emerging here. Looks like you have the SP-1 install. (P.S. You can this info verbosely by looking at the ""Product Name"" value in the Version tab of the Properties box) Update: Turns out this information is not really correct. Look at the following screenshot: Left = SP1 install, Right = Non-SP install. They are the same version number. I'm going to say that your version is the non-SP though, because SP1 is missing from the description according to your post. ",Mark Henderson,https://serverfault.com/users/7709,http://serverfault.com/questions/59325,TECHNOLOGY,serverfault.com 6742,Tuples in LaTeX,"I am learning to use TikZ to draw things in LaTeX. One of the things that TikZ seems to use everywhere for specifying coordinates is a tuple. For example, \begin{tikzpicture} \node[isosceles triangle, isosceles triangle apex angle=70, draw=black,fill=white, inner sep=0pt,anchor=lower side,rotate=90,draw=black, fill=white, minimum height=2 cm] (a) at (0,0) {}; \end{tikzpicture} Creates a small isosceles triangle. Note the use of (0,0). Let's encapsulate making a triangle as above with the following macro. \newcommand\Tri[3]{ \node[isosceles triangle, isosceles triangle apex angle=70, draw=black,fill=white, inner sep=0pt,anchor=lower side,rotate=90,draw=black, fill=white, minimum height={#2} cm] (#1) at #3 {};} Suppose I wanted to define a function that takes in a size and starting coordinate, and draws a ""triangle"" of triangles such as \begin{tikzpicture} \Tri{a}{1}{(-1,0)} \Tri{b}{1}{(1,0)} \Tri{c}{1}{(0,1.41)} \end{tikzpicture} The simple way to do this is to make a macro \TriTri, such that \TriTri{a}{n}{x}{y} creates a triangle of triangles, with bottom triangle anchored at (x,y). \newcommand\TriTri[4]{ \Tri{#1}{#2}{(#3,#4)} \Tri{#1}{#2}{(#3+2*#2,#4)} \Tri{#1}{#2}{(#3+#2,{sqrt(2*#2*#2)})}} %% note #3+#2 = (x1 + x2)/2 %% the sqrt bit is sqrt(size^2 + size^2) } I have gotten this to work! But what I would like to do is instead of having x and y input separately, I would like to have them input as a coordinate pair. I would like to reference the coordinates as \first,\second. So that \first(x,y) = x. The desired effect is that $$\first(1,2)$$ would be the same as $$1$$ ",Jonathan Gallagher,https://tex.stackexchange.com/users/16108,"You can use the xparse package: \documentclass{article} \usepackage{tikz,xparse} \usetikzlibrary{shapes.geometric} \NewDocumentCommand{\Tri}{m m r()} {% \node[isosceles triangle, isosceles triangle apex angle=70, draw=black,fill=white, inner sep=0pt,anchor=lower side,rotate=90,draw=black, fill=white, minimum height=#2cm] (#1) at (#3) {}; } \NewDocumentCommand\TriTri{mmr(,u)} {% \Tri{#1}{#2}(#3,#4) \Tri{#1}{#2}(#3+2*#2,#4) \Tri{#1}{#2}(#3+#2,{sqrt(2*#2*#2)}) %% note #3+#2 = (x1 + x2)/2 %% the sqrt bit is sqrt(size^2 + size^2) } \begin{document} \begin{tikzpicture} \TriTri{a}{3}(2,2) \end{tikzpicture} \end{document} The \Tri command accepts three arguments; the first and the second ones are enclosed in braces, while the third is between parentheses, so \Tri{a}{3}(0,0) In the body of the definition you'll use (#3) instead of #3, because the parentheses are stripped off. In the case of \TriTri we have to split off the two coordinates, so we define four arguments; the first and the second ones are enclosed in braces; the third is what goes from ( to a comma, the final one is everything up to ). Thus I have modified accordingly your code for \TriTri based on the requirements for \Tri. ",egreg,https://tex.stackexchange.com/users/4427,http://tex.stackexchange.com/questions/133987/tuples-in-latex,TECHNOLOGY,tex.stackexchange.com 1116,Nikon D3000 Blurry Pictures. Focus Issue?,"Here are two examples: Both pictures are in NEF format here. The pictures have not been modified in any way except except for being resized and converted to PNG. Just for kicks (and to prove I'm not crazy) I sharpened the butterfly image via ""unsharp mask."" It's not a pretty result but I just wanted to demonstrate ""sharp"" vs. ""blurred."" Kind of annoying because I've ruined many epic shots with this odd focus problem. My original Film SLR was a Minolta Dynax 505si Super 35mm (or in the same family, I think) and it performed marvellously. I used it for about 4 or 5 years all throughout high school and then (as an avid film photographer) begrudgingly made the switch over to digital in college. But the Minolta definitely gave me experience in photography and people genuinely enjoyed my photographs. Early on, I don't know if I was just enamoured with the idea of vibrant digital images from an SLR or if I just didn't notice enough, but I don't remember a whole lot of images that came out blurry in the beginning. Maybe 60% of them (a liberal estimate). I accidentally deleted about a year's worth of early pictures so I'm unable to tell now. The preview in the viewfinder doesn't appear to be blurry at all; then again, there's a huge different between the 3"" preview screen and my 20"" computer monitor. Here are things I've tried: Using a tripod (although, as you can tell, the issue is not a motion blur issue). Tried different aperture settings (for example, the landscape image is f/22). Tried different ISO. Manual focus. Auto focus. Manually ""de-focusing"" the object (focusing behind it and focusing in front of it). Although, with the picture of the butterfly, this doesn't seem to be the case: it has varying depth of field and even the supposedly ""in-focus"" butterfly is out of focus. Changing the ""sharpening"" property via the camera: Menu > Set Picture Control > (picture control -- e.g. ""Neutral"") > Sharpening Went into a physical repair shop and they did test images. They didn't seem to find a problem, patted me on the head, and told me to be a good photographer and use the autofocus. Letting someone else take the picture. Chromatic aberration correction (typically through Digikam) Different Lenses. The two below are using my AF-S Nikkor 18-55mm 1.3.5-5.6 G lens. I have a AF-S Nikkor 55-200mm 1.4-5.6G ED telephoto and get the same result (sometimes result is worse -- can post an example if needed). And, oh, yeah, I even sent it into Nikon...three times. They said they fixed the problem. But, you know how those things go... Oddly enough I've looked up reviews for my camera and both lenses and couldn't find many (if any) reviews stating blurry pictures for every picture. A few thoughts: Could whichever photo editing program I'm using be the cause of the blur? I used Linux so I've used Digikam (my favorite), F-Spot, and the Gimp. Maybe it's normal for digital pictures to be blurry compared to film? Digital doesn't use crystals like film, so the opposite should seem true. I wonder this because a lot of work has gone into sharpening tools like unsharpen mask. Sorry for the long post and various photo examples. Thanks in advance! ",i41,https://photo.stackexchange.com/users/29811,"I see no problem in either of these images. They both appear correct. Lenses are not 100% sharp to begin with and on cheaper lenses it is not atypical for the resolution of the camera to outpace the resolution of the lens, particularly on entry level and kit lenses like the two you are using. This is even further compounded by using high aperture on a crop body camera. The smaller point you try to focus light on, the more of an issue diffraction becomes when shining the light through a small hole. The smaller the hole, the more impact diffraction has and this reduces what level of quality is possible to capture. Try shooting at or above f/8 or so and diffraction limiting shouldn't be a problem. You might be able to go a bit higher than that based on your resolution, but I didn't do the calculations to figure out exactly when it is a problem. (There are calculators online if you want to check exactly when it should theoretically start being an issue.) The first one certainly has a shallow depth of field, but it appears as sharp as expected for your choice of aperture and lens. Your unsharp masked version seems over-sharpened. It over-exaggerates the edges and makes things ""jump out"" more, but is unnaturally so. ",AJ Henderson,https://photo.stackexchange.com/users/11392,http://photo.stackexchange.com/questions/52322/nikon-d3000-blurry-pictures-focus-issue,LIFE_ARTS,photo.stackexchange.com 9574,How to remember a trusted machine using two factor authentication (like Google's system),"We are developing a web application that will use two factor authentication. We are likely to try and emulate something similar to that used by google, where to login you enter a username and password, and then receive a token in an SMS message to be entered as well. We would like to allow users to remember a client machine if they would like to so that they can login for 30 days without requiring the second authentication method. What information will we have access to (through headers of the web page requests etc.) which we can use to uniquely identify this trusted client machine? Obviously a user can have more than one trusted client machine, and I completely expect that if they use two different browsers on the same trusted machine machine, each browser will have to be trusted independently. Setting a cookie on the machine with some GUID which means this is trusted simply would not be good enough, as someone else could just copy the cookie, and create it on their own browser circumventing the two factor authentication. ",Marryat,https://security.stackexchange.com/users/21071,"Don't think this can be done safely for an arbitrary client using only a standard web browser. As you say, cookies are not a safe choice to authorise a computer. Besides, cookies are set per browser, not per computer. You could try browser fingerprinting techniques, but again this is specific to the browser, not the computer. And keep in mind that HTTP requests, including User Agent strings, can be set arbitrarily by a malicious client. ",Gruber,https://security.stackexchange.com/users/20225,http://security.stackexchange.com/questions/31327/how-to-remember-a-trusted-machine-using-two-factor-authentication-like-googles,TECHNOLOGY,security.stackexchange.com 9161,Is research a viable business model?,"I have had the suspicion that it may be for a while and apparently not all is a product of my mind. Let me quote from an answer: In my experience, in UK and other European countries, the research funding comes from successful proposals to the relevant funding bodies. There are research centres that were established and keep going only because the staff there constantly submits project proposals (somebody told me that the success rate is 1 out of 5 or maybe even lower). There are two questions here. Can a company feasibly focus on obtaining funds in publicly funded research (as a business model) successfully enough to ""survive""? Can such a company be started (nearly) from scratch? In short, the company would be exactly like a research institute (or institution) except that it would be private. Reasons why question 1 may not be feasible: I don't see any company doing this kind of thing, i.e. there may be some, but there are not many, which means that it may be hard. It's a bad sign. Public funds seem to be assigned to public entities, while companies can benefit from the collaboration and synergy, but they are expected to get their funding from their work as companies (searching for customers, etc.) In this case the customers would be the partners in the projects and the society itself, but again, this seems to be an ""innovative"" (maybe naïve, or even plain stupid) idea. Research is a means for something, not an end on itself, that's why the business model should be on something else (point two) and that's why such a company would raise eyebrows on the mere idea of its existence. It may even be against some kind of tacit rule or even written laws. Reasons why question 2 may not be feasible: No previous history of success of the company, or products or anything means zero (or negative) trustworthiness and no projects assigned to the company. No partners would like to associate with the company in a project for the reasons in point 1. The most similar case I can think of are spin-off companies that are created from successful research labs, not from scratch. OMG so much communism! Go to kickstarter you hippie! As an example, a possible scenario that could be close to this: Someone writes a paper about a software system that does something not very novel in the state of the art but in a way that is very different from an architectural point of view, leading to good results in practical terms. In short: in theory nothing is new, in practice what was just a dream is now a reality. What is done remains the same in theory, but how it is done is completely different in practice (and now it works). Unfortunately only a proof of concept (PoC) can reasonably be implemented. Would it be feasible to request funds to continue the development of this PoC (still very far from a commercial product) as a start-up or that simply doesn't make sense? ",Trylks,https://academia.stackexchange.com/users/7571,"In Europe, companies exist that primarily live from FP7 or, now, H2020 funding. They rarely contribute much to projects in terms of research, but often handle tangential issues, such as project management, dissemination, marketing, or association with standardization bodies. Their model works because (1) they do things that none of the research partners actually wants to do, and (2) because they are often SMEs, which is generally politically helpful to get your funding proposals accepted. Further, as writing grant proposals is their core business, they usually also have grant writing experts that have the time to actually keep up with the various changes that the european commission is constantly applying to its programmes and rules (something that many researchers struggle to find the time for). Formally, these companies often camouflage as either consultancies or technology spinoffs. That is, you will not find it on their web page that their core business model is actually to milk grant programmes, as this is strictly against official funding rules (as a company, you can only apply for funding if you plan to commercialise the results, and you are not supposed to make a profit from the project itself). In practice, the project officers seem to tolerate these businesses - for now. Can such a company be started (nearly) from scratch? You will need a reasonable amount of seed money, as the H2020 rules require proof that an organization applying for grants has enough financial stability to likely survive over the typically 3-year project duration. I know from one startup that wanted to participate in a project (for actual technology reasons) which was in fact struggling to cross this hurdle. However, if you have the required seed funding, I see no reason why you would not be able to start such a business. Whether it is a smart business idea is a different question, given that you are basically living off of a loophole in the current funding practices, and you can never tell how long this loophole will stay open. Edit: I just saw that I missed this question: Would it be feasible to request funds to continue the development of this PoC (still very far from a commercial product) as a start-up or that simply doesn't make sense? Yes, at least in Europe there are funding sources for exactly this kind of case. You should inform yourself about the concept of Technology Readiness Levels (TRLs, slide 4), and the different kinds of funding available for each TRL. If you look at this presentation and go to slide 32, there is an overview over different funding instruments in H2020 depending on the maturity of the idea. ",xLeitix,https://academia.stackexchange.com/users/10094,http://academia.stackexchange.com/questions/23676/is-research-a-viable-business-model,LIFE_ARTS,academia.stackexchange.com 3578,Hostname resolution in a machine with multiple running eth ports,"Consider a machine having 4 eth ports running on it. Then to which eth port's ipaddress will the hostname resolve to? Kindly guide me to some documentation to support your answers so that I could use them as proof in my project. Thanks ",LinuxPenseur,https://serverfault.com/users/62792,"You don't mention which brand of Linux you're using. RedHat (and Centos, and perhaps even Fedora) uses the /etc/sysconfig/network file to determine the host's name. Then, using the host's name, it determines the IP address of the host using the normal naming system (as given in /etc/resolv.conf), which in practice means that you should have an IP-to-name mapping in /etc/hosts. The IP addresses are associated to the NICs in /etc/sysconfig/network-scripts/ethX, where X is an integer (0, 1, 2, and 3 in your case). See http://www.centos.org/docs/5/html/5.2/Deployment_Guide/s2-sysconfig-network.html and Ch03:_Linux_Networking"">http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:Ch03:_Linux_Networking ...and http://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-networkscripts.html ",Mike S,https://serverfault.com/users/63931,http://serverfault.com/questions/236095,TECHNOLOGY,serverfault.com 6538,Gaussian blur - convolution algorithm,"My program uses graphics convolution, an algorithm that processes pixels to make them round, soft and blurred. This particular algorithm is well-known, but its slowing down the operation of the whole program. Can you suggest any improvements of this algorithm? I tried following from here, especially ""ultimate solution"" all the way to the bottom of that page, hoping to reduce the number of for loops one within another, but it did not work. import perceptron.DoubleBuffer.ImageRenderContext; import util.ColorUtility; import java.awt.image.DataBuffer; public final class Convolution { DoubleBuffer buffer; int[] d; int s, h, e; int[] temp; /** * Constructs new Convolution using the convolution degree and DoubleBuffer as input parameters. * * @param std * @param b */ public Convolution(int std, DoubleBuffer b) { s = 2 * std; h = s / 2; e = 256 / h; d = new int[s]; buffer = b; for (int i = 0; i < s; i++) { d[i] = (int) (256 * gaussian(i - s / 2, std)); } temp = new int[b.buffer.W * b.buffer.H]; } /** * Optimized power function. Poor quality? */ public static double power(final double a, final double b) { final long tmp = (Double.doubleToLongBits(a) >> 32); final long tmp2 = (long) (b * (tmp - 1072632447) + 1072632447); return Double.longBitsToDouble(tmp2 << 32); } /** * Optimized exponent function with little benefit. */ public static double exponent(double val) { final long tmp = (long) (1512775 * val + (1072693248 - 60801)); return Double.longBitsToDouble(tmp << 32); } /** * Calculate the Gaussian for blurring. * * @param x * @param sigma * @return */ static double gaussian(float x, float sigma) { return exponent(-.5 * (x * x) / (sigma * sigma)) / (sigma * 2.506628); //return exponent(-.5 * pow(x / sigma, 2)) / (sigma * sqrt(2 * PI)); //return exp(-.5 * pow(x / sigma, 2)) / (sigma * sqrt(2 * PI)); // actual equation } /** * Process the loaded buffer (image). * * @param amount */ public void operate(int amount) { ImageRenderContext source = buffer.output; DataBuffer sourcebuffer = buffer.output.data_buffer; DataBuffer destbuffer = buffer.buffer.data_buffer; if (buffer.convolution != 0) { int W = buffer.output.W; int H = buffer.output.H; int Hp = H - h; // Do X blur int i = 0; for (int y = 0; y < H; y++) { for (int x = 0; x < W; x++) { int Y = 0, G = 0; for (int k = 0; k < s; k++) { int c = source.get_color_for_convolution.getColor(x + k - h << 8, y << 8); int w = d[k]; Y += w * (c & 0xff00ff); G += w * (c & 0x00ff00); } temp[i++] = (0xff00ff00 & Y | 0x00ff0000 & G) >> 8; } } // Do Y blur i = 0; int notamount = 256 - amount; for (int y = 0; y < h; y++) { for (int x = 0; x < W; x++) { int Y = 0, G = 0; for (int k = 0; k < s; k++) { int y2 = (y - h + k + H) % H; int c = temp[x + W * (y2)]; int w = d[k]; Y += w * (c & 0xff00ff); G += w * (c & 0x00ff00); } int c1 = (0xff00ff00 & Y | 0x00ff0000 & G) >> 8; int c2 = sourcebuffer.getElem(i) << 1; int r = ((c2 >> 16) & 0x1fe) - ((c1 >> 16) & 0xff); int g = ((c2 >> 8) & 0x1fe) - ((c1 >> 8) & 0xff); int b = ((c2) & 0x1fe) - ((c1) & 0xff); r = r < 0 ? 0 : r > 0xff ? 0xff : r; g = g < 0 ? 0 : g > 0xff ? 0xff : g; b = b < 0 ? 0 : b > 0xff ? 0xff : b; c2 = (r << 16) | (g << 8) | (b); c2 = ColorUtility.average(c1, amount, c2, notamount); destbuffer.setElem(i++, c2); } } for (int y = h; y < Hp; y++) { for (int x = 0; x < W; x++) { int Y = 0, G = 0; for (int k = 0; k < s; k++) { int c = temp[x + W * (y - h + k)]; int w = d[k]; Y += w * (c & 0xff00ff); G += w * (c & 0x00ff00); } int c1 = (0xff00ff00 & Y | 0x00ff0000 & G) >> 8; int c2 = sourcebuffer.getElem(i) << 1; int r = ((c2 >> 16) & 0x1fe) - ((c1 >> 16) & 0xff); int g = ((c2 >> 8) & 0x1fe) - ((c1 >> 8) & 0xff); int b = ((c2) & 0x1fe) - ((c1) & 0xff); r = r < 0 ? 0 : r > 0xff ? 0xff : r; g = g < 0 ? 0 : g > 0xff ? 0xff : g; b = b < 0 ? 0 : b > 0xff ? 0xff : b; c2 = (r << 16) | (g << 8) | (b); c2 = ColorUtility.average(c1, amount, c2, notamount); destbuffer.setElem(i++, c2); } } for (int y = Hp; y < H; y++) { for (int x = 0; x < W; x++) { int Y = 0, G = 0; for (int k = 0; k < s; k++) { int y2 = y - h + k; if (y2 < 0) { y2 = 0; else if (y2 >= H) { y2 = H - 1; } int c = temp[x + W * (y2)]; int w = d[k]; Y += w * (c & 0xff00ff); G += w * (c & 0x00ff00); } int c1 = (0xff00ff00 & Y | 0x00ff0000 & G) >> 8; int c2 = sourcebuffer.getElem(i) << 1; int r = ((c2 >> 16) & 0x1fe) - ((c1 >> 16) & 0xff); int g = ((c2 >> 8) & 0x1fe) - ((c1 >> 8) & 0xff); int b = ((c2) & 0x1fe) - ((c1) & 0xff); r = r < 0 ? 0 : r > 0xff ? 0xff : r; g = g < 0 ? 0 : g > 0xff ? 0xff : g; b = b < 0 ? 0 : b > 0xff ? 0xff : b; c2 = (r << 16) | (g << 8) | (b); c2 = ColorUtility.average(c1, amount, c2, notamount); destbuffer.setElem(i++, c2); } } } else { buffer.buffer.data_buffer = buffer.output.data_buffer; } } } ",GianniTee,https://codereview.stackexchange.com/users/34915,"Naming naming naming Your code is very intimidating - it is filled with single letter variable and members (s,h,e,d...). Those which are not single letter are generic and unhelpful (temp, buffer, notamount...). This makes your code very unreadable. You also use a lot of literal numbers (2, 256, 1072632447, 60801...) which make no sense to a person who is not familiar with your algorithm. Use constants to make your code more readable. Your comments are also not useful for someone to read and understand your code. If you want a serious code review, you must make your code readable, break large methods (operate) into smaller ones, etc. ",Uri Agassi,https://codereview.stackexchange.com/users/22648,http://codereview.stackexchange.com/questions/39592/gaussian-blur-convolution-algorithm,TECHNOLOGY,codereview.stackexchange.com 4152,How do I stop Windows from moving desktop Icons?,"I have two monitors connected to my computer. (same graphics card. One HDMI, the other DVI). Whenever I do one of the following things, my icons move around on my desktop: Play a Game Turn off one monitor When I stop playing the game or turn one of the monitors back on, Windows 7 does not properly restore the icon locations. Is there is a way I can prevent Windows from moving my desktop icons around? ",ray023,https://superuser.com/users/37183,"No. When the screen resolution changes, Explorer will automatically move icons that would otherwise be off-screen. (Imagine the complaints if it didn't do that. ""I changed my monitor and now half my files are gone!"") ",grawity,https://superuser.com/users/1686,http://superuser.com/questions/290078,TECHNOLOGY,superuser.com 840,Equivalent Key Signatures,"I've noticed that a variety of pieces in the classical repetoire (certainly at least the piano repetoire), label what seems to be effectively the same key signature differently. That is, I am not aware of any differences in terms of key between a piece in ""G Sharp major"" and ""A flat major"" (or their equivalent minors). Is there any reason that sometimes a sharped key signature is used while at other times the equivalent flatted key signature is used? As a related point, I have undoubtedly noticed the preference of certain ""equivalent"" key signatures over others. For example, one encounters ""E flat"" significantly more than ""D sharp"" and likewise ""C sharp"" significantly more than ""D flat"". Is there any particular reason for this, or is it simply a convention that has been handed down to use through musical history? ",Noldorin,https://music.stackexchange.com/users/179,"There is a strong case for certain enharmonic key uses depending on the mode (minor/Major). These four little tables show that Eb is significantly easier to write than D# for a major scale as the latter would involve double sharps in the signature. But F# and Gb Major are really close in complexity. Major scales Number of #s (upper lines) versus enharmonic number of bs Number of bs (upper lines) versus enharmonic number of #s Likewise C# minor is to be prefered to Db minor but D# and Eb are interchangeable and this is indeed what Bach did in its Well Tempered Keyboard (Preludium 8 and Fugue 8, BWV 853). He used one for the prelude and the other for the fugue (See Alex Basson's answer about the validity of this substitution). Minor scales Number of #s (upper lines) versus enharmonic number of bs Number of bs (upper lines) versus enharmonic number of #s It explains that one favor keys that are practical in both modes especially in styles when it is frequent to make modulations or to switch between modes, such as variations. ",ogerard,https://music.stackexchange.com/users/48,http://music.stackexchange.com/questions/2976/equivalent-key-signatures,LIFE_ARTS,music.stackexchange.com 4509,Extending Internal Link and External Link to allow selection of Images,"I need to extend selection of external and Internal Link and provide a image selection. Please see the snapshot in the below : Here the above snapshot allows you to add properties for External Link.In the same popup can we add a field Called Image(as shown in screenshot) which will allow user to select images from the media library?? Thanks, Suhas ",Suhas,https://stackoverflow.com/users/998504,"If you are talking about a whole field and not just an external link inside of a rich text field, you should create a custom field based on the documentation to do so in SDN: http://sdn.sitecore.net/Articles/API/Creating%20a%20Composite%20Custom%20Field.aspx You can inherit most functionality from the current link field. ",Paul Caponetti,https://stackoverflow.com/users/2201280,http://stackoverflow.com/questions/23337280/extending-internal-link-and-external-link-to-allow-selection-of-images,STACKOVERFLOW,stackoverflow.com 164,2 divs both 100% next to each other,"Quite simple question but tried about everything. what i want is 2 (actually 5) divs next to eachother with the class ""container"" so i can make a horizontal 1page website. Each div has to be 100% wide. so 2 divs mean 2 screens next to eachother. This is the css line i have now: .container { width: 100%; float: left; display: inline; } I cant get them to line up next to each other. Here is a visual to make it more clear. image url for bigger preview: http://www.luukratief.com/stackoverflow.png The scrolling part is not the issue for me, just the placement of the divs. Is this possible using percentages or is this simply not possible. If so, please tell me how to do this with css. Thanks in advance! ",Luuk,https://stackoverflow.com/users/691035,"You can make a container with 200% width and then put two divs inside of that element with 50% width so you will make sure that one div always gets the whole visitors screen width. For example: <div class=""container""> <div class=""contentContainer""></div> <div class=""contentContainer""></div> </div> And CSS: .container { width: 200%; } .contentContainer { width: 50%; float: left; } ",Johan Davidsson,https://stackoverflow.com/users/734261,http://stackoverflow.com/questions/6597889/2-divs-both-100-next-to-each-other,STACKOVERFLOW,stackoverflow.com 8919,Demonstrating the insecurity of an RSA signature encoding scheme,"I'm working on problem 12.4 from Katz-Lindell. The problem is as follows: Given a public encoding function $\newcommand{\enc}{\operatorname{enc}}\enc$ and a textbook RSA signature scheme where signing occurs by finding $\enc(m)$ and raising it to the private key $d \bmod N$, how can we demonstrate the scheme's insecurity for $\enc(m) = 0||m||0^{L/10}$, where $L = |N|$ and $|m| = 9L/10 - 1$ and m is not the message of all zeroes? ",pg1989,https://crypto.stackexchange.com/users/1025,"An RSA signature scheme with public key $(n,e)$, private exponent $d$, and encoding function $enc$ (including but not limited to the question's $enc$), signs message $m$ as $$Sign(m) = enc(m)^d\bmod n$$ Such scheme is insecure if an adversary can figure out $k>0$ distinct messages $m_i$, and integers $u_i$, $r$, $s$ verifying $$s^e \cdot enc(m_0) \cdot \prod_{0\lt i\lt k} enc(m_i)^{u_i} \equiv r^e \pmod n$$ because this implies (by raising to the power $d$) $$ Sign(m_0) \equiv r \cdot s^{-1} \cdot\prod_{0\lt i\lt k}Sign(m_i)^{-u_i} \pmod n$$ which allows computing the signature of $m_0$ (if $k\gt 1$, it is also necessary that the attacker obtain the signatures of the other messages $m_i$; that becomes an existential forgery, or chosen-message attack). Although dated, Jean-Francois Misarsky's How (Not) to Design RSA Signature Schemes is an interesting and relatively easy reading on that topic. In fact, every known attack on an RSA signature scheme is either of the above kind (with more or less involved computations to exhibit $m_i$, $u_i$, $r$, $s$); or amounts to factorization of $n$ (which includes anything recovering $d$, perhaps by side-channel attack); or is some implementation error, perhaps widespread. In order to mount an attack of the above kind, a relation of the form $enc(m_0)=r^e$ is ideal. It gives the signature of $m_0$ without any consideration on $n$ or known signature. When $e$ is 3, 5 or 7, this can be done with the encoding $enc$ in the question, by considering $r=2^t$ for some appropriate $t$, and extended to $r=v\cdot2^t$ for some small $v$. Similarly, $enc(m_0) = r^e\cdot enc(m_1)$ gives the signature of one message from the signature of the other, without any consideration on $n$. This can be done with the encoding $enc$ in the question, for a wider choice of $e$. Similarly, $enc(m_0) \cdot enc(m_1) = enc(m_2) \cdot enc(m_3)$ gives the signature of one message from the signature of the other three, for any public key $(n,e)$. With the encoding $enc$ in the question, there is ample choice (the equation simplifies to $m_0\cdot m_1=m_2\cdot m_3$, and all messages which left bit is 0 or which integer representation is composite are vulnerable). The ISO/IEC 9796:1991 signature encoding scheme (section 11.3.5 of the Handbook of Applied Cryptography), now withdrawn, turned out to be vulnerable to that, of course if the adversary can obtain the signature of three chosen messages, and is content with the signature of the fourth. Even the hash-based ISO/IEC 9796-2:1997 (now known as ISO/IEC 9796-2:2010 scheme 1), still in wide use, is vulnerable if the adversary can obtain the signature of many weird chosen messages and is content with the signature of another, which fortunately is seldom the case in practice. Some require $e>2^{16}$ (FIPS 186-3 appendix B3.1, RGS Annex B1 section 2.2.1.1, and I have seen suggestions for much wider random $e$), because some attacks on weak encoding schemes or implementations of RSA signature/encryption have been easiest for $e=3$ or other small $e$, as is the case for the scheme in the question. I will not condone a course of action that will lead us to loose the main appeal of RSA (or Rabin) signature schemes: fast and simple verification with modest hardware. ",fgrieu,https://crypto.stackexchange.com/users/555,http://crypto.stackexchange.com/questions/1422/demonstrating-the-insecurity-of-an-rsa-signature-encoding-scheme,TECHNOLOGY,crypto.stackexchange.com 2993,Implementing a NoSQL and RDBMS compatible DAO,"What would be the correct way to design a DAO which implementation is first going to be targeting a MS SQL database with a STAR model, but yet, business requirements specify the application must be flexible enough that it would be able to be migrated to a NoSQL database in the future if required. Which type of NoSQL, no idea... My confusion is that i cannot seem to figure out how could I build independent DAOs for the STAR Dimensions and Facts tables which could then be swapped for a completely different model that might not even be table oriented (riak/mongo/whatever). Therefore, Should I create DAOs which rather than abstracting the table, it abstracts the CRUD operations - for example create IDaoInsert which can then be implemented as SQLInsertDaoImpl and MongoInsertDaoImpl, each with a completely different model logic etc. or Should I just create the typical DAO design whose interface would be something like IDaoCustomerDimension, and the implementation SqlDaoCustomerDimesionImpl and MongoDaoCustomerDimentionImpl respectively? Hibernate/Etc are out of the scope of this question for the time being. ",Carlos,https://programmers.stackexchange.com/users/164772,"Your architecture should look something like this: Data source <--> Data source driver <--> CRUD interface <--> Application You'll need one data source driver implementation for each type of data source. The CRUD interface will be the same regardless of data source. Note that you can have more than just CRUD methods. You might want to return collections, for example. Just make sure that whatever you do on the Data Source side is translatable to your API on the CRUD side for all possible data sources. ",Robert Harvey,https://programmers.stackexchange.com/users/1204,http://programmers.stackexchange.com/questions/270346/implementing-a-nosql-and-rdbms-compatible-dao,TECHNOLOGY,programmers.stackexchange.com 420,"Display the number of bytes, words and lines in a file","I want to create a shell script df. As, I want to type in df name_of_file and then I can get the contents of the file. If the file name is in the directory, I want it to show its contents. If not, I want to show the size in words, lines, and bytes. How do I go about this? So far, I have this: #!/bin/bash FILENAME=$FILENAME FILEBYTES=$(stat -c%s ""$FILENAME"") FILEWORDS=$(stat -w%s ""$FILENAME"") FILELINES=$(stat -l%s ""$FILENAME"") echo ""Size of $FILENAME in bytes = $FILEBYTES bytes, $FILEWORDS words, $FILELINES lines."" ",Gary,https://unix.stackexchange.com/users/50448,"I would do it like so: #!/bin/bash FILENAME=$1 [ -f ""$FILENAME"" ] || exit FILEBYTES=$(stat -c%s ""$FILENAME"") FILEWORDS=$(wc -w ""$FILENAME"" | awk '{print $1}') FILELINES=$(wc -l ""$FILENAME"" | awk '{print $1}') printf ""Size of %s -- %s bytes, %s words, %s lines.\n"" \ ""$FILENAME"" ""$FILEBYTES"" ""$FILEWORDS"" ""$FILELINES"" Example Say I have this file: $ ls -l | grep bbbb -rw-rw-r-- 1 saml saml 3283 May 18 02:49 bbbb Now I run your script, I called it df.bash. The df command is already taken in Unix: $ ./df.bash bbbb Size of bbbb -- 3283 bytes, 386 words, 94 lines. Look for a file that doesn't exist: $ ./df.bash bbbbbbb $ Alternative method You can save some wasted calls by consolidating and having awk do the counting instead of wc. #!/bin/bash FILENAME=$1 [ -f ""$FILENAME"" ] || exit FILEBYTES=$(stat -c%s ""$FILENAME"") FILEWORDS=$(awk '{ total = total + NF }; END {print total}' ""$FILENAME"") FILELINES=$(awk 'END {print NR}' ""$FILENAME"") printf ""Size of %s -- %s bytes, %s words, %s lines.\n"" \ ""$FILENAME"" ""$FILEBYTES"" ""$FILEWORDS"" ""$FILELINES"" ",slm,https://unix.stackexchange.com/users/7453,http://unix.stackexchange.com/questions/98499/display-the-number-of-bytes-words-and-lines-in-a-file,TECHNOLOGY,unix.stackexchange.com 3353,How to forcibly disconnect a application listening on a port,"I have an app that doesn't properly stop listening on a port. How do I force it to stop so I can open the application again/use that port again? ",bobber205,https://serverfault.com/users/24088,"Yup - get TCPView from SysInternals, find the application and the connection, and close it. Failing that, restarting the application, unless the specific app has a way of doing this. Most apps won't. ",mfinni,https://serverfault.com/users/29373,http://serverfault.com/questions/115194,TECHNOLOGY,serverfault.com 1177,How can I speed up the rate at which putty dries?,"We're (slowly) renovating the sash windows in our house and the current window is causing problems. What should have been a quick job (especially at this time of year!) has turned into a marathon because the putty won't dry. We had to replace a couple of panes of glass (one was cracked and we broke another when using a heat gun to remove the paint) so we knew it would take a little while. On a previous window the putty took over three weeks to dry enough to paint partly because (as we thought) there was too much oil. So this time we rolled the putty on newspaper first to try to remove the excess oil. It seemed to work, but after two weeks the putty is still soft to the touch. We've tried standing the windows next to a radiator but all that seemed to do was make it softer (which was obviously going to happen in hindsight). So given that we don't want to reputty the windows what can we do to speed up the drying process. We've had to seal off the room and cover the window as best we can in the meantime. I've found this advice on DoItYourself.com which doesn't really help as it says use other materials! The answers to this post on DIY-Forums are confusing at best and possibly contradictory as one recommends exposing the putty to moisture(!) to speed the drying process. ",ChrisF,https://diy.stackexchange.com/users/194,"Heat will make the putty softer, which is why you can heat it up to remove it. Putty pretty much stays soft for years. Initially, it doesn't really dry out so much as oxidize which forms a skin on it. If you absolutely must paint it right away, you'll probably has to use one of the latex based glazing compounds. If you want to use a traditional one, paint it as soon as it forms enough of a skin that the paint will stick to it. Also, I think you probably should be using oil based paints, but check the instructions on the putty. If you let use know specifically which putty you are using, that might help get better answers. ",Zach,https://diy.stackexchange.com/users/1141,http://diy.stackexchange.com/questions/3022/how-can-i-speed-up-the-rate-at-which-putty-dries,LIFE_ARTS,diy.stackexchange.com 1712,put an html (scripted) menu in a separate file,"I have a menu that I've created using jquery that ""pops-up"" on certain button mouse-overs. it has a LOT of options and sub-menu options and I'd like to put it into a separate file so that it only needs to be downloaded once and all of the html markup and text doesn't need to be re-downloaded every time a user hits a sub page on my site. I was toying with the idea of using the jquery template engine but couldn't quite wrap my head around the best way to work that. This isn't a template after all, but a static menu. I'm pretty sure I can't put it in a JS file because it's not script per se, it's actual html markup (mostly tables). Any ideas? ",Christopher Johnson,https://stackoverflow.com/users/759549,"So in conclusion this would be the only way to cache the menu individually (or any individual html elements) but bear in mind this would generate an extra http request the first time a user arrives at your site which may not be worth the 50k you're saving versus using serer side includes or php include() $(function(){ $(""#menuholder"").html(""all the menu markup goes in here""); }) <!-- inside menu.js <script src=""menu.js""></script> <div id=""menuholder""></div> ",Tules,https://stackoverflow.com/users/555116,http://stackoverflow.com/questions/7761372/put-an-html-scripted-menu-in-a-separate-file,STACKOVERFLOW,stackoverflow.com 9020,Open problems/questions in representation theory and around?,"What are open problems in representation theory? What are the sources (books/papers/sites) discussing this? Any kinds of problems/questions are welcome - big/small, vague/concrete. Some estimation of difficulty and importance, as well as, small description, prerequisites and relevant references, ... are welcome. To the best of my knowledge, there are NO good lists of representation theory problems on the web. E.g. the sites below contain lots of unsolved problem in other areas, but not in representation theory: http://en.wikipedia.org/wiki/Unsolved_problems_in_mathematics http://garden.irmacs.sfu.ca/ http://maven.smith.edu/~orourke/TOPP/ MO questions also discuss other fields, but not representation theory: What are the big problems in probability theory? What are some open problems in algebraic geometry? What are some open problems in toric varieties? More open problems Open problems with monetary rewards Open problems in Euclidean geometry? Open Questions in Riemannian Geometry What are some of the big open problems in 3-manifold theory? Open problems in continued fractions theory ",Alexander Chervov,https://mathoverflow.net/users/10446,"There are many open problems on modular representation theory of finite groups. There is a well-known list of problems of R. Brauer which date to around 1960, about ordinary and modular representations of finite groups. There are other major conjectures ( Broue's Abelian defect group conjecture has already been mentioned in comments). There are Alperin's Weight conjecture, Dade's Projective Conjecture, the Isaacs-Navarro conjecture, and several related conjectures. This is only the tip of the iceberg (and only in one corner of representation theory). ",Geoff Robinson,https://mathoverflow.net/users/14450,http://mathoverflow.net/questions/96202,SCIENCE,mathoverflow.net 5727,Quartz cron expression of 0/0,"As a part of a input validation I was thinking whether this is a really valid cron expression and how it would executed: 0 0/0 * * * ? Quartz validation returns true org.quartz.CronExpression.isValidExpression(""0 0/0 * * * ?"") So, does this run all the time, never, every hour or every minute...? ",Petteri Hietavirta,https://stackoverflow.com/users/28841,"You can find the result by using TriggerUtils.computeFireTimesBetween() : try { CronTriggerImpl cron = new CronTriggerImpl(); cron.setStartTime(new Date()); cron.setCronExpression(""0 0/0 * * * ?""); BaseCalendar calendar = new BaseCalendar(); List<Date> result = TriggerUtils.computeFireTimesBetween(cron, calendar, new Date(),DateBuilder.futureDate(1, IntervalUnit.DAY)); for (Date date : result) { System.out.println(date); } } catch (ParseException e) { e.printStackTrace(); } and the output is : Thu Apr 05 18:00:00 CST 2012 Thu Apr 05 19:00:00 CST 2012 Thu Apr 05 20:00:00 CST 2012 Thu Apr 05 21:00:00 CST 2012 Thu Apr 05 22:00:00 CST 2012 Thu Apr 05 23:00:00 CST 2012 Fri Apr 06 00:00:00 CST 2012 Fri Apr 06 01:00:00 CST 2012 Fri Apr 06 02:00:00 CST 2012 Fri Apr 06 03:00:00 CST 2012 Fri Apr 06 04:00:00 CST 2012 ....................... So , 0 0/0 * * * ? will run at every hour at 0 mins and 0 sec. ",Ken Chan,https://stackoverflow.com/users/339637,http://stackoverflow.com/questions/10024576/quartz-cron-expression-of-0-0,STACKOVERFLOW,stackoverflow.com 2228,Prove that any real function defined on a real open interval has at most countably many simple discontinuities.,"This is problem 17 in baby Rudin's chapter on continuity. He has a hint to use triplets of rationals that bound each simple discontinuity on the left, right, and in between the values of the limits from the left and right. It seems like this can be weakened to just rationals to the left and right. Simple discontinuities are those in which the limit from the left and right exist, so there must be intervals to the left and right of a simple continuity on which no other simple discontinuity can exist. More precisely, let $c$ and $c'$ be simple discontinuities for $f$ on $(a,b)$ and consider the limit, $l$, of $f$ approaching $c$ from the left: $\forall \epsilon >0, \exists \delta>0 : c-x<\delta \Rightarrow |l-f(x)|<\epsilon$ but $ \exists \epsilon '>0 \forall \delta ' >0 : |c'-x|<\delta ' \Rightarrow |f(c')-f(x)|>\epsilon ' \\ \therefore \epsilon = \epsilon ' , \delta ' = \delta \rightarrow \leftarrow $ Therefore, you can make an injection from the set of simple discontinuities to a subset of rationals by associating each simple discontinuity with one rational in the aforementioned ""free"" interval to its left; from there compose with the map from rationals to integers to show countable. Is this argument correct? ",user2303321,https://math.stackexchange.com/users/84960,"Let $E_n = \left\{ x \in \left( a , b \right) \mid \lvert \lim_{t \to x^+} f(t) - \lim_{t \to x^-} f(t) \rvert > \frac{1}{n} \right\}$, the set of simple discontinuities whose jumps are greater than $\frac{1}{n}$. Then $E_1 \subset E_2 \subset\cdots$ and $\cup^\infty_{i=1} E_i$ is the set of all simple discontinuities. If all of the $E_n$ are countable, then $\cup^\infty_{i=1}E_i$ is countable. Suppose $ x \in E_n $. The left-hand limit exists, so $$ \exists \delta^-_x > 0 \colon t \in \left( x - \delta^-_x, x \right) \implies \lvert f(t) - \lim_{t \to x^-} f(t) \rvert < \frac{1}{4n} $$ Suppose $y \in \left( x - \delta^-_x, x \right)$ is a simple discontinuity. Then $$ \exists \delta^-_y > 0 \colon t \in ( y - \delta^-_y, y ) \implies \lvert f(t) - \lim_{t \to y^-} f(t) \rvert < \frac{1}{4n} \\ \exists \delta^+_y > 0 \colon t \in ( y, y + \delta^+_y ) \implies \lvert f(t) - \lim_{t \to y^+} f(t) \rvert < \frac{1}{4n} $$ Then $\exists z^- \in (y - \delta^-_y, y) \cap (x - \delta^-_x, x), z^+ \in (y, y + \delta^+_y) \cap (x - \delta^-_x, x) \colon$ $$ \lvert \lim_{t \to y^+} f(t) - \lim_{t \to y^-} f(t) \rvert \leq \\ \lvert \lim_{t \to y^+} f(t) - \lim_{t \to x^-} f(t) \rvert + \lvert \lim_{t \to y^-} f(t) - \lim_{t \to x^-} f(t) \rvert \leq \\ \lvert \lim_{t \to y^+} f(t) - f(z^+) \rvert + \lvert \lim_{t \to x^-} f(t) - f(z^+) \rvert + \lvert \lim_{t \to y^-} f(t) - f(z^-) \rvert + \lvert \lim_{t \to x^-} f(t) - f(z^-) \rvert \leq \\ \frac{1}{n} $$ So that $$ \forall x \in E_n \exists \delta > 0 \colon y \in (x - \delta, x ) \implies y \not \in E_n $$ This says that for a jump at $x$, there exists a left-hand neighborhood around x such that the jumps in the neighborhood are smaller than the jump at $x$ (we could prove the same thing for a right-hand neighborhood, but that turns out to be unnecessary). For each $x$, choose a rational number $q \in \mathbb{Q}$ from $(x - \delta, x )$, e.g., $$ \frac{ \lceil (x - \delta) ( \lceil \frac{1}{\delta} \rceil + 1 ) \rceil + 1}{\lceil \frac{1}{\delta} \rceil + 1} $$ Since the $(x - \delta, x)$ are disjoint, $g \colon x \mapsto q$ is an injection $g \colon E_n \rightarrowtail \mathbb{Q}$ (each $x$ maps to a different $q$). Since $\mathbb{Q}$ is countable, so is $E_n$. ",Neal Lawton,https://math.stackexchange.com/users/92676,http://math.stackexchange.com/questions/613654/prove-that-fa-b-to-mathbb-r-has-at-most-countably-many-simple-discontinu,SCIENCE,math.stackexchange.com 5625,Modifying a calculated column gives different errors,"I have site column with the following formula: [AmountLeftToPay]/([AmountAssigned]-[AmountReleased]) The problem is the division by zero, sometimes it shows on list items #DIV/0! So I wanted to do the following: =IF([AmountAssigned]-[AmountReleased]=0; 0; [AmountLeftToPay]/([AmountAssigned]-[AmountReleased])) And it shows me the same error in all lists where its used. is not supported. /apps/xx/xx/Lists/Budgets : The formula contains a syntax error or is not supported. If I change ; with commas, The formula contains a syntax error or is not supported. so I got no clue ",Luis Valencia,https://sharepoint.stackexchange.com/users/5032,"SharePoint uses Excel formulas (and same engine to parse them) for calculated fields. And as you probably know, Excel uses localized formulas. Thus, when trying to define formulas through GUI and having non-english site, you should use the localized version of function names and "";"" instead of commas. This definitely brings some confusion, because this fact is not even mentioned in documentation I know. But from code or from powershell it is sometimes possible to put english formulas there (your thread should be set to use English locale or something like this). Also, internally SharePoint stores those formulas in English format. So to resolve your issue, just open Excel, create a sketch of your formula there using formula wizard, and then ""migrate"" it to SharePoint, passing correct field names instead of Excel cell addresses (please keep in mind that not all of the Excel functions will work in SharePoint, only limited subset of them is available). Hopefully this explanation makes things a bit more clear for you. ",Andrey Markeev,https://sharepoint.stackexchange.com/users/1430,http://sharepoint.stackexchange.com/questions/59195/modifying-a-calculated-column-gives-different-errors,TECHNOLOGY,sharepoint.stackexchange.com 7974,Can I run 64-bit VM guests on a 32-bit host?,"Can I run 64-bit VM guests on a 32-bit host? If I have a physical PC with 32 bit can I launch a VM that is 64 bit? What virtual machine software (Virtual PC or VirtualBox or other) would allow this? I read out there that VMware may support this but I am looking for something Open source or free. Host would preferably be a Windows host but could be Linux. Guest needs to be Windows. Thanks ",Maestro1024,https://serverfault.com/users/12050,"This is trickier than I thought before I was in the market for a box that can handle 64-bit guests. Myth #1: All 64-bit hosts can run 64-bit guests. False. 64-bit guest requires specific hardware support: VT-x or AMD-V. Myth #2: All 64-bit processors support 64-bit guests. False. See myth #1. Myth #3: All current Intel 64-bit processors have VT-x. False. Many brand new 64-bit processors (T6400, T6500 etc.) do NOT support VT-x, in the name of market segmentation. Myth #4: All machines with VT-x capable processor can support 64-bit guest. False. VT-x support is disabled by default on Intel processors and needs to be enabled by BIOS. Many BIOS, e.g., those in most Acer laptops, do NOT have the option to turn on VT-x. Basically host OS is irrelevant w.r.t 64-bit guest. If you're looking for a cheap machine to run 64-bit guests, stick to current AMD Athlon 64 (with AM2 or AM3 sockets) or Opteron (2+ generations) processors, as AMD-V support is on by default. ",obecalp,https://serverfault.com/users/3713,http://serverfault.com/questions/64127,TECHNOLOGY,serverfault.com 2138,How to disable bash drivers in windows 8.1?,"I'm trying to follow these instructions to stop Bash Driver BHDrvx86 or BHDdrvx64, but device manager in Windows 8.1 no longer displays non plug and play drivers (such as the Bash drivers), even as a hidden option. I'm unsure how else to disable them. ",Erlja Jkdf.,https://superuser.com/users/446259,"Device Manager generally should be run elevated, it doesn't show many things otherwise. However, the same can be done from an elevated command line: sc config BHDrvx86 start= disabled sc config BHDdrvx64 start= disabled (A space only after the = sign, exactly as shown in the example.) ",grawity,https://superuser.com/users/1686,http://superuser.com/questions/913799,TECHNOLOGY,superuser.com 9348,"Sharing JavaScript model code between server and client, is this approach valid?","I'm beginning learning Node.js and Backbone. I'd like to share some code between the server and the client (related to [1] and [2]). More in deep: Share defaults values for a model. Defaults are used to populate forms (client-side), while they are enforced server-side Share validation rules in order to be DRY and perform client/server validation Share instance methods So my idea is to use a factory object to encapsulate common code (defaults, validation rules, public instance methods) and adapt the factory object based on the environment (Node.js or AMD module). This code is quick&dirty and may not work. Is this a good approach or just a waste of time? (function (factory) { if (typeof exports === 'object') { // Node.js var config = require('../config/config.json'), Sequelize = require('sequelize'), _ = require('underscore'); var User = { receiveSms: { type: Sequelize.BOOLEAN, allowNull: false }, receiveNewsletter: { type: Sequelize.BOOLEAN, allowNull: false } }; // Add defaultValue for each returned by _.each(factory.defaults, function (value, key) { if(_.has(User, key)) { User[key].defaultValue = value; } }); module.exports = function () { (new Sequelize(config.database, config.username, config.password)) .define('User', User); }; } else if (typeof define === 'function' && define.amd) { // AMD define(['backbone', 'uderscore'], function (Backbone, _) { return Backbone.Model.extend(factory); }); } }(function () { return { // To be adapted defaults: { receiveSms: false, receiveNewsletter: true } } })); ",gremo,https://stackoverflow.com/users/220180,"I think it's a better solution to use require.js (especially for using frameworks like underscore in multiple files). You should use a factory only for objects that change during the runtime. A shopping cart for example (but even in this example i think it's more appropriate to use a backbone collection that is given to your function as an argument when instantiated). See more information here: http://requirejs.org/docs/node.html ",tmuecksch,https://stackoverflow.com/users/1646019,http://stackoverflow.com/questions/14789183/sharing-javascript-model-code-between-server-and-client-is-this-approach-valid,STACKOVERFLOW,stackoverflow.com 4948,Fedora manual installation and dependencies,"Following answers on this website (like: How to use TeX Live on Fedora 17? and Manually installed TexLive on Fedora 16 ) I installed texlive manually on fedora and it works flawlessly. The problem I have is that tex is a requisite for other packages (such as R). Whenever I try to install (through yum) R i am required to install another tex from fedora. I don't want to do so because the package is old, it doesn't have tlmgr and I don't want to have two installed tex. Is there a way to make the OS notice I already have tex installed and the dependency is satisfied? Thanks! ",CarrKnight,https://tex.stackexchange.com/users/23288,"While option 2 from the question in How to use TeX Live on Fedora 17? will solve this problem, you're probably trying to get around deficiencies in jnovy's TexLive repository. You want yum to think you have the proper packages installed, but it seems to go against yum's policy to provide a way to fake dependencies. You could try using a fake TexLive RPM spec file or fakeprovide. Sample fake RPM spec file from the link: Name: texlive2010-fake Version: 1.0 Release: 1%{?dist} Summary: This is a fake TeXLive package Group: Applications/Publishing License: GPLv2 and BSD and Public Domain and LGPLv2+ and GPLv2+ and LPPL BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Provides: config(texlive) Provides: kpathsea libkpathsea.so.4() Provides: tetex tetex-dvips tetex-fonts tetex-latex tex Provides: tex(dvips) tex(latex) tex(tex) tex-preview texinfo-tex Provides: texlive texlive-afm texlive-context texlive-doc texlive-doc-errata Provides: texlive-dvips texlive-dviutils texlive-east-asian texlive-fonts Provides: texlive-texmf texlive-latex texlive-utils texlive-xetex Provides: texlive-texmf-afm texlive-texmf-context texlive-texmf-doc texlive-texmf-dvips Provides: texlive-texmf-errata texlive-texmf-errata-afm texlive-texmf-errata-context Provides: texlive-texmf-errata-doc texlive-texmf-errata-dvips texlive-texmf-errata-east-asian Provides: texlive-texmf-errata-fonts texlive-texmf-errata-latex texlive-texmf-errata-xetex Provides: texlive-texmf-fonts texlive-texmf-latex texlive-texmf-xetex %description This was necessary to have a tlmgr-based installation of texlive and all the rpm packages that requires texlive (e.g., a2ps and R-core) still installable. %prep %build %install rm -rf $RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc %changelog To install: rpmdev-setuptree (as a normal user) to create the necessary ~/rpmbuild tree rpmbuild -bb --clean texlive2010-fake.spec to create the RPM yum install --nogpgcheck texlive2010-fake-1.0-1.fc17.x86_64.rpm to install the RPM ",sappjw,https://tex.stackexchange.com/users/9428,http://tex.stackexchange.com/questions/86934/fedora-manual-installation-and-dependencies,TECHNOLOGY,tex.stackexchange.com 6253,"The $ABCD$ paralelograms sides are $AB,BC,CD,DA$. On these line segments there are points in the same order: $X,Y,Z,V$.","The $ABCD$ paralelograms sides are $AB,BC,CD,DA$. On these line segments there are points in the same order: $X,Y,Z,V$. We know, that: $$\frac{AX}{XB}=\frac{BY}{YC}=\frac{CZ}{ZD}=\frac{DV}{VA}=k$$ $k$ is a positive constant what is less then $\frac{1}{2}$. What is the value of $k$, if the area of $XYZV$ is 86% of the area of $ABCD$? Can you tell me a step by step answer to this question? ",encuka,https://math.stackexchange.com/users/212147,"Due triangle similarity (by drawing parallel lines) at a given fraction of sides it is square root of the ratio. If at mid point of each side quarter area is filled for central position example $ \sqrt{(1/4)} = 1/2$. In this case the fraction is: $ \sqrt{.86} =~ .927362.$ or =~ $ (1- 0.927362) $ if you mean the other half side for the ratio. ",Narasimham,https://math.stackexchange.com/users/95860,http://math.stackexchange.com/questions/1183946/the-abcd-paralelograms-sides-are-ab-bc-cd-da-on-these-line-segments-there-a,SCIENCE,math.stackexchange.com 7161,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 will be needing is my own laptop and a connection to the internet. The money I earn would actually help me pay for the expenses I get during the holiday. ",Ruch,https://travel.stackexchange.com/users/3972,"The intent of the law is to preserve U.S. work for U.S. workers. Everything else is fuzzy. From the USCIS web site: ""Employment — Any service or labor performed by an employee for an employer within the United States, but not including casual domestic employment or duties performed by nonimmigrant crewmen (D-1 or D-2)."" You can't be employed on a ""B"" visa. As an attorney I could argue that ""within the United States"" applies to the employer, but if I was prosecution and someone cared enough to push it, the phrase could apply to the physical location of the employee and be grounds for removal from the United States. So look at the intent. Can anything I might do take work away from legal U.S. workers? As for user16885, I suspect that you said something in the interview that indicated you would be doing ""employment"". If you have a transcript (which you don't, because there is no appeal from a State Department decision on things like this) I could probably pick it out. ",David,https://travel.stackexchange.com/users/32327,http://travel.stackexchange.com/questions/12771/i-want-to-travel-to-the-usa-while-working-remotely-for-my-non-us-employer,CULTURE,travel.stackexchange.com 3254,Variable scope in while-read-loop on Solaris,"Could someone please explain to me why my while loop seems to have an internal scope? I've seen multiple explanations online but they all have to do with pipes. My code has none. The code: #!/bin/sh while read line do echo ""File contents: $line"" echo if [ 1=1 ]; then test1=bob fi echo ""While scope:"" echo "" test1: $test1"" done < test.txt if [ 1=1 ]; then test2=test2; fi echo; echo ""Script scope: "" echo "" test1: $test1"" echo "" test2: $test2"" The output: File contents: In the file While scope: test1: bob Script scope: test1: test2: test2 ",Joel Cochran,https://unix.stackexchange.com/users/72845,"In the Bourne shell, redirecting a compound command (like your while loop) runs that compound command in a subshell. In Solaris 10 and earlier1, you don't want to use /bin/sh as it's the Bourne shell. Use /usr/xpg4/bin/sh or /usr/bin/ksh instead to get a POSIX sh. If for some reason you have to use /bin/sh, then to work around that, instead of doing: compound-command < file You can do: exec 3<&0 < file compound-command exec <&3 3<&- That is: duplicate the fd 0 onto fd 3 to save it away and then redirect fd 0 to the file. run the command restore fd 0 from the saved copy on fd 3. And close fd 3 which is no longer needed. 1. In Solaris 11 and later, Oracle eventually (at long last) made /bin/sh a POSIX shell, so it now behaves like the sh of most other Unices (it interprets the sh language specified by POSIX though it supports extensions over it as it's based on ksh88 (like other Unices, where sh is now generally based on ksh88, pdksh, bash, yash or an enhanced ash)) ",Stéphane Chazelas,https://unix.stackexchange.com/users/22565,http://unix.stackexchange.com/questions/137680/variable-scope-in-while-read-loop-on-solaris,TECHNOLOGY,unix.stackexchange.com 2760,How remove works for ArrayList while iterating using for-each loop?,"I have a very basic question. I have created simple ArrayList and I am removing the item while iterating using for-each loop. It gives me java.util.ConcurrentModificationException because I can't remove an item while iterating but when I un-comment the if condition it works fine. Please can anybody explain me how for-each works in this way. ArrayList<String> list1 = new ArrayList<String>(); list1.add(""Hello""); list1.add(""World""); list1.add(""Good Evening""); for (String s : list1) { //if (s.equals(""World"")) { list1.remove(1); //} } If I change it to list1.remove(2); or list1.remove(0); then also its working fine. Note: This is sample code and I know it will work fine using Iterator. My sole purpose of this question is to know how method remove() works perfectly if condition is un-commented no matter what index you are removing from the list. ",Braj,https://stackoverflow.com/users/3218114,"You can also use an index-based removal. The drawback of this solution is that the list1.size() gets evaluated during every loop iteration. The positive thing is that removing an item from a List by its index is faster. for (int i = 0; i < list1.size(); /* i incremented in loop body */) { if (""World"".equals(list1.get(i))) { list1.remove(i); } else { i++; } } ",Josef Vyskovsky,https://stackoverflow.com/users/1061628,http://stackoverflow.com/questions/23170999/how-remove-works-for-arraylist-while-iterating-using-for-each-loop,STACKOVERFLOW,stackoverflow.com 3469,LED as 230V AC indicator,"Answers to other questions here (e.g. 1) show capacitors used to drop AC voltages to levels suitable for a LED. I've seen much simpler circuits such as the one below simulate this circuit – Schematic created using CircuitLab Assuming it's in a suitable enclosure, are there significant drawbacks or dangers to this circuit compared to others? ",RedGrittyBrick,https://electronics.stackexchange.com/users/2191,"The types of AC powered LED drivers I've seen use a capacitor to drop the voltage/limit the current and to that extent it uses less ""real"" power. The circuit you've drawn will (for normal 1.8V LEDs) pretty much dissipate 1W so it will get a little warm. I guess the inability to pack some punch is the main drawback. The current into the LED is about 8mA every positive cycle so you don't get much light out compared to the heat. I don't think there are any dangers (other than those you excluded) ",Andy aka,https://electronics.stackexchange.com/users/20218,http://electronics.stackexchange.com/questions/76985/led-as-230v-ac-indicator,TECHNOLOGY,electronics.stackexchange.com 5326,Is it safe to truncate a field revision table?,"I noticed D7 creates a field_revision table for every field, and duplicates the content from its field table counterpart even if one has revisions turned off. I have a big text table and it is taking up a lot of space (several GBs). Would it be safe to truncate the revision table? PS: Meanwhile, I have also reported this as a bug. ",giorgio79,https://drupal.stackexchange.com/users/1916,"You should have a look at this How I can delete all node/field revisions?, and perhaps subscribe to http://drupal.org/node/1063266#comment-5268252 ",Cyclonecode,https://drupal.stackexchange.com/users/4090,http://drupal.stackexchange.com/questions/17364/is-it-safe-to-truncate-a-field-revision-table,TECHNOLOGY,drupal.stackexchange.com 3143,Issue while deploying Spring MVC application | no matching editors or conversion strategy found,"I am facing a deployment issue while trying to deploy my application in oracle weblogic 12c server. While deploying, I get below error: java.lang.Exception: Exception received from deployment driver. See Error Log view for more detail. at oracle.eclipse.tools.weblogic.server.internal.DeploymentProgressListener.watch(DeploymentProgressListener.java:190) at oracle.eclipse.tools.weblogic.server.internal.WlsJ2EEDeploymentHelper.deploy(WlsJ2EEDeploymentHelper.java:510) at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishWeblogicModules(WeblogicServerBehaviour.java:1501) at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishToServer(WeblogicServerBehaviour.java:920) at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publishOnce(WeblogicServerBehaviour.java:708) at oracle.eclipse.tools.weblogic.server.internal.WeblogicServerBehaviour.publish(WeblogicServerBehaviour.java:555) at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774) at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3108) at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) Caused by: weblogic.application.ModuleException: java.lang.IllegalStateException: Cannot convert value of type [$Proxy214 implementing org.springframework.web.accept.ContentNegotiationStrategy,org.springframework.web.accept.MediaTypeFileExtensionResolver,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [org.springframework.web.accept.ContentNegotiationManager] for property 'contentNegotiationManager': no matching editors or conversion strategy found at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140) at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:70) at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:24) at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:729) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42) at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258) at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:48) at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165) at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:586) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:148) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:114) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:339) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:846) at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1275) at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:442) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:176) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:550) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295) at weblogic.work.ExecuteThread.run(ExecuteThread.java:254) Caused by: java.lang.IllegalStateException: Cannot convert value of type [$Proxy214 implementing org.springframework.web.accept.ContentNegotiationStrategy,org.springframework.web.accept.MediaTypeFileExtensionResolver,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [org.springframework.web.accept.ContentNegotiationManager] for property 'contentNegotiationManager': no matching editors or conversion strategy found at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:264) at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:450) at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:496) at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:490) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1437) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1396) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1132) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:607) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:647) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:598) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:661) at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:517) at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:458) at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138) at javax.servlet.GenericServlet.init(GenericServlet.java:240) at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:337) at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:288) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) The main part of the exception stack trace is: weblogic.application.ModuleException: java.lang.IllegalStateException: Cannot convert value of type [$Proxy214 implementing org.springframework.web.accept.ContentNegotiationStrategy,org.springframework.web.accept.MediaTypeFileExtensionResolver,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [org.springframework.web.accept.ContentNegotiationManager] for property 'contentNegotiationManager': no matching editors or conversion strategy found I have not defined any 'contentNegotiationManager' in my mvc config xml. Please help! ",Ankit,https://stackoverflow.com/users/810176,"This was because I did put my AOP configuration in MVC configuration file and AOP was trying to create proxies for Spring MVC classes. Placing AOP config in a separate file solved the problem. ",Ankit,https://stackoverflow.com/users/810176,http://stackoverflow.com/questions/25175430/issue-while-deploying-spring-mvc-application-no-matching-editors-or-conversion,STACKOVERFLOW,stackoverflow.com 4118,"Should I get my guitar re-set up when changing string brands, but not gauges?","So I've recently purchased an electric guitar, and I've been playing contentedly with it. However, I decided the factory strings were due for a change, so I had the guitar set up with strings of a certain gauge. Now, however, I've come to regret my choice of string. They just don't sound as good as the original strings from the factory. Therefore, my question is: can I just change the strings to the same gauge, or should I get the whole guitar re-set up, given that the brand might be slightly different or whatnot? ",Alex ,https://music.stackexchange.com/users/7180,"Changing string brand while keeping the same gauge does not theoretically require a setup. Practically, you may still have to do some minor adjustments to the intonation. Now the point is that even if you keep the same gauge and brand you'll have to adjust your setup frequently if you want to keep your guitar playable and well intonated, so you'd better learn how to do it by yourself. Also, no guitar tech is going to have exactly your hands and touch. ",bruno desthuilliers,https://music.stackexchange.com/users/6030,http://music.stackexchange.com/questions/12137/should-i-get-my-guitar-re-set-up-when-changing-string-brands-but-not-gauges,LIFE_ARTS,music.stackexchange.com 4328,Laravel 4 translation by country,"I need help I'm working on a project that needs to translate the language of the site automactically depending on the country the user is from. I've never done this before so please any help would be wonderful. ",Eric Evans,https://stackoverflow.com/users/1115116,"Right, as was pointed out before, there is this repository. In which you can find common translations for many languages. It is well maintained, take a look! ",facundofarias,https://stackoverflow.com/users/3009370,http://stackoverflow.com/questions/17072218/laravel-4-translation-by-country,STACKOVERFLOW,stackoverflow.com 1623,How do I stop Windows from moving desktop Icons?,"I have two monitors connected to my computer. (same graphics card. One HDMI, the other DVI). Whenever I do one of the following things, my icons move around on my desktop: Play a Game Turn off one monitor When I stop playing the game or turn one of the monitors back on, Windows 7 does not properly restore the icon locations. Is there is a way I can prevent Windows from moving my desktop icons around? ",ray023,https://superuser.com/users/37183,"I found something that works for me and hopefully it will work for others too. Without your monitors plugged in, right-click on your desktop, hover over ""View"" and turn off the feature ""Align icons to grid"" Plug in your monitor and proceed only if your icons remain in their original positions Turn ""Align icons to grid"" back on the same way you turned it off. Using the steps above, this should allow you to unplug/turn-off monitors and replug/turn-on monitors without your icons moving all over the place. I noticed with this, however, that it's save-file-like and you will need to redo the steps if you want to move icons around. I tested this by unplugging my monitor, moving an icon (without changing the grid feature) and plugging my monitor back in. I observed that the icon returned to its original position on my desktop as it was before I moved it and the rest of my icons stayed in the same spot. I then unplugged my monitor and found that icon to move to where I originally moved it to, so I turned the grid feature off, plugged in my monitor and then turned the grid feature back on and found the icon to stay in its new position. I don't know how well this will work for your games (worst off you just need to leave the grid feature off) but it will hopefully solve turning monitors on and off. ",user350602,https://superuser.com/users/350602,http://superuser.com/questions/290078,TECHNOLOGY,superuser.com 1797,Correctly debugging switching (DC-DC) boost converter with Oscilloscope,"I have an LED driver (LM3410) that adjusts it's voltage based upon how many LEDs you place in series to it and I'm curious to see what voltage it is actually outputting. To test it I connected my oscilloscope probe on the v+ output and ground and after getting a little smoke I'm a little worried about trying again. I'm pretty sure I put the thing into over-drive as it tried to ""power"" my oscilloscope. My over-voltage protection seems to have saved it since it still seems to work (miraculously). So my question is: what is the proper way to measure voltage output from a DC-DC boost converter that changes it's voltage based on load? ",Aureis,https://electronics.stackexchange.com/users/15684,"From the problem description, two possible hypotheses come to mind: There is a ground level mismatch: The DC-DC boost output has a ground that is different from your oscilloscope's ground The probing was done with no LED load, so the boost circuit is attempting to generate the highest voltage it can. How high this can be depends on the circuit design, of course. With some additional detail on the boost conversion design, additional hypotheses, or a definitive answer, might be possible. ",Anindo Ghosh,https://electronics.stackexchange.com/users/14004,http://electronics.stackexchange.com/questions/56493/correctly-debugging-switching-dc-dc-boost-converter-with-oscilloscope,SCIENCE,electronics.stackexchange.com 6524,Increasing voltage source frequency,"I am trying to simulate a simple circuit using a simulation program like SPICE. In the beginning of the circuit I have a pulse train voltage source, later it is connected to a normal LPF. The voltage source frequency is set as 1 kHz, my question is how to increase this frequency? The only options that I have is to change the time of the cycle and the voltage. If I set 1 ms and 5V, the frequency will be 1 kHz. If I change the time to 0.5 ms, the result will be 5V for 0.5 ms and the rest is 0. (The second cycle will not start after 0.5 ms, so the frequency is same 1 kHz). Strange! How do I increase the frequency of the voltage source? ",yaya,https://electronics.stackexchange.com/users/53052,"You can change the frequency by making changes in either time or frequency. As you mentioned that you have changed time to 0.5ms, please make sure whether you have changed time period of one complete cycle (on time + off time). If your time period of one complete cycle is 0.5ms, your frequency should be 2khz, because frequency is number of cycles per second. ",dasan,https://electronics.stackexchange.com/users/53041,http://electronics.stackexchange.com/questions/129410/increasing-voltage-source-frequency,SCIENCE,electronics.stackexchange.com 5644,How old is Captain America when he receives the 'Super-Soldier Serum'?,"Steve Rogers is said to have been born in the 1920's. WWII started roughly in 1939 with the invasion of Poland by Germany. Rogers attempts to enlist in the US Army in 1940, however due to his frail physical state he is denied entry. Having been observed by certain key Army officials attempting to enlist several more times after being denied, he is inducted in to Project Rebirth as its first candidate for Dr. Erskin's Super-Soldier Serum. After receiving said serum, and becoming the pinnacle of human potential he operates in the European theater of war for several years alongside Bucky Barnes and, on occasion members of the Invaders. On his final mission during the war he and Barnes are presumed dead when the experimental bomb they are attempting to stop from destroying Washington DC explodes dumping Cap in the Arctic waters to be frozen and preserved for many years before he is found and revived by the founding members of the Avengers. I'm trying to figure out how old he was when he received his serum treatments and became Captain America, and/or how old he was when he was frozen in the ice. ",Monty129,https://scifi.stackexchange.com/users/8226,"According to Captain America's biography on ComicVine; The comic version of Steve Rogers was born on July 4th, 1920. He was given the Super-Serum in March 1941 (aged 20). This is flatly contradicted by the film version which states that he was born on July 4th, 1918 and turned into a superhero aged 21. Both versions agree that was frozen in 1945 (aged 25 and 27 respectively). ",Valorum,https://scifi.stackexchange.com/users/20774,http://scifi.stackexchange.com/questions/53219/how-old-is-captain-america-when-he-receives-the-super-soldier-serum,LIFE_ARTS,scifi.stackexchange.com 6108,SQL Help in Access – Looking for the Absence of Data,"I am trying to find the fastest way to find all of the records in a parent table that do not have certain records in a child table. For example, I want the query to return all of the family records where there are no male children or no children at all. Example 1 This is painfully slow: SELECT * FROM Families WHERE Families.FamilyID NOT IN(SELECT FamilyID FROM Children WHERE Children.Gender=""m"") Example 2 This is faster: SELECT * FROM Families WHERE NOT EXISTS(SELECT * FROM Children WHERE Children.Gender=""m"" AND Children.FamilyID = Families.FamilyID) Example 3 This is the fastest, but I'm worried about investing in it because I can't find any documentation on it. I don't even know what it's called. For want of a better term, we have been calling it an ""anonymous query"". SELECT * FROM Families LEFT JOIN [SELECT * FROM Children WHERE Gender=""m""]. AS AliasChildren ON Families.FamilyID=AliasChildren.FamilyID WHERE AliasChildren.FamilyID IS NULL So my question is this: What is this thing called in example 3? Is it a ""mainstream"" feature of Access that will be supported in the future? Where can I find documentation on it (this might be easier once I know what it's called)? Thanks! ",Shane Miskin,https://stackoverflow.com/users/16415,"I think you could also try something like this: SELECT * FROM Families WHERE Families.FamilyID IN ( SELECT Children.FamilyID FROM Children WHERE Children.Gender<>'m' GROUP BY Children.FamilyID ) ",aintnoprophet,https://stackoverflow.com/users/90332,http://stackoverflow.com/questions/752048/sql-help-in-access-looking-for-the-absence-of-data,STACKOVERFLOW,stackoverflow.com 6902,Thunderbird 2.0: Inbox size is 4GB on disk: how do I reduce it?,"Mozilla Thunderbird 2.0: I have set Thunderbird never to delete a message that is on disk...Thus, after four short years, I have a 4GB Inbox file. Thunderbird needs about 10 minutes to read it, and even then I can't compact it. Anyone have some suggestions? ",Eric,https://superuser.com/users/15673,"When you say you can't compact the file, what are you actually doing? By this, I mean that ""compacting"" in Thunderbird is not like running your inbox through a compression algorithm like you would to create a .zip file. The ""compact"" option in Thunderbird is there because deleting a message does not remove the message from your disk, it is just hidden - therefore, you use ""compact"" to remove these ""deleted"" messages from the data file. You will need to clean out your mailbox by saving and deleting messages that are no longer needed and then running the ""compact"" option. ",Nick,https://superuser.com/users/51218,http://superuser.com/questions/198503,TECHNOLOGY,superuser.com 8472,Salesforce Mobile SDK Community Registration,"I am developing a mobile application for one of our client using Salesforce SDk. I haven't found any documentation regarding the community registration vai Salsforce SDK. Is this possible? Because when i complete the registration from ""Not a member"" link the page is still loading in the webview , not getting redirected to the application ( to mobile). Is there any way to accomplish registration via SDK? ",Ragesh,https://salesforce.stackexchange.com/users/5184,"This link provides all configuration items that you need to have in place to use Communities with the Salesforce Mobile SDK. Depending on the kind of user license, you also need to have appropriate permissions (such as API enabled for Portal users) - refer this link. SDK does not provide any explicit support for self-registration. ",Gaurav Kheterpal,https://salesforce.stackexchange.com/users/10881,http://salesforce.stackexchange.com/questions/60754/salesforce-mobile-sdk-community-registration,TECHNOLOGY,salesforce.stackexchange.com 7237,Replacing one character of a string in python,"In python, are strings mutable? The line someString[3] = ""a"" throws the error TypeError: 'str' object does not support item assignment I can see why (as I could have written someString[3] = ""test"" and that would obviously be illegal) but is there a method to do this in python? ",Chris,https://stackoverflow.com/users/104060,"In new enough pythons you can also use the builtin bytearray type, which is mutable. See the stdlib documentation. But ""new enough"" here means 2.6 or up, so that's not necessarily an option. In older pythons you have to create a fresh str as mentioned above, since those are immutable. That's usually the most readable approach, but sometimes using a different kind of mutable sequence (like a list of characters, or possibly an array.array) makes sense. array.array is a bit clunky though, and usually avoided. ",mzz,https://stackoverflow.com/users/262026,http://stackoverflow.com/questions/2165172/replacing-one-character-of-a-string-in-python,STACKOVERFLOW,stackoverflow.com 5165,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. ",Louis Rhys,https://programmers.stackexchange.com/users/8486,"It dances on the line between technical and non-technical, but if your school offers something along the lines of Human-Computer Interaction (HCI) or anything else related to user interface design, jump on it. That's some valuable stuff right there. ",BlairHippo,https://programmers.stackexchange.com/users/17,http://programmers.stackexchange.com/questions/31567/important-non-technical-course-for-programmers,TECHNOLOGY,programmers.stackexchange.com 5607,Is there a word for something loved by the masses but whose true value is lacking?,"Is there a general word for someone or something popular or loved by the masses but that has not been proven to be effectual (like how some would use the term ""pop psychology"" pejoratively)? Examples would be how things like popular psychology or holistic medicine are accepted excitedly by numerous people while not being proven to be useful to the majority. UPDATE: Thanks for you responses. I think the word ""fad"" (or ""hype"") would come closest to what I was looking for (thank you for that). But is there a more general or appropriate term? I'm not American so apologies in advance (this is strictly for the sake of discussion): the only example I can think of is certain voters who were initially excited about Obama, but came to be disappointed after he failed to meet their expectations. Is there a word that could be used to describe Obama in this context? Something well-loved which turns out to be a disappointment. ",Mia T,https://english.stackexchange.com/users/106861,"The word ""fad"" is not always pejorative, but if you use it to describe something that others take seriously, then it comes off as insulting. ",Oldbag,https://english.stackexchange.com/users/99368,http://english.stackexchange.com/questions/222672/is-there-a-word-for-something-loved-by-the-masses-but-whose-true-value-is-lackin,CULTURE,english.stackexchange.com 5414,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 will be needing is my own laptop and a connection to the internet. The money I earn would actually help me pay for the expenses I get during the holiday. ",Ruch,https://travel.stackexchange.com/users/3972,"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 employer and your travel to the US is not employment related, so apply for a tourist visa and you should be fine. To be more specific I found several sites explaining the differences between B1/B2 and H visas in more laymen's terms, so you can try to read up on that to make your determination: Workpermit Wikipedia And last but not least State Department ",Karlson,https://travel.stackexchange.com/users/1372,http://travel.stackexchange.com/questions/12771/i-want-to-travel-to-the-usa-while-working-remotely-for-my-non-us-employer,CULTURE,travel.stackexchange.com 8700,Prevent a user from viewing another user's profile based on a field value,"I'm a Drupal veteran, but this one has me stumped . . . I have two Profile2 profiles, one for a company and one for a job seeker. In the job seeker profile, there is an entity reference field where they add companies they don't want to view their profile. The way companies finds people is by searching via Search API. Another way, would be by browsing. I need to block both ways. Basically, the job seeker should be invisible to the companies that they've blocked. I have Panels, Panelizer, Rules, and Views all at my disposal and know how to use them, just not in this case. Or am I better going with my own custom module? I saw this answer Hide Profile2 fields depending on it's value when viewing user profile and that's only for specific fields, I want to block the whole profile. This question is along the same lines of mine, but I don't see a complete answer -How to filter a view based for the current user based the value of custom fields in his profile and fields in the list of items viewed ",lonehorseend,https://drupal.stackexchange.com/users/18884,"You can add an 'access callback' function to the menu hook for the pages you want to block and inside that function perform your own checks against the currently logged in user. This also means you must block the page for anonymous users or the company can just logout and view the profile anyway. For hiding in search results I see two options: Easy solution In search-result.tpl.php or hook_preprocess_search_results you check access and don't show it. Drawback is that the count of the total results wouldn't be correct anymore. More advanced Add an extra indexed field blockedcompanies which contains all ids of the blocked companies in Solr with hook_apachesolr_index_document_build. When searching: add a check on this field with hook_apachesolr_query_prepare. ",pcoucke,https://drupal.stackexchange.com/users/9882,http://drupal.stackexchange.com/questions/85459/prevent-a-user-from-viewing-another-users-profile-based-on-a-field-value,TECHNOLOGY,drupal.stackexchange.com 7435,Next & Previous (Pagination in this case) Not Appearing,"I am using a custom page template for my portfolio. The code is calling the correct number of posts per page but for some reason the pagination links won't show up :-S My query <?php $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 2)); ?> <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> <?php $custom = get_post_custom($post->ID); $screenshot_url = $custom[""screenshot_url""][0]; $website_url = $custom[""website_url""][0]; ?> The entire markup <?php /* Template Name: Portfolio */ ?> <?php get_header(); ?> <div id=""full_container""> <div id=""portfolio_content""> <div id=""portfolio_wrap""> <div id=""content""> <?php $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 2)); ?> <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> <?php $custom = get_post_custom($post->ID); $screenshot_url = $custom[""screenshot_url""][0]; $website_url = $custom[""website_url""][0]; ?> <a href=""<?php the_permalink() ?>""> <span class=""img""> <?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'thmb-portfolio' ); } ?> <span class=""under""> <!-- Excerpt title --> <span class=""title""><?php the_title(); ?></span> <!-- Excerpt description --> <span class=""desc""> <?php my_excerpt('short'); ?> </span> </span> </span> </a> <?php endwhile; ?> <!-- Next/Previous Posts --> <?php if (function_exists(""pagination"")) { pagination($additional_loop->max_num_pages); } ?> </div> </div> </div> </div> </div> <?php get_footer(); ?> ",AndrettiMilas,https://wordpress.stackexchange.com/users/5205,"<?php /* Template Name: Portfolio */ ?> <?php get_header(); ?> <div id=""full_container""> <div id=""portfolio_content""> <div id=""portfolio_wrap""> <div id=""content""> <?php $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 2)); ?> <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> <?php $custom = get_post_custom($post->ID); $screenshot_url = $custom[""screenshot_url""][0]; $website_url = $custom[""website_url""][0]; ?> <a href=""<?php the_permalink() ?>""> <span class=""img""> <?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'thmb-portfolio' ); } ?> <span class=""under""> <!-- Excerpt title --> <span class=""title""><?php the_title(); ?></span> <!-- Excerpt description --> <span class=""desc""> <?php my_excerpt('short'); ?> </span> </span> </span> </a> <?php previous_posts_link('Previous'); ?> / <?php next_posts_link('Next') ?> <?php endwhile; ?> <?php if (function_exists(""pagination"")) { pagination($additional_loop->max_num_pages); } ?> </div> </div> </div> </div> </div> <?php get_footer(); ?> ",Mohit Bumb,https://wordpress.stackexchange.com/users/8184,http://wordpress.stackexchange.com/questions/30616/next-previous-pagination-in-this-case-not-appearing,TECHNOLOGY,wordpress.stackexchange.com 1279,let you know a couple of facts OR bring couple of facts to your notice,"Which of the following is more appropriate / polite? I would like to bring a couple of facts (or things?) to your notice. OR I would like to let you know a couple of facts. Please advise. ",sandeep,https://english.stackexchange.com/users/16608,"While speaking it may well depend upon your tone. In writing, let you know a couple of facts, sounds more authoritative/accusative compared to bring to your notice. Alternatively, bring to your attention, may be appropriate when dealing with seniors in the hierarchy. One of the single word for the above phrase can be accentuate. ",check123,https://english.stackexchange.com/users/6653,http://english.stackexchange.com/questions/60235/let-you-know-a-couple-of-facts-or-bring-couple-of-facts-to-your-notice,CULTURE,english.stackexchange.com 6139,Conscript won't install - what to do?,"I'd like to started with Scalatra. For that, I need to use giter8 to generate a template project. To install giter8, I need to install conscript first. But doing that (at least using the runnable jar on Windows) fails with this error: :::::::::::::::::::::::::::::::::::::::::::::: :: UNRESOLVED DEPENDENCIES :: :::::::::::::::::::::::::::::::::::::::::::::: :: net.databinder.conscript#conscript_2.11;0.4.4: not found :::::::::::::::::::::::::::::::::::::::::::::: This is with the latest conscript version. Doesn't it support scala 2.11 yet? Is conscript even still actively maintained? The mailing list is dead and there's not even a stackoverflow tag. Although I'd prefer to fix the conscript installation issue, is there an easy workaround? Like installing giter8 without using conscript? Or setting up scalatra without using giter8? ",herman,https://stackoverflow.com/users/775138,"It turned out I had an older conscript version installed that I didn't remove first. Starting from scratch (deleting conscript and g8 installations) allowed me to install version 0.4.4 without this issue. ",herman,https://stackoverflow.com/users/775138,http://stackoverflow.com/questions/24151505/conscript-wont-install-what-to-do,STACKOVERFLOW,stackoverflow.com 9606,Add product and coupon to cart together,"What I would like to do is add a product and a coupon to the cart at the same time from a product page. The reasoning behind this is we are creating a landing page for a specific coupon and want to add both the product and coupon to the cart with only a single click for the user. ",David Manners,https://magento.stackexchange.com/users/158,"Another approach is to look at the SalguaMagentoAddProduct extension https://github.com/salgua/SalguaMagentoAddProduct it provides the ability to do what you are looking for. ",Tegan Snyder,https://magento.stackexchange.com/users/3899,http://magento.stackexchange.com/questions/43588/add-product-and-coupon-to-cart-together,TECHNOLOGY,magento.stackexchange.com 4945,Display a field of a node that is referenced on another node via a relationship,"I have two content types, ""Stores"" and ""Offers."" In the ""Offers"" content type, there is a CCK node reference field type that references the ""Stores"" nodes. So essentially, I create a store and if the store has an offer, I create the ""Offer"" node and select the store with which it is associated. I have a view (a default glossary view) that displays a list of stores. I would like to display the node titles of any offers that are associated with it but I can't figure out how to do it. I have tried to add a relationship on the node reference field then add a field that uses the relationship but the result just appears blank. ",Jamie Hollern,https://drupal.stackexchange.com/users/1319,"I finally went with something similar to Stefan's answer. I created a module using hook_views_pre_render that checks the correct table against the node id to see if there are any related nodes. The code is shown below. <?php /** * Implementation of hook_views_pre_render() */ function gretna_views_pre_render(&$view) { // Select the right view if ($view->name == 'stores_list') { // Check how many results there are $count = count($view->result); // For each result (reason we don't use foreach is every result is duplicated twice) for($i = 0; $i < $count; $i++) { // Get the nid for this row $nid = $view->result[$i]->nid; // Check to see if the node has any related offers $result = db_query(""SELECT nid FROM {content_type_store_offers} WHERE field_offer_store_nid = %d"", $nid); $result = db_fetch_array($result); // If not false, the row has offers if ($result !== FALSE) { $view->result[$i]->users_uid = ""Yes""; } // Else it doesn't else { $view->result[$i]->users_uid = ""No""; } } } } ",Jamie Hollern,https://drupal.stackexchange.com/users/1319,http://drupal.stackexchange.com/questions/4148/display-a-field-of-a-node-that-is-referenced-on-another-node-via-a-relationship,TECHNOLOGY,drupal.stackexchange.com 789,What makes LSBit steganography detectable? And what would help in concealing it?,"In a project of mine I took a 24-bit bitmap image and I performed LSBit steganography over it (saved a black and white image inside each of the planes R, G, B) using pixel shuffling and xor encryption. Is my stenography easy to detect? And what would it take to conceal it? ",Ahmed Ihsan Tawfeek,https://crypto.stackexchange.com/users/12003,"A general theoretical answer to the title's What makes LSBit steganography detectable? is that in normal images, the LSBit of a pixel in some channel is correlated to higher-order bits in the same pixel and channel, that pixel in other channels, and adjacent pixels, in ways that mere replacement of LSBit tends to strongly alter. One simple way to improve that is adding noise or blurr to a degree such that the LSBit is nearly indistinguishable from random, in which case it can then be replaced by something equally indistinguishable from random (as resulting from good encryption) with little chance of detection versus an equally noisy/blurry image. Next step is changing only few bits at locations dependent on a key (towards that goal it is necessary to have a small payload, as previously pointed), and have the other pixels randomly noisy according to a good model of the natural image. From a practical standpoint, sending uncompressed 24-bit bitmap images somewhat is a red flag that basic stego is in use. That would be somewhat less apparent with an additional step of JPEG lossless compression, or PNG or GIF conversion (lossy compression would destroy the hidden message given the LSBit encoding used; more sophisticated stenographic schemes survive that). Notice that sending noisy/blurry images without lossy compression is a waste of bandwidth, and could also raise alarm. I suggest two ""easy to detect"" tests, to be applied comparatively on your image with stego (after decompression if a lossless compression step is added), and normal images that could be allegedly sent, at least including the one you start from. Show as an 8-color image the 3 LSBits of each pixel; that can be done by changing each byte x in each RGB plane to ~((x&1)-1). It there something perceptibly remarkable for your image with stego? Update: a 64 or 512-color image using (x<<6)+32 or (x<<5)+16 might also be interesting. (note: the three expressions are for C, and assume truncation to octet. ~((x&1)-1) yields 0x00 if the low bit of x is clear, 0xFF otherwise). Is the compression ratio of PNG markedly lower for your image with stego than for normal images? Note that these tests can only demonstrate failure to be undetectable. ",fgrieu,https://crypto.stackexchange.com/users/555,http://crypto.stackexchange.com/questions/14573/what-makes-lsbit-steganography-detectable-and-what-would-help-in-concealing-it,TECHNOLOGY,crypto.stackexchange.com 3125,Custom Logout in Sharepoint 2010,"I have sp application where there are 15 subsite.I need to redirect each subsite to the respective logout page when i click logout.How do i achieve this & properly logout each respective subsite? ",Nik J,https://sharepoint.stackexchange.com/users/4061,"No need to LOGOUT each SubSite but simple call this page in the _layouts virtual folder (available from wherever in SharePoint) use (the / in front would make your link relative to your site collection) /_layouts/signOut.aspx ",Marius Constantinescu - MVP,https://sharepoint.stackexchange.com/users/5306,http://sharepoint.stackexchange.com/questions/34387/custom-logout-in-sharepoint-2010,TECHNOLOGY,sharepoint.stackexchange.com 519,How to add special price to category products grid?,"How to add Special price column to category products grid under Catalog -> Manage Categories -> Category_to_be_edited ",Shathish,https://magento.stackexchange.com/users/2102,"In order to achieve this you need to override the block that displays the product grid in the category edit screen. This block is Mage_Adminhtml_Block_Catalog_Category_Tab_Product. For this, create a new module. Let's call it Easylife_Adminhtml with the following files: app/etc/modules/Easylife_Adminhtml.xml - the module declaration file. <?xml version=""1.0""?> <config> <modules> <Easylife_Adminhtml> <active>true</active> <codePool>local</codePool> <depends> <Mage_Adminhtml /> </depends> </Easylife_Adminhtml> </modules> </config> app/code/local/Easylife/Adminhtml/etc/config.xml - the module configuration file <?xml version=""1.0""?> <config> <modules> <Easylife_Adminhtml> <version>0.0.1</version> </Easylife_Adminhtml> </modules> <global> <blocks> <adminhtml> <rewrite> <catalog_category_tab_product>Easylife_Adminhtml_Block_Catalog_Category_Tab_Product</catalog_category_tab_product><!-- override the default block with your ownw--> </rewrite> </adminhtml> </blocks> </global> </config> app/code/local/Easylife/Adminhtml/Block/Catalog/Category/Tab/Product.php - the block override class. <?php class Easylife_Adminhtml_Block_Catalog_Category_Tab_Product extends Mage_Adminhtml_Block_Catalog_Category_Tab_Product{ protected function _prepareCollection() { if ($this->getCategory()->getId()) { $this->setDefaultFilter(array('in_category'=>1)); } $collection = Mage::getModel('catalog/product')->getCollection() ->addAttributeToSelect('name') ->addAttributeToSelect('sku') ->addAttributeToSelect('price') ->addAttributeToSelect('special_price')//add attributes you need ->addStoreFilter($this->getRequest()->getParam('store')) ->joinField('position', 'catalog/category_product', 'position', 'product_id=entity_id', 'category_id='.(int) $this->getRequest()->getParam('id', 0), 'left'); $this->setCollection($collection); if ($this->getCategory()->getProductsReadonly()) { $productIds = $this->_getSelectedProducts(); if (empty($productIds)) { $productIds = 0; } $this->getCollection()->addFieldToFilter('entity_id', array('in'=>$productIds)); } //simulate parent::parent::_prepareCollection() because you cannot call parent::_prepareCollection if ($this->getCollection()) { $this->_preparePage(); $columnId = $this->getParam($this->getVarNameSort(), $this->_defaultSort); $dir = $this->getParam($this->getVarNameDir(), $this->_defaultDir); $filter = $this->getParam($this->getVarNameFilter(), null); if (is_null($filter)) { $filter = $this->_defaultFilter; } if (is_string($filter)) { $data = $this->helper('adminhtml')->prepareFilterString($filter); $this->_setFilterValues($data); } else if ($filter && is_array($filter)) { $this->_setFilterValues($filter); } else if(0 !== sizeof($this->_defaultFilter)) { $this->_setFilterValues($this->_defaultFilter); } if (isset($this->_columns[$columnId]) && $this->_columns[$columnId]->getIndex()) { $dir = (strtolower($dir)=='desc') ? 'desc' : 'asc'; $this->_columns[$columnId]->setDir($dir); $this->_setCollectionOrder($this->_columns[$columnId]); } if (!$this->_isExport) { $this->getCollection()->load(); $this->_afterLoadCollection(); } } return $this; } protected function _prepareColumns() { //add the special price collumn after the 'price' column $this->addColumnAfter('special_price', array( 'header' => Mage::helper('catalog')->__('Special Price'), 'type' => 'currency', 'width' => '1', 'currency_code' => (string) Mage::getStoreConfig(Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE), 'index' => 'special_price' ), 'price'); return parent::_prepareColumns(); } } Clear the cache and it should work. It worked for me. ",Marius,https://magento.stackexchange.com/users/146,http://magento.stackexchange.com/questions/3644/how-to-add-special-price-to-category-products-grid,TECHNOLOGY,magento.stackexchange.com 6462,Where to install SSL Cert,"I have Bluehost hosting my landing page and a few subdomains. One of the subdomains has a A-Record that points to an Amazon EC2 instance running tomcat. I would like the tomcat application to be hosted over HTTPS. Where do I need to install the certificate? On Bluehost or in tomcat on my EC2 instance? ",Michael J. Lee,https://superuser.com/users/89886,"You install the certificate On Tomcat. See here. In general terms you run the certificate on the device you want to handle HTTPS, which is the web server hosting the subdomain. This is fairly intuitive as an SSL cert [usually] specifices a single domain, unless you get a wildcard cert or an SNI cert, in which case you would use it in both places. ",davidgo,https://superuser.com/users/137786,http://superuser.com/questions/651361,TECHNOLOGY,superuser.com 6199,Does one need a visa to visit Antarctica?,"What is the status of Antarctica in terms of visa regulation? Does one need a visa to visit Antarctica? If so, which country does issue such a visa? ",MOON,https://travel.stackexchange.com/users/15207,"There are seven countries which have territorial claims on parts of Antarctica: Britain, France, Australia, New Zealand, and Norway, which all recognize each other's claims; and Chile and Argentina, whose claims are disputed. In practice, however, all claims are suspended under international treaty, and there are no checkpoints or immigration officers. For most people, a visit to Antarctica consists of a flight over it or a ride on a ship through its waters, neither involving disembarkation and thus both avoiding immigration formalities. Land tourism does exist, and a permit is required. The vast majority of visitors will arrive by commercial ship or helicopter, and the tour operator is responsible for obtaining the necessary permits. You may, of course, need a visa for the country where your tour is departing from. To land on the continent in a private vessel such as a yacht, you would need to obtain a permit yourself from your own government, if your country is a signatory to the Antarctic Treaty System. For example, Britons would apply to the Foreign and Commonwealth Office, Polar Regions Department; Americans would file the DS-4131 Advance Notification Form – Tourist and Other Non-Governmental Activities in the Antarctic Treaty Area with the Department of State’s Office of Ocean and Polar Affairs Due to Antartica's extreme physical conditions and remoteness, only a few dozen yachts make the trip each year, and there are special yachting guidelines for Antarctic cruises. For a list of tour operators, see the International Association of Antarctica Tour Operators. ",choster,https://travel.stackexchange.com/users/1480,http://travel.stackexchange.com/questions/34817/does-one-need-a-visa-to-visit-antarctica,CULTURE,travel.stackexchange.com 521,How to color lat/lon points in given RGB data?,"I am using QGIS on a Mac. I am working with hydroacoustic data for mapping and interpreting the seafloor. Data are collected, processed and interpreted. The result is a txt file with Lat and Lon in the first columns followed by R, G and B data, e.g. [54.20,7.78,0.94,0.62,0.37]. The files can have 100,000 lines or more. I am not really good in GIS but I need to use it for some reasons. I seem to be unable to plot these data in GIS. There is obviously no symbology/style way to tell the system to take the color values from a file (i.e. the next 3 values in the same line of the file). It is so easy in MatLab: scatter(lat, lon, symbolsize, [R G B]) but I can't work easily with multiple layers in Matlab. ",Chris,https://gis.stackexchange.com/users/35565,"Partly off-topic but because there is no user-friendly way for doing it with QGIS this image shows how it can be done with OpenJUMP. OpenJUMP reads attribute column ""R_G_B"" and colours the feature with RGB values saved into the field as hexadecimal values. Perhaps QGIS some day can do the same or hopefully better by utilizing the OGR Feature Style Specification http://www.gdal.org/ogr_feature_style.html. ",user30184,https://gis.stackexchange.com/users/30184,http://gis.stackexchange.com/questions/109894/how-to-color-lat-lon-points-in-given-rgb-data,TECHNOLOGY,gis.stackexchange.com 5350,Magento SendMail with attachment,"I have been working on a custom extension and I need a function to send the generated CSV file. Can you please let me know what might be the possible error in it. protected function _sendCSV($filename, $subject, $last_update, $now) { $template_id = ""svm_export_email""; $email_template = Mage::getModel('core/email_template')->loadDefault($template_id)->setSubject($subject."" ["".$now.""]""); $template_variables = array( 'file_name' => $filename, 'last_update' => $last_update, 'now' =>$now, ); $email_template->getProcessedTemplate($template_variables); $sender = array('My Team' => Mage::getStoreConfig('trans_email/ident_general/email')); $email_template->setFrom($sender); $file = Mage::getBaseDir('var') . DS .'SVM'. DS .date('Y'). DS .date('m'). DS .$filename; $attachment = $email_template->getMail()->createAttachment(file_get_contents($file)); $attachment->filename = $filename; try { $email_template->send('thecoderin@gmail.com','My Gmail'); } catch (Exception $e) { Mage::log($e->getMessage(), NULL, self::LOG); return false; } Mage::log($filename."" File sent through mail"", NULL, self::LOG); return true; } I am getting the following error on invoking the function: exception 'Exception' with message 'This letter cannot be sent.' in /my/magento/root/app/code/core/Mage/Core/Model/Email/Template.php:398 Thanks! ",thecoderin,https://magento.stackexchange.com/users/22911,"I found an alternate solution using Zend Mail and it works for me. protected function _sendCSV($filename, $subject, $last_update, $now) { $template_id = ""svm_export_email""; $emailTemplate = Mage::getModel('core/email_template')->loadDefault($template_id); $template_variables = array( 'file_name' => $filename, 'last_update' => $last_update, 'now' =>$now, ); $storeId = Mage::app()->getStore()->getId(); $processedTemplate = $emailTemplate->getProcessedTemplate($template_variables); $recipients = array( ""SVM"" => Mage::getStoreConfig('svm_modules/svm_export/email'), ); $subject .= "" ["".$now.""]""; $sender = Mage::getStoreConfig('trans_email/ident_general/email'); $file = Mage::getBaseDir('var') . DS .'SVM'. DS .date('Y'). DS .date('m'). DS .$filename; $attachment = file_get_contents($file); try { $z_mail = new Zend_Mail('utf-8'); $z_mail->setBodyHtml($processedTemplate) ->setSubject($subject) ->addTo($recipients) ->setFrom($sender, ""My Team""); $attach = new Zend_Mime_Part($attachment); $attach->type = 'application/csv'; $attach->disposition = Zend_Mime::DISPOSITION_INLINE; $attach->encoding = Zend_Mime::ENCODING_8BIT; $attach->filename = $filename; $z_mail->addAttachment($attach); $z_mail->send(); Mage::log(""Mail Sent"", NULL, self::LOG); } catch (Exception $e) { Mage::log($e->getMessage(), NULL, self::LOG); return false; } return true; } Thanks for all the support. I believe this may help someone. ",thecoderin,https://magento.stackexchange.com/users/22911,http://magento.stackexchange.com/questions/62857/magento-sendmail-with-attachment,TECHNOLOGY,magento.stackexchange.com 4609,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. I don't think there'd a problem if I scan it in 300 dpi? It's just that I find it terribly difficult to get proportions right working on large pieces. ",Azuv,https://graphicdesign.stackexchange.com/users/47325,"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. Of course, enlarging it when scanning may mean you need to clean it up a bit digitally to possibly sharpen it a bit. ",Scott,https://graphicdesign.stackexchange.com/users/3270,http://graphicdesign.stackexchange.com/questions/57029/what-size-should-i-make-the-line-art-for-a-one-sheet-poster,LIFE_ARTS,graphicdesign.stackexchange.com 211,How best can I discover what is up with my electrical bill?,"This might be subjective, I don't know. However, it's a serious problem for me. My electrical bill is outrageous. It's three times as large as my next-door neighbor, and four or five times the size of my neighbor's across the street. It's worse in the summer (I live in central TX), but I've had the air conditioner inspected, and while the house is right at the maximum capacity for our unit, the unit should still be able to take care of the load. That also doesn't explain why our winter bills are larger than the comparables. What I would like to do is check the amount of current drawn by each running appliance and calculate where all my money is going. I just don't know how to go about doing this. ",moswald,https://diy.stackexchange.com/users/168,"You could invest in a clamp on Ammeter like this Then open up your electrical panel and measure the draw on each circuit, this will show you which circuits are drawing the most. Also as Mike Powell pointed out, you could clamp on to the main lines and then turn off each breaker noting how much the value drops. (You will have to do this for each leg of the main). Once you know which circuits are drawing the most power, you can start eliminating devices on that circuit until you find the largest consumers. If you want you can figure out how much your devices cost to run like this. Watts = Amps * Volts Kilowatts = Watts/1000 Kilowatt-hours = kilowatts * Hours used Cost = kilowatt-hours * cost per kilowatt-hour Or Cost = (((Amps * Volts)/1000) * Hours Used) * Cost per Kilowatt You could also do like I did and split an old extension cord (so you can clamp on to a single wire), then plug one end into the wall, and your device into the other end. Then you can measure the draw of just that device. ",Tester101,https://diy.stackexchange.com/users/33,http://diy.stackexchange.com/questions/1713/how-best-can-i-discover-what-is-up-with-my-electrical-bill,LIFE_ARTS,diy.stackexchange.com 4140,Triac circuit confusion,"X1Iz.png I have the following questions about the above circuit: -Why are we even using a trica/diac combo above. Why would a circuit consisting of just the fuse, switch and primary not be sufficient for charging the battery? -If we do go ahead with the above combo, what is the use of the resistor/capacitor combo attached in parallel above the triac? Thanks giv ",givknow,https://electronics.stackexchange.com/users/62399,"The circuit attached to the primary of the transformer is a phase chopper or ""dimmer"" which would reduce the power the transformer is getting (and thus delivering to the load) according to the selected value of the variable resistance. The way a phase chopper works is delaying when the triac turns on each cycle, the variable resistor charges the capacitor until it reaches the breakdown voltage of the diac and then the triac turns on. ",Gabe,https://electronics.stackexchange.com/users/69414,http://electronics.stackexchange.com/questions/158662/triac-circuit-confusion,TECHNOLOGY,electronics.stackexchange.com 7665,Simanim on Rosh Hashanah,"Halacha (Kitzur) brings that besides for the Simanim (symbolic foods) mentioned in the Gemara Horiyas and Shulchan Aruch you can Make your own according to the Language of the Country you live in, this had lead to some creative stuff lets see some original Ideas for the Yehi Ratzons and symbolic foods (the example in the Kitzur brings carrots(Meren) which in Yiddish the language of his country also means to inrease)? ",SimchasTorah,https://judaism.stackexchange.com/users/87,"Don't forget Dates for dates... ",yydl,https://judaism.stackexchange.com/users/128,http://judaism.stackexchange.com/questions/2713/simanim-on-rosh-hashanah,CULTURE,judaism.stackexchange.com 4353,Finding the smallest binary relation in a given set including a relation,"The following binary relation of the set {a, b, c, d, e} is given: R = { (a,b), (a,c), (b,c) } What I have to do is to find the smallest reflexive / symmetric / transitive / antisymmetric relation including R. I know what these relations are all about, but what I have trouble with is how to find them. For example, I see no reflexive relation in the set. Does ""including R"" mean that i can extend R with any element from the given set? So for example, if I am looking for a reflexion can I just add (a, a)? If I can extend the set, my solution would be: Reflexive: Add (a,a) Symmetric: Add (b,a) Transitive: Already satisfied Antisymmetric: Already satisfied? I am not sure about this one ",xxsl,https://math.stackexchange.com/users/184856,"You're on the right track. ""Containing"" means just what you would think, since $R$ is a set, we want another set of pairs of elements $(x,y)\in S\times S$ so that $R\subseteq R'$ and $R'$ has one of the properties you mention. First you need to add $(x,x)$ for every $x\in S=\{a,b,c,d,e\}$ which will give you $R_r=R\cup\{(a,a),(b,b),(c,c), (d,d), (e,e)\}$--the smallest reflexive relation containing $R$. For a symmetric one, you need to add all of the elements of $R$ where you switch $x$ and $y$, i.e. $R_s=R\cup\{(b,a), (c,a), (c,b)\}$ Continuing for the others, we need a transitive one, so we need to see if there are $xRy$ and $yRz$, and in-fact there is exactly one, namely since $aRb$ and $bRc$ we need to add $aRc$, but you already have $(a,c)\in R$, so $R_t=R$. Finally anti-symmetry is already satisfied, since there are no $x,y\in S$ such that $xRy$ and $yRx$, so $R=R_a$ is already anti-symmetric. If you have trouble seeing how this is, remember that antisymmetric is parsed in logical symbols as $$\forall x,y\in S (xRy\land yRx\implies x=y)$$ Since the set of $x,y\in S$ such that $xRy$ and $yRx$ is empty, the condition is vacuously true because all $\forall z\in\varnothing$ statements are vacuously true because the negation is $\exists z'\in\varnothing$ which is clearly false, since there are no elements in an empty set. ",Adam Hughes,https://math.stackexchange.com/users/58831,http://math.stackexchange.com/questions/1020549/finding-the-smallest-binary-relation-in-a-given-set-including-a-relation,SCIENCE,math.stackexchange.com 1252,using the new facebook payments reports API,"been trying to get data from the facebook payments reports API, since they say on november 7th no more reports will be sent by email. tried php and got an error - ""SSL connection timeout"". this is the php curl code i'm using: $set_action_url = ""https://paymentreports.facebook.com/"".$company_id.""/report?date="".$date.""&type="".$type.""&access_token="".$company_token; $ch = curl_init($set_action_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch,CURLOPT_TIMEOUT,5); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $result = curl_exec($ch); i logged the url and query string just before the call, and if i use it in a browser i do get the file. what am i doing wrong? ",user1750618,https://stackoverflow.com/users/1750618,"Try to add : curl_setopt($ch, CURLOPT_SSLVERSION, 3); ",j0k,https://stackoverflow.com/users/569101,http://stackoverflow.com/questions/12919057/using-the-new-facebook-payments-reports-api,STACKOVERFLOW,stackoverflow.com 7929,Run commands on a different computer,"Here's the situation: I have one server and two terminals. I want to run a semi-automatic backup that will be run on one of the terminals, which will, obviously, back up some files, etc. However, one of the commands which the back up should do is run a shell command that should be ran at the server (sql server command). How can I run a command on the server from the terminal? Right now I'm using batchrun for the backup, running it from a vnc on the server. EDIT: They're all Windows machines. ",Amir Rachum,https://superuser.com/users/14729,"Use SysInternals PSExec. It allows you to remotely execute files on any Windows system you have administrator credentials for. You could add a psexec command to the batch file (or whatever you're using) on the terminal which will then run the desired commands on the server. ",nhinkle,https://superuser.com/users/20088,http://superuser.com/questions/180131,TECHNOLOGY,superuser.com 8096,"Plot has red 'film', no error message","I am encountering really strange behavior: I wrote a function that plots values some data. After executing the code the resulting plot has the red 'error' colour, but only momentarily (maybe 0.1 sec). There is no error message, so the plot seems fine. However, when I export the graphic, the red colour is exported too. There seems no way to get the graphic without the red. I am (in this case) not interested in what caused the error message but want to export the graphic without te red colour. Does anyone know how to do this? I tried using Quiet[] but that did not help. My code: PlotBetaCI[whole_,everyminute_]:= Module[ {len,linearmodels,betas,lows,highs}, len=Length[everyminute]; linearmodels=Quiet@LinearModelFit[Transpose[{#,whole}],x,x]&/@everyminute; betas=Transpose[{Range[len],#[""ParameterConfidenceIntervalTableEntries""][[2,1]]&/@linearmodels}]; lows=Transpose[{Range[len],#[""ParameterConfidenceIntervalTableEntries""][[2,3,1]]&/@linearmodels}]; highs=Transpose[{Range[len],#[""ParameterConfidenceIntervalTableEntries""][[2,3,2]]&/@linearmodels}]; ListPlot[{betas,Sequence@@Transpose[{lows,highs}]},Joined->{False,Sequence@@ConstantArray[True,len]},PlotStyle->Black,PlotMarkers->{Graphics[{Line[{{-1,-1},{1,1}}],Line[{{-1,1},{1,-1}}]},ImageSize->10],Sequence@@ConstantArray[Graphics[{Line[{{0,0},{0.04,0}}]},ImageSize->10],len]},ImageSize->Large,PlotRange->{Automatic,{Automatic,1.5}}] ] The command to actually plot is (this produces the plot I am talking about) PlotBetaCI[rmssd, everyminutermssd] rmssd is a list of values. everyminutermssd has the same length, but depth 10. ",Aart Goossens,https://mathematica.stackexchange.com/users/1032,"The pink box shows a formatting error. You can disable highlighting of formatting errors for a specific object using Style: Style[ Graphics[{Disk[], garbage}], AutoStyleOptions -> {""HighlightFormattingErrors"" -> False}] You can also change the setting globally using the Preferences dialog (Edit - Preferences - Messages - Formatting error indications), or just for the current session using: SetOptions[$FrontEndSession, AutoStyleOptions -> {""HighlightFormattingErrors"" -> False}] ",Simon Woods,https://mathematica.stackexchange.com/users/862,http://mathematica.stackexchange.com/questions/51335/plot-has-red-film-no-error-message,TECHNOLOGY,mathematica.stackexchange.com 7864,Refresh Downloads list,"I have Android 4.4.3 on a Nexus 5. I connected the phone to a laptop, and there I deleted most of the files in the Downloads directory of the phone. Nevertheless, these files still show up on the phone when I open Downloads (of course, when I try to open them, I get an error). Is there a way to refresh the Downloads list? ",Seub,https://android.stackexchange.com/users/64352,"Long press on one of the entries to bring up the select menu. Click on each one of the files and press the trash icon in the upper right corner. The entries will be removed from the list but the files will remain in the Download folder. Too bad there is no 'select all' button. ",Dennis,https://android.stackexchange.com/users/64806,http://android.stackexchange.com/questions/73446/refresh-downloads-list,TECHNOLOGY,android.stackexchange.com 9525,A desktop e-mail client for multiple accounts,"Currently, I have 3 different mails (2 private and 1 for work) and I have 3 browsers open at the same time to have access to all of them. I am looking for a desktop application in which I can add my e-mail accounts and can receive there my e-mails. What I want as requirements: Easily respond with the e-mail that I have received a message. For example I don't want to change all the time options with which e-mail I will respond to another one. If someone send me an e-mail to my Gmail, then I will respond with the Gmail account.* Desktop notification for a new e-mail. Free Windows and/or Linux if it is a desktop application User-friendly interface Statistics with graphs for each account *I removed the word ""autorespond"" to avoid any misunderstanding. I don't want to choose each time the account to respond to an e-mail, but I want to respond with the one they send me the e-mail. ",Tasos,https://softwarerecs.stackexchange.com/users/76,"How about the good old Mozilla Thunderbird? It's open-source, cross-platform and a lot of support is available online. It covers all the features you need (except the optional one). Plus it has got full POP3/IMAP support and works well with all kinds of accounts. Here are some of the features I like: Tabbed E-mail Add-ons Feature Requests High Customizability Awesome Search Multiple Channel Chats I've been using Thunderbird ever since I started using Linux (it comes integrated with Ubuntu). I haven't faced any issue so far. ",Ranveer,https://softwarerecs.stackexchange.com/users/194,http://softwarerecs.stackexchange.com/questions/1003/a-desktop-e-mail-client-for-multiple-accounts,SCIENCE,softwarerecs.stackexchange.com 3552,Is 1 pixel of a height map representative of 1 vertex on the mesh?,"I'm trying to get my head around heightmap terrain generation. If I have a plane say 64 x 64 verts will I need to create a 64px by 64px greyscale heightmap in order to displace the geometry of the plane correctly? ",Caius Eugene,https://gamedev.stackexchange.com/users/23581,"You may be confusing some details. A height map is simply a 2D array of data. Each point represents 3 pieces of information: an x and y location and a number to represent the height at that point. For a simpler example, lets look at a 1D array of data that creates some 2D terrain. Each data point here will contain an x location and a number to represent the height at that point: Pretty simple right? It's just a regular old graph. As you can see, the numbers on the x axis go up by tens. We could easily change that to go up by 100's or by .01's. Same goes for the data displayed on the y axis. We can scale those values however we like. Basically, it's just numbers until you decide how you're going to visually represent it. So, saying a height map of 64px by 64px is already one step beyond where we need to go. Since a grayscale image is just another way to display the same data as a 3D height map. The data to represent each is coming from the same place. Further, you don't even need a 1 to 1 relationship between data and display. You could have far more vertices than you have data points, or far fewer. They don't even need to be equally spaced. For the most basic example: Yes, generate an array of [64][64] data points to make a grayscale image or a 3D heightmap. Each [x][y] of your array will correspond to the x, y of your vertices and the value stored in each [x][y] will represent the z value of your vertex. ",MichaelHouse,https://gamedev.stackexchange.com/users/7191,http://gamedev.stackexchange.com/questions/44906/is-1-pixel-of-a-height-map-representative-of-1-vertex-on-the-mesh,TECHNOLOGY,gamedev.stackexchange.com 3308,Powering circuit from PC's USB port,"I am working on a circuit connected to computer with FTDI FT232RL. The circuit have got some op-amps and one MCU. Total power consumption (including FTDI chip) is near by 80 mA /h (at 5V). My op-amps need well regulated 5V power (single supply). Here comes the time to design power supply. USB Vcc pin is connected to the FT232RL Vcc and MCU's Vcc. The question is this how i should use USB's Vcc pin? First connecting USB Vcc to LDO regulator IC like AMS1117 and powering both FTDI IC and MCU + Op-amps with AMS1117's regulated output is good? USB Vcc-->AMS1117-->FTDI chip+MCU+Op-amps Or connecting USB Vcc to FTDI Vcc and a regulator IC on the MCU +Op-amps is good? USB Vcc-->FTDI chip-->AMS1117-->MCU+Op-amps ",user30878,https://electronics.stackexchange.com/users/30878,"The XX1117 is not really an LDO regulator, more of a medium-drop-out. You need to give it quite a bit more input voltage than you expect out of it. So if your circuitry is happy with 3V (say), you may be okay. You can only count on 4.35V at the USB connector, and the regulator can use as much as 1.3V depending on current etc. so that leaves you with 3.05V. At 80mA, 3.3V may be acceptable, but you'll have to sharpen your pencil to figure that out. If you want to create a low-noise well-regulated 5V supply from a USB input, you would have to boost the input to something like 5.5V and use a true LDO or to more like 6.5V and use an XX1117 regulator. At 80% efficiency that means you'd be at about 150mA input current. That's acceptable, but you're supposed to negotiate for current above 100mA. Possibly the FTDI chip does that for you. If you're dealing with two supply voltages in your system you may have to have voltage translators and so on, and the details will vary a lot depending on exactly what you are trying to accomplish. Maybe you can operate all the digital stuff from the USB Vcc and use regulated 3.0V or 3.3V for the analog stuff. That would be my first plan of attack. ",Spehro Pefhany,https://electronics.stackexchange.com/users/35530,http://electronics.stackexchange.com/questions/151651/powering-circuit-from-pcs-usb-port,TECHNOLOGY,electronics.stackexchange.com 869,Removing unwanted color from B&W image (aperture),"I've been shooting ilford color-process b&w film. The local photo processor's equipment has a glitch; sometimes the resulting negatives are slightly colorful. In the current roll, there's a faint blue stripe in some images, and an overall purple cast to others. I'm not a very adept Aperture user; can someone supply or point to a recipe for fixing this? ",bmargulies,https://photo.stackexchange.com/users/11429,"If you want to remove all color, just slide the saturation slider all the way to the left. If the stripe is showing regardless of color, then you would have to repair the photo in something like Photoshop. You can reference page 65 of the manual for more info on this particular feature - http://manuals.info.apple.com/en_US/Aperture_Performing_Adjustments.pdf ",dpollitt,https://photo.stackexchange.com/users/4892,http://photo.stackexchange.com/questions/30375/removing-unwanted-color-from-bw-image-aperture,LIFE_ARTS,photo.stackexchange.com 6485,Exit Google Chrome from terminal,"Is there a way to cause google-chrome to quit, from the terminal, besides using killall google-chrome? I would like to be able to close it from a script without killing it. ",slybloty,https://unix.stackexchange.com/users/14775,"Perhaps wmctrl could be of some assistance. You could use the -c option that closes a window gracefully: wmctrl -c chrome The string chrome is matched against the window titles. Note that the window might not close if some message pops-up (e.g. when you have multiple tabs open). ",Baldrick,https://unix.stackexchange.com/users/10659,http://unix.stackexchange.com/questions/34101/exit-google-chrome-from-terminal,TECHNOLOGY,unix.stackexchange.com 2962,Order of footnotes with packages afterpage and footnote,"I need to have footnotes in captions of figures and therefore use the afterpage package to keep the footnotes and the figure on the same page (also using package footnote for footnotes in figures). I need to write my PhD thesis in a style that was defined in Word, but I wanted to write in Latex. Word always puts footnotes at the bottom of the page. So basically, I'm forced to put footnotes at the bottom. Others seem to have the same problem (other question, accepted answer puts footnote on bottom of page, but is manual; also for tables that might float and floats in general, where I found the idea with afterpage; also in other places on the web), so I though I might share my progress made so far and get input from others on the issue. When using floats in an afterpage environment, the ordering of the footnotes at the bottom gets mangled up in some parts of the document. I managed to fix the ordering of the footnotes at the bottom with a dirty hack (see below), but the footnote number of the figure is not always the first footnote number appearing on the page. So I now have basically two questions: What does my dirty hack do? I just tried some things and somehow it worked, now I'd like to understand why and whether it might have effects on other parts of the document. How can I get the correct footnote number, i.e. the lowest footnote number on that page, for the footnote of the caption? My dirty hack (using \patchcmd from etoolbox): \usepackage{etoolbox} \makeatletter \tracingpatches \patchcmd{\AP@savetop}{\global\setbox\AP@footins\box\footins}{}{}{} \patchcmd{\AP@@}{\insert\footins{\unvbox\AP@footins}\fi}{\setbox\footins\vbox{\unvbox\AP@footins}\fi}{}{} \makeatother What I get without my dirty hack: Footnotes on same page as figure Footnotes order not correct Footnote number of caption not first number on page What I get with my dirty hack Footnotes on same page as figure Footnotes order correct Footnote number of caption not first number on page What I want Footnotes on same page as figure Footnotes order correct Footnote number of caption first number on page MWE: \documentclass[12pt,a4paper,twoside,openany,fleqn]{book} \usepackage{afterpage} \usepackage[ngerman]{babel} \usepackage{lipsum} \usepackage{footnote} \makesavenoteenv{figure} \begin{document} \chapter{First Chapter} \lipsum[1]\footnote{Footnote} \afterpage{ \begin{figure}[htp] \fbox{Hello World} \caption[test]{test\protect\footnote{Test}} \end{figure} } \lipsum[1]\footnote{Footnote} \lipsum[1]\footnote{Footnote} \lipsum[1]\footnote{Footnote} \afterpage{ \begin{figure}[htp] \fbox{Hello World} \caption[test]{test\protect\footnote{Test}} \end{figure} } \lipsum[1]\footnote{Footnote} \lipsum[1]\footnote{Footnote} \end{document} Edit1: Second MWE without afterpage, where footnote is kept on different page. Adding afterpage around the figures moves the footnote to the correct page: \documentclass[12pt,a4paper,twoside,openany,fleqn]{book} \usepackage[ngerman]{babel} \usepackage{lipsum} \usepackage{footnote} \makesavenoteenv{figure} \begin{document} \chapter{First Chapter} \lipsum[1]\footnote{Footnote} \begin{figure}[tp] \begin{minipage}[t][0.4\textheight][t]{0.6\textwidth} \end{minipage} \caption[test]{test\protect\footnote{Test}} \end{figure} \lipsum[1]\footnote{Footnote} \lipsum[1]\footnote{Footnote} \lipsum[1]\footnote{Footnote} \begin{figure}[tp] \begin{minipage}[t][0.4\textheight][t]{0.6\textwidth} \end{minipage} \caption[test]{test\protect\footnote{Test}} \end{figure} \lipsum[1]\footnote{Footnote} \lipsum[1]\footnote{Footnote} \end{document} ",ThomasD,https://tex.stackexchange.com/users/59897,"There is no way to do this with floating figures without rewriting half of latex: the caption (including any footnote marks) is set at the point of the figure environment and a floating figure can float past footnotes, thus getting the footnote numbers out of order. If you really want this output style (I can see no good reason for it, a float is by design a distinct object not in the main flow of text on the page, and so having its footnotes in the page just seems wrong) then you need to use non floating figures. You can use float package \begin{figure}[H] or or caption or capt-of package \captionof{figure}{...} then the figure is not a floating object but fixed in the page, and you can then use \footnotemark in the caption and \footnotetext immediately after the \end{figure} and they will come on the same page. ",David Carlisle,https://tex.stackexchange.com/users/1090,http://tex.stackexchange.com/questions/193895/order-of-footnotes-with-packages-afterpage-and-footnote,TECHNOLOGY,tex.stackexchange.com 8780,"Antonym of ""crepuscular""?","What is the antonym of ""crepuscular""? Crepuscular animals are most active at twilight (crepusculum = twilight). Thus, the antonym of ""crepuscular"" would refer to animals most active at midday or midnight. ",Geremia,https://english.stackexchange.com/users/94359,"There are three classes of activity: Diurnal: active during daylight. Crepuscular: active in twilight conditions (dawn/dusk). Nocturnal: active in darkness. While they are mutually exclusive, none is a perfect antonym for any other. ",Hellion,https://english.stackexchange.com/users/2490,http://english.stackexchange.com/questions/265930/antonym-of-crepuscular,CULTURE,english.stackexchange.com 8328,What is the best introductory Bayesian statistics textbook?,"Which is the best introductory textbook for Bayesian statistics? One book per answer, please. ",Shane,https://stats.stackexchange.com/users/5,"I read: Gelman et al (2013). Bayesian Data Analysis. CRC Press LLC. 3rd ed. Hoff, Peter D (2009). A First Course in Bayesian Statistical Methods. Springer Texts in Statistics. Kruschke, Doing Bayesian Data Analysis: A Tutorial with R and Bugs, 2011. Academic Press / Elsevier. and I think that the better one to start with is Kruschke's book. It's perfect for a first approach to Bayesian thinking: concepts are explained very clearly, there is not too much mathematics, and there are lots of nice examples! Gelman et al. is a great book, but it is more advanced and I suggest to read it after the Kruschke's one. Conversely, I did not like Hoff's book because it is an introductory book, but concepts (and Bayesian thinking) are not explained in a clear way. I suggest to pass over. ",stochazesthai,https://stats.stackexchange.com/users/44171,http://stats.stackexchange.com/questions/125/what-is-the-best-introductory-bayesian-statistics-textbook,SCIENCE,stats.stackexchange.com 2971,Is it necessary to know initial y velocity to solve this projectile motion problem?," A marble is launched horizontally off a 93.0-cm high table causing the marble to land on the floor 1.85 m from the base of the table. a.) How long was the ball in the air? b.) With what velocity must the marble have left the tabletop? Wouldn't another piece of information be needed to solve this problem? Is it implied the initial y velocity is 0? ",user1530249,https://physics.stackexchange.com/users/18785,"Yes it it implied that the $y$-component of the initial velocity is zero because the problem states that ""the marble is launched horizontally."" ",joshphysics,https://physics.stackexchange.com/users/19976,http://physics.stackexchange.com/questions/53690/is-it-necessary-to-know-initial-y-velocity-to-solve-this-projectile-motion-probl,SCIENCE,physics.stackexchange.com 1078,How to highlight part of an image and blur the rest?," I'm looking for a way to get a similar effect to the above but using css + javascript. Ideally I'm looking for a javascript that given an object { top: 30, left: 10, width: 100 height: 300 } would produce the effect on the image #document on a mouse enter and leave events so I can highlight part of the image when the mouse is over it. So far I have the following: var highlight = function(sel, info) { $(sel).mouseenter(function() { var w = $(sel).width(); var h = $(sel).height(); $(sel + ' .box').css({ top: info.top + 'px', left: info.left + 'px', width: info.width + 'px', height: info.height + 'px', opacity: 1 }); $(sel + ' .overlay-a').css({ top: 0 + 'px', left: 0 + 'px', right: 0 + 'px', bottom: (h - info.top) + 'px', }); $(sel + ' .overlay-b').css({ top: info.top + 'px', left: 0 + 'px', right: (w - info.left) + 'px', bottom: 0 + 'px' }); $(sel + ' .overlay-c').css({ top: info.top + 'px', left: (info.left + info.width) + 'px', right: 0 + 'px', bottom: 0 + 'px' }); $(sel + ' .overlay-d').css({ top: (info.top + info.height) + 'px', left: info.left + 'px', right: (w - info.left - info.width) + 'px', bottom: 0 + 'px' }); }).mouseleave(function() { $(sel + ' .box').css({ top: 0 + 'px', left: 0 + 'px', width: 0 + 'px', height: 0 + 'px', opacity: 0 }); $(sel + ' .overlay-a, ' + sel + ' .overlay-b, ' + sel + ' .overlay-c, ' + sel + ' .overlay-d').css({ top: 'auto', left: 'auto', right: 'auto', bottom: 'auto', }); }); } highlight('#document', { top: 10, left: 10, width: 200, height: 200 }); .container { position: relative; width: 600px; } .box { position: absolute; border: 2px solid black; box-sizing: border-box; z-index: 2; } .container img { width: 100%; z-index: 1; } .overlay { position: absolute; opacity: 0.5; background-color: black; z-index: 2; top: 0px; left: 0px; } <script src=""https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js""></script> <div id=""document"" class=""container""> <img src=""http://lorempixel.com/600/400"" /> <div class=""overlay overlay-a""></div> <div class=""overlay overlay-b""></div> <div class=""overlay overlay-c""></div> <div class=""overlay overlay-d""></div> <div class=""box""></div> </div> ",Justin808,https://stackoverflow.com/users/308079,"The first thing I thought of would be to use JS/jQuery to change the zindex of the element you wish to highlight to higher up (closer to the user) and have a partially transparent overlay appear .show() in jQuery (IIRC). So you would have: [viewer] element to be highlighted semi-transparent element main content Someone else will have to help you with the actual JS if you need assistance there. ",Caleb Williams,https://stackoverflow.com/users/5063281,http://stackoverflow.com/questions/31283342/how-to-highlight-part-of-an-image-and-blur-the-rest,STACKOVERFLOW,stackoverflow.com 1245,How to convert particles to mesh,"I need to convert a Particle System to a mesh object, so I can export it to Unity 3D. How could I do this? ",kholyphoenix1,https://blender.stackexchange.com/users/10890,"The following assumes that you are using 'Particle System-> Render-> Object -> Dupli Object'. Option 1) You can press the Convert button for the Particles Modifier. Option 2) If you would like to keep the particle Emitter intact, you can use the 'Make Duplicates Real' Tool Shift+Ctrl+a. This will create object particles at every particle position just as if you applied the Modifier but the particle emitter and its particle system will still be intact in case you would like to make further changes. ",MarcClintDion,https://blender.stackexchange.com/users/1448,http://blender.stackexchange.com/questions/24274/how-to-convert-particles-to-mesh,TECHNOLOGY,blender.stackexchange.com 8587,Syntax highlighting language hints,"Do you think it would be worthwhile to provide hints as to what language to use for the syntax highlighting? Sometimes I find the highlighting on SQL or VB.NET answers is more distracting than helpful; for example: Converting MySQL select to PostgreSQL Retrieving data from a VB.NET arraylist of objects to pick the two I've been looking at recently. ",Rowland Shaw,https://meta.stackexchange.com/users/130044,"Scavenger's answer is a good idea, but # might be something that is valid in the code like a pre-processor command in C++ that can be part of the actual code sample. I suggest to have something that is specified before the code block in a special way. The code block is indented with 4 spaces, so the language specifier could be indented 3 spaces (and only mean something when appearing immediately before a code block). This follows the simplicity in the markup rules that already exists.    VB.NET      Dim myVariable As String 'Here is the first code line      myVariable = ""Hello world"" ",awe,https://meta.stackexchange.com/users/135505,http://meta.stackexchange.com/questions/981/syntax-highlighting-language-hints,TECHNOLOGY,meta.stackexchange.com 586,SOQL Showing null values as 0,"If a record is not found, can I have it show a 0, instead of not appearing in my results? For example: If I'm getting the total # of records for 5 different picklist values, and 1 picklist have has 0 records, I want it to show 0 instead of not showing that 5th picklist value at all. ",Jason,https://salesforce.stackexchange.com/users/13592,"No, SOQL won't show ""empty"" buckets in the result set, so it will be up to your code to properly render those zero-value entries. ",sfdcfox,https://salesforce.stackexchange.com/users/2984,http://salesforce.stackexchange.com/questions/58079/soql-showing-null-values-as-0,TECHNOLOGY,salesforce.stackexchange.com 8922,How do I establish international copyright to my works?,"What should I do to establish rights on my work? Does it depend on the country where it was created? ",stan,https://graphicdesign.stackexchange.com/users/1648,"Regardless of what country your in one of the first things you can do is establish evidence that shows when the work was created (or when you claim you created the work). You can do this using the free online copyright protection service Myows. This can't prove that you created the work but it can establish evidence that could be used if you ever needed to defend your copyright. As soon as you upload an Original work on Myows, a copy of that work is time- and date-stamped and saved on our secure servers. Uploading your work on Myows provides you with valuable evidence as well as an effective deterence measure designed to prevent theft. ",Chris_O,https://graphicdesign.stackexchange.com/users/194,http://graphicdesign.stackexchange.com/questions/3395/how-do-i-establish-international-copyright-to-my-works,LIFE_ARTS,graphicdesign.stackexchange.com 1736,why ions and electrons are at different temperatures in plasma?,"In plasma, collision rate among ions or electrons is much larger than the collision rate between ions and electrons. why is that so? ",seeking_infinity,https://physics.stackexchange.com/users/57676,"Consider a plasma that just's been formed and then left alone. Being far from equilibrium, the plasma will evolve towards an equilibrium state. At this stage, it's not very useful to characterize the plasma with a temperature because the velocity distribution would bear little resemblance to a Boltzmann distribution, or really any kind of distribution function with meaningful moments. Let's assume that the plasma is being driven towards equilibrium by collision events. The particles will lose energy during each inelastic collision event, with some being more inelastic than others. The degree of inelasticity will depend significantly on the mass ratio: ion-ion collisions and electron-electron collisions will be inelastic compared to ion-electron collisions. Since the $i-i$ and $e-e$ collisions are relatively inelastic, it often occurs that the ions and electrons quickly develop their own ""temperatures"". The ion velocity distribution rapidly approaches a Boltzmann distribution with temperature, and the electrons also rapidly approach a Boltzmann distribution with some different temperature. If you were to superpose the two, you'd get a funny-looking distribution with a tall top and wide tails, i.e. not global equilibrium. The ""centeredness"" or ""tailedness"" (basically kurtosis) of the total distribution tells you how far from equilibrium the plasma is. The further the system is from equilibrium, the faster it will try to equilibrate via collisions. So if the temperatures are very different, the $i-e$ collision frequency will be high. If the temperatures are not too different, the $i-e$ will be lower, but still higher than the $e-e$ and $i-i$ systems that have already approximately equilibrated with themselves. Note: In laboratory experiments, it's common to produce plasmas whose ions and electrons do not settle to a Boltzmann distribution. In that case, the kurtosis argument flies out the window. Another major complication arises if the electrons and ions have different flow speeds, where so-called ""two-stream"" or ""bump-on-tail"" instabilities become important in the equilibration physics. ",Endulum,https://physics.stackexchange.com/users/41138,http://physics.stackexchange.com/questions/143738/why-ions-and-electrons-are-at-different-temperatures-in-plasma,SCIENCE,physics.stackexchange.com 2683,linq sql where closest to number,"i have a table Id Number 1 9 2 10 3 12 4 19 5 20 select Id where Number is closest to 18 it should return row 4 which is 19 how do i write this in linq and tsql? thanks ",scrippie,https://stackoverflow.com/users/204579,"(from q in table orderby Math.Abs(18 - q.Number) select q).FirstOrDefault() and SELECT TOP 1 * FROM table ORDER BY ABS(10 - Number) and for a datetime var nearTo = new DateTime(1999, 12, 31); (from q in table orderby Math.Abs((nearTo - q.Date).TotalSeconds) select q).FirstOrDefault() ",John Gietzen,https://stackoverflow.com/users/57986,http://stackoverflow.com/questions/1705799/linq-sql-where-closest-to-number,STACKOVERFLOW,stackoverflow.com 9282,Really customized themes,"I've been toying around with Drupal 7 for a couple of weeks now, and I think I understand how the theming system works, but I have a question. I'm looking at Zen's default theme right now, and I understand that you're supposed to tweak the CSS files in the starterkit to begin building a more substantial sub-theme, but what if I wanted to change the layout of the page altogether? Currently the Zen theme has the regions laid out something like this (please pardon the massively crude drawing, I just wanted to illustrate something): And if I wanted it to be laid out like this instead: Which of the theme files am I supposed to edit/hack? I'm assuming it's either page.tpl.php or html.tpl.php. Or is this something that's supposed to be done with CSS? ",cornjuliox,https://drupal.stackexchange.com/users/6147,"Different layouts for different pages is one of the many things that the Panels module can do. It works alongside your base theme. The base theme sets up general things, gets your site looking consistent, and gives you the opportunity to customize it. Panels gives you much greater flexibility for creating different layouts for different parts of your site, than the normal blocks in regions combo gives you. ",mpdonadio,https://drupal.stackexchange.com/users/835,http://drupal.stackexchange.com/questions/26366/really-customized-themes,TECHNOLOGY,drupal.stackexchange.com 2639,Is there anyway to return particular elements from JFrame?,"Lets imagine that JFrame containes 9 JTextFields like so: public static JFrame generateFrame(){ JFrame frame = new JFrame(); Container c = frame.getContentPane(); JPanel panel = new JPanel(); panel.setLayout(new GridLayout(3,3)); JTextField[]textFields = new JTextField[9]; for(int i=0; i<9;i++){ textFields[i]= new JTextField(1); textFields[i].setFont(new Font(""Sans-serif"", Font.BOLD, 30)); panel.add(textFields[i]); } c.add(panel); frame.setVisible(true); frame.setSize(300,300); return frame; } So I assign this returned JFrame to variable in main method like so: public static void main(String []args){ JFrame gameFrame = generateFrame(); } Is there anyway to extract all the textfields from ""gameFrame"" object? Something like docyment.getElementByTagName(""element"") equivalent in DOM? ",galdikas,https://stackoverflow.com/users/1786480,"Try following. Component[] components = gameFrame.getComponents(); for (int i = 0; i < components.length; i++) { if (components[i] instanceof JTextField) { //DO what you want with the text field here } } Hope it helps. ",Jabir,https://stackoverflow.com/users/2106815,http://stackoverflow.com/questions/15878198/is-there-anyway-to-return-particular-elements-from-jframe,STACKOVERFLOW,stackoverflow.com 8714,What is the difference between drought resistant non-succulent plants and plants that cannot be allowed to dry out?,"What features make one plant able to withstand dry spells better than another with relatively similar structure? For instance, one of my Rudbeckias is wilting from drought at the moment, and an Oenothera next to it is not yet showing signs of dryness. Or like jewelweed (Impatiens capensis), which wilts even while the soil is damp, in full sun, and ragweed (Ambrosia artemisiifolia), which will grow in very dry locations without being phased. Is it caused by a faster transpiration rate in some plants than in others? ",J. Musser,https://biology.stackexchange.com/users/338,"Plants in drier conditions usually have reduced surface area, thick waxy cuticle covering the epidermis, reduced number of stomata, and water storage tissues that presides in its roots and leaves. This means that even if the plants are similar, one of them might express more of one of the features shown above. ",user46725,https://biology.stackexchange.com/users/8279,http://biology.stackexchange.com/questions/19545/what-is-the-difference-between-drought-resistant-non-succulent-plants-and-plants,SCIENCE,biology.stackexchange.com 265,Why is the pixel count of RAW images from the Panasonic LX5 slightly larger than the generated JPEGs?,"I'm new to working with RAW images, and I'm capturing simultaneous RAW+JPGs with my new Lumix LX5, and using Bibble to view/process the results. I'm very surprised that the RAW images taken at 24mm wide 16x9 seem to capture a different (and larger) sensor area compared to the JPGs. The RAW images seem to contain the equivalent of about 100 extra pixels on left and right sides, and a smaller number top and bottom. I say ""equivalent"", because the actual pixel counts of RAW and JPG are only slightly different, which implies some resizing must be going on...? JPG: 3968 x 2232 RAW: 3976 x 2238 I guess this small difference is because JPG images must be 16x16 multiples> The raw image displays noticeable vignetting in the extra pixels, and there's a fair bit of chromatic aberration. I can crop off the 'extra' pixels, but then my RAW image has fewer pixels in it than the JPG, which doesn't feel right. I'll try and add samples shortly. ",Roddy,https://photo.stackexchange.com/users/562,"I think this is happening because Bibble (at least the version you're using) isn't applying the metadata in the LX5's RW2 file that tells it how to correct for the lens' deformations. Perhaps this is a setting in Bibble, or a missing feature in their RW2 converter. I'll bet if you convert your RW2's to DNG with Adobe's free DNG converter, Bibble be able to read and apply that data and produce a 'corrected' image. I've come to this conclusion (and found your question) by noticing the same artifacts you mentioned when using Picasa 3.8 to view images created using Adobe DNG Converter 6.4.0.139 from my LX5's RAW files. This happens when I ask Adobe DNG Converter to create files for ""Camera Raw 5.4 and later"", the max setting. This theory was backed up by the fact that the JPG preview looks corrected when compared to the image rendered by Picasa when it renders the DNG. Not only that, but the JPG preview rendered by Adobe DNG converter matches the JPG's that came straight from the camera for the same shot (clearly the converter is applying the same transformations that the camera did internally to make the JPG). After playing around a bit, I discovered that the artifacts go away in Picasa 3.8 when I have the DNG Converter create files for ""Camera Raw 4.6 and later"". I assume this means Picasa 3.8 doesn't understand Camera Raw 5.4, but it CAN understand Camera Raw 4.6, and will apply the correction automatically to conforming DNG files. No more corner vignette and barrel distortion on the resulting DNG files in Picasa, and in theory all the information from the RW2 is in the DNG! Also - I wouldn't be put off by the correction - it's a good thing - and supposedly no information is thrown away. The DNG / RW2 files contain the raw sensor data plus additional information on the lens / camera aberrations, and viewing software can elect to apply these transformations or not. The 'true' sensor data can always be accessed. ",Jeff Jones,https://photo.stackexchange.com/users/5394,http://photo.stackexchange.com/questions/4242/why-is-the-pixel-count-of-raw-images-from-the-panasonic-lx5-slightly-larger-than,LIFE_ARTS,photo.stackexchange.com 1123,Eigenvalues of a transition probability matrix,"I have read that, for $$I - \alpha P$$ where $I$ is the $n\times n$ identity matrix, $\alpha \in (0,1]$, and $P$ is the transition probability matrix with dimensions $n \times n$, $I - \alpha P$ is an invertible matrix because the eigenvalues of any transition probability matrix lie within the unit circle of the complex plane. ""Thus no eigenvalue of $\alpha P$ can be equal to 1, which is a necessary and sufficient condition for $I - \alpha P$ to be invertible."" Why is that? ",user243716,https://math.stackexchange.com/users/243716,"For any scalar $\alpha$ and square matrix $P$, the following are equivalent: $\alpha P$ has an eigenvalue $1$ $\alpha Pv = v$ for some non-zero vector $v$ $(I - \alpha P)v = 0$ for some non-zero vector $v$ $I - \alpha P$ is not invertible ",Omnomnomnom,https://math.stackexchange.com/users/81360,http://math.stackexchange.com/questions/1300345/eigenvalues-of-a-transition-probability-matrix,SCIENCE,math.stackexchange.com 7405,How to call hook in template.php after login from any user in drupal 7?,"I am using below code to get the user login gender information & store in SESSION, I want to call below code after login, I already try this hook function bartik_user_login(&$edit, $account) {}but its not working. Please help. Thanks if (user_is_logged_in()) { global $user; $uid = user_load($user->uid); $profile_main = profile2_load_by_user($uid, 'main'); $field_iam = field_get_items('profile2',$profile_main,'field_i_am_field'); $_SESSION['i_am']=$field_iam[0][value]; echo $_SESSION['i_am']; } ",Nishant Pandya,https://drupal.stackexchange.com/users/33402,"You should use preprocess function. For example - function yourtheme_preprocess_user_login(&$vars) { $vars['intro_text'] = t('This is my awesome login form'); } The general flow is: theme($hook, $var) >> preprocess functions >> process functions >> finally either goto template.php or call theme function >> return output as string therefore, template.php or theme function call is the final destination, no hook runs after template.php ",Parvind,https://drupal.stackexchange.com/users/33518,http://drupal.stackexchange.com/questions/131132/how-to-call-hook-in-template-php-after-login-from-any-user-in-drupal-7,TECHNOLOGY,drupal.stackexchange.com 6097,json load more items,"I worked JSON. I have two classes (private class LoadDataToServer extends AsyncTask and class loadMoreListView extends AsyncTask) in the first grade, I parsing JSON and show item in the ListView and the second class, I'm trying to load multiple items. my problem is when I call the new loadMoreListView (). execute (); .. on listView.setOnScrollListener there is an error. my problem is adapter this is my code private class loadMoreListView extends AsyncTask>> { @Override protected void onPreExecute() { pd.show(); } @Override protected ArrayList<HashMap<String, String>> doInBackground( Void... params) { jsonparser = new JSONParser(); URL = ""http://bri.ge/api/getList.aspx?count=2&time="" + dateTime; jsonarray = new JSONArray(); JSONObject jsonobject = jsonparser.getJSONfromURL(URL); try { jsonarray = jsonobject.getJSONArray(""data""); for (int i = 0; i < jsonarray.length(); i++) { jsonobject = jsonarray.getJSONObject(i); HashMap<String, String> map = new HashMap<String, String>(); map.put(""journal"", jsonobject.getString(KEY_journal)); map.put(""image"", jsonobject.getString(KEY_image)); map.put(""title"", jsonobject.getString(KEY_title)); map.put(""description"", jsonobject.getString(KEY_description)); map.put(""JournalID"", KEY_JournalID); map.put(""pubDate"", jsonobject.getString(KEY_pubDate)); Content cont = new Content(jsonobject.getString(""journal""), jsonobject.getString(""image""), jsonobject.getString(""title""), jsonobject.getString(""pubDate""), jsonobject.getString(""description""), jsonobject.getInt(""JournalID"")); contents.add(cont); itemList.add(map); } // adapter.notifyDataSetChanged(); } catch (JSONException e) { Log.e(""Error"", e.getMessage()); e.printStackTrace(); } dateTime = itemList.get(itemList.size() - 1).get(KEY_pubDate); return itemList; } @Override protected void onPostExecute(ArrayList<HashMap<String, String>> result) { super.onPostExecute(result); if (pd.isShowing()) { pd.dismiss(); try { // itemList.clear(); int currentPosition = list.getFirstVisiblePosition(); // Appending new data to menuItems ArrayList adapter = new LazyAdapter(MainActivity.this, itemList); adapter.notifyDataSetChanged(); list.setAdapter(adapter); // list.add // Setting new scroll position list.setSelectionFromTop(currentPosition + 1, 0); } catch (NullPointerException e) { e.printStackTrace(); } } } } private class LoadDataToServer extends AsyncTask>> { @Override protected void onPreExecute() { super.onPreExecute(); pd.show(); } @Override protected ArrayList<HashMap<String, String>> doInBackground( Void... params) { jsonparser = new JSONParser(); @SuppressWarnings(""static-access"") JSONObject jsonobject = jsonparser.getJSONfromURL(URL); try { jsonarray = jsonobject.getJSONArray(""data""); for (int i = 0; i < jsonarray.length(); i++) { jsonobject = jsonarray.getJSONObject(i); HashMap<String, String> map = new HashMap<String, String>(); map.put(""journal"", jsonobject.getString(KEY_journal)); map.put(""image"", jsonobject.getString(KEY_image)); map.put(""title"", jsonobject.getString(KEY_title)); map.put(""description"", jsonobject.getString(KEY_description)); map.put(""JournalID"", KEY_JournalID); map.put(""pubDate"", jsonobject.getString(KEY_pubDate)); // contents = new ArrayList<Content>(); Content cont = new Content(jsonobject.getString(""journal""), jsonobject.getString(""image""), jsonobject.getString(""title""), jsonobject.getString(""pubDate""), jsonobject.getString(""description""), jsonobject.getInt(""JournalID"")); contents.add(cont); itemList.add(map); } } catch (JSONException e) { Log.e(""Error"", e.getMessage()); e.printStackTrace(); } dateTime = itemList.get(itemList.size() - 1).get(KEY_pubDate); return itemList; } @Override protected void onPostExecute(ArrayList<HashMap<String, String>> result) { super.onPostExecute(result); pd.dismiss(); // itemList.clear(); // Appending new data to menuItems ArrayList adapter = new LazyAdapter(MainActivity.this, itemList); adapter.notifyDataSetChanged(); list.setAdapter(adapter); // list.add // Setting new scroll position } } list.setOnScrollListener(new OnScrollListener() { @Override public void onScrollStateChanged(AbsListView view, int scrollState) { if (scrollState == 0) { // new loadMoreListView().execute(); } } @Override public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { final int lastItem = firstVisibleItem + visibleItemCount; if (lastItem == totalItemCount) { new loadMoreListView().execute(); } } }); ",Jambul Kukhalashvili,https://stackoverflow.com/users/2702722,"see i guess somewhere in your network call (Async task) your ""itemList"" get updated without notifying adapter. because you are adding item in ""doInBackGround"" which is on different thread. I would suggest you to use these two library for making REST network call and json parsing . this is efficient in terms of memory and performance. Android Asynchronous Http Client google-gson these are open source . for any query ask me. ",nitesh goel,https://stackoverflow.com/users/1971954,http://stackoverflow.com/questions/20572822/json-load-more-items,STACKOVERFLOW,stackoverflow.com 4625,"""Obama is in town this weekend"" or ""Obama will be in town this weekend""","A friend of mine used the following phrase to tell me about Obama's visit to Malaysia this weekend (he told me this when it was not already the weekend): Obama is in town this weekend. This phrase confused me, because it goes against what I was taught in school. Or at least, I think so, I am not a native speaker. At least in my mind, the following is correct: Obama will be in town this weekend. My friend, a native British English speaker, says that both are fine, but in his country people are more likely to use the first. How is the first acceptable? Doesn't ""is"" mean that it is happening in the present? Thank you. ",Zhao Xi,https://english.stackexchange.com/users/73127,"The present tense is often used for future events that are scheduled: Did you know that Obama is town this weekend? Really, when does he arrive? Aarts in Oxford Modern English Grammar (p248) calls this the present futurate, and lists I start my degree course next week as one of his examples. He goes on to explain: It would have been possible to use other means of referring to the future in these examples, but with the present futurate the future situation is anchored in the present, and in some way scheduled to take place as a 'diaired occurrence' or as a natural occurrence. The use of the present futurate makes the conversation more lively by bringing the anticipated situation to the fore. Notice that for these examples to be interpreted as futurate uses, a time specification is normally required. As an aside, it is worth noting the inherent ambiguity of the statement Obama is in town this weekend if said on a Saturday. It could mean that Obama is here now, or it could mean that he is arriving later today or on Sunday. Obviously, if the statement is made on a non-weekend day, then it can only be referring to the future. ",Shoe,https://english.stackexchange.com/users/11146,http://english.stackexchange.com/questions/166093/obama-is-in-town-this-weekend-or-obama-will-be-in-town-this-weekend,CULTURE,english.stackexchange.com 3014,"Sorting the output of ""find""?","I need to be able to alphabetically sort the output of find before piping it to a command. Entering | sort | between didn't work, so what could I do? find folder1 folder2 -name ""*.txt"" -print0 | xargs -0 myCommand ",Industrial,https://unix.stackexchange.com/users/3208,"If you have GNU Parallel http://www.gnu.org/software/parallel/ installed you can do this: find folder1 folder2 -name ""*.txt"" -print | sort | parallel myCommand You can install GNU Parallel simply by: wget http://git.savannah.gnu.org/cgit/parallel.git/plain/src/parallel chmod 755 parallel cp parallel sem Watch the intro videos for GNU Parallel to learn more: https://www.youtube.com/playlist?list=PL284C9FF2488BC6D1 ",Ole Tange,https://unix.stackexchange.com/users/2972,http://unix.stackexchange.com/questions/34325/sorting-the-output-of-find,TECHNOLOGY,unix.stackexchange.com 319,Why do I have to explicitly add perl before the script for getops to run properly?,"When i run my script like so: C:\>perl script.pl -f file It works fine. But, if I just do: C:\>script.pl -f file then I don't get any errors but getopts doesn't assign anything to $opt_f This works just fine on perl 5.8 Windows XP, but it doesn't work on perl 5.12 on Windows 7. There aren't any other versions of perl installed (its a new OS build). Code: use Getopt::Std; our ($opt_f); getopts('f:'); print ""input file is: $opt_f \n""; print ""$0\n Run with: C:\> perl get.pl -f sadf input file is: sadf get.pl Run without: C:\>get.pl -f sadf input file is: Nothing! EDIT: fixed and this question was a repeat... http://stackoverflow.com/questions/1695188/how-do-i-make-perl-scripts-recognize-parameters-in-the-win32-cmd-console The OP of that post figured it out. I had to do the same but also recreate the assoc in the gui (in addition to in the reg and on the command line with ftype.) ",Alex,https://stackoverflow.com/users/8676,"First, look at: C:\> assoc .pl .pl=Perl Take the string on the RHS, and invoke: C:\> ftype Perl Perl=""C:\opt\Perl\bin\perl.exe"" ""%1"" %* Make sure %* is there. If not, run a cmd.exe shell as administrator, and invoke C:\> ftype Perl=perl.exe %1 %* See also ftype /?. ",Sinan Ünür,https://stackoverflow.com/users/100754,http://stackoverflow.com/questions/4065054/why-do-i-have-to-explicitly-add-perl-before-the-script-for-getops-to-run-properl,STACKOVERFLOW,stackoverflow.com 7439,Is Mac OS X in a VirtualBox VM suitable for iOS development?,"I have finally successfully managed to install Mac OS X in a virtual machine on my Windows 7 laptop using VirtualBox and a tutorial from Lifehacker. Performance is very slow, with Mountain Lion reporting that it is seeing just 4MB video memory (I didn't manage to load the Intel HD3000 driver). Youtube is essentially unplayable, with even the audio potion stuttering. That said, the interface and general UI is pretty acceptable. Even with such slow performance, does it make sense to download and develop with Xcode? I am allocating 3GB of RAM. What would performance be like under those conditions? ",Redandwhite,https://apple.stackexchange.com/users/8950,"Essentially, you're running 2 virtual boxes if you use the iOS emulator and take this approach. 1 for OSX and 1 (essentially) for the emulator. This can get very cpu and ram intensive but it's doable. Best bet, give it a shot. If you don't like, just remove the vm image. ",Agent 404,https://apple.stackexchange.com/users/28621,http://apple.stackexchange.com/questions/63147/is-mac-os-x-in-a-virtualbox-vm-suitable-for-ios-development,TECHNOLOGY,apple.stackexchange.com 4586,I can't find a PFET protected against ESD,"I like to use OmniFETs for MOSFETs because they have internal protection against ESD so I am unlikely to damage them while handling and then when they don't work I don't have to wonder if it was damaged or I have a circuit mistake. These are n-channel FETs, but now I need a p-channel FET. I tried to find one Mouser and Digikey, but was unsuccessful. Is there such a thing? It would basically be a MOSFET and a diode in one package. Other things like over-current and over-temperature protection would also be nice, but are less important. ",mccoyn,https://electronics.stackexchange.com/users/7808,"I suspect the device you are looking for is known as a ""intelligent high-side switch"" (a), (b) or a ""smart high-side switch"". Such as the following (which all mention electrostatic discharge protection in their datasheets): the STM VN540-E the INF BTS50080-1TMA the INF BTS50080-1TMB the INF BTS50085-1TMB the IRF AUIPS7081 the IRF IPS521 etc. ",davidcary,https://electronics.stackexchange.com/users/813,http://electronics.stackexchange.com/questions/25890/i-cant-find-a-pfet-protected-against-esd,TECHNOLOGY,electronics.stackexchange.com 2752,How can I tell if a downloaded ISO is complete?,"I just ran into a nasty problem with an ISO download from Microsoft. I successfully burnt it to a rewritable DVD, and copied the contents to the local hard drive on another machine, but when I went to run them they were corrupt. It turns out the download had been truncated. Now, OK, sometimes that happens - but it surprised me that the truncated file (which was only slightly more than 60% of the actual ISO) burnt successfully and seemed to be presenting me with a sensible file system, to the extent that I could (apparently) successfully copy the files. So, is there some way I could have tested the file to see if it was complete or not? The MS web site did not provide any information about the expected size, so I'm looking for a generic solution: given an ISO file which may or may not be truncated, is there some way to tell? Do commonly used CD/DVD (data) formats include any embedded information about how much data is supposed to be on the disk, or even better, some kind of CRC? A solution that detects most truncated images will be accepted, it doesn't need to be perfect. (I'd prefer something that doesn't give false positives, though.) [Addendum: a comparison of the disk burnt with the truncated image with the files extracted from the full image suggests that chunks of the data from many of the files were replaced with random information, perhaps from the contents of a previous burn to the same rewritable disk.] ",Harry Johnston,https://superuser.com/users/96662,"The ISO from the download center is the same one you can get from MSDN. The MD5 is 61c2088850185ede8e18001d1ef3e6d12daa5692 vs2010sp1dvd1.iso I hope that helps. If you don't have a MD5, you can download one here. http://corz.org/windows/software/checksum/simple-checksum.php ",surfasb,https://superuser.com/users/24500,http://superuser.com/questions/347622,TECHNOLOGY,superuser.com 3056,What is temptation?,"Temptation, in the common secular sense, seems to indicate an attraction to something. Temptation The act of tempting The condition of being tempted. Something attractive, tempting or seductive; an inducement or enticement. Pressure applied to your thinking designed to create wrong emotions which will eventually lead to wrong actions. Tempting attractive, appealing, enticing seductive, alluring, inviting Tempt (transitive) To provoke someone to do wrong, especially by promising a reward; to entice. She tempted me to eat the apple. (transitive) To attract; to allure. Its glossy skin tempted me. (transitive) To provoke something; to court. It would be tempting fate. But, as with many secular concepts that overlap religious concepts, there are often explicit theological definitions which allow the terminology to fit into religious, dogmatic, and theological discussions with less ambiguity. In this case, is there any predominating Christian/theological definition? In particular, how is temptation defined or explained in such a manner that allows Christ to have been tempted? To clarify the problem, if Christ is to be attracted to some thing, there must be some part or aspect of Christ to which some thing appeals. More significantly, Christ, in order to be tempted, must desire that thing if we are to say He is attracted to it. And if Christ is to contain a part or aspect to which some evil may be a temptation, thus arousing a desire, there could be said to be a sinful nature or component in Christ -- a contradiction of His Godliness. To illustrate the problem, one might select magnetism (or any natural force) as a natural analogy. For the effect of magnetism (sin) to attract (tempt) a material (person), the material must contain, at least to some extent, a magnetic (sinful) component. Thus, if we say that Christ is tempted in this understanding, we say that He has a sinful component. How do we Christians, Catholics, or any denomination that has a well-established concept, define or explain temptation in a non-trivial manner without requiring Christ to have a sinful nature? ",svidgen,https://christianity.stackexchange.com/users/3410,"It is what satan throws at you if you bite you sin. How to stop it. Don't take the bate. There is no such thing as sudden sin. It happen just like this you hear it in your ear, or you see it with eyes, then you want it with you heart so much you say it out your mouth then you do it ""sin"", seed time, it grew, then bam harvest you just did the will of satan. Turn that the right way and do the will God of Hearing the word, see the word want in your heart say it out your mouth harvest comes your not falling into temptation any more because the word is taking up all the space in your heart. And he that has even more shall be given. ",Bryan,https://christianity.stackexchange.com/users/3933,http://christianity.stackexchange.com/questions/14116/what-is-temptation,CULTURE,christianity.stackexchange.com 4565,Career advice – mathematics,"I really need some opinions/advice on my situation. My background I'm studying for my master degree in mathematics. I have always (since I was 14) wanted to do my own research one day. As I grew older, I knew that mathematics was what I wanted to do. So I went to the university to study mathematics. After having encountered a course in group theory I knew that I belonged to the algebraic part of mathematics. I did my bachelor project in group theory and when I became a graduate student (September 2013), I took courses and made a project supporting my interest in algebra. Along the way I created the vision that I would finish my master degree as a dedicated student in algebra. In order to realize this vision my plan was to study abroad for one semester taking new algebraic courses. The situation My situation today is that my study abroad semester begins tomorrow. As mentioned my dream is to do my own research, but more generally/important: I want to develop new ideas and be dedicated to something and I would love to follow/explore my passion. My first thought (as many other students): I should get a PhD. So I did some research and figured out that there was an available position at the university I'm currently studying at in geometric group theory. I don't know much about geometric group theory, but I do know that I love group theory. So I would really like to know if this is an opportunity or if I should just forget it. I don't want to pursue a PhD for anything in this world. I just want to stay focus on creating a meaningful work life around my passion. Any advice? Further remarks I'm a student from Denmark and I'm studying abroad in Austria for one semester. After my study abroad semester I still have to study one year for my master degree in Denmark. However this year consists of a half year with elective courses and a half year where I'm making my master's thesis. I don’t know much about the PhD position. I found it from a Google search (: “PhD position group theory”). There is only given a starting date and an e-mail address for contact. I’m going to attend a course held by the supervisor of the project, so the whole thing is a coincidence. I have investigated my opportunities for a position at my home university. One of my supervisors, a professor in group theory, told me that he couldn't offer me a position, since it was a question about money, but would like to recommend me. I don't think the university accepts PhD students without a master degree and the positions are without project descriptions. However there is also another university (in Denmark) with a talent program where it is possible to get a PhD position without having a master degree. I contacted them and they told me I should apply after my study abroad semester (because I would have a stronger profile). But I don't know my chances. ",HelloProfile,https://academia.stackexchange.com/users/12557,"I'm having a lot of trouble nailing down your question. After reading it several times, I think you mean that you have an opportunity to go on to study a PhD in geometric group theory at your current university. (Is it specifically relevant that you are going abroad tomorrow? How does this fit in with the rest?) From this I am guessing that you are not in the US, because in the US one would not have a position in ""geometric group theory"" specifically; one would just apply to the entire math department. It could be helpful to know what country you are studying in. So I think you are really asking whether you should go on to do a PhD? You say that your motivation is to do mathematical research: for that you essentially need a PhD, yes. Along the way I created the vision that I would finish my master degree as a dedicated student in algebra. Yes, okay, you're studying algebra. I feel like I'm missing some nuance here: what's the ""vision""? As mentioned my dream is to do my own research, but more generally/important: I want to develop new ideas and be dedicated to something and I would love to follow/explore my passion. Again, I feel like I'm missing a nuance. Doing your own research means precisely to developing your new ideas and being dedicated to something. Doesn't everyone want to ""follow/explore their passion""? That comes off sounding mean, which is not my intent: rather, I feel like you're trying to say something here and I'm missing it. I don't know much about geometric group theory, but I do know that I love group theory. So I would really like to know if this is an opportunity or if I should just forget it. It seems clear that a PhD in geometric group theory is an indeed an opportunity to do everything that you said you wanted to do...in geometric group theory, which is a subfield of the field that you say you like. Whether you will like GGT specifically seems best answered by learning some and finding out. If the PhD program is so specifically invested in GGT that if you find out you don't want to do GGT per se then you'll need to leave the program, then you should study GGT on your own / during your master's degree first in order to find out whether it's interesting enough to you to spend years of your life on. (I think GGT is really interesting. If I hadn't done arithmetic geometry, I think I would have had fun with it. So I assure you that there is nothing wrong with that subsubfield of mathematics!) I don't want to pursue a PhD for anything in this world. I just want to stay focus on creating a meaningful work life around my passion. Huh? This time I don't understand at all. Please elaborate/rephrase. ",Pete L. Clark,https://academia.stackexchange.com/users/938,http://academia.stackexchange.com/questions/17630/career-advice-mathematics,LIFE_ARTS,academia.stackexchange.com 2285,MonoTouch: How to save a huge PDF downloaded from an URL incrementally?,"I need to download a huge PDF file from an URL in my MonoTouch iPhone/iPad newsstand app. The PDF is too big to fit in memory, so I need to save it incrementally with NSData. My idea is the following: instead of appending all the downloaded data in NSData and at the very end of the download, when I got all data, to store it to a file, I want to execute the download asynchronously in a separate thread and append to a file each received chunk and free my memory, but be certain that if the connection is dropped or the app crashes the download would resume automatically from the last chunk without corrupting the file. What do you suggest? Is there a better method? How can I do it in MonoTouch? I did't find any documentation or code example about iOS incremental download/resume on the Xamarin website. ",Emanuele Sabetta,https://stackoverflow.com/users/959398,"You don't need NSData or anything from ObjC. You can use WebClient (http://msdn.microsoft.com/en-us/library/system.net.webclient.aspx) to achieve this in plain C#. For an example of a chunked download with progress bar, see here: http://devtoolshed.com/content/c-download-file-progress-bar ",Krumelur,https://stackoverflow.com/users/304870,http://stackoverflow.com/questions/8666648/monotouch-how-to-save-a-huge-pdf-downloaded-from-an-url-incrementally,STACKOVERFLOW,stackoverflow.com 3913,How valuable is studying cognitive psychology for UX?,"I am starting my second year in grad school and thinking about what to study. One thing that I know is good to have a grasp of is cognitive psychology. But I would like to get someones perspective. Have you studied cognitive psychology? Either 1 class or more... and what did that give you? ",JeroenEijkhof,https://ux.stackexchange.com/users/793,"Have you studied cognitive psychology? Either 1 class or more... Yes. and what did that give you? That's a difficult question. A lot of the academic cognitive psychology probably isn't that relevant to UX to be honest... (for example the language generation / comprehension bit ) Without some good guidance you could spend a lot of time reading psychology stuff, which, while interesting isn't really that relevant to UX. Which begs the next question... ",PhillipW,https://ux.stackexchange.com/users/4403,http://ux.stackexchange.com/questions/5534/how-valuable-is-studying-cognitive-psychology-for-ux,TECHNOLOGY,ux.stackexchange.com 8933,How do you deal with amends from a client?,"I'm a web designer currently working with a very demanding client. I presented them with designs back in May and I'm still working through amends with them. They are making changes to everything and although I know amends are to be expected, it's really getting to be frustrating. I'm currently working every evening on the list of new amends they have. Tiny things like ""make this blue"" or ""change the width of this"" or ""make this gap smaller"". I know amends need to be made and that's fine, but how do you handle when there are just too many? I've counted the comments on inVision and there have been 185 amends on 6 pages of a website design. Some of them change, and then change again, and then change again and again. For example they wanted to add a strapline, so I added it, adjusted all the menus to accomodate is across the 6 pages. Then they wanted to change the text, so I changed it and updated it across all 6 documents. Now that it's changed, they want to make the menu smaller so now I have to go back and change the menu again. I quoted based on time I thought it would take to complete the designs with some time for amends but I've more than tripled the time. I haven't explained to them early enough in the process that amends beyond the normal would cost them more so I'm going to have to swallow the cost this time, but should I lay this out better with future clients? How do you handle amends? Do you put an estimated time on them at the beginning, and then charge more if they go over this? Or do you do something different? ",user1486133,https://graphicdesign.stackexchange.com/users/46171,"Maybe this can help: http://freelancing.stackexchange.com/questions/3226/project-based-freelance-project-requiring-multiple-unexpected-redos-from-clien/3337#3337. I like to ask a lot of questions before getting started, prepare quick sketches, and split my projects in ""steps""; and then each step gets approved. Once a client goes back, it's a revision that is charged. I also explain to clients they have to provide their final texts and the images they want to use to avoid revisions. Always be specific and yes, explain clearly the process before you get started. But since you're already stuck with this... When clients are back to using the html site as a ""sketch zone"" as your client does, stop changing the CSS and the html, and go back to using a plan or showing them a JPG of ONE page (or sections of it). Explain them that when you start doing CSS and html, it's not the time to play around and modify things (at least not menus and big changes.) You can be nice and tell them it's for their own good since the coding requires some planning and it avoids mistakes. Don't tell stuff like ""it's easy"", they might end up believing it's truly easy for you. So take a screenshot of a main page, do the changes in Photoshop or Illustrator or Indesign, and show them a JPG ""proof"" that they will approve. Have the main layout approved first, not all 6 pages! On your proof, add a mention about ""any changes after this is approved will be charged at XX/hour"". And instead of sending that proof by email, host it somewhere and send them an url; this way it will appear at 100% in their browser and they'll have a better idea of what to expect. Personally, I like to present them 2-4 options; this way they can say they like the menu of A, the body font of B and the footer of C for example. Then I present them another set of proofs with the elements they preferred, and other options if necessary. Usually it ends up limiting the possible requests they might have because you showed them pretty much everything possible at this point! Your proofs don't need to be perfect, they're like a sketch; just do some copy/paste and move things around. Once it's approved, you can go back to coding. If you have to come back again to ""sketching"" or modify your code, start charging at hourly rate. You need to do something like this otherwise they'll keep going until december 2016 if they get all that free work from you and if you don't require them to fully approve some of your work. Right now, they're not taking any decision. PS: I don't like using design software to do sketches of the websites, and I'm sure you don't either. It's way simpler sometimes to do it straight in CSS but... the reason why you're doing this is not so much to make it faster to do the website but to make your client feel like you're also making them go back to step 1! All they want in the end is to have their website done; when you go back to showing them JPGs, they get a bit less excited and you get back some control on the situation. They will approve your JPGs proofs faster than the real website you're showing them because they will want to see the result ""live"" as soon as possible. ",go-junta,https://graphicdesign.stackexchange.com/users/44519,http://graphicdesign.stackexchange.com/questions/55932/how-do-you-deal-with-amends-from-a-client,LIFE_ARTS,graphicdesign.stackexchange.com 367,How can I resend an application on Careers?,"I applied for a job a year ago, and things didn't pan out then and I didn't hear back. I'd like to resubmit my application as the job has been reposted and my skillset has become broader, but Careers doesn't let me send an application again, it just says ""You applied for this position on {date last year}. Good luck!"" with no ""apply now"" button. In my Messages section, I can view the application but there's no way to withdraw the application or anything, and I can't even post a comment to it as I have a message saying ""You must wait until the employer responds to your application."" It's been a year; I don't think they are going to respond to the old application after so long, but I'm left with no way to resubmit my information to them. It seems counter-intuitive and unlike other job sites that you basically get only one chance to apply to a job, even if said job gets reposted at a later date. There should either be a way to resubmit an application, withdraw an application, or the system should allow reapplying after some arbitrary amount of time has passed so you aren't left seeing a job that you're a good fit for this time around but with no way to apply for it since you already applied once before. ",Wayne Molina,https://meta.stackexchange.com/users/259529,"Right now there's no way to resubmit an application. This is probably an oversight on our part considering a job listing can be re-posted years later. I'll add this our ever growing feature request Trello board. Nevermind, the devs are already looking into how to fix it as we speak. ",Juice,https://meta.stackexchange.com/users/141235,http://meta.stackexchange.com/questions/232398/how-can-i-resend-an-application-on-careers,TECHNOLOGY,meta.stackexchange.com 8190,What is Google's policy about separate content on same URLs in mobile and desktop versions?,"I'm currently developing a mobile version of my site where users' devices are automatically identified and then displayed either mobile or desktop view of the same URL. For usability purposes, I would like to display different information on certain URLs in mobile than desktop. For example, I'd prefer the content to be straight on first page on mobile, whereas my desktop root domain is a landing page. How will such arrangement affect Google's opinions about my site? Is is hurtful for my rankings? Or does Google separate desktop and mobile results? ",Kasperi,https://webmasters.stackexchange.com/users/41699,"It appears that you're worried that serving different content to mobile users than to desktop users at the same URL, using user-agent detection, might be considered a form of cloaking, and thus penalized by Google. According to the Google Webmaster Central Blog, this is not the case, provided that you do the mobile browser detection properly. Essentially, the important detail to realize is that Google's crawlers use different user-agent strings depending on whether they expect desktop or mobile content. For example, a typical user-agent string for normal Googlebot requests would be: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) whereas for requests from the mobile crawler, you'll see something like: SAMSUNG-SGH-E250/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Browser/6.2.3.3.c.1.101 (GUI) MMP/2.0 (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html) or (for smartphone requests): Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) As long as you make sure that you correctly detect the latter type of Googlebot requests (and not the former type) as mobile, and serve mobile content to them, everything should be fine. Basically, the important thing is that normal Googlebot requests need to receive desktop content, while mobile Googlebot requests need to receive mobile content. Here's a nice diagram illustrating this, from the Google Webmaster Central Blog article I linked to above: Also, to let Google's crawler know that there might be different content available for mobile browsers, you'll want to configure your web server to send the Vary: User-Agent HTTP header for any pages that you're using user-agent detection for. You'll also want to make sure to avoid common pitfalls when detecting user-agents. ",Ilmari Karonen,https://webmasters.stackexchange.com/users/12578,http://webmasters.stackexchange.com/questions/65203/what-is-googles-policy-about-separate-content-on-same-urls-in-mobile-and-deskto,TECHNOLOGY,webmasters.stackexchange.com 7183,Running ArcPy script from ArcObjects?,"the standard method requires to run ArcPy script in command line, i've struggled with it to run but without a result, i can import arcpy, set the workspace to the geodatabase path and describe the env variable using arcpy.Describe(arcpy.env.workspace).name it gives me the geodatabase name, but when i try to get featureclasses using arcpy.ListFeatureClasses() i get [], i have made sure that all the environement variables in PATH and PYTHONPATH are ok . i would like to know if there's an alternative way to run ArcPy script, like it could be run in ArcMap console, is there a way to send scripts to ArcMap console using ArcObjects, what's the difference between ArcMap console and standard command line console? so any way to run an ArcPy script using ArcObjects 10 or Arcgis Engine 10 will be very welcome. ",geogeek,https://gis.stackexchange.com/users/2969,"There may be several options. If you package your script into a toolbox you could reference your toolbox (and tool) via ArcObjects as such: IGeoProcessor2 gp = new GeoProcessorClass(); gp.AddToolbox(@""C:\YourPath\YourToolbox.tbx""); parameters.Add(@""C:\YourPath\ParamsIfYouHaveThem.gdb\ParamFC""); gp.Execute(""NameOfYourToolInsideReferencedToolbox"", parameters, null); Read more on this method here: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#executingCustomTool Or you could try this route: System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.StartInfo.FileName = @""C:\path\toYour\script.py""; proc.StartInfo.UseShellExecute = true; proc.Start() which is mentioned here: http://forums.esri.com/Thread.asp?c=93&f=993&t=276632 ",AHigh,https://gis.stackexchange.com/users/8232,http://gis.stackexchange.com/questions/28191/running-arcpy-script-from-arcobjects,TECHNOLOGY,gis.stackexchange.com 1991,"How can I learn how to lay out an ""evidence scene""?","I feel like I'm particularly bad at any kind of scene where I want to drop clues. I'm hesitant to use the term ""crime scene"" because it's not always being investigated by ""police"", and some of these times there isn't any kind of typical evidence. I'm not even 100% sure that my problem is just the scene, but rather creating enough evidence to begin with. Other aspects I struggle with is witnesses - both witnesses with knowledge, and how to reveal it. Having useless witnesses for flavor, etc. I keep feeling that in general I give too little in these scenes, and everything I give is important. Since I suspect this is a rather broad problem, I'd like to know if there are any Role Playing resources (sections of books, site, etc) that are specifically geared at teaching this portion of RPG storytelling? I'm currently playing in the ""new"" World of Darkness 2.0, but I want answers on this not tied to the game system's rules. ",xenoterracide,https://rpg.stackexchange.com/users/1015,"With questions like these, I always point to Alexandrian's Three Clue Rule essay. http://thealexandrian.net/wordpress/1118/roleplaying-games/three-clue-rule As Alexandrian says, have at least three clues per thing that you want the players to figure out. And as Bankuei says, make at least some of them obvious. Generally I use two tiers when making a mystery. There are three first tier clues that point to the person/location/thing that the players need to run into. But when the players enter the mystery, what they find first are second tier clues to the first tier clues or places they can find other second tier clues. So lets say we have a murder mystery. We come up with three first tier clues: the guy who acted as lookout while the murder was committed, the murder weapon, and the fact that the two victims knew the murderer. We decide that we have three second tier sources of clues: The two crime scenes, and the CCTV network that one player has access to. At the first crime scene are stab wounds that will match the murder weapon, a witness who saw the lookout and can describe him, and the matchbooks that the lookout dropped at his lookout point, which points to his favorite bar. At the second crime scene are stab wounds that will match the murder weapon, a witness who saw where the murderer disposed of the murder weapon, and a series of emails between the murdered and murderer which shows they had business ties. The CCTV network will show the outlook at the second crime scene, and the fact that the murderer frequently visited both victims. He looked very angry when he visited the second victim before the day before the murder. To shore up the outlook clues, we'll also decide that the outlook is a petty crook, so his name and address can be found by finding him in the criminal database (if they know what he looks like). Finally our first tier clues: The murder weapon has the murderer's finger prints and his initials on the grip. The outlook can be made to spill the beans. He knows exactly who the murderer is. And digging into the emails and other records will reveal that the three were engaged in shady business deals, where the murderer was getting the short end of the stick. ",Rubberduck,https://rpg.stackexchange.com/users/3544,http://rpg.stackexchange.com/questions/50671/how-can-i-learn-how-to-lay-out-an-evidence-scene,CULTURE,rpg.stackexchange.com 4451,Where did Kagami Taiga live when he lived in the US?,"We see a flashback to when Kagami lived in the US in episode 1 of season 2 (26Q). Judging from all the palm trees, I'd hazard a guess that he was probably in California. California also seems like the most likely option on a demographic basis (i.e. where are Japanese temporary immigrants most likely to end up?). Is it ever explicitly stated where he lived? And if it is California, is it ever stated whether he's in SoCal or NorCal (or somewhere else)? ",senshin,https://anime.stackexchange.com/users/1908,"The only indication offhand gets kinda spoilery but Character Spoiler: Unrevealed yet in the anime as of episode 1 of Kuroko no Basket S2, Alexandra Garcia, was a college champion in the NCAA from UCLA. In her retirement, she frequented betting courts on the streets (which could technically be anywhere) and eventually runs into Taiga & Himuro. Event Spoiler: Alexandra trains Taiga & Himuro as kids. Later on Taiga decides to receive training once more from his old master by returning to Los Angeles, so it's pretty suggested that everything took place in SoCal. Here's a pic of an announced airline destination: Chapter 111, page 19 from Batoto.net I tried to minimize unnecessary spoiling information. Overall, a bit circumstantial, but still enough for me to presume that they're in Southern California. ",Daz C,https://anime.stackexchange.com/users/2364,http://anime.stackexchange.com/questions/5417/where-did-kagami-taiga-live-when-he-lived-in-the-us,CULTURE,anime.stackexchange.com 3859,Update query showing old data after submitting,"I have the following code: $sql = mysql_query(""UPDATE users SET name='$name' WHERE email='$email'"") or die(mysql_error()); echo ""<h4>Your information has been updated</h4><br />""; <form method=""post"" action=""<?php echo $_SERVER['PHP_SELF']; ?>""> <p> <label for='name'>Name</label><br /><br /> <input class=""input-text required"" name=""name"" type=""text"" value=""<?php echo $row[name]; ?>"" /> </p> <p><input type=""submit"" name=""update"" value=""Update"" /></p> </form> After clicking Update, it updates the information in the database, but the <?php echo $row['name']; ?> still shows the old value. Only after refreshing the page does it show the updated information. I could have it refresh the page after updating by echoing meta refresh but I want it to still show the echo saying ""Your info has been updated"" which doesn't happen if I set it to refresh. Is there any solution? ",robk27,https://stackoverflow.com/users/1253477,"You will need to requery the database to repopulate $row or explicitly set the $row variable to your values (I would recommend repopulating it, just to be safe). Or echo $name, instead of $row[name] ",Adam Plocher,https://stackoverflow.com/users/730566,http://stackoverflow.com/questions/12763489/update-query-showing-old-data-after-submitting,STACKOVERFLOW,stackoverflow.com 2840,Cant retrieve PHP arrays outside the assigning loop,"I am trying to create a 2-dimensional array, reading specific values from a (large) met file. The arrays are empty and I dont know why. I have the following array: $varmet = array('tasmax', 'tasmin', 'pr', 'clt'); I have two loops: The first is for ($j = 0; $j <= 3; $j++) { ... I read the corresponding files and variables, etc. It works properly. Then I have the other loop for ($i = 1; $i <= 360; $i++) { .... $valor = $valor * $correctp; It works perfectly, retrieving the required value in $valor The problem arise when I want to store the value in a different array, according to the met variable: switch ($j) { case 0: $tmax[$i] = $valor; break; case 1: $tmin[$i] = $valor; break; case 2: $prec[] = $valor; break; case 3: $clt[$i] = $valor; break; } // Fin del switch } // Fin del for para un fichero met } // Fin del for para todas las varmet The $tmax, $tmin, etc. have no value, although $valor does have. Furthermore, if I assign the array within the loop (i.e. $valorest[$j][$i] = $valor) it still have the values, but not outside it. Anybody knows what I am doing wrong? ",user1369250,https://stackoverflow.com/users/1369250,"Try like this $tmax = array(); //declare this outside the loop i.e before the loop starts In switch case statement, replace the below line $tmax[$i] = $valor; with array_push($tmax,$valor); ",nithi,https://stackoverflow.com/users/738026,http://stackoverflow.com/questions/10408599/cant-retrieve-php-arrays-outside-the-assigning-loop,STACKOVERFLOW,stackoverflow.com 2179,What does the different coloured smoke in Once Upon a Time mean?,"In Once Upon a Time, when you use magic we usually see that magic looks like colored smoke/mist like in this picture. Is there a symbolic meaning behind the different colors when using magic or is it just for show? E.g. Rumplestilskins magic looks red, Zelenas is Green, Emmas is blue or maybe purple I think. Anyone know. ",Izumi-reiLuLu,https://scifi.stackexchange.com/users/20797,"I think that Emma's Magic is blue because it is light magic, rumple's is red because he has killed so many, Regina's is purple because she believes she is the most beautiful and fairest of them all, and Zelena's is green beacause of her envy of Regina, but before she became wicked, she was mad that her father didn't appreciate her and had envy over everyone else who was treated better than her. Last but not least, the good witch of the south (I think) has white magic that I think represents honesty, goodness, and wisdom ",The Doctor,https://scifi.stackexchange.com/users/40742,http://scifi.stackexchange.com/questions/55575/what-does-the-different-coloured-smoke-in-once-upon-a-time-mean,LIFE_ARTS,scifi.stackexchange.com 8513,A question on unbounded operators,"Assume that $H$ is a separable Hilbert space. Is there a polynomial $p(z)\in \mathbb{C}[x]$ with $deg(p)>1$ with the following property?: Every densely defined operator $A:D(A)\to D(A),\;D(A)\subset H$ with $p(A)=0$ is necessarily a bounded operator on $H$. That is the polynomial-operator equation $p(A)=0$ has only bounded solution. ",Ali Taghavi,https://mathoverflow.net/users/36688,"I do not think so. Observation: Without loss of generality, $p(x)$ can be taken to be monic (constant multiples won't affect either $p(A) = 0$ or boundedness). Case 1: $p$ is degree $2$. By the above reduction, $p(x) = (x - \lambda)(x - \mu)$ for some $\lambda$ and $\mu$ in $\mathbb{C}$ (since $A$ clearly commutes with itself and with $I$, and since $A$ maps $D(A)$ to itself, this decomposition is reasonable). Yet if $p(A) = 0$, take the operator $\displaystyle B = A - \frac{\lambda + \mu}{2} I$ (with the same domain), and we see that for $\displaystyle \nu = \frac{\lambda - \mu}{2}$, $B$ satisfies $(B + \nu)(B - \nu) = 0$, or $B^2 - \nu^2 = 0$. We will show that an unbounded choice of $B$ exists, satisfying $B: D(B) \to D(B)$, hence an unbounded choice of $A$ exists, with $A: D(A) \to D(A)$. Subcase 1: $\nu = 0$. Then take $H = \ell^2(\mathbb{N})$, let $H_0 = D(B)$ be the sequences with only finitely many nonzero elements, and let $B$ be the operator represented by the infinite matrix $$ \begin{pmatrix} 0 & 1 & & & & & \cdots \\ 0 & 0 & & & & & \cdots \\ & & 0 & 2 & & & \cdots \\ & & 0 & 0 & & & \cdots \\ & & & & 0 & 3 & \cdots \\ & & & & 0 & 0 & \ddots \\ \vdots & \vdots & \vdots & \vdots & \vdots & \ddots & \ddots \end{pmatrix},$$ which is clearly well-defined on $H_0$ and clearly maps $H_0$ to itself. Then $B^2 = 0$, but letting $e_j$ be the $j$th basis vector, $B e_{2j} = j e_{2j - 1}$, so clearly $B$ is unbounded. Subcase 2: $\nu \neq 0$. Then again take $H = \ell^2(\mathbb{N})$, and $H_0$ the almost-everywhere-$0$ sequences. We now define $B$ by the matrix $$ \begin{pmatrix} 0 & \nu & & & & & \cdots \\ -\nu & 0 & & & & & \cdots \\ & & 0 & 2\nu & & & \cdots \\ & & -\frac{1}{2}\nu & 0 & & & \cdots \\ & & & & 0 & 3\nu & \cdots \\ & & & & -\frac{1}{3}\nu & 0 & \ddots \\ \vdots & \vdots & \vdots & \vdots & \vdots & \ddots & \ddots \end{pmatrix}.$$ Again, $B$ maps $H_0$ to itself, and $B^2 e_j = \nu^2 e_j$ for all $j$, so $B^2 = \nu^2$ on $H_0$. Yet $Be_{2j} = j e_{2j - 1}$, so $B$ is unbounded. Case 2: $\deg p > 2$. Well, then $p(x) = q_1(x) q_2(x)$, with $\deg q_1 = 2$, $\deg q_2 \geq 1$. Again take $H$ and $H_0$ as above, and take $A$ to be an unbounded solution to $q_1(A) = 0$, satisfying $A: D(A) \to D(A)$. Then $p(A) = q_1(A) q_2(A) = 0 q_2(A) = 0$, and $A$ is unbounded. [Again, my naive factoring really depends on $D(A) \subseteq D(A^n)$, hence I am strongly using the $A: D(A) \to D(A)$ fact here.] QED. Of course, Case 2 is sort of a cheat. I think there should be a ""natural"" example in general, since you can construct unbounded examples to $A^n = 0$ by just increasing the order of the nilpotency, and $A^n = I$ by taking positive real numbers $a_1, \dotsc, a_n$ with $a_1 a_2 \dotsc a_n = 1$ and letting the building-block matrix be $$ \begin{pmatrix} 0 & a_1 & & & \cdots & & \\ & 0 & a_2 & & \cdots & & \\ & & 0 & a_3 & \cdots & & \\ \vdots & \vdots & \vdots & \ddots & \ddots & &\\ \vdots & \vdots & \vdots & \vdots & \ddots & \ddots & \\ & & & & & 0 & a_{n-1} \\ a_n & 0 & 0 & & \dotsc & 0 & 0 \end{pmatrix} $$ Then again make a block-diagonal infinite matrix such that as we repeat the blocks, $a_3, \dotsc, a_n$ are constant, and $a_1 \to \infty$ and $a_2 \to 0$ (or somesuch). ",user52733,https://mathoverflow.net/users/56229,http://mathoverflow.net/questions/178302,SCIENCE,mathoverflow.net 847,Can I use a shock pump to inflate a tube?,"I know that shock pumps are meant for high pressure applications so that they can withstand high pressures needed by suspension shocks. However, can I use a shock pump to inflate my tire in a pinch if I run out of CO2? How would it compare to a standard mini-pump in terms of volume? ",Benzo,https://bicycles.stackexchange.com/users/2997,"A shock pump is designed to fill a very small volume of space with very high air pressures. A tire pump is designed to fill a large volume of air, to relatively low pressures, pretty quickly. You can technically fill a schrader valve tube using a shock pump, but because the volume of air for each repetition of the pump will be so low, it might take a week to fill the tire. A shock pump will not mate with a presta valve at all. On a practical level, you should use a shock pump to fill your shocks, and a tire pump to fill your tires. ",zenbike,https://bicycles.stackexchange.com/users/1259,http://bicycles.stackexchange.com/questions/14643/can-i-use-a-shock-pump-to-inflate-a-tube,CULTURE,bicycles.stackexchange.com 4195,The Moon is slowly moving away from the earth. Does this mean that a total solar eclipse wasn't possible at some point in earth's history?,"When the moon was closer to earth, was it still possible to witness a total solar eclipse millions of years ago? Or was the view-able space so small that it was impractical to even witness it? ",brant,https://physics.stackexchange.com/users/17270,"The moon is moving away from Earth. So in the past it was closer and its shadow was larger so a wider area experienced a total eclipse. At some point in the future (in about 0.5 Billion years) a total solar eclipse will no longer be possible because the moon's shadow won't fall on the Earth. ",Martin Beckett,https://physics.stackexchange.com/users/2525,http://physics.stackexchange.com/questions/47829/the-moon-is-slowly-moving-away-from-the-earth-does-this-mean-that-a-total-solar,SCIENCE,physics.stackexchange.com 23,Can you book hotels on a prepaid credit card worldwide?,"I tend to stay at smaller boutique hotels or local apartments when I visit a city but recently due to some credit card issues I will need to depend on prepaid Visa. But I noticed when I try to shop online a lot of retailers don't accept prepaid credit cards so I'm thinking hotels would be even stricter. Is there a list somewhere of countries or particular hotel chains than ban prepaid cards? If so, how does one book online or reserve a room without a card? Do all hotels worldwide accept cash? ",verve,https://travel.stackexchange.com/users/2283,"TL;DR - Depends, on your pre-paid card, the hotel, and how you book the hotel. There are a few different charges to consider here: Pre-payment of the room at/shortly after booking Holding the room on a flexible booking Deposit at checkin Room charge, meals, drinks, extras etc at checkout With many OTAs and hotel websites, if you make a non flexible booking, or some kinds of flexible bookings, they will charge your card for the room rate during the booking process. With some others, they'll send your card details through to the hotel, who'll put it through their tills later. (Maybe that day, maybe during a weekly sweep). In order for this pre-payment to go through, your card will need to support offline / cardholder-not-present transactions. As long as your card advertises itself as ""suitable for online shopping"" or similar, and as long as the card issuer doesn't block travel booking, you should be fine. Speak to your card issuer to be sure. Alternately, when reserving the room, you might opt for a flexible rate where you pay at checkout, with no pre-payment. This is typically offered on the hotel's own site, and some OTAs. They will normally ask for a credit card to ""hold"" the reservation, which would be charged in the event of a no-show, but as long as you turn up as planned the card won't be charged. These rates are normally a bit more expensive than non-flexible pre-paid ones, but this style of booking should be fine on any card. At checkin, most hotels (but not all) will want to take some sort of deposit. Typically this covers any unpaid parts of the room rate, along with expected spend in the restaurant / bar / etc. The details taken would also be used in the event of damage. If you've pre-paid the room and don't plan to run up extras in the hotel, many hotels would let you not leave a deposit, but not all. Very small hotels may take a look at you, decide you look fine, and tell you to pay everything at checkout. Some hotels may want to take something no matter what. For the deposit, this is normally done as a pre-authorisation. Not all pre-paid card support this, which would be a problem. Some pre-paid cards do support it, but badly, and might take a week or so to release the reserved funds, which could be a problem. Check with your card issuer about this. Alternately, many hotels which require a deposit will be willing to take a cash deposit, but they may well want a larger cash deposit than they'd normally authorise on a credit card. (They can't charge extras to the card later for example). Expect to leave a hefty chunk of cash as a deposit, expect checkin to take a while, expect several people to count the money, bills may be checked for counterfeits, and expect a receipt at the end. Speak with the hotel first to see if they need a deposit, and if they take cash ones. As a datapoint, I once got stuck in a checkin queue behind someone doing a cash deposit, he was asked to leave something like 4 nights room rate as a deposit on a 2 night stay. Finally, we have settling up the bill at the end. If you pre-paid, and didn't eat there, you could well find there's nothing to pay, or just a few dollars / pounds / euros in city taxes. Alternately, if you didn't pre pay (or they didn't take it), ate in the restaurant lots etc, you could have a decent amount to pay here. You'll be present, so any card which supports in-person transactions will be fine for this. Well, as long as you have the money on it for the bill that is! If you did a cash deposit, you should get the choice between taking the bill off that and getting the remainder, or getting the whole deposit back in cash and paying on a card. Oh, one more possibility - charges not noticed at checkout. Maybe you forgot to tell them about the minibar charges, maybe that morning's breakfast didn't go through, something like that. If you used a credit card for the deposit, expect them to charge it to that later when they notice. If you paid cash, expect to get a bill in the mail some time later. Can it be done - sure! Can it be done at one specific hotel with one particular kind of pre-paid card on one specific rate booked one specific way? Depends... ",Gagravarr,https://travel.stackexchange.com/users/26,http://travel.stackexchange.com/questions/35395/can-you-book-hotels-on-a-prepaid-credit-card-worldwide,CULTURE,travel.stackexchange.com 2364,Scrabble variation: use double and triple word scores (but not double/triple letter scores) twice?,"Is there a popular Scrabble variation that: lets you play double/triple word scores twice, once vertically and once horizontally? does NOT let you play double/triple letter scores twice? This is how I've always played, so it surprised me to learn that official Scrabble rules do NOT permit using double/triple word scores twice. Perhaps this was true in an older version of Scrabble (I started playing in the 70s). ",barrycarter,https://boardgames.stackexchange.com/users/639,"I have certainly played Scrabble games with people that though you could re-use bonus squares, though I haven't heard of the distinction you make between word and letter bonus squares. I think this is not so much a common variation as it is a common misconception (like Free Parking in Monopoly). I have had reasonably-good success weaning people of their attachment to this non-rule by purposely making solid blocks of tiles that have to be carefully lifted and replaced for every word I play :-) ",Mark Bessey,https://boardgames.stackexchange.com/users/1191,http://boardgames.stackexchange.com/questions/9118/scrabble-variation-use-double-and-triple-word-scores-but-not-double-triple-let,CULTURE,boardgames.stackexchange.com 6435,Deciding how to articulate Baroque semiquavers,"I'm playing a movement (from a Quantz flute concerto) in 2/4 time. There are reasonably lengthy passages of semiquavers with no slurs marked. I appreciate I want to vary my articulation to make it more interesting, so how would I go about deciding where to place my slurs? Are there certain beats I shouldn't slur between because it would add emphasis in the wrong place? Of course you can't give me a definitive answer without seeing the music, but presumably there are some general rules to follow. ",8128,https://music.stackexchange.com/users/11,"Or you can always buy the book. Quantz did in fact write what many consider the definitive book on playing the baroque flute and since you are playing a piece written by him I don't see how you can go wrong following his advice. Google 'Quantz on playing the flute.' I quick note I do not have the quote handy but to paraphrase Quantz, ""repeated passages should not be played with the same articulation each time. This is dull for the listener and shows a lack of imagination on the part of the performer."" ",user10835,https://music.stackexchange.com/users/10835,http://music.stackexchange.com/questions/842/deciding-how-to-articulate-baroque-semiquavers,LIFE_ARTS,music.stackexchange.com 6181,Is it code-legal to have a circuit breaker box within a storage room?,"I am currently in the process of planning a room remodel to convert an existing bedroom into a home office and storage room. One thing that makes this conversion a little bit tricky, is the existence of a breaker box at the rear corner of the room. As you can see in the image below, we plan to have the back 5' of the room become a storage area (there would be 2' deep shelving units along the back wall, stopping short of the breaker box, we would use this area to store Christmas decorations, misc. stuff, etc..). I know it is illegal to place a breaker box in a closet that will store clothes or other combustibles. So my questions would be: 1) how would one define a storage room vs. a closet (i.e.- could this be classified as a walk in closet somehow?) and 2) with > 36"" clearance in front, and 30"" around, would this be legal? ",MarkD,https://diy.stackexchange.com/users/346,"According to 2005 NEC code 204.24 (note that newer editions may differ, but are probably only more strict in their requirements), it looks like you would not be able to store things like clothes, paper, and other combustibles in that closet, and you probably wouldn't be able to have any shelves in the closet: 240.24 Location in or on Premises (D) Not in Vicinity of Easily Ignitible Material. Overcurrent devices shall not be located in the vicinity of easily ignitible material, such as in clothes closets. Examples of locations where combustible materials may be stored are linen closets, paper storage closets, and clothes closets. Additionally, you must allow 36"" clearance in front of the panel for an area 30"" wide starting at the panel. Could you split the storage room space so you have a dedicated room for the panel, with a wall outside of the required clearance, and then have the rest of that area be the storage closet? ",geerlingguy,https://diy.stackexchange.com/users/5823,http://diy.stackexchange.com/questions/25917/is-it-code-legal-to-have-a-circuit-breaker-box-within-a-storage-room,LIFE_ARTS,diy.stackexchange.com 1694,What is the difference between the KLMN and SPDF methods of finding electronic configuration?,"I've always been puzzled by this because my teachers happen to use only the KLMN method, but what is the difference between the KLMN and SPDF methods of finding electronic configuration? ",Madhav Sudarshan,https://chemistry.stackexchange.com/users/17174,"The KLMN(OP) method is based on electron shells, with the labels KLMN(OP) being derived from an experiment in which the spectroscopist wanted to leave room for lower energy transitions in case their were any. K denotes the first shell (or energy level), L the second shell, M, the third shell, and so on. In other words, the KLMN(OP) notation only indicates the number of electrons an atom has with each principle quantum number ($n$). The SPDF notation subdivides each shell into its subshells. For further information about the other quantum numbers, especially $l$, which defines the subshell, see the accepted answer to this question: What do the quantum numbers actually signify? The K shell can hold two electrons: $n=1,\ l=0$ When $l=0$, we have an $s$ subshell, which has one orbital $m_l=0$, with room for two electrons. The L shell can hold 8 elections: $n=2,\ l=0,1$ When $l=1$, we have a $p$ subshell, which has three orbitals $m_l=-1,0,+1$, with room for 6 electrons. The L shell also has an $s$ subshell. The M shell can hold 18 electrons $n=2,\ l=0,1,2$ When $l=2$, we have a $d$ subshell, which has 5 orbitals $m_l=-2,-1,0,+1,+2$, with room for 10 electrons. The M shell also has $s$ and $p$ subshells. The N shell can hold 32 electrons! $n=3,\ l=0,1,2,3$ When $l=3$, we have an $f$ subshell, which has 7 orbitals $m_l=-3,-2,-1,0,+1,+2,+3$, with room for 14 electrons. The N shell also has $s$, $p$, and $d$ subshells. This [table here] summarizes the relationship between the two notations for all elements. Here is an example for scandium $\ce{Sc}$: Scandium has 23 electrons $Z=23$. Its electron configuration in KLMN notation is K L M N 2 8 9 2 Its SPDF notation (based on the aufbau principle) is $1s^2 2s^2 2p^6 3s^2 3p^6 3d^1 4s^2$ ",Ben Norris,https://chemistry.stackexchange.com/users/275,http://chemistry.stackexchange.com/questions/33391/what-is-the-difference-between-the-klmn-and-spdf-methods-of-finding-electronic-c,SCIENCE,chemistry.stackexchange.com 6339,Should I block bots from my site and why?,"My logs are full of bot visitors, often from Eastern Europe and China. The bots are identified as Ahrefs, Seznam, LSSRocketCrawler, Yandex, Sogou and so on. Should I block these bots from my site and why? Which ones have a legitimate purpose in increasing traffic to my site? Many of them are SEO. I have to say I see less traffic if anything since the bots have arrived in large numbers. It would not be too hard to block these since they all admit in their User Agent that they are bots. ",Frank E,https://webmasters.stackexchange.com/users/21198,"While attempting to block bots can help in free up resources and clean up your logs it’s important to note that robots.txt and even using the meta tag on pages noindex does not actually stop bots visiting your site. They can still crawl your site occasionally to see if the denied from robots has been removed. A lot of bots don’t even use a user agent and will use a standard user agent. The bots I’m referring to are typically SEO harvesting bots that scan for backlinks and not the general ones you find from search engines. Rather than blocking the bots you should just factor in these bots when counting up your visitors, after a while of actively monitoring your site your establish a rough figure which are bots. Most people care about unique visits and this rules out the bots since they are constantly returning. In this day and age there are plenty of servers, shared hosting that can handle these bots so other than pages that you don’t want indexed I see no reason why to block these types of bots. Of course you have harmful bots as well but these certainly won’t use user agent ;). Personally I believe blocking robots is a waste of time as they don’t use that much resources at all, SEO robots can help as they list your site on PR0 pages which of course increases your PageRank and there automated so you won’t get punished by them. Logs Issue You should use a proper log viewer that enables you to filter out certain requests, this makes it easier when reviewing your logs. Good viewers can filter out lots of things like normal visits, 404s' and so forth. ",Simon Hayter,https://webmasters.stackexchange.com/users/20604,http://webmasters.stackexchange.com/questions/42169/should-i-block-bots-from-my-site-and-why,TECHNOLOGY,webmasters.stackexchange.com 1285,Could Apple and Microsoft allow the GPLv3 on their locked-down devices?,"It seems that both Apple and Microsoft prohibit GPLv3-licensed software in the app stores for their locked-down devices (i.e. iOS, Windows Phone and the Metro part of Windows). I have heard various explanations for this. However: Would they even be able to allow this license in their app stores if they wanted to, or does the GPL's anti-tivoization clause already prohibit this? ",Erik,https://programmers.stackexchange.com/users/55048,"Apple effectively ban any GPL because they only allow redistribution through the store and by registered developers. So if you distribute the GPL to your users they cannot abide by it. Apple could simply allow any GPL app to be redistributed by any user through a free section of the site - but chose not to. Ironically OSX is based on a free BSD Unix kernel. Microsoft have an historical objection to ""the cancer of open source"" and their licence explicitly bans any open source licenced app that requires redistribution of source (ie GPL). This is their right, it's a business decision - just like banning sales in a particular country. As their position in the market becomes less dominant they might change their mind ",Martin Beckett,https://programmers.stackexchange.com/users/2021,http://programmers.stackexchange.com/questions/167797/could-apple-and-microsoft-allow-the-gplv3-on-their-locked-down-devices,TECHNOLOGY,programmers.stackexchange.com 679,How do I find which elements in one array aren't in another?,"I am new to programming and hence I am stuck on a basic level problem. Following is code I wrote for comparison. But the result I get does not make sense to me. I would appreciate if someone could tell me what is going wrong. There are two arrays: @array1 , @array2 of unequal length. I wish to compare both and list down values not present in @array1. my %temp = map {$_,$_}@array2; for (@array1){ next if exists $temp{$_}; open (FILE, "">>/filename"") or die ""$!""; print FILE ""$_\n""; close(FILE); } ",birdy,https://stackoverflow.com/users/131194,"See the FAQ How do I compute the difference of two arrays? How do I compute the intersection of two arrays? Adapting the code you posted: #!/usr/bin/perl use strict; use warnings; my @x = 1 .. 10; my @y = grep { $_ % 2 } @x; my %lookup = map { $_ => undef } @y; for my $x ( @x ) { next if exists $lookup{$x}; print ""$x\n""; } ",Sinan Ünür,https://stackoverflow.com/users/100754,http://stackoverflow.com/questions/1759418/how-do-i-find-which-elements-in-one-array-arent-in-another,STACKOVERFLOW,stackoverflow.com 8669,Mark: outstanding (as in: not yet known),"I’m updating my tabular CV for an application and I’d like to include my master thesis even though it’s not yet finished (soon!) and marked. So I’d like to write that the mark is still outstanding but I fear that if I simply write Master thesis: ‹topic› Supervisor: ‹supervisor› Mark: outstanding this could be misconstrued to mean that the result is in, and that it’s outstanding (as in: spectacular). What can I say here instead? It should be as salient as possible, single word preferred. I specifically want to avoid writing half a sentence. ",Konrad Rudolph,https://english.stackexchange.com/users/1637,"To be received, or to be decided? This fits into a pattern of common phrases: to be confirmed, to be announced, to be decided, which are standard enough that in many institutions they are given just as tbc, tba, tbd. To be received is less standard than these, but should be well-understood since it clearly invokes this well-known template. ",PLL,https://english.stackexchange.com/users/2587,http://english.stackexchange.com/questions/9077/mark-outstanding-as-in-not-yet-known,CULTURE,english.stackexchange.com 7736,Is it possible to connect to already running session on Xubuntu 12.04 machine?,"Previously I was connecting to my Xubuntu machine1 by running on it VNC server first and then using VNC client on machine2 to connect to machine1. The problem is that i had to login anew to my desktop, so I got new X11 session, I believe. I would like to connect to my already running X11 session if it's running. Is it possible to do that? If yes, than what should I do? Thanks in advance. ",dhblah,https://askubuntu.com/users/12185,"I install and use vino, and I believe it comes standard with regular Ubuntu (with a menu item called something like Remote Desktop). It puts a little icon in your system tray so you can easily access the program preferences. It works with any vnc client. You just have it start with your startup programs. Run /usr/lib/vino/vino-server After you login, it connects immediately to your running desktop. ",Sepero,https://askubuntu.com/users/54228,http://askubuntu.com/questions/222117/is-it-possible-to-connect-to-already-running-session-on-xubuntu-12-04-machine,TECHNOLOGY,askubuntu.com 4961,Table heading multicolumn problem,"I have the following code, which needs 2 sub-columns in the last main column. I have written code as follows: \begin{table} \centering \begin{tabular}{|c|l|c|c|} \hline \multicolumn{1}{|c|}{\bfseries First} & \multicolumn{1}{|c|}{\bfseries Characteristics} & \multicolumn{2}{|c|}{\bfseries Implemented in}\\ A&B \\ \hline a & b & c & d \\ 1 & 2 & 3 & 4\\ \end{tabular} \end{table} The result is I want the ""A"" and ""B"" as sub-column within the ""Implemented in"" column. ",Sathish Krishnan,https://tex.stackexchange.com/users/44940,"You can use \\ && A&B instead of \\ A&B. The first two && are to skip over the first two columns. Notes: As per Bernard'scmment, the multirow package was used to vertically center the first two headers across the two rows. As per @AlanMunn's comment, \cline{3-4} can be used to draw lines across specified columns. However, I would strongly recommend you have a look at the booktabs package for tables: Code: \documentclass{article} \usepackage{multirow} \begin{document} \begin{tabular}{|c|l|c|c|} \hline \multirow{2}{*}{\bfseries First} & \multirow{2}{*}{\bfseries Characteristics} & \multicolumn{2}{|c|}{\bfseries Implemented in}\\ \cline{3-4} && A&B \\ \hline %------ & b & c & d \\ 1 & 2 & 3 & 4\\ \end{tabular} \end{document} Code: booktabs \documentclass{article} \usepackage{booktabs} \usepackage{multirow} \begin{document} \begin{tabular}{c l c c} \toprule \multirow{2}{*}{\bfseries First} & \multirow{2}{*}{\bfseries Characteristics} & \multicolumn{2}{c}{\bfseries Implemented in}\\ \cmidrule(lr){3-4} && A&B \\ \cmidrule(lr){1-4} %------ & b & c & d \\ 1 & 2 & 3 & 4\\ \bottomrule \end{tabular} \end{document} ",Peter Grill,https://tex.stackexchange.com/users/4301,http://tex.stackexchange.com/questions/156384/table-heading-multicolumn-problem,TECHNOLOGY,tex.stackexchange.com 7946,Return value in bash script,"I am working with a bash script and I want to execute a function to print a return value: function fun1(){ return 34 } function fun2(){ local res=$(fun1) echo $res } when I execute func2 it does not print ""34"". Can anybody help me? ",mindia,https://stackoverflow.com/users/2496202,"Functions in Bash are not functions like in other language; they're actually commands. So functions are used as if they were binaries or scripts fetched from your path. From the perspective of your program logic there should be really no difference. Shell commands are connected by pipes (aka streams), and not fundamental or user-defined data types, as in ""real"" programming languages. There is no such thing like a return value for a command, maybe mostly because there's no real way to declare it. It could occur on the man-page, or the --help output of the command, but both are only human-readable and hence are written to the wind. When a command wants to get input it reads it from its input stream, or the argument list. In both cases text strings have to be parsed. When a command wants to return something it has to echo it to its output stream. Another oftenly practiced way is to store the return value in dedicated, global variables. Writing to the output stream is clearer and more flexible, because it can take also binary data. For example, you can return a BLOB easily: encrypt() { gpg -c -o- $1 # encrypt data in filename to stdout (asks for a passphrase) } encrypt public.dat > private.dat # write function result to file As others have written in this thread, the caller can also use command substitution $() to capture the output. Parallely, the function would ""return"" the exit code of gpg (GnuPG). Think of the exit code as a bonus that other languages don't have, or, depending on your temperament, as a ""Schmutzeffekt"" of shell functions. This status is, by convention, 0 on success or an integer in the range 1-255 for something else. To make this clear: return (like exit) can only take a value from 0-255, and values other than 0 are not necessarily errors, as is often asserted. When you don't provide an explicit value with return the status is taken from the last command in a Bash statement/function/command and so forth. So there is always a status, and return is just an easy way to provide it. ",Andreas Spindler,https://stackoverflow.com/users/887771,http://stackoverflow.com/questions/17336915/return-value-in-bash-script,STACKOVERFLOW,stackoverflow.com 8297,How to display zero value as blank cell in mac numbers 3.1,"How do I display zero value as blank cell in mac numbers 3.1 yet maintain a formula. I want a running balance column that only shows balance to the line of the last entry like a checkbook register. Thanks. ",user69881,https://apple.stackexchange.com/users/69881,"The easiest way is to use ""Conditional Highlighting..."" found under the ""Format"" menu. Select the cell you want to have blank as zero then select ""Conditional Highlighting"" you then set a highlight when the cell is equal to zero. Choose ""Custom Highlighting"" at the bottom of the style list and then you can set the text colour to white. A ""blank"" cell on zero. ",Tony Williams,https://apple.stackexchange.com/users/40544,http://apple.stackexchange.com/questions/120359/how-to-display-zero-value-as-blank-cell-in-mac-numbers-3-1,TECHNOLOGY,apple.stackexchange.com 5684,"how do i fixed divs from overlapping centered, static div on browser resize?","I am trying to build a two columned layout with a sidebar that always stays on the left side of the page with a main content area that is centered, and when the window is resized, the centered content will eventually bump up against the nav bar, but never move any further left than where it is when they touch (which would be left: 150px). Can someone help me out? Here is the CSS: @charset ""UTF-8""; /* CSS Document */ body,td,th { font-size: 16px; font-family: Verdana, Geneva, sans-serif; color: #000; } body { background-color: #FFF; margin-left: 0px; margin-top: 0px; margin-right: 15px; margin-bottom: 0px; } #nav { position: fixed; top: 0px; left: 0px; width: 150px; height: 10000px; background-color: #D61D21; text-align: right; } #nav a:link { color: #FFF; text-decoration: none; } #nav a:visited { color: #FFF; text-decoration: none; } #nav a:hover { color: #FFF; text-decoration: underline; } #main { width: 810px; height: 810px; margin: 0px auto; } and here is the html: <!DOCTYPE HTML> <html> <head> <meta charset=""UTF-8""> <title>Nick Passaro Designs</title> <link href=""css/index.css"" rel=""stylesheet"" type=""text/css""> </head> <body> <div id=""nav""> <a href=""index.php""><img src=""assets/marklogo.jpg"" width=""150"" height=""97"" border=""0"" alt=""Nick Passaro Designs""></a> <p><a href=""portfolio.php"">PORTFOLIO</a> &nbsp;</p> <p><a href=""logos.php"">LOGOS</a> &nbsp;</p> <p><a href=""print.php"">PRINT</a> &nbsp;</p> <p><a href=""web.php"">WEB DESIGN</a> &nbsp;</p> <p><a href=""photography.php"">PHOTOGRAPHY</a> &nbsp;</p> <p><a href=""contact.php"">CONTACT</a> &nbsp;</p> </div> <div id=""main""> ENTER CONTENT HERE </div> </body> </html> Any help is greatly appreciated! ",Nick Passaro,https://stackoverflow.com/users/1200780,"A neat little trick I just learned is making your #content position: relative; and then make all child elements inside it position: absolute; that way all child elements are absolute to your content area and the content will resize to any resolution. Saves me so loads of time and i can't believe how much time I used to waste laying dynamic sites out. Hope this does something for you. ",sethhoova,https://stackoverflow.com/users/1316073,http://stackoverflow.com/questions/10114974/how-do-i-fixed-divs-from-overlapping-centered-static-div-on-browser-resize,STACKOVERFLOW,stackoverflow.com 5296,Is there any performance difference between ++i and i++ in C#?,"Is there any performance difference between using something like for(int i = 0; i < 10; i++) { ... } and for(int i = 0; i < 10; ++i) { ... } or is the compiler able to optimize in such a way that they are equally fast in the case where they are functionally equivalent? Edit: This was asked because I had a discussion with a co-worker about it, not because I think its a useful optimization in any practical sense. It is largely academic. ",Anton,https://stackoverflow.com/users/341413,"In addition to other answers, there can be a difference if your i is not an int. In C++, if it is an object of a class that has operators ++() and ++(int) overloaded, then it can make a difference, and possibly a side effect. Performance of ++i should be better in this case (dependant on the implementation). ",Hosam Aly,https://stackoverflow.com/users/41283,http://stackoverflow.com/questions/467322/is-there-any-performance-difference-between-i-and-i-in-c,STACKOVERFLOW,stackoverflow.com 2537,two-way connection between SharePoint list and wiki page?,"I received an unusual request and I'm trying to figure out if it's possible: store data in a custom list to be used for a report output the formatted data to page let users edit the page page must have ""track changes"" or ""page history"" functionality (here's the kicker) edits made to the page should automatically appear in the list items I think that I could write a custom program that would output the list data to a wiki page. However, if changes were made to the wiki page, they wouldn't be reflected in the original list. Can this be done, and if so, how? ",LFurness,https://sharepoint.stackexchange.com/users/3021,"If the user really want to go this route. You need to use an event receiver associated with the pages library. On item updated you should parse the page html. Another option is to edit wiki page layout and add a data sheet (but in this case the data will be tabular) ",Amal Hashim,https://sharepoint.stackexchange.com/users/34350,http://sharepoint.stackexchange.com/questions/120164/two-way-connection-between-sharepoint-list-and-wiki-page,TECHNOLOGY,sharepoint.stackexchange.com 5582,Is there a good field methods book that covers terrestrial ecology?,"In the past I have used Limnological Analysis by Wetzel and Likens and Methods in Stream Ecology edited by Hauer and Lamberti to develop labs and research methods for courses and projects with an aquatic focus. These books detail the standard methods of lotic and lentic ecology with some emphasis on utilizing the methods in undergraduate or graduate level courses. I am now developing a biogeochemistry course that is not limited to aquatic systems and I am looking for a summary of field methods for terrestrial systems. Is there a book that summarizes terrestrial field ecology methods similar to Wetzel and Likens and Hauer and Lamberti? ",KennyPeanuts,https://biology.stackexchange.com/users/137,"Take a look at Field and Laboratory Methods for General Ecology by James E. Brower, Jerrold H. Zar, and Carl N. von Ende. If you are only interested in plant sampling techniques, an great resource published by U.S. Bureau of Land Management is Measuring & Monitoring Plant Populations by Caryl L. Elzinga, Daniel W. Salzer, and John W. Willoughby. Another great resource that covers wildlife research and management techniques (2 volume set) is The Wildlife Techniques Manual published by The Wildlife Society and edited by Nova J. Silvy. ",RioRaider,https://biology.stackexchange.com/users/1396,http://biology.stackexchange.com/questions/2455/is-there-a-good-field-methods-book-that-covers-terrestrial-ecology,SCIENCE,biology.stackexchange.com 7388,Sinks and Sources,"I need to find a differential equation $x'=f(x)$ that has three equilibrium points that are all sinks; all sources. So two differential equations total. Help! ",Sara,https://math.stackexchange.com/users/61568,"hint: pay attention root of this equation x'=f(x) is equilibrium points let $f(x_0)=0$ therefore$$if\quad f'(x_0)\lt0 \quad then\quad x_0 \quad is\quad sink $$ and $$if\quad f'(x_0)\gt0 \quad then\quad x_0 \quad is\quad source $$ now you can find $f(x)$ for ""1"" let $f(x)=(x-a)(x-b)(x)$ s.t $f'(x)=3x^2-2(a+b)+ab\lt0$ then calculate lower bound and upper bound for a,b also do it for second part $f(x)=(x-a)(x-b)(x)$ then find a,b such that $f'(x)=3x^2-2(a+b)+ab\gt0$ ",M.H,https://math.stackexchange.com/users/45906,http://math.stackexchange.com/questions/298528/sinks-and-sources,SCIENCE,math.stackexchange.com 6311,What package managers do popular Unix Distributions Use?,"I am creating a Script and I need to know what package manager each Popular Unix Distribution Uses (especially those distros that are commonly-used for Servers)... I mean: Debian uses apt-get Fedora uses yum ",ant0nisk,https://unix.stackexchange.com/users/19942,"I'll comment about the specific *BSD tools: OpenBSD. DragonFlyBSD and NetBSD. FreeBSD. Warning: the *BSD systems use the same name convention for the tools (pkg_add, pkg_info, etc) but all are completely different. ",Rufo El Magufo,https://unix.stackexchange.com/users/9316,http://unix.stackexchange.com/questions/40989/what-package-managers-do-popular-unix-distributions-use,TECHNOLOGY,unix.stackexchange.com 7790,Installing Windows 10 in VirtualBox and in MBM,"I want to be able to test out Windows 10 in VirtualBox so that I don't have to reboot to switch to my main computer, however, it would be nice if I could also, when booting, boot directly into Windows 10 without the need for VirtualBox. So basically, I want to be able to have Windows 10 on a partition, which can be booted directly or booted in VirtualBox. Is there a way to go about this? If so, does anyone know the steps required to achieve this and if there are there likely to be any problems? Any help would be appreciated. ",David,https://superuser.com/users/274535,"You should use (for example) application as: Acronis True Image or Norton Ghost or another image creating Run this program in VBox session (in Windows 10 guest) from start CD/image. Make image this guest (for example) to network disk. Next - restore these images to clean disk. And run computer from this disk. It should be run :-). But maybe is not run :-(. ",PrzemasR,https://superuser.com/users/375655,http://superuser.com/questions/819722,TECHNOLOGY,superuser.com 1065,Single entry with multiples pages,"I search how to have a entry with multiple pages if the product created has multiples colors. Indeed, i work on a product website and my client want to have the possibility to define a product in different color but he wants one channel in admin but several pages in front-end. And in search system, he wants to find only one product :-( There is a possibility (module, add-on, custom field) to have a system in admin when it's activate it's create multiple pages but with only one channel. I hope someone'll understand what i try to do :-) Thanks. ",jca0310,https://expressionengine.stackexchange.com/users/6510,"This is perfectly feasible in EE without any add-ons. Since EE doesn't really have a concept of pages, a single channel entry can appear at multiple URIs no problem - You'll just need to use some logic in your template to show the right entry. There are lots of different ways to approach this, but let's say you want your URIs to be: /products/widget-A/in/blue /products/widget-A/in/red /products/widget-B/in/blue /products/widget-B/in/red You could use a category or custom field to define the colours and then pipe the values through to a channel entries query. For example, with categories, your products/index template could look a bit like this (also using Low Seg2Cat to get the cat ID here): {exp:channel:entries channel=""products"" disable=""member_data|pagination"" dynamic=""no"" category=""{segment_4_category_id}"" url_title=""{segment_2}"" limit=""1"" } <h1>{title}</h1> {/exp:channel:entries} You could do the same thing with a custom field, such as checkboxes or radio buttons and the search parameter. Just be a little bit careful that you don't pipe URI segments directly into a channel entries tag as this could be a (minor) security risk (exposing private entries etc if you're not careful). I would usually use Stash to pre-screen/normalise any incoming segments to prevent this. ",James Smith,https://expressionengine.stackexchange.com/users/182,http://expressionengine.stackexchange.com/questions/32505/single-entry-with-multiples-pages,TECHNOLOGY,expressionengine.stackexchange.com 2808,How do I find the most populous cities in the world?,"I am attempting to plot the most populous cities on a world map. Currently, I have the line of code: numberofpeople = Map[{#, Length[CityData[#, ""Population""]]} &, CityData[All]]; which should give me the City name, and the population. However, when I type in the line of code Reverse[SortBy[numberofpeople, Last]][[1 ;; 20]] I am getting odd data, which is that the most populous cities have 1 person. Could somebody debug my code, and answer any future questions I have on the matter? Much appreciated. EDIT: How do I plot these points on a World Map? Currently I have Graphics[{EdgeForm[Black], , CountryData[#, ""SchematicPolygon""]} & /@ CountryData[]] but I have no idea what goes between the points. ",user9876,https://mathematica.stackexchange.com/users/9876,"I was gonna post this as a comment but it'll be too long. As Mr. Wizard has shown you how to obtain the most popluar cities, here is how to plot them: Graphics[{{White, EdgeForm[Black], CountryData[#, ""FullPolygon""] & /@ CountryData[]}, {PointSize[Large], Red, Tooltip[Point[Reverse[CityData[#, ""Coordinates""]]], CityData[#, ""Name""]] & /@ largeCities}}] Here, largeCities are the names of the cities without their populations. So you can do something like largeCities = Take[SortBy[numberofpeople, Last] // Reverse, 20][[All, 1]] ",RunnyKine,https://mathematica.stackexchange.com/users/5709,http://mathematica.stackexchange.com/questions/34456/how-do-i-find-the-most-populous-cities-in-the-world,TECHNOLOGY,mathematica.stackexchange.com 1571,php mysql return wrong boolean result,"I have the following query : 'SELECT Active FROM tbUsers WHERE Id=55' The Id is unique and I need just to know the status of the user if he's active yes or no. The Column Active is set as boolean in Mysql When I tried to return the result like the following (using another php function) : $result = $this->selectRow($db,""tbClass"",""Active"",""Id='$Id'""); if($result) { return ""ok"" ; } else { return ""nok"" ;) it returns 'ok' on both cases. Any idea what's wrong with it ? Here is the other function : public function selectRow($db,$tableName,$field,$where) { if($where == """") { $query = ""SELECT $field FROM $tableName""; } else { $query = ""SELECT $field FROM $tableName WHERE $where""; } $result=$db->Qry($query); if ($result) { $no_of_rows = $db->TotRows($result); if($no_of_rows == 1) { return $result; } if($no_of_rows == 0) { return ''; } if($no_of_rows < 0) { die('Invalid query: ' . $sender .""("".$query .""): "".mysql_errno()."": "". mysql_error()); return ''; } } else { die('Invalid query: ' . $sender ."": "" .$query."": "". mysql_errno()."": "". mysql_error()); return ''; } } Qry Function is the following : function Qry($sql) { if($result = mysqli_query($this->con,$sql) ) { return $result; } else { $err = ""Error: "".$sql. "" :: "". mysqli_error; die(""$err""); } } ",koul,https://stackoverflow.com/users/4297309,"Alright, so $result is a mysqli_result object. You might want to fetch the first row of that result and return the desired column. Replace return $result; with return $result->fetch_assoc()[$field]; ",Siguza,https://stackoverflow.com/users/2302862,http://stackoverflow.com/questions/30592415/php-mysql-return-wrong-boolean-result,STACKOVERFLOW,stackoverflow.com 4446,"Do Jews view Scripture as the ""word of God""?","I am curious whether Jews view Scripture (i.e. the Tanach) as ""the word of God,"" and if so, in what way? Is it ""inspired"" by God? Is it a ""product of the Spirit of God""? Is God the ""Author""? [etc.] In other words, what was God's role in the production of Scripture from a Jewish perspective? ",Jas 3.1,https://judaism.stackexchange.com/users/2657,"The traditional view: The Jewish Scripture, i.e. Tanakh, is made of 3 parts. The first part is the ""Chumash"", the five books of Moses. They were dictated word-by-word from G-d, and Moses wrote them down. (Now most of Deuteronomy is a big speech of Moses, but even so, after the fact that's what he was ordered to transcribe.) The last few verses describe Moses' death; either G-d dictated them to Joshua (Moses' successor), or Moses had to write them in advance (which must not have been fun). Just because they are the word of G-d does not mean they were intended literally; some legal material was left unclear and was accompanied by an oral interpretation, and some of the stories involving angels may have occurred during dreams or prophetic experiences. That doesn't make it any less divine. The Prophets (Joshua, Judges, Isaiah, Jeremiah, etc.) had a lower level of prophecy than Moses. Often it would involve a vision that they had to interpret; the Talmud observes that two prophets could have the same prophecy and while the overall message they would convey would be the same, the choice of words they would use would be different. Thus we would view the words of Isaiah as sacred and the message as being from G-d, but not the same word-for-word ""authorship"" compared to the first five books. The other Writings (Psalms, Proverbs, Song of Songs, etc.) were the product of divine inspiration, but not above the threshold of what we'd call ""prophecy."" (~2000 years ago it was even debated whether Ecclesiastes was truly divinely inspired or simply a great work of wisdom. It got the upvote in the end and it's included in Tanakh!) ",Shalom,https://judaism.stackexchange.com/users/21,http://judaism.stackexchange.com/questions/29780/do-jews-view-scripture-as-the-word-of-god,CULTURE,judaism.stackexchange.com 6944,Reblog yourself on Tumblr,"Recently in my timeline, I have seen users that have repeat posts from earlier such that it is in the format of a reblog. When I click on my posts I do not see the option to reblog. How to reblog oneself on Tumblr ? ",phwd,https://webapps.stackexchange.com/users/40,"Reblog is mainly for re-posting blogs by others; http://www.tumblr.com/docs/en/dashboard Reblogging lets you quickly share things you find on Tumblr. Clicking the Reblog button next to any post will create a copy on your blog, and give you a chance to include your own comments. Reblogged posts automatically include attribution to the original poster. But you can reblog yourself by doing the following; http://tumblring.net/how-to-reblog-yourself-on-tumblr/ Right Click on the following bookmarklet link – REBLOG YOUR OWN POST ON TUMBLR – and choose “Bookmark this link” Now, once you are on one of the posts of yours that you want to reblog (not the dashboard, but the article itself ) Click on the Reblogging bookmark you just saved and you will be taken to the reblogging edition screen. The bookmarklet mentioned above is; javascript:%28function%28%29%7Bwindow.location=%22http://tmv.proto.jp/reblog.php?post_url=%22%20window.location%7D%28%29%29; Hope this helps ",Whitingx,https://webapps.stackexchange.com/users/1690,http://webapps.stackexchange.com/questions/15237/reblog-yourself-on-tumblr,TECHNOLOGY,webapps.stackexchange.com 8365,Can I expect my e-mail to be routed securely?,"If I connect to my e-mail server via SSL (SMTP/SSL) and the recipient also only checks his e-mail via SSL (web/https or IMAP/SSL), does this - generally speaking - increase the security for the message content in any way? That is, will the communication between my providers e-mail server and the recipients e-mail server be ""secure""(*), or will the e-mail be delivered plain text between the servers? (*) Secure in the context of: encrypted throughout it's transit. Not secure in the sense that I'd put any really sensitive info in there. ",Martin,https://security.stackexchange.com/users/3785,"Also, bear in mind that as email is store-and-forward even if the network link is encrypted in some way, each server in the delivery chain could potentially have stored a copy of the message which would potentially be readable to an administrator. Whether this is likely or not depends entirely on who manages those servers... it might be a small risk in some cases and a huge one in others ",only1weasel,https://security.stackexchange.com/users/5542,http://security.stackexchange.com/questions/8289/can-i-expect-my-e-mail-to-be-routed-securely,TECHNOLOGY,security.stackexchange.com 3620,Collections of two-player free-form adventure ideas?,"I'm planning a short two-person (one PC, one GM) free-form session. Is there a good quality compilation of adventure outlines tuned for one-on-one play somewhere? The theme doesn't matter much, but I'd like some ideas fit for just one PC to get started. ",Tim,https://rpg.stackexchange.com/users/1548,"One of the best genres as a whole for this is Espionage and Spys... Steal liberally from every James Bond movie and book. And any other such story. Another good one, surprisingly, is the ""Rebel Scout"" in both the Star Wars and US Civil War settings. The prominent NPC in both has to do with the PC's mode of transport... in SW, it's the astromech droid; in the USCW, one's horse. Sneaking into systems/towns, finding out if that loner there is friend or foe... Related, but suitable for guest PC's as well, is the investigation based scenario. It works best when the character has a mission-based reason. But it allows stealing from just about 30-some odd TV shows. Which leads to another resource or two for ideas: TV Tropes Interned Movie DataBase (IMDB) IMDB has plot synopses for many series' episodes. Steal liberally. Pick any series with a singular main character and rip away. ",aramis,https://rpg.stackexchange.com/users/407,http://rpg.stackexchange.com/questions/6739/collections-of-two-player-free-form-adventure-ideas,CULTURE,rpg.stackexchange.com 1634,"If NASA could send a camera into a black hole, could we then see what's inside the black hole?","Inspired by Stephen Hawking I recently tripped upon an idea of what is really inside a black hole. I thought if NASA (or any other space agency) could send a super protected camera into a black hole, then we could see what's inside black hole. Is this even possible? ",Amit Joki,https://physics.stackexchange.com/users/40854,"No, not even light can escape a black hole, therefore radio will be unable to broadcast signals back to Earth. (Radio is a form of light) ",user37390,https://physics.stackexchange.com/users/37390,http://physics.stackexchange.com/questions/99678/if-nasa-could-send-a-camera-into-a-black-hole-could-we-then-see-whats-inside-t,SCIENCE,physics.stackexchange.com 1915,"What type of lubricant should be used on PVC windows, and how often should it be applied?","As far as I know, the lifespan of PVC windows is highly dependent on periodic lubrication. What kind of oil should I use to lubricate the moving metal parts of my PVC windows? Additionally, what should be the time span between two applications of the lubricant? ",Mehper C. Palavuzlar,https://diy.stackexchange.com/users/769,"Quality sliding PVC windows use rollers. Keep the tracks clean, using a slightly damp lint-free cloth. The rollers take care of themselves. On cheap PVC sliders, I use paste wax after cleaning the slot with a slightly damp lint-free cloth. You can also use spray silicone. Clean the track with a slightly damp lint-free cloth. Spray the silicone on another lint-free cloth and wipe the track down. Don't use any petroleum lubricants on PVC if you want it to last. ",Fiasco Labs,https://diy.stackexchange.com/users/7020,http://diy.stackexchange.com/questions/62897/what-type-of-lubricant-should-be-used-on-pvc-windows-and-how-often-should-it-be,LIFE_ARTS,diy.stackexchange.com 617,Is it possible to create your own server on the Xbox 360?,"Is it possible to create your own server on the Xbox 360? ",Render,https://gaming.stackexchange.com/users/8523,"You cannot make your own servers hosted from your local xbox, the reason for this and the six player minimum is because of cheaters. A lot of people stat pad, or find methods of getting points quickly and effortlessly to rank up. It was a massive problem in Battlefield 2 and is still a problem in BF3. EA claims they went through and wiped accounts that showed signs of cheating, but I still see players with rediculous ranks, so they failed. ",Emerica.,https://gaming.stackexchange.com/users/15996,http://gaming.stackexchange.com/questions/36135/is-it-possible-to-create-your-own-server-on-the-xbox-360,CULTURE,gaming.stackexchange.com 1840,Where do the bodies of the dead Tributes go?,"I've only seen the movie-version of The Hunger Games, and have yet to read the books. Is it explained where the bodies of the dead Tributes go, if they are removed at all? ",System Down,https://scifi.stackexchange.com/users/887,"Hovercrafts are instantly dispatched to recover the body, perhaps to prevent cannibalism, which was an issue in previous Games: There was a guy like that a few years ago from District 6 called Titus. He went completely savage and the Gamemakers had to have him stunned with electric guns to collect the bodies of the players he'd killed before he ate them. There are no rules in the arena, but cannibalism doesn't play well with the Capitol audience, so they tried to head it off. There was some speculation that the avalanche that finally took Titus out was specifically engineered to ensure the victor was not a lunatic. And on the hovercraft to retrieve bodies quickly: Suddenly, the birds fall silent. Then one gives a high-pitched warning call. A single note. Just like the one Gale and I heard when the redheaded Avox girl was caught. High above the dying campfire a hovercraft materializes. A set of huge metal teeth drops down. Slowly, gently, the dead tribute girl is lifted into the hovercraft. Then it vanishes. The birds resume their song. This may have been the same hovercraft: ",Solemnity,https://scifi.stackexchange.com/users/11262,http://scifi.stackexchange.com/questions/34313/where-do-the-bodies-of-the-dead-tributes-go,LIFE_ARTS,scifi.stackexchange.com 450,How are integers internally represented at a bit level in Java?,"I am trying to understand how Java stores integer internally. I know all java primitive integers are signed, (except short?). That means one less bit available in a byte for the number. My question is, are all integers (positive and negative) stored as two's complement or are only negative numbers in two's complement? I see that the specs says x bit two's complement number. But I often get confused. For instance: int x = 15; // Stored as binary as is? 00000000 00000000 00000000 00001111? int y = -22; // Stored as two complemented value? 11111111 11111111 11111111 11101010 Edit To be clear, x = 15 In binary as is: `00000000 00000000 00000000 00001111' Two's complement: `11111111 11111111 11111111 11110001` So if your answer is all numbers are stored as two's complement then: int x = 15; // 11111111 11111111 11111111 11110001 int y = -22 // 11111111 11111111 11111111 11101010 The confusion here again is the sign says, both are negative numbers. May be I am misreading / misunderstanding it? Edit Not sure my question is confusing. Forced to isolate the question: My question precisely: Are positive numbers stored in binary as is while negative numbers are stored as two's complement? Some said all are stored in two's complement and one answer says only negative numbers are stored as two's complement. ",Kevin Rave,https://stackoverflow.com/users/668650,"Java integers are of 32 bits, and always signed. This means, the most significant bit (MSB) works as the sign bit. The integer represented by an int is nothing but the weighted sum of the bits. The weights are assigned as follows: Bit# Weight 31 -2^31 30 2^30 29 2^29 ... ... 2 2^2 1 2^1 0 2^0 Note that the weight of the MSB is negative (the largest possible negative actually), so when this bit is on, the whole number (the weighted sum) becomes negative. Let's simulate it with 4-bit numbers: Binary Weighted sum Integer value 0000 0 + 0 + 0 + 0 0 0001 0 + 0 + 0 + 2^0 1 0010 0 + 0 + 2^1 + 0 2 0011 0 + 0 + 2^1 + 2^0 3 0100 0 + 2^2 + 0 + 0 4 0101 0 + 2^2 + 0 + 2^0 5 0110 0 + 2^2 + 2^1 + 0 6 0111 0 + 2^2 + 2^1 + 2^0 7 -> the most positive value 1000 -2^3 + 0 + 0 + 0 -8 -> the most negative value 1001 -2^3 + 0 + 0 + 2^0 -7 1010 -2^3 + 0 + 2^1 + 0 -6 1011 -2^3 + 0 + 2^1 + 2^0 -5 1100 -2^3 + 2^2 + 0 + 0 -4 1101 -2^3 + 2^2 + 0 + 2^0 -3 1110 -2^3 + 2^2 + 2^1 + 0 -2 1111 -2^3 + 2^2 + 2^1 + 2^0 -1 So, the two's complement thing is not an exclusive scheme for representing negative integers, rather we can say that the binary representation of integers are always the same, we just negate the weight of the most significant bit. And that bit determines the sign of the integer. In C, there is a keyword unsigned (not available in java), which can be used for declaring unsigned int x;. In the unsigned integers, the weight of the MSB is positive (2^31) rather than being negative. In that case the range of an unsigned int is 0 to 2^32 - 1, while an int has range -2^31 to 2^31 - 1. From another point of view, if you consider the two's complement of x as ~x + 1 (NOT x plus one), here's the explanation: For any x, ~x is just the bitwise inverse of x, so wherever x has a 1-bit, ~x will have a 0-bit there (and vice versa). So, if you add these up, there will be no carry in the addition and the sum will be just an integer every bit of which is 1. For 32-bit integers: x + ~x = 1111 1111 1111 1111 1111 1111 1111 1111 x + ~x + 1 = 1111 1111 1111 1111 1111 1111 1111 1111 + 1 = 1 0000 0000 0000 0000 0000 0000 0000 0000 The leftmost 1-bit will simply be discarded, because it doesn't fit in 32-bits (integer overflow). So, x + ~x + 1 = 0 -x = ~x + 1 So you can see that the negative x can be represented by ~x + 1, which we call the two's complement of x. ",0605002,https://stackoverflow.com/users/1102056,http://stackoverflow.com/questions/13422259/how-are-integers-internally-represented-at-a-bit-level-in-java,STACKOVERFLOW,stackoverflow.com 4815,"When cellphone providers give ""unlimited social networking"", how do they identify the traffic?","Some providers will give unlimited traffic for things like Facebook, Twitter, LinkedIn and even YouTube in some rare cases on smartphones. I'm wondering if there's any documented way they identify this traffic. Not for malicious purposes but from an ethical standpoint I'm curious as to how they keep the data at bay. On first glance, I would assume an IP filter and payload size checks but I wonder if anyone has any better theories or resources? ",Vaughan Hilts,https://security.stackexchange.com/users/11907,"I would think that a combination of checking DNS queries and IP filters would be the easiest way. The IP addresses for the allowed list of sites should be known. I can't think of any reason they would need anything more advanced. ",AJ Henderson,https://security.stackexchange.com/users/12578,http://security.stackexchange.com/questions/31523/when-cellphone-providers-give-unlimited-social-networking-how-do-they-identif,TECHNOLOGY,security.stackexchange.com 3559,How can I find out which server OS a particular site is running?,"Is there a way to check which server OS a particular site is running. For example from linux command line. Maybe via telnet? But all I can get from ""telnet www.google.com http"" is: Trying 209.85.173.104... Connected to www.l.google.com. Escape character is '^]'. Can somebody dwell on the subject if possible at all? ",ervv,https://serverfault.com/users/115509,"Many sites will tell you in the HTTP headers: $ curl -s -I hotmail.com | grep Server Server: Microsoft-IIS/7.5 $ curl -s -I pinterest.com | grep Server Server: nginx/0.8.54 Some include the OS and sometimes version: $ curl -s -I linuxquestions.com | grep Server Server: Apache/2.2.9 (Unix) $ curl -s -I red.com | grep Server Server: Apache/2.2.3 (Red Hat) $ curl -s -I slashdot.org | grep Server Server: Apache/2.2.3 (CentOS) $ curl -s -I bar.com | grep Server Server: Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.8 Some write their own web serving software: $ curl -s -I google.com | grep Server Server: gws $ curl -s -I yahoo.com | grep Server Server: YTS/1.20.10 But some don't send the Server header: $ curl -s -I serverfault.com HTTP/1.1 200 OK Cache-Control: public, max-age=41 Content-Length: 129706 Content-Type: text/html; charset=utf-8 Expires: Tue, 27 Mar 2012 13:01:46 GMT Last-Modified: Tue, 27 Mar 2012 13:00:46 GMT Vary: * Date: Tue, 27 Mar 2012 13:01:04 GMT $ curl -s -I www.facebook.com HTTP/1.1 302 Found Location: http://www.facebook.com/common/browser.php P3P: CP=""Facebook does not have a P3P policy. Learn why here: http://fb.me/p3p"" Set-Cookie: datr=sbpxT_PpXR9FO5mMTy8pCTjD; expires=Thu, 27-Mar-2014 13:03:45 GMT; path=/; domain=.facebook.com; httponly Content-Type: text/html; charset=utf-8 X-FB-Debug: VJycxKwQ9bAV0Z/n6jfN1WSFx4pqj2337c1jc+pPlE0= X-Cnection: close Content-Length: 0 Date: Tue, 27 Mar 2012 13:03:45 GMT Any or all of these could be lying. Bart's suggestion of nmap is more likely to be accurate but cannot produce 100% accurate results for the reasons he mentioned. It doesn't even make sense sometimes, for instance with the number of servers that are involved in fulfilling a single HTTP request at Google, their web servers, search servers, database servers, caching servers and whatever else they run could all potentially be using different operating systems and you would have no way of knowing. ",Ladadadada,https://serverfault.com/users/26130,http://serverfault.com/questions/373917,TECHNOLOGY,serverfault.com 6810,Protractor test vs long-polling,"I have an Angular web app that continuously listens for notifications from the backend via long-poll: scope.notification = $resource('/notification').get(); This request never completes in the test environment. This is a problem for Protractor, because it wants to wait for all outstanding HTTP requests to finish. I see a number of potential solutions, but have some issues with all of them. I do not see a way to tell Protractor to ignore this request. Issuing it from $interval (which itself is ignored) is not a solution. Protractor will not wait for the request to be sent, but once it's sent, it will still wait for it to complete. So I'm trying not to send this request when running the tests. But how do I know I'm in a test? I could add a flag to the URL (?protractor=true). But my web app modifies the URL all the time, so it would get cleared quickly. I tried setting a variable: browser.executeScript('window.runningProtractorTests = true;'); But it seems Protractor will wait for the page to sync first before running executeScript. And I'm sending the request right away when the page loads. I could set a cookie. But it's fairly cumbersome, e.g. I'd have to load the page twice. (See issue 341 for more difficulties.) I could set a user agent. It's not easy either. I would need to set browser flags for each browser in the config file. I do not want to completely override the user agent (to Protractor, for example) out of fear that my libraries may rely on interpreting the user agent string, so I'd have to figure out the right string. I could check if the server is running on a specific port. But then a year from now someone will try to run the production server on the same port and not understand why the notifications don't work. Making the test backend complete the request immediately does not help, because it's immediately sent again whenever it completes. But I guess I could introduce a special ""you are in a test"" notification and stop the polling when this is received. This would mean a (small) change to our protocol, so I'd rather avoid it if possible. Is there no straightforward way to do this? ",Daniel Darabos,https://stackoverflow.com/users/3318517,"Can you put the calls to $resource into a service which you mock out using Protractor's browser.addMockModule()? That way, Protractor will always override your original service before it has a chance to run. This could look something like // in your application myModule.service('myNotificationService', function($resource) { this.notification = $resource('/notification').get(); }); // In your Protractor test browser.addMockModule('notificatonOverride', function() { angular.module('notificationOverride').service('myNotificationService', function() { this.notification = {}; // or whatever you need here. }); }); ",Jmr,https://stackoverflow.com/users/2316696,http://stackoverflow.com/questions/26973127/protractor-test-vs-long-polling,STACKOVERFLOW,stackoverflow.com 8196,iMessage Weird Behavior,"I have multiple mobile devices (2x iPhone, 2x iPad) in my home, all which share the same iTunes account between them. When iMessage is used to exchange messages between two of the devices (e.g. the two iPhones), the messages appear to be sent from and received by the same identity. The only way I have found to correct this by turning off iMessage on one of the devices and only using SMS. Is there a way to associate iMessage with a different iTunes account than other apps on the same device? ",AJ.,https://apple.stackexchange.com/users/7001,"If you go into Settings > Messages, you should be able to choose which email addresses you get iMessages to. It's under the Receive At option which let's you input additional email addresses. Additionally, you can even sign out of your iMessage account without affecting the iTunes account by tapping on the name of the account you are currently signed in as (on the same screen). Here's what it looks like on an iPhone: ",Senseful,https://apple.stackexchange.com/users/218,http://apple.stackexchange.com/questions/45050/imessage-weird-behavior,TECHNOLOGY,apple.stackexchange.com 9313,Mazda Air Mass Meter - where can I buy one?,"I have a 1993 Mazda 323 estate (GLXI 1.6l petrol). It's not been terribly reliable and has suffered from inconsistent idle - sometimes idling fast (~1500 rpm) and sometimes erratically and sometimes cutting out when stopped at lights. The last mechanic I took it to said it was probably a problem with the air mass meter - he did some 'bodges' on it to try and get it working but the car has still failed to start on one occasion. It seems to start and drive ok at the moment, but I'm not sure how much longer it will continue to do so! Is this likely a problem with the air mass meter or is it likely to be something else? Also, does anyone know where I could get hold of a new one? (I'm based in the UK) ",Matthew Dresser,https://mechanics.stackexchange.com/users/559,"I don't know about Mazda, but some manufacturers still stock parts for older vehicles - it might be worth asking at the parts desk at your nearest dealer. It's not the sort of part I'd expect a normal motor factor to stock, although they might still be able to get hold of one. Your best bet is probably to try one of the bigger parts chains such as eurocarparts (who, despite the name, also sell bits of japanese cars), unipart or camberley auto factors (the latter is local to the Berkshire/Hampshire/Surrey area, but I think they do mail order) ",Nick C,https://mechanics.stackexchange.com/users/373,http://mechanics.stackexchange.com/questions/2062/mazda-air-mass-meter-where-can-i-buy-one,CULTURE,mechanics.stackexchange.com 6911,"If $f: \mathbb Q\to \mathbb Q$ is a homomorphism, prove that $f(x)=0$ for all $x\in\mathbb Q$ or $f(x)=x$ for all $x$ in $\mathbb Q$.","If $f: \mathbb Q\to \mathbb Q$ is a homomorphism, prove that $f(x)=0$ for all $x\in\mathbb Q$ or $f(x)=x$ for all $x$ in $\mathbb Q$. I'm wondering if you can help me with this one? ",Mirna,https://math.stackexchange.com/users/36579,"I understand that we're looking at rationals as a ring (as a group it is obviously false). Pick an arbitrary homomorphism $\varphi:\mathbf Q\to \mathbf Q$. Put $e:=\varphi(1)$. If $e=0$, then for any $x\in \mathbf Q$ we have $\varphi(x)=\varphi(1)\varphi(x)=0\cdot\varphi(x)=0$, so $\varphi$ is zero. If $e\neq 0$, then $e\cdot e=\varphi(1)\varphi(1)=\varphi(1\cdot 1)=e$, so $e=1$ (since $e\neq 0$ and $0,1$ are the only solutions of the equation $x^2-x=0$). Furthermore, for any $\frac{p}{q}$ we have $1+\ldots+1=p\cdot 1= p=\frac{p}{q}+\ldots \frac{p}{q}=q\cdot \frac{p}{q}$, so $e+\ldots +e=p\cdot e= q\cdot \varphi(\frac{p}{q})$, so $\varphi(\frac{p}{q})=e\cdot \frac{p}{q}=\frac{p}{q}$ and we're done (for negative $p$ we can use $\frac{p}{q}=(-1)\cdot \frac{-p}{q}$ so $\varphi(\frac{p}{q})=-e\cdot\varphi(\frac{-p}{q})=\frac{p}{q}$). ",tomasz,https://math.stackexchange.com/users/30222,http://math.stackexchange.com/questions/175477/if-f-mathbb-q-to-mathbb-q-is-a-homomorphism-prove-that-fx-0-for-all-x,SCIENCE,math.stackexchange.com 18,"multiple keys via HKDF - whats better, one or two applications of HKDF-extract","Assume for the sake of the question that I have two variable-length bit strings, each with 128 bit cryptographic randomness, and I want to extract two 128 bit keys via HKDF-SHA256. Which alternative is better (if any), and why? Use a single HKDF-extract on the concatenation of the two strings, and two HKDF-expands with different info strings to get two 128 bit keys. Use two HKDF-extract operations, one for each bit string, and use a single HKDF-expand on each to get two 128 bit keys. Or in other words, is it better to HKDF-extract on a longer IKM string and use multiple HKDF-expands, or is it better to use HKDF on independent but shorter IKMs. My intuition tells me that, if my randomness strings are really as good as I claim, then two independent HKDF extracts are better, but using a single one on the concatenation is, in practice, just as safe, and safer if my input randomness is not actually as good as assumed, so two HKDFs might be more robust in practice. ",Marc Lehmann,https://crypto.stackexchange.com/users/7672,"Realistically, it probably doesn't matter, if all of your premises are accurate. If it were me, I'd probably concatenate the inputs, then apply a HKDF to the concatenation to derive two keys -- but honestly, it's unlikely to matter. This is very unlikely to be the weakest link in your system. Pick something that's easy to implement and easy to understand, and move on: focus your energy on some other aspect of your system. ",D.W.,https://crypto.stackexchange.com/users/351,http://crypto.stackexchange.com/questions/9318/multiple-keys-via-hkdf-whats-better-one-or-two-applications-of-hkdf-extract,TECHNOLOGY,crypto.stackexchange.com 3044,Spokes keep breaking - bad hub or bad build?,"Background information A bit of background information (I'll try keep it brief): Last year I bought an old but unused bike, 5 speeds with internal gearing. Apparently the shop bought a lot of bikes somewhere in the 90's (not sure), but never got around to selling them. When I bought it, it was wrapped in plastic, had been stored in the shop's stock house for about 20 years and free of corrosion. I'm about 95 kilos, thread quite hard but rides exclusive to paved bike paths. The original, 20(?) year-old wheel lasted me a year with no problems. The front wheel is still fine and true. Spokes breaking - and getting replaced After a little under a year, I suddenly noticed that a few spokes had broken. On closer inspection, quite a few were too loose. Should have noticed sooner but didn't. I took it to a shop, where they advised me to have the wheel rebuilt which I paid them to do. The gearing being internal, the new rims and spokes were built on the existing hub. After just two weeks, the back wheel suddenly began to feel wobbly on my way to work. As careful as I could, I drove the bike back to the shop. Almost all spokes were terribly loose. They retensioned the wheel free of charge (of course) and sent me on my way. The following weeks, I periodically checked that all spokes were still tensioned. 2,5 months later, I noticed three of the spokes were broken close to the hub. Went back to the shop and had the spokes replaced (free or charge). 1 month later I noticed 2 broken spokes and had those replaced as well. They seemed less eager to keep fixing the wheel free of charge, and when I asked why the spokes kept breaking, the guy muttered something about the hub holes maybe had burrs due to wear. Now, a few weeks later, I find another spoke broken. My gut tells me this all stems from a bad build, that quickly lost tension and thus damaged the spokes. I find the explanation about a worn hub a bit far fetched, but I don't have the knowledge to dismiss the theory. Questions Is there any way this is not the shop's fault? - A bad build? Cheap spokes? Improperly tensioned? Given the wheel's history, is there any point in keep replacing spokes, a couple at a time, or should I get the wheel rebuilt (preferably at the shop's expense)? Could the hub in any way be to blame for this? Thank you! Update Oct 24th I've been trying to get in touch with the manager of the shop throughout the week. Failed again to reach him this morning, so I figured I'd have a chat about my problem with one of the guys on the floor. Tried to get him to provide at least a theory of why my spokes keep breaking, but not much came out of it really. He mentioned that he've seen, on rare occasaions, that a worn hub could cut the spokes (could be the same guy as I spoke to last time). I'll check the hubs as soon as possible, as @Daniel R Hicks suggested. Due to plumbing work in our appartment, I haven't been home or able to check my bike all week. If I don't see any indicatations that the spokes were put in the wrong way, I'm going to follow the advice most of you have, and take my bike to another shop for advice and repair. Thanks so far! - I'll update you after I've payed the other shop a visit. Update Nov 3rd Took the bike to the other shop, told them the story. Let them decide to replace the broken spoke or them all. They decided to replace just the broken spoke with a DT spoke (what ever that means). They also trued the wheel, which had gotten a slight ""eggy"" shape. My fingers are crossed that this wheel will last now. Once again, thank you all for your input! Anecdotal Update In case anyone follows... Since the last repair at the other shop, the wheel kept being in good shape. Finally, my spokes stayed tensioned, wheels stiff and true - the long struggle was finally over. Alas, the joy didn't even last a month... Going home from a company party, I returned to my bike I parked at the train station, only to find out that some punk kids had apparently tossed it to the ground, and jumped both wheels badly out of shape. Front wheel had to be replaced and back wheel was in desperate need for a trueing. sigh Sorry for the melodrama, just thought I'd update you the faith of my bike ;-). ",abstrask,https://bicycles.stackexchange.com/users/3123,"If the wheel keeps on failing - for some unidentified reason - you have to review the variables: - the rim - the hub - the spokes - the construction From your description it's probably not the rim and, like @Daniel says, 'burrs on the hub' sounds like some fake techno-jargon you're being fobbed off with. It certainly sounds like the spokes are failing to do the job the wheel builder is expecting of them. I'm a similar size and when I had some wheels made recently the builder used tandem spokes for their extra strength. Every little helps. That said, it sounds like, unless you've a particular reason to keep with them, finding another shop might keep you safe and sane - and a second opinion is rarely a bad thing in this sort of situation. ",Unsliced,https://bicycles.stackexchange.com/users/425,http://bicycles.stackexchange.com/questions/12756/spokes-keep-breaking-bad-hub-or-bad-build,CULTURE,bicycles.stackexchange.com 3697,Differences between PS3 and Wii version of Rock Band The Beatles,"I'm considering buying Rock Band The Beatles for my only gaming console, the Nintendo Wii, but I was wondering if there are any big differences between the version on Wii and the version on Playstation 3? ",runaros,https://gaming.stackexchange.com/users/2968,"AFAIK, there is no difference between PS3 and Wii version. The only difference I know for this game: The Xbox 360 version of ""Rock Band: The Beatles"" has an exclusive song (All you need is love) which the PS3 and Wii don't have; but the song is available for download on the Wii and PS3. ",Mehper C. Palavuzlar,https://gaming.stackexchange.com/users/145,http://gaming.stackexchange.com/questions/5707/differences-between-ps3-and-wii-version-of-rock-band-the-beatles,CULTURE,gaming.stackexchange.com 8812,Count values in multiple columns based on ranges in first column,"I have a 7 different columns with various attributes & 500 rows with corresponding values for these attributes [Numbers,texts,YES/No etc]..Example only 2 column with values shown. 1st column have range & rest 6 have values need to be counted based on the ranges. Column 1 is called level , I have levels from 1 to 7....this will repeat for next groups. Level 1 is main level & remaining levels [2 to 7] are sub levels. Need to find missing value counts for this group and subsequent groups. PS: this is for a Bill OF material [BOM] example Level Number Description - 1 6586 ABC 2 6579 XYZ 3 6689 3 7854 123 4 6011 GHF G1 4 OOPO YUI 4 5589 OIK 5 2132 6 4178 BUY - 7 7145 CRI * 1 8245 WES 2 6666 RED 3 1025 TRY G2 3 9898 UIO 4 4567 POL 5 1234 WIP 6 987 III * 7 7787 RTE + 1 6652 WED 2 5425 3 9899 TRY G3 3 6452 OOP 4 3452 POE 5 7890 6 LLK + 7 8889 RET Result expected [Aim is to find count of missing/wrong values] Main ITEM Number Description G1 1 3 [1 text in number column,2 blank/1 number in Dsecr column] G2 0 0 [ 0 error , as both columns filled proeprly] G3 1 2 [1 blank in Number column,2 blanks in Descr. column] Name & description corresponding to level 1 are always constant. To make things bit more clear... If i use MATCH function with lookupvalue ABC it will give position 3 & MATCH function for WES will give posiiton 9. Based on this range ,Row 3 to row 8,[Row 9 will start of anotther range] need count of blanks or texts for NUMBER,Count of blanks for DESCRIPTION and some other attributes which i have not included here. ABC is a group with 2 to 7 sub levels 1 6586 ABC 2 6579 XYZ 3 6689 3 7854 123 4 6011 GHF 4 OOPO YUI 4 5589 OIK 5 2132 6 4178 BUY 7 7145 CRI WES is a group with next 2 to 7 sub levels 1 8245 WES 2 6666 RED 3 1025 TRY 3 9898 UIO 4 4567 POL 5 1234 WIP 6 0987 III 7 7787 RTE WED is next group 1 6652 WED 2 5425 3 9899 TRY 3 6452 OOP 4 3452 POE 5 7890 6 LLK 7 8889 RET ",user3286682,https://stackoverflow.com/users/3286682,"In cell D2 type =if(A2="""","""",if(A2=1,C2,C1)) This will associate main level name with all subgroups. In cell E2 type =if(A2="""","""",if(B2="""",E1+1,E1)) This will running count blanks in the numeric column for the main level In cell F2 type =if(A2="""","""",if(AND(B2>-1,B2<10000),F1+1,F1)) This should running count non-numeric in the numeric column. In cell G2 type =if(A2="""","""",if(C2="""",G1+1,G1)) This should running count blanks in the description column I don't have excel on this machine so this is untested. Update for group sequence: In cell H2 type =if(A2="""",H1+1,H1) This should generate a higher number sequence when the group changes. In cell I2 type =""G""&H2 This gets the H columns sequence and prefixes G by concatenation If you paste all these functions down to the end of your data block, you should then be able to do a pivot table to ""compress"" everything into what you need as described in your specifications. You can put the ""I"" and ""D"" columns in the row area of the pivot. Double click each of these and for subtotals, select none. The ""E"", ""F"" and ""G"" columns in the value area, double click each and pick ""max"". Move the values to ""columns"" if the are vertically arranged. ",bf2020,https://stackoverflow.com/users/3038209,http://stackoverflow.com/questions/21643832/count-values-in-multiple-columns-based-on-ranges-in-first-column,STACKOVERFLOW,stackoverflow.com 2445,Can I use Flatiron's resourceful in express?,"Is it possible to use Flatiron's resourcefull (ODM) in express.js? ",dev.pus,https://stackoverflow.com/users/1309847,"There's nothing in Resourceful that is specific to any other package; the readme at https://github.com/flatiron/resourceful does a good job of showing how you would use this package in any project (not just Express-based ones). ",Michelle Tilley,https://stackoverflow.com/users/62082,http://stackoverflow.com/questions/11231491/can-i-use-flatirons-resourceful-in-express,STACKOVERFLOW,stackoverflow.com 6403,"Loading and unloading ""chunks"" of tiles in a 2d tile engine with 2d camera","I am making a 2d tile based game in C# and XNA 4.0. I am having trouble loading and unloading ""chunks"" of tiles(blocks). The whole world is randomly generated and is infinate on both axis. How would I go about loading and unloading chunks of tile data in the camera's view? A pastebin to the pastebin links(I still have the 2 link cap): http://pastebin.com/9PYr8cvC ",ceriosNerd,https://gamedev.stackexchange.com/users/14120,"Basically you want to have a range around your camera. When chunks come into this range, you load/generate them. When chunks leave this range, you save/unload. Keep in mind you'll want to keep the loaded range larger than the visible range, so your chunk loading isn't seen. At the moment it looks like you're storing your chunks in a dictionary. That's kind of a strange choice, and it may be a little more work for you to maintain your chunks with that data structure. It looks like you've got a lot of the functions you need already, nice work. You'll want a list of chunk positions that should be loaded, your loaded list. Your update loop is going to maintain that list. As the camera moves, you update the list to include all the chunks in the range of the camera. This is where the dictionary choice is a little strange. Essentially you'd have to loop through all your dictionary entries, unload the chunks that aren't in your loaded list and load the ones that aren't in your dictionary but are in your loaded list. The alternative is to have some sort of linked list structure. Where you can add/remove chunks from either end. This does get a little tricky when dealing with 2D linked lists, but I think you can make it work. It would look something like this: Starting with this scenario, where the red dot is the camera, moving in the X plus direction. All the grid squares (chunks) touching the green area are currently loaded. Then the camera moves far enough to get some new chunks: All the blue chunks will be loaded/generated. All the red chunks will be unloaded/saved. As for maintaining the list, you can update whenever the camera moves past a chunk boundary. Like if it moves past the X plus boundary of the chunk it's currently over, like in the example above, the chunks to be added or removed from the list could be found like this: for(int y = Camera.Position.Y + LoadRange.Y; y >= Camera.Position.Y - LoadRange.Y; y--){ AddToLoadedList(GetChunkRootPositionAt(Camera.Position.X + LoadRange.X, y)); RemoveFromLoadedList(GetChunkRootPositionAt(Camera.Position.X - LoadRange.X, y)); } Where GetChunkRootPositionAt converts a world position into the root position of the chunk that contains that location. And the LoadedList functions take a Vector2 to add/remove from the loaded list. Finally, you may find adding in a buffer for unloading could be nice. If someone is moving the camera around a lot right on a chunk boundary, you can save a lot of loading/unloading by just keeping it loaded. Essentially, you may find that unloading at the same time as loading isn't necessarily the best option. ",MichaelHouse,https://gamedev.stackexchange.com/users/7191,http://gamedev.stackexchange.com/questions/25030/loading-and-unloading-chunks-of-tiles-in-a-2d-tile-engine-with-2d-camera,TECHNOLOGY,gamedev.stackexchange.com 9012,"""going to"" vs ""will""","I know several questions were asked about the difference between ""going to"" and ""will"". Based on several answers (see, for instance, here, here and here), I understood that ""will"" is more spontaneous and ""going to"" is used with more planned actions. So, it seems that everything is pretty fine. However, in this question, Kosmonaut has an answer in which he states: ""Let's say that tomorrow you will walk your dog from 7 - 8 AM"". On the one hand, you probably planned to walk your dog long before and thus I should use ""Let's say that tomorrow you're going to walk your dog from 7 - 8 am"". On the other hand, since I'm saying ""let's say..."", I'm deciding right now (thus, unplanned) that you will walk your dog. So, even though in this hypothetical situation you made a plan, I'm in a more spontaneous mood deciding right now that that's what you will do tomorrow, and, thus, I should use ""will"". Which one (if any) of the above explanations is right? ",Manoel Galdino,https://english.stackexchange.com/users/21109,"In most contexts, I am going to [verb] and I will [verb] are interchangeable. Sometimes the former may place more emphasis on the fact of your current intention/expectation, where the latter emphasises the future action. There are some contexts where the difference is clear, and this may have some bearing on why OP thinks there's a planned/spontaneous distinction (usually there isn't). Say you're round a friend's house watching a football match on TV, and at half-time the beer runs out... You: ""I'll nip down the shop and get some more beer."" Friend: ""It's raining - I'll find my umbrella for you."" If you reply ""Don't bother - I'm going to use my car"", the implication is you had already decided you were going to use the car before you first said you'd get the beer. But if you say ""Don't bother - I will use my car"", this implies you just made that decision in response to what your friend said. @Peter Shor mentions another context (""It's going to/It will bite!"") where native speakers often make a distinction. In that case, going to usually signifies immediate danger (it's just about to bite), but will can just mean it's bitten others before, and will/may bite you soon if you're not careful (effectively, the same as ""Careful! It bites!"" where present tense indicates ""habitual"" action). Kosmonaut's ""Let's say that tomorrow you will walk your dog"" isn't really relevant to the current issue. It could just as well have been ""...tomorrow you are going to walk..."" or even just ""...tomorrow you walk..."". They all mean the same, and in that context there's no real reason to prefer one over another. ",FumbleFingers,https://english.stackexchange.com/users/2637,http://english.stackexchange.com/questions/87900/going-to-vs-will,CULTURE,english.stackexchange.com 636,"""God is Fire"": Trying to Source an Analogy for Prayer","I remember reading once a very clever analogy, which I was sure that I had found in the writings of Yeshayahu Leibowitz (who sourced it, from memory, in the writings of the Rav, R' Yosef Ber Soloveitchik, who himself sourced it in the Rambam), but I can no longer locate it at all. In essence, the analogy stated that God is like fire. Different objects, when dropped into the fire, react differently. Some become hard. Some become soft. Some let off smoke. Some change their hue. Some make a noise. Some might explode. But while all of these different reactions can be found, at no stage is the fire anything other than a fire; the difference in responses to it is to be found in the different objects that come into contact with it. So too, the analogy concluded, when it comes to our relationship with God. When we pray, we change ourselves in order that God might interact more favourably with us. We do not hope for God to change in any way, but for ourselves to change instead. God's influence upon the world is constant and unchanging; it is we who are in flux. Does this analogy sound familiar to anybody? If you can direct me to a printed source (be it in the writings of the Rav, or Prof. Leibowitz, or whomever it was who came up with this), I would be much obliged. ",Shimon bM,https://judaism.stackexchange.com/users/1659,"From zaq's answer to a related question: In the Moreh Nevuchim [(Part 1 ch.53)], Rambam explains how God's attributes should be understood without compromising God's unchangingness. He compares God's mood to a fire. If you put ice in a fire, it melts, then evaporates. If you put clay in a fire, it hardens. If you put wood in a fire it burns... The fire causes many different and contrasting effects without changing the fire's properties. The same ""fire melts certain things and makes others hard, it boils and burns, it bleaches and blackens."" It is the properties of each individual material that elicit a different interactions with fire. ",ray,https://judaism.stackexchange.com/users/1857,http://judaism.stackexchange.com/questions/30015/god-is-fire-trying-to-source-an-analogy-for-prayer,CULTURE,judaism.stackexchange.com 5874,Should I avoid credit card use to improve our debt-to-income ratio?,"We put all our expenses on a credit card and pay it off every month in order to get maximize our cash back. We never charge more than we have in the checking account, so we always pay it off. Should we reconsider doing this in order to improve our debt-to-income ratio? Our goal is to be in the best position possible to get a mortgage in the next 3-12 months. ",JHFB,https://money.stackexchange.com/users/6182,"For scoring purposes, having a DTI between 1-19% is ideal. From Credit Karma: That being said, depending on the loan type you looking at receiving (FHA, VA, Conventional, etc), there are certain max DTIs that you want to stay away from. As a rule, for VA, you want to try to stay away from 41% DTI. Exceptions are made for people with sufficient funds in the bank (3-9 months) to go to higher DTIs. If you keep a 19% utilization overall, that will get you a higher score but it will also show that you have a monthly payment on a particular revolving credit account. While the difference between 729 and 745 seems like a lot of points, there are rules as to how the interest rates are determined. So you will find that many banks have the same or similar rates due to recent legislation in Dodd-Frank. In the days of subprime mortgages, this was not the case. Adjustable rate mortgages did not necessarily go away, the servicer just has to make sure that the buyer can weather the full amount once it reaches maturity, not the lower amount. That is what got a lot of people in trouble. From ""how interest rates are set"": Before quoting you an interest rate, the loan officer will add on how much he and his branch want to earn. The branch or company sets a policy on how little that can be (the minimum amount the loan officer adds on to his cost) but does not want to overcharge borrowers either (so they set a maximum the loan officer can charge) Between that minimum and maximum, the loan officer has a great deal of flexibility. For example, say the loan officer decides he and his branch are going to earn one point. When you call and ask for a rate quote, he will add one point to the cost of the loan and quote you that rate. According to the rate sheet above, seven percent will cost you zero points. Six and three-quarters percent will cost you one point. In our example, at 7.125% the loan officer and branch would earn one point and have some money left over. This could be used to pay some of the fees (processing, documents, etc), which is how you get a ""no fees -no points"" mortgage. You just pay a higher interest rate. Where this scoring helps you is in credit card interest rates and auto loan and personal loan rates, which have different rate structures. My personal opinion is to avoid the use of the credit cards. Playing games to try to maximize your score in this situation won't help you when you are talking about 20 points potentially. If you were at the bottom level and were trying to meet a minimum score to qualify, then I would recommend you try to game this scoring system. Take the extra money you would put on a credit card and save it for housing expenses. Taking the Dave Ramsey approach, you should have at least $1000 in emergency funds as most problems you encounter will be less than $1000. That advice rings true. ",Brian,https://money.stackexchange.com/users/897,http://money.stackexchange.com/questions/30939/should-i-avoid-credit-card-use-to-improve-our-debt-to-income-ratio,LIFE_ARTS,money.stackexchange.com 4634,Application deployment using MDT with no access to network.,"Is it possible to install ONLY software using MDT via USB? I don't want to deploy OS as don't want to lose the licence. I would like to achieve this scenario: Laptop with installed Windows 8.1 USB stick with MDT on it is plugged in I run silent deployment of software using the wizard. Other bits to clarify: I don't want to run MDT connected to network I don't want to install OS from scratches ",Okrx,https://serverfault.com/users/167602,"Read this and ignore the OS part. http://www.vkernel.ro/blog/creating-an-offline-mdt-deployment-media ",Elliot Labs,https://serverfault.com/users/216286,http://serverfault.com/questions/630849,TECHNOLOGY,serverfault.com 6410,How can I upgrade my processor from X3065 to X3220?,"I have a Dell Poweredge R200 server which has an ancient Xeon 3065 processor. I see in the servers specs that it can accommodate Xeon 3200 series, but not sure if I buy a bare-boned Xeon 3220 processor (without heatsink etc.) , will it fit easily on motherboard? If not, what exactly should I buy to upgrade my processor? Thanks ",alfish,https://serverfault.com/users/58595,"It will physically fit yes, they're both LGA775 chips but the 3220 has a TDP of nearly twice that of the 3065, you may have heat management issues that would affect the life of your server. ",Chopper3,https://serverfault.com/users/1435,http://serverfault.com/questions/264105,TECHNOLOGY,serverfault.com 2439,Create heatmap with PSTricks or TikZ,"I have a huge amount of 2D-coordinates, associated with a value, e.g.: x | y | value 27.50 52.15 12.51 61.83 13.32 57.56 36.23 21.83 41.73 40.46 85.67 25.20 ... The data is not tabular and I Want the points between two data-points to be interpolated in some way (which way is not really clear, yet) I want to preset the data as heatmap like this: Is there any ready-to-use package for PSTricks or TikZ to do it? ",user2033412,https://tex.stackexchange.com/users/35228,"You can also use pgfplots. I use the same data and the same number of point of Herbert, and the default matlab color map. You have to compile the following code with LuaLaTeX because it needs a lot of memory. It needs also a lot of time (about 2 minutes in my PC) so its better to compile it once and then insert the pdf file of your graph as an image. \documentclass[border=10pt]{standalone} \usepackage{pgfplots} \usepackage{xcolor} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis}[ colormap/jet, colorbar, view={0}{90}] \addplot3[surf,shader=flat] file {data-map.dat}; \end{axis} \end{tikzpicture} \end{document} ",Red,https://tex.stackexchange.com/users/31093,http://tex.stackexchange.com/questions/133882/create-heatmap-with-pstricks-or-tikz,TECHNOLOGY,tex.stackexchange.com 3580,Displaying images in draft mode for books,"I am writing my thesis in draft mode. \documentclass[dissertation,draft]{univthesis} The univthesis is a dissertation template like a book. However, when I include figures, I only see the figure name and box enclosing it. When draft mode is removed, I get what I want. So, I was wondering if there is a way to display images even in draft mode. I have both .eps and .pdf files in the current directory. ",discipulus,https://tex.stackexchange.com/users/102941,"Try using the following setup: \RequirePackage{graphicx} \documentclass[dissertation,draft]{univthesis} This loads graphicx before the draft option is set. Alternatively (preferred), don't load graphicx but reset the package option using \setkeys{Gin}{draft=false} Gin contains the family of keys associated with graphics/graphicx. ",Werner,https://tex.stackexchange.com/users/5764,http://tex.stackexchange.com/questions/162387/displaying-images-in-draft-mode-for-books,TECHNOLOGY,tex.stackexchange.com 99,"Can a card be un-cast, if the player realises it was a bad decision?","Let's say a player casts a spell, completely allows it to resolve, and accepts its consequences - then realises that was a bad idea, or there was something better to do. That player realises there was a better card to play, or that the spell will do something they don't want to happen, such as deal enough damage to that player to kill them. Does the caster have the opportunity to go back and fix that mistake (and to stay alive), even though they already accepted the consequences? ",Marath the commander,https://boardgames.stackexchange.com/users/7225,"Depends on what you mean by ""misused"". If the card was cast illegally, such as trying to Shock a creature with Hexproof, the game is rewound to the point immediately before the spell was cast. This does depend on how much time has passed- if so much time has passed that fixing it would be difficult, just correct anything currently illegal and continue the game. If a player just did something silly, like trying to Shock a creature that actually had 3 toughness because of a Glorious Anthem, the answer is no in any tournament setting. Once you've taken an action, you can't suddenly change your mind. In casual play, it's up to the opponent. If the opponent decides it's sporting to allow take-backs, they can allow them. ",Studoku,https://boardgames.stackexchange.com/users/6951,http://boardgames.stackexchange.com/questions/15042/can-a-card-be-un-cast-if-the-player-realises-it-was-a-bad-decision,CULTURE,boardgames.stackexchange.com 3938,MS-Access VBA Date() works on one PC but not others,"I am designing my first database from the ground up and I have learned a lot in the last few weeks. One thing that has been eating at me though is that on my login page I have a simple unbound text box with its control source as =Date(). This works perfectly well on the computer I use most days, but any other computer in the facility I am working out of displays #NAME? instead of the date. I have tried changing to =Now() and it works fine on all computers. Apparently only =Date() has issues. If the fields control source is changed back to =Date() I am informed that The function you entered can't be used in this expression. I have checked the MS-Access versions and tried on a machines with and without access. I really need Date() to work because it is used elsewhere in more vital areas of my code and I may not be able to use Now() in its place. Any ideas as to why this may not work on any PC besides my own? ",ctall,https://stackoverflow.com/users/5149553,"Date() is controlled by the Visual Basic For Applications X.XX reference. Make sure the reference is installed and any competing references are removed. To do this, open the VBA window and go to Tools --> References and ensure the proper one is checked. ",Johnny Bones,https://stackoverflow.com/users/2174085,http://stackoverflow.com/questions/31596191/ms-access-vba-date-works-on-one-pc-but-not-others,STACKOVERFLOW,stackoverflow.com 1903,Mystery cards in Magic 2015 card list,"If you look at the full card list for Magic 2015, at Gatherer or elsewhere, you'll see a bunch of cards listed with collectors number 270-284. What are these cards, and why are they listed as being part of Magic 2015? I played enough M15 Limited to be pretty sure that they aren't actually present in packs, and they're listed after the basic lands, which is very unusual. Is there some secret, bonus release of M15 that had these extra cards? ",JSBձոգչ,https://boardgames.stackexchange.com/users/156,"These are cards which you can get in the M15 learn to play packs. You can get these at your local (WPN) game store, but are mostly given to players which are new to the game. ",Ivo Geersen,https://boardgames.stackexchange.com/users/5859,http://boardgames.stackexchange.com/questions/19165/mystery-cards-in-magic-2015-card-list,CULTURE,boardgames.stackexchange.com 7980,"Solve for time, given distance and acceleration","Two gangsters are flying down I-70 West at a constant 108 hm/hr. If they make it to Indiana, they will be safe. When they are 1 km away from the Indiana border, while still traveling at a constant 108 km/hr, they pass a concealed police car hidden in a speed trap. At the instant that the criminals pass the patrol car, the cop pulls onto the highway and accelerates at a constant rate of 2 m/s^2. Does the cop catch up with them before they cross the state line? Here's what I have progressed so far ΔV = (ΔX)/(T) when V is velocity, X is distance, and T is time. 108 = (1 - 0)/T 108T = 1 T = 1/108 T = 0.00925 hours T = 0.00925 * 60 * 60 T = 33.33 seconds (this is the time it takes the gangsters to get to the borders of Indiana) What I am stuck at is the time it takes the cop to travel the same distance. I have used the distance formula to find time as follows: Xf = Xi + 1/2 * A * T^2 where A is acceleration Since the cop is starting from rest, the initial velocity is 0 (zero), so 1 = 0 + 1/2 * (2) * T^2 1 = T^2 T = 1 seconds So it takes the cop 1 seconds to travel the whole mile to Indiana? What am I doing wrong? ",Brian Lindsey,https://math.stackexchange.com/users/123222,"Converting the gangsters' speed to ms$^{-1}$, $108$ km/h $=108/3.6$ ms$^{-1} = 30$ ms$^{-1}$. The distance the cop travelled in time $t$ s is $\frac12at^2 = t^2$ metres, and the distance the gangsters travelled in time $t$ s is $30t$ metres. The time when they met the second time is $$\begin{align*}t^2 =& 30t\\t=&30\text{ seconds}\end{align*}$$ Then the distance they have travelled in $30$ seconds is $900$ metres, and this is before they arrive Indiana. ",peterwhy,https://math.stackexchange.com/users/89922,http://math.stackexchange.com/questions/648400/solve-for-time-given-distance-and-acceleration,SCIENCE,math.stackexchange.com 3005,How to solve this stochastic integrals?,"how can I solve these two stochastic integrals? $$\int_0^T B_t\,dB_t$$ $$\int_0^T f(B_t)\,dB_t$$ where B_t is the BM. Thank you very very much! ",Jorko,https://math.stackexchange.com/users/80606,"Besides applying the Itô formula, there is also the possibility to calculate a stochastic integral using approximation by step functions. It works fine for the integral $\int_0^T B_t \, dB_t$: Let $$f_n(t,\omega) := \sum_{j=1}^n 1_{[t_{j-1},t_{j})}(t) \cdot B_{t_{j-1}}(\omega)$$ where $\Pi_n$ is a partition of $[0,T]$ such that $$\max_{t_j \in \Pi_n} |t_j-t_{j+1}| \to 0 \qquad (n \to \infty)$$ Since the Brownian motion has continuous paths, it's not difficult to show that $(f_n)_{n \in \mathbb{N}}$ is an approximating sequence as required in the definition of the stochastic integral, therefore $$\int_0^T f_n(t) \, dB_t \stackrel{L^2}{\to} \int_0^T B_t \, dB_t \qquad (n \to \infty)$$ By definition, it's easy to calculate the stochastic integral of step functions: $$\int_0^T f_n(t) \, dB_t = \sum_{j=1}^n B_{t_{j-1}} \cdot (B_{t_{j}}-B_{t_{j-1}}) \tag{1} $$ On the other hand, we have $$\begin{align} B_T^2 &= \left( \sum_{j=1}^n B_{t_j}-B_{t_{j-1}} \right) \cdot \left( \sum_{k=1}^n B_{t_k}-B_{t_{k-1}} \right) =\underbrace{\sum_{j=1}^n (B_{t_j}-B_{t_{j-1}})^2}_{\stackrel{L^2}{\to} T} + 2 \underbrace{\sum_{j=1}^n B_{t_{j-1}} \cdot (B_{t_j}-B_{t_{j-1}})}_{\stackrel{(1)}{\to} \int_0^T B_t \, dB_t}. \end{align}$$ Thus, $$B_T^2 = T + 2 \int_0^T B_t \, dB_t.$$ ",saz,https://math.stackexchange.com/users/36150,http://math.stackexchange.com/questions/408918/how-to-solve-this-stochastic-integrals,SCIENCE,math.stackexchange.com 4621,How to store length of time in a model with Rails?,"I can think of two solutions: 1) Store hours, minutes, seconds, etc. in separate columns in the database Downside: a lot of columns 2) Convert and store the number of seconds We still want to be able to show seperate fields for hour, minute, second, etc. in the form. We could write virtual attribute for each of these and write a before_save callback that converts the timespan to seconds (still messy tho). Am I missing some other obvious solution? How do you people do this? ",randomguy,https://stackoverflow.com/users/377920,"I vote for a single column to keep track of durations. That keeps the duration normalized, whereas you'll need to do almost as much work or more to normalize multi-column durations. Rails (activesupport) also gives you wonderful methods to work with time. For example, if your duration is in seconds, you can easily add the duration in seconds to a point in time and get an end time: end_time = Time.now + duration_in_secs It is a bit more work using virtual attributes to separate it out, but in my experience, it's not that more work. perhaps there is a plugin or gem that simplifies it. ",edk750,https://stackoverflow.com/users/622139,http://stackoverflow.com/questions/5532817/how-to-store-length-of-time-in-a-model-with-rails,STACKOVERFLOW,stackoverflow.com 557,Making sure that you have comprehended a concept,"Hi, I have a question that I've been thinking about for a long time. How can you assure yourself that you've fully comprehended a concept or the true meaning of a theorem in mathematics? I mean how can you realize that you totally get the concept and it's time to move on to the next pages of the book you're reading? Thanks in advance for your responses. ",Axiom,https://mathoverflow.net/users/3124,"Although we all want to ""understand the concepts"", I would encourage you to measure how well you are learning mathematics not by whether you ""understand a concept"" or not (because this is in the end too vaguely defined) but by whether you can use what you have learned to do something useful. For students, this usually means doing the problems at the end of the section or chapter. For those using mathematics as a tool (like Steve Huntsman), it means writing software that uses the mathematics learned. For both students and professionals, it also often means working out the details usually via computations of examples that illustrate what you have just learned. And, of course, if you are or are striving to be a pure mathematician, it can also mean using what you learned to prove other mathematical statements you want or need. If you are able to do any of these things with what you have just learned, then you should definitely move along to the next thing. Because, as others have already advised you, you might want to move along, even if you can't do anything useful yet. When learning mathematics, you should definitely try to be able to do something useful (e.g., work out examples and/or solve problems) with most of what you are learning. However, everybody runs into things that just don't sink in despite intensive effort. As long as you're learning most of everything else, it is often advisable to just move ahead and return later after you know more and are more experienced. Everything gets easier, if not on the second try, usually by the tenth. ",Deane Yang,https://mathoverflow.net/users/613,http://mathoverflow.net/questions/26950,SCIENCE,mathoverflow.net 8222,"Magento: Display custom product price in product listing, view page and also set same price after adding product to cart","I need to display custom price for each product where the admin will set different price for each product. and this product price only should be displayed in product listing and product view page, without changing the product actual price. And also the same price should apply to the cart. I tried with catalog_product_get_final_price observer, but It shows the price as special price but it will not change the display of product price. Please give me an idea, how can I do this? Thanks in advance:) ",SKumar,https://stackoverflow.com/users/3484766,"on list page and view page just check whether your custom price is null nor not if it is null show original price and if it not null show custom price. create a event in config file **checkout_cart_product_add_after** as given below <events> <checkout_cart_product_add_after> <observers> <unique_event_name> <class>modulename/observer</class> <method>modifyPrice</method> </unique_event_name> </observers> </checkout_cart_product_add_after> </events> create new file **Observer.php** class namespace_modulename_Model_Observer { public function modifyPrice(Varien_Event_Observer $obs) { // Get the quote item $item = $obs->getQuoteItem(); // Ensure we have the parent item, if it has one $item = ( $item->getParentItem() ? $item->getParentItem() : $item ); // Load the custom price $price = $this->_getPriceByItem($item); // Set the custom price $item->setCustomPrice($price); $item->setOriginalCustomPrice($price); // Enable super mode on the product. $item->getProduct()->setIsSuperMode(true); } protected function _getPriceByItem(Mage_Sales_Model_Quote_Item $item) { $price; //use $item to determine your custom price. return $price; } } ",Manoj Chaurasia,https://stackoverflow.com/users/3256230,http://stackoverflow.com/questions/25347405/magento-display-custom-product-price-in-product-listing-view-page-and-also-set,STACKOVERFLOW,stackoverflow.com 6605,HowTo: Add Class to Sidebar Widget List-Items,"The newest version of Bootstrap (v3.0) adds a new List Group component which has the following structure: <ul class=""list-group""> <li class=""list-group-item"">Cras justo odio</li> <li class=""list-group-item"">Dapibus ac facilisis in</li> <li class=""list-group-item"">Morbi leo risus</li> <li class=""list-group-item"">Porta ac consectetur ac</li> <li class=""list-group-item"">Vestibulum at eros</li> </ul> I would like to be able to add a class to the ul (i.e. <ul class=""list-group"">) I would like to style my Category sidebar widget to support this new component, but as you see, this requires classes on each li item. In reading some similar posts, one option I found is to use jQuery to add the class to each li, but I am concerned about the dreaded FOUC. Is there some WordPress function that gets me to my goal? Please advise, Update: I was able to add classes to the individual li's by creating a Custom Walker which extends Walker_Category (see code below), but this still does not get me to the ul which also needs a class added (eg <ul class=""list-group"">). class Walker_Category_BS extends Walker_Category { function start_el( &$output, $category, $depth = 0, $args = array() ) { extract($args); $cat_name = esc_attr( $category->name ); $cat_name = apply_filters( 'list_cats', $cat_name, $category ); $link = '<a href=""' . esc_url( get_term_link($category) ) . '"" '; if ( $use_desc_for_title == 0 || empty($category->description) ) $link .= 'title=""' . esc_attr( sprintf(__( 'View all posts filed under %s' ), $cat_name) ) . '""'; else $link .= 'title=""' . esc_attr( strip_tags( apply_filters( 'category_description', $category->description, $category ) ) ) . '""'; $link .= '>'; $link .= $cat_name . '</a>'; if ( !empty($feed_image) || !empty($feed) ) { $link .= ' '; if ( empty($feed_image) ) $link .= '('; $link .= '<a href=""' . esc_url( get_term_feed_link( $category->term_id, $category->taxonomy, $feed_type ) ) . '""'; if ( empty($feed) ) { $alt = ' alt=""' . sprintf(__( 'Feed for all posts filed under %s' ), $cat_name ) . '""'; } else { $title = ' title=""' . $feed . '""'; $alt = ' alt=""' . $feed . '""'; $name = $feed; $link .= $title; } $link .= '>'; if ( empty($feed_image) ) $link .= $name; else $link .= ""<img src='$feed_image'$alt$title"" . ' />'; $link .= '</a>'; if ( empty($feed_image) ) $link .= ')'; } if ( !empty($show_count) ) $link .= ' (' . intval($category->count) . ')'; if ( 'list' == $args['style'] ) { $output .= ""\t<li""; $class = 'list-group-item cat-item cat-item-' . $category->term_id; if ( !empty($current_category) ) { $_current_category = get_term( $current_category, $category->taxonomy ); if ( $category->term_id == $current_category ) $class .= ' current-cat'; elseif ( $category->term_id == $_current_category->parent ) $class .= ' current-cat-parent'; } $output .= ' class=""' . $class . '""'; $output .= "">$link\n""; } else { $output .= ""\t$link<br />\n""; } } /* end start_el */ } /* end Walker_Category_BS */ Update 02: After viewing default-widgets.php in the core, I decided to create a new widget (WP_Widget_Categories_BS, see code below) wherein I basically, copied all the code from the default category widget and simply modified the the UL to add the necessary class. <?php /** * Categories widget class * * @since 2.8.0 */ class WP_Widget_Categories_BS extends WP_Widget { function __construct() { $widget_ops = array( 'classname' => 'widget_categories_bs', 'description' => __( ""A list or dropdown of categories for Bootstrap 3.0"" ) ); parent::__construct('categories', __('Boostrap Categories'), $widget_ops); } function widget( $args, $instance ) { extract( $args ); $title = apply_filters('widget_title', empty( $instance['title'] ) ? __( 'Categories' ) : $instance['title'], $instance, $this->id_base); $c = ! empty( $instance['count'] ) ? '1' : '0'; $h = ! empty( $instance['hierarchical'] ) ? '1' : '0'; $d = ! empty( $instance['dropdown'] ) ? '1' : '0'; echo $before_widget; if ( $title ) echo $before_title . $title . $after_title; $cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h); if ( $d ) { $cat_args['show_option_none'] = __('Select Category'); wp_dropdown_categories(apply_filters('widget_categories_dropdown_args', $cat_args)); ?> <script type='text/javascript'> /* <![CDATA[ */ var dropdown = document.getElementById(""cat""); function onCatChange() { if ( dropdown.options[dropdown.selectedIndex].value > 0 ) { location.href = ""<?php echo home_url(); ?>/?cat=""+dropdown.options[dropdown.selectedIndex].value; } } dropdown.onchange = onCatChange; /* ]]> */ </script> <?php } else { ?> <ul class=""list-group""> <?php $cat_args['title_li'] = ''; wp_list_categories(apply_filters('widget_categories_args', $cat_args)); ?> </ul> <?php } echo $after_widget; } function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); $instance['count'] = !empty($new_instance['count']) ? 1 : 0; $instance['hierarchical'] = !empty($new_instance['hierarchical']) ? 1 : 0; $instance['dropdown'] = !empty($new_instance['dropdown']) ? 1 : 0; return $instance; } function form( $instance ) { //Defaults $instance = wp_parse_args( (array) $instance, array( 'title' => '') ); $title = esc_attr( $instance['title'] ); $count = isset($instance['count']) ? (bool) $instance['count'] :false; $hierarchical = isset( $instance['hierarchical'] ) ? (bool) $instance['hierarchical'] : false; $dropdown = isset( $instance['dropdown'] ) ? (bool) $instance['dropdown'] : false; ?> <p><label for=""<?php echo $this->get_field_id('title'); ?>""><?php _e( 'Title:' ); ?></label> <input class=""widefat"" id=""<?php echo $this->get_field_id('title'); ?>"" name=""<?php echo $this->get_field_name('title'); ?>"" type=""text"" value=""<?php echo $title; ?>"" /></p> <p><input type=""checkbox"" class=""checkbox"" id=""<?php echo $this->get_field_id('dropdown'); ?>"" name=""<?php echo $this->get_field_name('dropdown'); ?>""<?php checked( $dropdown ); ?> /> <label for=""<?php echo $this->get_field_id('dropdown'); ?>""><?php _e( 'Display as dropdown' ); ?></label><br /> <input type=""checkbox"" class=""checkbox"" id=""<?php echo $this->get_field_id('count'); ?>"" name=""<?php echo $this->get_field_name('count'); ?>""<?php checked( $count ); ?> /> <label for=""<?php echo $this->get_field_id('count'); ?>""><?php _e( 'Show post counts' ); ?></label><br /> <input type=""checkbox"" class=""checkbox"" id=""<?php echo $this->get_field_id('hierarchical'); ?>"" name=""<?php echo $this->get_field_name('hierarchical'); ?>""<?php checked( $hierarchical ); ?> /> <label for=""<?php echo $this->get_field_id('hierarchical'); ?>""><?php _e( 'Show hierarchy' ); ?></label></p> <?php } } // end WP_Widget_Categories_BS Combined with a Custom Walker I created (Walker_Category_BS) I now have what I wanted. Analysis Is this the best way to do it? Don't know as I have have received zero feedback so far, and this is the first time i've done this (hence the question), but ...it works! I could use a review. Debug Warning Concerning my Custom Category Walker Walker_Category_BS, i'm seeing this message ""Strict standards: Declaration of Walker_Category_BS::start_el() should be compatible with Walker::start_el(&$output, $object, $depth = 0, $args = Array, $current_object_id = 0) in C:\wamp\www\mysite\wp-content\themes\mytheme\assets\inc\Walker_Category_BS.php"" It appears to be a warning, of some sort. ",sleeper,https://wordpress.stackexchange.com/users/12116,"Update: I fixed the debug warning and everything appears to be working. In the absence of any other comments, I will accept my own solution outlined in the original questions updates. ",sleeper,https://wordpress.stackexchange.com/users/12116,http://wordpress.stackexchange.com/questions/113233/howto-add-class-to-sidebar-widget-list-items,TECHNOLOGY,wordpress.stackexchange.com 7973,Magento SendMail with attachment,"I have been working on a custom extension and I need a function to send the generated CSV file. Can you please let me know what might be the possible error in it. protected function _sendCSV($filename, $subject, $last_update, $now) { $template_id = ""svm_export_email""; $email_template = Mage::getModel('core/email_template')->loadDefault($template_id)->setSubject($subject."" ["".$now.""]""); $template_variables = array( 'file_name' => $filename, 'last_update' => $last_update, 'now' =>$now, ); $email_template->getProcessedTemplate($template_variables); $sender = array('My Team' => Mage::getStoreConfig('trans_email/ident_general/email')); $email_template->setFrom($sender); $file = Mage::getBaseDir('var') . DS .'SVM'. DS .date('Y'). DS .date('m'). DS .$filename; $attachment = $email_template->getMail()->createAttachment(file_get_contents($file)); $attachment->filename = $filename; try { $email_template->send('thecoderin@gmail.com','My Gmail'); } catch (Exception $e) { Mage::log($e->getMessage(), NULL, self::LOG); return false; } Mage::log($filename."" File sent through mail"", NULL, self::LOG); return true; } I am getting the following error on invoking the function: exception 'Exception' with message 'This letter cannot be sent.' in /my/magento/root/app/code/core/Mage/Core/Model/Email/Template.php:398 Thanks! ",thecoderin,https://magento.stackexchange.com/users/22911,"Check the createAttachment function from the file lib/Zend/Mail.php. See the function from below: public function createAttachment($body, $mimeType = Zend_Mime::TYPE_OCTETSTREAM, $disposition = Zend_Mime::DISPOSITION_ATTACHMENT, $encoding = Zend_Mime::ENCODING_BASE64, $filename = null) { $mp = new Zend_Mime_Part($body); $mp->encoding = $encoding; $mp->type = $mimeType; $mp->disposition = $disposition; $mp->filename = $filename; $this->addAttachment($mp); return $mp; } We have to pass the extra parameters to the function. See example at http://stackoverflow.com/questions/17164077/magento-send-transactional-email-with-pdf-attachment ",PHP Bugs,https://magento.stackexchange.com/users/2870,http://magento.stackexchange.com/questions/62857/magento-sendmail-with-attachment,TECHNOLOGY,magento.stackexchange.com 2751,\jobname in Gummi,"The command \jobname usually print the file name without the path and extension, so inside a file called foo.tex will print just foo. With pdflatex foo.test or compiling from LaTeXila certainly I obtained this result. But from Gummi what I obtain is .foo.tex Does anyone know why Gummi compiles differently and how I could get the usual \jobname behavior in Gummi? Edit: Based on helpful answers of @JosephWright and @Herbert I wonder if it is possible to do the \jobname correction in Gummi only if the source have the .swp extensión or .tex persist in \jobname. That is, I would like a solution like: \makeatletter \let\JobName\jobname \ifthenelse{\equal{\detokenize{foo}}{\jobname}} {} { \def\@JobName.#1.#2\@nil{#1} \def\jobname{\expandafter\@JobName\JobName\@nil} } \makeatother This conditional works to check if the jobname is foo or not, but I want a general solution, independent of the file name (not limited to the string foo). ",Fran,https://tex.stackexchange.com/users/11604,"use in the preamble: \makeatletter \let\JobName\jobname \def\@JobName.#1.#2\@nil{#1} \def\jobname{\expandafter\@JobName\JobName\@nil} \makeatother then \jobname works as usual. The above is only useful for running a file with gummi. ",Herbert,https://tex.stackexchange.com/users/2478,http://tex.stackexchange.com/questions/69434/jobname-in-gummi,TECHNOLOGY,tex.stackexchange.com 7653,Adding seconds to mysql DateTime via php,"Im trying to add 12 seconds to a mysql datetime object via php. My php code generates the following query: ""UPDATE Stats SET Usage = 1970-01-01 00:00:12"" however the query fails. My php code is as follows: public function UpdateTime($diffrence) { $seconds = $diffrence / 1000; mysql_connect('localhost','user','pass') or die(""Unable to select host""); mysql_select_db('StatDB') or die(""Unable to select database""); $query = ""SELECT * FROM Stats""; $result=mysql_query($query); $retVal = mysql_result($result,0,""Usage""); $oldTime = new DateTime($retVal); $oldTime->modify('+'. $seconds .' seconds'); $from = date(""Y-m-d H:i:s"", strtotime($oldTime->format('Y-m-d H:i:s'))); $query2 = ""UPDATE Stats SET Usage = $from""; echo $query2; $result2=mysql_query($query2); mysql_close(); } Does anyone how I can fix this? Thanks ",Ryuk,https://stackoverflow.com/users/1211548,"This is likely related to missing quotes in your query. Check out the answer to this question. UPDATE Stats SET Usage = '1970-01-01 00:00:12' You should surround the date time value passed in single quotes. ",Aiias,https://stackoverflow.com/users/2151120,http://stackoverflow.com/questions/15317063/adding-seconds-to-mysql-datetime-via-php,STACKOVERFLOW,stackoverflow.com 5952,hide javascript/jquery scripts from html page?,"How do I hide my javascript/jquery scripts from html page (from view source on right click)? please give suggestion to achive this . Thanks. ",Shaitender Singh,https://stackoverflow.com/users/192252,"It's virtually impossible. If someone want's your source, and you include it in a page, they will get it. You can try trapping right click and all sorts of other hokey ways, but in the end if you are running it, anyone with Firefox and a 100k download (firebug) can look at it. ",Daren Schwenke,https://stackoverflow.com/users/189262,http://stackoverflow.com/questions/1628799/hide-javascript-jquery-scripts-from-html-page,STACKOVERFLOW,stackoverflow.com 3712,Equivalent of Java 1.6 @Override for interfaces in C#,"This question gives the answer that Java's @Override has the C# equivalent of the override keyword on methods. However, since Java 1.6 the @Override annotation can be applied to interfaces also. The practical use for this is that in Java you get compile errors when a class claims it implements an interface method when it no longer does (e.g. if the interface method is removed). Is there equivalent functionality in C#? Some code examples: Java: public interface A { public void foo(); // public void bar(); // Removed method. } public class B implements A { @Override public void foo(); @Override public void bar(); // Compile error } C#: public interface IA { void Foo(); // void Bar(); // Removed method. } public class B : A { public override void Foo(); // Doesn't compile as not 'overriding' method public void Bar(); // Compiles, but no longer implements interface method } ",Bringer128,https://stackoverflow.com/users/545680,"There is similar functionality: explicit interface implementation. public interface IA { void foo(); // void bar(); // Removed method. } public class B : IA { void IA.foo() {} void IA.bar() {} // does not compile } The problem is that if you do this you cannot call the methods through the this pointer (from inside the class) or through an expression that evaluates to a B -- it is now necessary to cast to IA. You can work around that by making a public method with the same signature and forwarding the call to the explicit implementation like so: public class B : IA { void IA.foo() { this.foo(); } public void foo() {} } However this isn't quite ideal, and I 've never seen it done in practice. ",Jon,https://stackoverflow.com/users/50079,http://stackoverflow.com/questions/8936296/equivalent-of-java-1-6-override-for-interfaces-in-c-sharp,STACKOVERFLOW,stackoverflow.com 7821,content to display by month in archive always shows current month rather then the month selected?,"on this http://ee2.acer.edu.au/rd/archive/2013/April I have this code {exp:channel:entries channel=""research-developments"" status=""Featured|Open"" orderby=""entry_date"" sort=""desc"" dynamic=""off"" display_by=""month"" limit=""1""} but it always shows latest month so at the moment I have may for all archives when I need it to display each for each section , any ideas ? ",Andrew,https://expressionengine.stackexchange.com/users/1533,"If dynamic is ""off"", the channel:entries isn't influenced by URL parameters. ",Robson Sobral,https://expressionengine.stackexchange.com/users/343,http://expressionengine.stackexchange.com/questions/10566/content-to-display-by-month-in-archive-always-shows-current-month-rather-then-th,TECHNOLOGY,expressionengine.stackexchange.com 145,How are switches for two monitors called? Or can I use a monitor split?,"I have 2 monitors, 1 desktop and 1 laptop. I would like to switch the display between desktop and laptop and want to use 2 monitors as extended monitor sources. I see there are lot of solutions to switch between 1 monitor sharing 2 sources but not for 2 monitors. How about this? I will go with a switch that facilitates 2 sources 1 monitor, but I will attach a split to the switch and connect to the 2 monitors... is that going to work? ",Krishna,https://superuser.com/users/45160,"You have to look for Dual Monitor KVM switches, which should get you what you want. Don't use the term switch as it is way to broad and will also result in other type of products unrelated to what you are after. KVM stands for Keyboard, Video & Mouse which is a specific property of the switch you are looking for. To denote that a KVM switch supports multiple monitors, use Dual Monitor. Splitting could also work. ",Tom Wijsman,https://superuser.com/users/9666,http://superuser.com/questions/375145,TECHNOLOGY,superuser.com 4129,What kind of energy does superfluidity use?,"Liquid helium (and other similar fluids) can ""climb up"" the walls of their containers. Who does the work in this case, and what kind of energy does it use? I'm sure we can't make a perpetuum mobile out of this, so I guess some kind of energy must somehow be expended to make the fluid ""climb up"" the wall. ",vsz,https://physics.stackexchange.com/users/14088,"Possibly helpful: http://arxiv.org/ftp/arxiv/papers/1103/1103.0517.pdf www.paper.edu.cn/download/downPaper/200812-856‎ The bizarre behaviour of superfluids! Climbing up walls and geting out of glass beakers EDIT: A googlebooks excerpt seems more useful: ",Carl Witthoft,https://physics.stackexchange.com/users/29202,http://physics.stackexchange.com/questions/90475/what-kind-of-energy-does-superfluidity-use,SCIENCE,physics.stackexchange.com 9309,nm: how to show object file of a symbol in a shared library?,"I have 25 object files which are combined to form one shared library. I have generated the shared library with gcc and while I was looking for exposed symbols with nm -D libmylib.so, I found two undesirable exposed symbols with the name of i and y which are in .bss section. I have tried to find them in my source files but i cant find them so if anyone can tell me whether there is some way to find that which .o file exactly has these undesired exposed symbols? Can I do it with nm or do I need another tool? Any help would be appreciated. ",Jewel Thief,https://stackoverflow.com/users/495590,"Once the shared library is linked, you can no longer tell which parts of it came from which object file. You can search the individual objects from which you build the library: find . -name '*.o' -print0 | xargs -0 nm -A | egrep ' (i|y)$' You can ask the linker to tell you when they are defined: $(CC) -fPIC -shared -o libmy.so $(OBJS) -Wl,-y,i,-y,y If you built the library from objects compiled with -g, you may ask GDB where i and y came from: gdb -q libmy.so (gdb) info var ^i$ (gdb) info var ^y$ ",Employed Russian,https://stackoverflow.com/users/50617,http://stackoverflow.com/questions/13365347/nm-how-to-show-object-file-of-a-symbol-in-a-shared-library,STACKOVERFLOW,stackoverflow.com 1535,EXcel Web Access - web part Error,"I asked this related question in stack overflow, Hence this forum is dedicated for sharepoint, Thought to ask here!! I got to know how to get the Excel using sharepoint Excel web access webpart. However I am getting an error ""Excel Services is unable to process the request. Wait a few minutes and try performing this operation again!!"" Even If I directly access the Excel from the document library also getting the same error!! ",Jithu,https://sharepoint.stackexchange.com/users/5462,"Would be nice if you could provide some log information, but double check: Excel Services is actually running on the farm. Check if you can run Get-SPExcelServiceApplication Check the Trusted File Location for Excel Services Check if your Web Application has a service connection to the Excel Services ",Anders Aune,https://sharepoint.stackexchange.com/users/4328,http://sharepoint.stackexchange.com/questions/22346/excel-web-access-web-part-error,TECHNOLOGY,sharepoint.stackexchange.com 4528,Interacting with openCPU,"I've stumbled across an awesome open source project called openCPU.org and I'm tremendously excited about the project. As a research scientist trying to create a website hosting my work, I would love nothing more than to be able to run R on the cloud to have my scripts run in real time and show up on my webpages. So a big time thanks to Jeroen for making this project happen. With that, onto my question. How the heck do I interact with openCPU? I can put an example function into ""run some code"" at: http://public.opencpu.org/userapps/opencpu/opencpu.demo/runcode/ And retrieve a PNG image of my code, which is great! But how do I do that in my own webpage, or via a URL? I can get the object of my original code upload from this page, something like: ""x3ce3bf3e33"" If it is a function similar to: myfun <-function(){ x = seq(1,6.28) y = cos(x) p = plot(x,y) print(p) # also tried return(p) } Shouldn't I be able to call it via: http://public.opencpu.org/R/tmp/x3ce3bf3e33/png What about with input variables? e.g.: myfun <-function(foo){ x = seq(1,foo) y = cos(x) p = plot(x,y) print(p) } I feel that perhaps there is something I am missing. How do I specify ""GET"" or ""POST"" with the url? EDIT Ok in response to @Jeroen below, I need to use to use POST and GET with the API. Now my question is extend to the following issue of getting PHP to interact with it correctly. Say I have the code: <?php $foo = 'bar'; $options = array( 'method' => 'POST', 'foo' => $foo, ); $url = ""http://public.opencpu.org/R/tmp/x0188b9b9ce/save""; $result = drupal_http_request($url,$options); // drupal function ?> How do I then access what is passed back in $result? I am looking to get a graph. It looks like this: { ""object"" : null, ""graphs"" : [ ""x2acba9501a"" ], ""files"" : {} } The next step will be to GET the image, something along the lines of: $newurl = ""http://public.opencpu.org/R/tmp/"".$result[""graph""].""/png""; $image = drupal_http_request($newurl); echo $image; But I don't know how to access the individual elements of $result? EDIT #2 Ok guys, I've gotten this to work, thanks to the answer below and to multiple other help sessions, and a lot of smashing my head against the monitor. Here we go, done with cURL <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://public.opencpu.org/R/tmp/x0188b9b9ce/save'); curl_setopt($ch, CURLOPT_POST, 1); // Method is ""POST"" curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Returns the curl_exec string, rather than just Logical value $result = curl_exec($ch); curl_close($ch); $new = json_decode($result,true); // $result is in 'json' format, decode it $get = $new['graphs'][0]; // the 'hashkey for the image, ""x2acba9501a"" above $img = 'http://public.opencpu.org/R/tmp/'.$get.'/png'; // link to the png image echo <<<END // use this to display an image from the url <a href=""$img""> <img src=""$img""> </a> END ?> ",Solar Nick,https://stackoverflow.com/users/1457857,"Here is a complete example webpage I mocked up to use OpenCPU to demo a particular analysis using a R package I wrote (MARSS). I was monkeying with providing easy access to particular analyses--a live user guide so to speak. Caveat, my example relies heavily on JavaScript and I've no experience with JavaScript beyond this example; so the coding is clunky but it works for my purposes. Copy and paste the html into a file and open in a browser and it should work. <!DOCTYPE html> <html xmlns=""http://www.w3.org/1999/xhtml""> <head> <meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"" /> <style> html, body { background: #6699FF; text-align: center; font-family : ""Lucida Sans Unicode"", ""Lucida Grande"", sans-serif; font-size:14px; } #container { background: #FFF; border: 0px #222 solid; margin: 0 auto; text-align: left; width: 10.25in; padding: 5px; overflow: auto; } #container form { margin: 0 auto; } label { float: left; width: 50px; } .leftCol { float: left; width: 3in; } .rightCol { float: left; width: 7in; } .references { font-size: x-small; text-indent: 20px; } </style> <base target=""_blank"" /> <title>Count-based population viability analysis (PVA) using corrupted data</title> <script type=""text/javascript"" src=""http://code.jquery.com/jquery-latest.js""> </script> <script> baseurl=""http://public.opencpu.org"" // This is done on load since we need the function on the server to deal with the file upload function saveRFunction(){ //Run this bit of code and store the R function to run on OpenCPU var baseurl = ""http://public.opencpu.org""; var url = ""http://public.opencpu.org/R/pub/base/identity/save""; // #txtRCommands is the id of the text box in the javascript var rFunction = $(""#RFunction"").val(); // this bit sends the the RFunction in the hidden text area $.post(url,{ x: rFunction }, function (data) { var funloc = $.parseJSON(data).object; funloc = ""http://public.opencpu.org/R/tmp/""+funloc; //set the action for the form document.getElementById('FunctionLocation').value = funloc; } ); setTimeout(function() { // Wait 2 seconds because of Chrome before loading default form var frm = document.getElementById(""inputForm2""); subm2(frm,'/svg'); }, 1000); }; //function for first submit button; subm and subm2 same except the id function subm(f,ftype){ document.getElementById(""inputForm"").action=document.getElementById('FunctionLocation').value+ftype; f.submit(); } function subm2(f,ftype){ document.getElementById(""inputForm2"").action=document.getElementById('FunctionLocation').value+ftype; f.submit(); } </script> </head> <body onload=""saveRFunction()""> <div id=""container""> <h2>MARSS Case Study 1: Count-based PVA for data with observation error</h2> This web tool fits a count-based PVA model (sensu Dennis et al. 1991) from a univariate (one site) time series of abundance data with observation error (Holmes 2001, 2004). The result is an estimated long-term rate of population growth (&lambda;), process variance estimate (&sigma;<sup>2</sup>) and non-process or observation error variance. Extinction risk metrics sensu Dennis et al. (1991) along with an uncertainty plot sensu Ellner and Holmes (2008) are shown. </br></br> <div class=""leftCol""> <form enctype=""multipart/form-data"" action="""" method=""POST"" target=""test"" id=""inputForm""> <fieldset> <legend><b>Upload a Dataset</b></legend> <i>Comma-delimited. 1st col time, 2nd col counts. Missing counts NA.</i></br> File: <input name=""!file:file"" type=""file"" /> <!-- param name has to be file --> Header: <select name=""header""><option value=TRUE> TRUE </option> <option value=FALSE> FALSE </option> </select> </br /> <input name=""!width"" type=""hidden"" value=7 /> <!-- in inches --> <input name=""!height"" type=""hidden"" value=6 /> <!-- in inches --> <INPUT type=""button"" name=""Submit"" value=""Run Analysis"" onclick=""subm(this.form,'/svg');""> <!-- svg so Firefox doesn't cache --> <INPUT type=""button"" name=""Submit"" value=""Get PDF of Plot"" onclick=""subm(this.form,'/pdf');""> </fieldset> </form> <form action="""" method=""POST"" target=""test"" id=""inputForm2""> <fieldset> <legend><b>Select an Example Dataset</b></legend> Dataset: <select name=""dataname""> <option value='""wilddogs""' selected >African Wilddogs</option> <option value='""prairiechicken""'>Prairie Chickens</option> <option value='""grouse""'>Sage Grouse</option> <option value='""graywhales""'>Gray Whales</option> </select></br /> <input name=""!width"" type=""hidden"" value=7 /> <!-- in inches --> <input name=""!height"" type=""hidden"" value=6 /> <!-- in inches --> <INPUT type=""button"" name=""Submit"" value=""Run Analysis"" onclick=""subm2(this.form,'/svg');""> <INPUT type=""button"" name=""Submit"" value=""Get PDF of Plot"" onclick=""subm2(this.form,'/pdf');""> </fieldset> </form> <fieldset class=""references""> <legend><b>References</b></legend> <p>Dennis, Brian, Patricia L. Munholland, and J. Michael Scott. ""Estimation of growth and extinction parameters for endangered species."" Ecological monographs 61.2 (1991): 115-143.</p> <p>Holmes, E. E. 2001. Estimating risks in declining populations with poor data. Proceedings of the National Academy of Science 98: 5072-5077.</p> </fieldset> <fieldset class=""references""> <legend><b>R Code</b></legend> <!-- if you do not want to see the R code, use this <textarea hidden=""hidden"" id=""RFunction"" style=""display:none;""> --> <textarea id=""RFunction"" readonly=""readonly"" cols=""27"" rows=""18"" style=""border:0px;margin:0px""> function(file=NULL, header=TRUE, dataname=""wilddogs"" ){ library(MARSS) if(is.null(file)){ dat=get(dataname) }else{ dat=read.csv(file, header=header) dat=as.matrix(dat) } CSEGriskfigure(dat, silent=TRUE) } </textarea> </fieldset> <input type=""hidden"" value=""not set"" id=""FunctionLocation"" /> <!-- this is where the function is stored --> <br /> </div> <!-- This iframe holds the output image. --> <iframe style='width: 7in; height: 6in; border: 0px solid #000000; padding: 10px;' name='test' id=""image_iframe"" class=""rightCol""></iframe> </div> <!-- This is an onload script, but Chrome is not loading the whole page before running the onload script. Time out used above for this problem. --> </body> </html> ",Eli Holmes,https://stackoverflow.com/users/2403645,http://stackoverflow.com/questions/11927829/interacting-with-opencpu,STACKOVERFLOW,stackoverflow.com 7638,"highcharts: stop chart from trapping mouse events, or capture mouse click on the ENTIRE chart","All, I'm using HighCharts in a web app I'm working on, and generally, I like it very much. However, I'm having a hard time figuring out how capture a mouse click on the ENTIRE chart. In other words - I'd like to know when the user clicks ANYWHERE on the chart (e.g., the plot area, the title, the x- or y-axis, the margins and padding around the chart elements, etc.) Or, I'd like to disable events altogether, so I can trap the event in the container itself. More detailed version... I have a DIV that contains my HighChart. I want to know if the user clicks ANYWHERE within that DIV. So - initially I tried attaching an ""onclick"" event to the DIV, but that never gets fired, presumably because the click is getting trapped by the HighChart. So, in the code that sets up the HighChart, I added this: var chart = new Highcharts.Chart({ chart: { renderTo: ""container"", events: { click: function(event) { // do something } }, ... } ... }); This works OK IF the user clicks somewhere within the plot area, but not if she clicks anywhere else in the chart (e.g., the x-axis, the y-axis, the title, the padding around the chart elements, etc.) So - how can I make the ENTIRE chart clickable? Many thanks in advance! ",mattstuehler,https://stackoverflow.com/users/49383,"I had this same issue. Using the webkit inspector I can see that Highcharts binds a click event to the chart container (the div with the 'highcharts-container' class), and this seems to interfere with clicking. Provided you don't want any of the functionality in that click event, you can remove it by setting chart.container.onclick = null; Otherwise, you'll need to use the built-in highcharts event properties to set your callbacks. As the OP noted, there is an 'events' property for the chart object, which should trigger when clicking the plot background. There is also an event property for the plot options which triggers when clicking the series itself. For example, for area plots: var chart = new Highcharts.Chart({ ... plotOptions: { area: { events: { click: function(event) { // do something } }, ... } } ... }); More more info see: http://www.highcharts.com/ref/#plotOptions-area-events ",grahamgilchrist,https://stackoverflow.com/users/1590465,http://stackoverflow.com/questions/11618075/highcharts-stop-chart-from-trapping-mouse-events-or-capture-mouse-click-on-the,STACKOVERFLOW,stackoverflow.com 7288,What does chain worn indicators 75% mean?,"I've bought a chain wear checker made by BBB, but not sure what the percentage of worn is about? It has 2 sides, one of them indicates that the chain is worn 75% and I should replace it in the near future. The other side shows, that the chain is 100% used and should replace it as soon as possible. My detailed question : What does these percentage mean? What is the equivalent of it in the metric system? Will 75% worn state affect my cogwheels also? Can I replace the chain to a new one without changing the drivetrain's other elements? I use a single-speed bike. Chain width is 1/8 inch. It consists 94 chain. (400km (250miles) / month) ",kisp,https://bicycles.stackexchange.com/users/13937,"On a non-single speed bike, rear cogs are pretty pricy, and when chain measure tool showing 1.0 it's probably already affected cogs. At 0.75 it's probably didn't affect the cogs yet. So it's preferable to change the chain before. On a single speed bike it will not greatly affect cogs. Thou it sensible when riding and you should feel the ride better with new chain. Personally, I don't use this tool, but a meter. As @kisp brought from wiki, if every 2 half-links equals 1 inch (20 half links are 10 inches), if those 2 half links become 2.56cm, it's up to change the chain. It's a bit hard to measure 2 half links, but when you take 20 it become easier. Yet, if you have a ruler with inches, it's very easy to measure 2 half links. ",Alexander,https://bicycles.stackexchange.com/users/7999,http://bicycles.stackexchange.com/questions/28637/what-does-chain-worn-indicators-75-mean,CULTURE,bicycles.stackexchange.com 8251,Spin matrices in Dirac equation,"Why in every textbook when deriving Dirac's equation the smallest possible matrices ($2 \times 2$) are used? I wonder why one couldn't use spin 1 matrices ($3 \times 3$) and get relativistic equation for spin 1 particle? ",John,https://physics.stackexchange.com/users/8745,"One can write down equations for spin-one particles but they won't be the Dirac equation because the Dirac equation, by definition, describes spin-1/2 particles (i.e. fermions such as leptons and quarks). The equations for free fields associated with spin-one particles are the Maxwell equations (for photons etc.) and/or Proca equations (for W-bosons or Z-bosons). ",Luboš Motl,https://physics.stackexchange.com/users/1236,http://physics.stackexchange.com/questions/23901/spin-matrices-in-dirac-equation,SCIENCE,physics.stackexchange.com 5099,Hexagon with exscribed triangle,"I am learning tikz now, it is painfully slow, but I am slowly learning. I am trying to reproduce the image below. Here is my code so far. This is basically a rip of from the pgf manual. \documentclass[10pt,a4paper]{article} \usepackage{mathtools} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{backgrounds} \usepgflibrary{shapes} \usetikzlibrary{through} \begin{document} \begin{figure}[!htpb] \centering \begin{tikzpicture} \foreach \a in {5,...,5}{ \draw[blue, dashed] (\a*2,0) circle(0.5cm); \node[regular polygon, regular polygon sides=\a, minimum size=1cm, draw] at (\a*2,0) {}; } \end{tikzpicture} \end{figure} \end{document} Some problems with this code How do i scale this image? How do I label each side ? Once again, how do I make that pesky angle ? Is there a way to do this for a n-gon? When I scaled the image using simply \begin{tikzpicture}[scale=3]... only the circle grew. Labeling each point manually is sort of tedious.. =( EDIT: I DID IT WOEEE Code us ugly though... :D:DD: \documentclass[10pt,a4paper]{article} \usepackage{mathtools} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{backgrounds} \usepgflibrary{shapes} \usetikzlibrary{through} \pgfdeclarelayer{background} \pgfdeclarelayer{foreground} \pgfsetlayers{background,main,foreground} \begin{document} \begin{figure}[!htbp] \centering \Large \begin{tikzpicture}[scale=1] \node (A) [draw,thick,regular polygon, regular polygon sides=6, minimum size=7cm,outer sep=0pt,fill=gray!20] {}; \node at (A.corner 1) [anchor=360/6*(1-1)+270] {$D$}; \node at (A.corner 2) [anchor=360/6*(2-1)+270] {$E$}; \node at (A.corner 3) [anchor=360/6*(3-1)+270] {$F$}; \node at (A.corner 4) [anchor=360/6*(4-1)+270] {$A$}; \node at (A.corner 5) [anchor=360/6*(5-1)+270] {$B$}; \node at (A.corner 6) [anchor=360/6*(5-1)+270] {$C$}; \node at (A.corner 4) [right,above] {\hspace{3.5cm}$AB=16$cm}; \coordinate [label=above:\textcolor{blue}{$S$}] (S) at (0.95,1); \draw[gray, thick, dashed] (0,0) circle(3.52cm); \path[draw] (0.7,-0.3) node {$\alpha$}; { \begin{pgfonlayer}{foreground} \draw[gray,thick, dashed] (A.corner 4) -- (S) -- (A.corner 5); \end{pgfonlayer} } \begin{scope} \path[clip] (S) -- (A.corner 4) -- (A.corner 5) -- cycle; \draw [red, fill=red!20] (S) circle (30pt); \draw [black] (S) circle (30pt); \end{scope} \end{tikzpicture} \end{figure} \end{document} ",N3buchadnezzar,https://tex.stackexchange.com/users/8306,"For scaling, add the transform shape option. That might not look too great though. You are probably better off modifying the minimum size and the circle. To label the sides you can use distance modifiers on the anchors, same for the corner points. For the angle you can either use tkz-euclid or (if you know the angle (or are willing to guess it like me)) you can just draw an arc. To generalize this to an n-gon, use a parameter instead of the for-loop (which does nothing now...) and draw using that. Of course the angle and the corresponging AB line won't be correct anymore, but the labelling will. This is what the code would look like: \documentclass[10pt,a4paper]{article} \usepackage{mathtools} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{backgrounds} \usepgflibrary{shapes} \usetikzlibrary{through} \begin{document} \begin{figure}[!htpb] \centering \begin{tikzpicture} \pgfmathsetmacro{\a}{6} \newcounter{temp} \draw[dashed] (\a*2,0) circle(3cm); \node[regular polygon, regular polygon sides=\a, minimum size=6cm, draw, blue, fill=blue!20] (poly) at (\a*2,0) {}; \foreach [count=\side] \siide in {2,3,...,\a,1}{ \pgfmathtruncatemacro{\opp}{mod(\side+\a/2,\a)} \pgfmathtruncatemacro{\opp}{ifthenelse(equal(\opp,0),\a,\opp)} \pgfmathtruncatemacro{\opi}{ifthenelse(equal(mod(\a,2),0),1,0)} \def\oppp{\ifnum\opi=0 poly.side \opp\else poly.corner \opp\fi} \node at ($(poly.side \side)!.15!270:(poly.corner \siide)$) {\side}; \node at ($(\oppp)!1.05!(poly.corner \side)$) {\setcounter{temp}{\side}\Alph{temp}}; } \coordinate (S) at ($(poly.corner 5) + (100:3)$); \begin{scope} \path[clip] (poly.corner 4) -- (S) -- (poly.corner 5) -- cycle; \path[draw,blue,fill=blue!50] (S) circle[radius=.4]; \path (S) ++(255:.6) node {$\alpha$}; \end{scope} \node at ($(poly.corner 4)!.5!(poly.corner 5)$) [above] {$DE = 16$cm}; \node at (S) [above] {S}; \path[draw,dashed] (poly.corner 5) -- (S) -- (poly.corner 4); \end{tikzpicture} \end{figure} \end{document} To clarify the code a little bit, the distance modifiers work as follows: (A)!x!a:(B) means take the point that is factor x on the line from A to B, then rotate it by a degrees around A. This allows us to place the labels roughly where we want them, without having to explicitly set them (the angles might need slight adjusting for larger polygons). And the resulting output: EDIT: Changed the code to place the labels to use the opposite corner. It uses the opposite side if the number of sides is odd. This way the placement of the labels will work for n-gons for pretty much any value of n. I also changed the angle to use the clipping approach instead of estimating it. Finally, I changed the way the node is drawn on the line, to ensure there is no difference in colour. That makes the result looks like this, showing the normal hexagon and a 9-gon: ",Roelof Spijker,https://tex.stackexchange.com/users/8344,http://tex.stackexchange.com/questions/35266/hexagon-with-exscribed-triangle,TECHNOLOGY,tex.stackexchange.com 1770,I can't find a PFET protected against ESD,"I like to use OmniFETs for MOSFETs because they have internal protection against ESD so I am unlikely to damage them while handling and then when they don't work I don't have to wonder if it was damaged or I have a circuit mistake. These are n-channel FETs, but now I need a p-channel FET. I tried to find one Mouser and Digikey, but was unsuccessful. Is there such a thing? It would basically be a MOSFET and a diode in one package. Other things like over-current and over-temperature protection would also be nice, but are less important. ",mccoyn,https://electronics.stackexchange.com/users/7808,"I would like to add that it seems to me like a very futile effort to only use ESD-protected FETs. If you have a FET that is large enough to hold in your hand, it is already fairly rugged by virtue of physics. Gate and drain-source capacitance make sure that whatever charge you can inject into the device will not cause large enough voltages to spark over. But much more importantly: when handling any other active device, you are probably holding tens, hundreds, thousands of tiny little FETs in your hand, each and every one of them orders of magnitude more sensitive to ESD. There is usually some protection on the outgoing pins, but I'm afraid that the only way to really set yourself free from the worry of ESD is to regard proper ESD safety: Regard air humidity at all times, try to keep it high (70%+). Air humidity dissipates static charges extremely effectively. When dealing with sensitive devices - something that is almost always mentioned in the datasheet or on the package if this is especially so - wear an ESD dissipative wrist band connected to an ESD mat, which in turn is connected to your mains electricity ground with an appropriate connector. ESD mats nowadays are very inexpensive. Regard your clothing. Do not wear clothing with long exposed fibers (e.g. wool). This way you will be able to enjoy electronics with access to the full gamut of devices, instead of having to artificially limit yourself to only those which explicitly advertise ESD protection. Which doesn't guarantee you in any way that you do avoid ESD damage either! ",user36129,https://electronics.stackexchange.com/users/26129,http://electronics.stackexchange.com/questions/25890/i-cant-find-a-pfet-protected-against-esd,TECHNOLOGY,electronics.stackexchange.com 8954,Why does itemAt() not always find QGraphicsItem,"Consider this extremely simple example in which you can drag a square around a QGraphicsScene (using PyQt, C++ users read self as this) import sys from PyQt4 import QtGui, QtCore class MainWindowUi(QtGui.QMainWindow): def __init__(self): QtGui.QMainWindow.__init__(self) self.scene = Scene(0, 0, 300, 300, self) self.view = QtGui.QGraphicsView() self.setCentralWidget(self.view) self.view.setScene(self.scene) self.scene.addItem(Square(0,0,50,50)) class Scene(QtGui.QGraphicsScene): def mousePressEvent(self, e): self.currentItem = self.itemAt(e.pos()) print (self.currentItem) QtGui.QGraphicsScene.mousePressEvent(self, e) class Square(QtGui.QGraphicsRectItem): def __init__(self, *args): QtGui.QGraphicsRectItem.__init__(self, *args) self.setFlag(QtGui.QGraphicsItem.ItemIsMovable, True) self.setFlag(QtGui.QGraphicsItem.ItemIsSelectable, True) if __name__ == '__main__': app = QtGui.QApplication(sys.argv) win = MainWindowUi() win.show() sys.exit(app.exec_()) When you click the mouse in the scene you should see a print statement telling you that you clicked either on the square or on nothing (ie. None). This works if you just start the program and click on the square. Now drag the square away from the upper left corner and click on it again. This time itemAt() return None even when you click on the square. What's going on? ",DanielSank,https://stackoverflow.com/users/2665591,"The answer seems to be that I should have used self.itemAt(e.scenePos()) instead of self.itemAt(e.pos()). I found this in this SO question. I note here that the reason I've been having trouble finding information on this issue is that moving QGraphicsItems around in a QGraphicsScene is not what Qt calls ""drag and drop"". To search for information on this topic you want to search for things like ""move QGraphicsItem"". ",DanielSank,https://stackoverflow.com/users/2665591,http://stackoverflow.com/questions/19486478/why-does-itemat-not-always-find-qgraphicsitem,STACKOVERFLOW,stackoverflow.com 2554,Why don't wifi managers remember mac addresses for hotspots to defeat the jasager attack?,"So I just learned about the jasager attack, via the wifi pineapple and it struck me immediately that it wouldn't work at all if network managers (privately) associated MAC addresses with hotspots and asked for explicit permission if you were going to connect to a new physical device. Obviously this would be mildly irritating in public hotspots where devices change and hundreds of diverse locations share network names, but it would make home and work networks much harder to penetrate. I haven't found any wifi managers that do this, or at least I haven't found information that any do. My question: Am I missing something obvious? Would remembering MACs not actually increase security? If it would, are there any network managers that do this? (I'm on Linux, but if there are tools for other OS's I think it's worth having them in the answers) ",quodlibetor,https://security.stackexchange.com/users/8391,"Convenience, mostly: I'm now historically using my third AP device - each one has been completely different make and vendor, but as long as the configuration stayed the same (SSID, encryption mode, passphrase), there was no need to re-enter the AP data on any of the client devices. This may not be enough of an issue in a home setting; if you have hundreds of devices which can connect to the network, reconfiguring them when an AP dies would be a royal pain. Likewise, having multiple identically-configured APs (and thus a larger signal-covered area), the client devices will switch to the AP with the strongest signal without trouble. A few frames may be lost before the new MAC address location propagates through the local network, but overall the roaming is close to seamless. As for the ""only connect to this AP if it has a specific MAC address"" - this is already possible with NetworkManager on Linux: there is an option to specify the AP's BSSID, which should be the AP's MAC address (of course, the BSSID can be spoofed - hence ""should""). ",Piskvor,https://security.stackexchange.com/users/884,http://security.stackexchange.com/questions/14854/why-dont-wifi-managers-remember-mac-addresses-for-hotspots-to-defeat-the-jasage,TECHNOLOGY,security.stackexchange.com 652,Optional argument to \item in enumitem list,"I'm trying to set up a list environment for typesetting a problem set. I'd like to be able to input something like the following: \begin{pset} \item First solution. \item[2.2] Second solution. \end{pset} and have it come out as: Problem 1. First solution. Problem 2 (2.2). Second solution with the optional argument to \item being typeset in parentheses if it's present. I assume I should be able to \renewcommand{\makelabel} somehow, but I can't figure out how to do it. I can't get anything like the following to work: \newcommand{\makepsetlabel}[1]{some if/then involving #1, checking if empty} \newlist{pset}{enumerate}{1} \setlist[pset]{ before={\renewcommand\makelabel[1]{\makepsetlabel{##1}} } What's the right way? ",user25695,https://tex.stackexchange.com/users/25695,"I would use a different command instead of \item: \documentclass{article} \usepackage{enumitem} \newlist{pset}{enumerate}{1} \setlist[pset]{ label=Problem \arabic*\protect\thispitem, ref=\arabic*, align=left } \newcommand{\pitem}[1][]{% \if\relax\detokenize{#1}\relax \def\thispitem{.}% \else \def\thispitem{ (#1).}% \fi \item} \begin{document} \begin{pset} \pitem First \pitem[2.2] Second \end{pset} \end{document} In the label I add a command \thispitem (with \protect so enumitem doesn't interpret it when setting up the environment). Then \pitem examines the presence of an optional argument and acts consequently: if none is specified, it just prints a period, otherwise a space, the parenthesized argument and the period. ",egreg,https://tex.stackexchange.com/users/4427,http://tex.stackexchange.com/questions/97431/optional-argument-to-item-in-enumitem-list,TECHNOLOGY,tex.stackexchange.com 1463,Is copyediting good for an academic career?,"I have recently been involved in managing a special issue in a scientific journal. The chief-editor was somehow appreciative of my work and now wants me to join the journal's board as a copyeditor. I am puzzled by this request since I have no example of an academic being involved in such a task. Usually, being an editor (see Why become a journal editor?) involves more content evaluation. Would my academic career take advantage of such a duty? ",marsei,https://academia.stackexchange.com/users/7767,"The only benefit you'll get as a copyeditor is clear: money (assuming he offered to pay you). The downsides are numerous: it takes a lot of time, it will not be considered a plus to your CV (it's a technical job, not a scientific one)… none of the benefits from being a journal editor apply to a copyeditor. Also, I don't know exactly what you did when you say “I have recently been involved in managing a special issue”, but if you were guest editor, offering you a copyeditor job is clearly not showing appreciation for your job as a scientist. ",F'x,https://academia.stackexchange.com/users/2700,http://academia.stackexchange.com/questions/13763/is-copyediting-good-for-an-academic-career,LIFE_ARTS,academia.stackexchange.com 590,let you know a couple of facts OR bring couple of facts to your notice,"Which of the following is more appropriate / polite? I would like to bring a couple of facts (or things?) to your notice. OR I would like to let you know a couple of facts. Please advise. ",sandeep,https://english.stackexchange.com/users/16608,"I agree with check123. ""Facts"" can have a harsh, accusatory tone which could put the listener on the defensive. ""Things"" is usually a vague word to avoid, especially in writing, but it can be an acceptable way of toning down ""facts,"" if the speaker wants to avoid sounding belligerent. Yet there are other ways to accomplish the same thing. You could avoid the word ""you"" as well: Let me state the facts... or even, Please allow me to give the facts... also sound a bit more polite, and less confrontational. ",J.R.,https://english.stackexchange.com/users/18220,http://english.stackexchange.com/questions/60235/let-you-know-a-couple-of-facts-or-bring-couple-of-facts-to-your-notice,CULTURE,english.stackexchange.com 8569,What role does this past-participle take?," Someone standing outside the Great Hall might well have thought some sort of explosion had taken place, so loud was the noise that erupted from the Gryffindor table. Harry, Ron, and Hermione stood up to yell and cheer as Neville, white with shock, disappeared under a pile of people hugging him. He had never won so much as a point for Gryffindor before. Harry, still cheering, nudged Ron in the ribs and pointed at Malfoy,who couldn’t have looked more stunned and horrified if he’d just had the Body-Bind Curse put on him. (Harry Potter and the Sorcerer's Stone) I don’t find the same syntactic example as the highlighted case in OALD. Is it a certain type of have-structure that I don’t find yet. Or does the phrase, put on him, modify the previous noun phrase, the Body-Bind Curse? ",Listenever,https://ell.stackexchange.com/users/504,"This is an instance of HAVE employed in a resultative sense—it’s the sense at OALD 22: 22 (used with a past participle) have something done to suffer the effects of what somebody else does to you She had her bag stolen. The use is actually broader than OALD suggests; it as also employed to express positive results: Now that we have that settled we can move on to the next item. This use goes all the way back to Old English, and was in fact the ancestor of the Perfect constructions which emerged in Middle English. In Old English the underlying syntax at that time was HAVE + [Direct Object] + [PaPpl], with the PaPpl modifying the Direct Object. (We know this because nouns and adjectives had case endings in OE, and in this construction the PaPpl 'agrees' with the Direct Object). In Modern English, however, it is probably best understood as a reduced subordinate clause: He had [ [that] a curse [was] put on him. ] I advance this parsing because in ModE there is also a use with a bare infinitive instead of a past participle; this is employed when the verb in question may be used both transitively and intransitively and the participle would be ambiguous: She had her house burn down. ... which may be similarly parsed as She had [that] her house burned down. Using active burn instead of passive burned here prevents this being parsed as transitive burned down used with causative HAVE, as in OALD's 23: 23 (used with a past participle) have something done to cause something to be done for you by somebody else You've had your hair cut! We're having our car repaired. This use also supports use with an explicit subject, OALD's #24: 24 to tell or arrange for somebody to do something for you • have somebody do something He had the bouncers throw them out of the club. ",StoneyB,https://ell.stackexchange.com/users/32,http://ell.stackexchange.com/questions/9312/what-role-does-this-past-participle-take,CULTURE,ell.stackexchange.com 5355,Regex findall on a function definition. Want to match args but not function,"I have a list of strings that look like ""funcname(arg, another_arg)*20 + second_func(arg1, arg2)"" and I want to pull out just the args. I've tried the following: re.findall(r'\w[\w\d_]+(?!\()', string) however this returns ['funcnam', 'arg', 'another_arg', '20', 'second_fun', 'arg1', 'arg2'] Firstly, I'm a bit confused as to why I am seeing the '20', since I specified the string should start with a word character. Secondly, I'm wondering how I can improve my look-ahead to match what I'm looking for. I should note that some of the strings don't have functions and look like ""value1 + value_two"" so I can't simply search inside the parentheses. ",Mikey08,https://stackoverflow.com/users/935491,"Here is a regex that should work better: (?!\w+\()[^\W\d]\w+ For example: >>> s = ""funcname(arg, another_arg)*20 + second_func(arg1, arg2)"" >>> re.findall(r'(?!\w+\()[^\W\d]\w+', s) ['arg', 'another_arg', 'arg1', 'arg2'] [^\W\d] is equivalent to [a-zA-Z_]. This uses the same logic as your regex, but by moving the lookahead to the beginning of the string you prevent a match like funcnam from funcname(...). Here is a similar alternative: [^\W\d]\w+(?![\w(]) ",Andrew Clark,https://stackoverflow.com/users/505154,http://stackoverflow.com/questions/10249422/regex-findall-on-a-function-definition-want-to-match-args-but-not-function,STACKOVERFLOW,stackoverflow.com 1824,Why does WPF toggle button pulse once unchecked,"Within a Desktop app I have a toggle button: <ToggleButton x:Name=""CFStglBtn"" Checked=""cfsCBox_Checked"" Unchecked=""cfsCBox_Unchecked"" IsChecked=""True"" HorizontalAlignment=""Left"" Margin=""5,0,0,0""> <StackPanel Orientation=""Horizontal""> <Image Source=""assets\telephone.png"" Margin=""3,0,0,0"" /> <TextBlock Text=""CFS"" FontSize=""10"" Margin=""5,5,5,0"" Foreground=""DarkSlateGray""/> </StackPanel> </ToggleButton> For the Checked event I am setting a value and then executing a method FilterView(); //ommitting code Unchecked state is just the opposite. resets a variable and executed the method again The question I have is I noticed when I uncheck the toggle button the button continues to pulse or flash ( going from blue to chrome) as if it still has focus. The button will stay like this until another button is clicked. Is there a way to remove this focus so that when the button is unchecked the button goes back to a unchecked state without the flashing / pulsing color. As you can see from above this is a standard toggle button no styles or custom I tested this on just a regular button and I found the same occured when clicked the button will continue to pulse / flash until another button is clicked. How do you work around this or prevent this effect from happening. Thank you ",rlcrews,https://stackoverflow.com/users/290645,"This is happening because of the button chrome built into the default template for the control. Your only workaround is to re-template the Button. This article should get you started. ",Charlie,https://stackoverflow.com/users/117638,http://stackoverflow.com/questions/3048140/why-does-wpf-toggle-button-pulse-once-unchecked,STACKOVERFLOW,stackoverflow.com 4017,Document count limit under folders,"We are trying to figure out what the library file count restriction is for items under a folder. We can see here: http://technet.microsoft.com/en-us/library/cc262787(v=office.15).aspx#ListLibrary Documents :: 30,000,000 per library >> You can create very large document libraries by nesting folders, or using standard views and site hierarchy. This value may vary depending on how documents and folders are organized, and by the type and size of documents stored. Does that mean there is a file count limit of some sort under folders for a library? ",Sol Web Solutions,https://sharepoint.stackexchange.com/users/28364,"TL;DR - Stay under 5,000 items for the entire library to get 100% of functionality In addition to the 30 million documents per library you also need to be aware of the limit of 5,000 items per ""view"". http://technet.microsoft.com/en-us/library/cc262787(v=office.15).aspx#ListLibrary This particular limit can be changed in on-premise but in SharePoint Online it cannot. This means that Microsoft does not recommend having more than 5,000 folders or documents within a single folder. You can continue to nest folders but any single folder should not have more than 5,000 direct children (items or folders). That being said... you will find there are limitations putting more than 5,000 documents into a single library no matter how efficient your foldering structure. This is because certain operations will apply to all items below a certain level and those operations (if they affect more than 5,000 items) will be throttled. In my experience this includes: Adding a indexed property to the library that contains more than 5,000 Changing permissions on t he library and or folder that contains more than 5,000 ",Cory Peters,https://sharepoint.stackexchange.com/users/7221,http://sharepoint.stackexchange.com/questions/109915/document-count-limit-under-folders,TECHNOLOGY,sharepoint.stackexchange.com 1613,Lead Free Soldering and bad looking joints,"For years I've been soldering with normal Sn60Pb40 solder wire. But now I try to switch to lead free solder. In many forums over the internet I found the Amasan BF32-3 solder wire. It's a Sn95Ag4Cu solder wire with 3.5% flux. So I tried it and was very disappointed. Nearly every solder joint was looking different. Some of them were (partially) shiny; some (the most) of them were dull. And the worst thing was, that even with additional flux, the solder didn't flow like the leaded. So there is no way, I could solder fine pith SMD stuff with it. I’m using a JBC soldering iron station with a C245-907 2.2mm chisel tip and tried different temperatures starting with 290°C to 360°C. The best results I get with about 315°C, with 350°C I got the worst results. I used the Amtech NC-559 Flux – the original, not the fake from china. Some other guys told me, that maybe the solder wire is not the best. That's why I'm looking for other soldering wires. But there are so many on market. Some with copper, some are Sn96.5Ag3.5 like the Amtech ASN96A3.5-0.50. So can someone tell me, with what type of solder wire or what product I can get nice shiny solder joints. And yes, I now that dull joints were not a sign for a bad or even cold joint. ",user39063,https://electronics.stackexchange.com/users/39063,"For things that require RoHS, I've been using a version of lead-free popular with assembly houses- Sn99.3/Cu0.7 2% flux, which seems to work okay. The joints are not quite as shiny as the beloved Sn63/Pb37 with RMA flux, but quite acceptable. Left two joints are lead-free, right joint is Sn63/Pb37. ",Spehro Pefhany,https://electronics.stackexchange.com/users/35530,http://electronics.stackexchange.com/questions/103778/lead-free-soldering-and-bad-looking-joints,SCIENCE,electronics.stackexchange.com 5323,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? ",P..,https://expressionengine.stackexchange.com/users/1962,"It searches for (some) settings in the control panel. So you could search for file, and you should get a result/link to the file manager. Similarly, searches for category, channel, username should all return results with links to the respective areas of the CP. However, the search results aren't consistent. Search for security and you don't get any results, yet a search for session gives a result for the Security and Session Preferences. I'd say its there for someone who has limited knowledge of EE general options and wants to access some of the preferences, but can't find them. Not entirely useful though! ",Andrew Armitage,https://expressionengine.stackexchange.com/users/1287,http://expressionengine.stackexchange.com/questions/21510/ee-control-panel-dashboard-search-field,TECHNOLOGY,expressionengine.stackexchange.com 8142,"What is another way to put ""mistaken about what one saw""?","Is there any more slangy/easy way of saying ""mistakenly about what one saw""? Like in the below example what else can be replaced Maybe I was mistaken.? A: I think I heard something in the dark. B: I didn't hear anything. A: Maybe I was mistaken. ",user49119,https://ell.stackexchange.com/users/3086,"mistaken is easy and unambiguous so better use this word only. Still, if you want other ways to say that, here are they... A: I think I heard something in the dark. B: I didn't hear anything. A: Maybe, I was mislead about that sound. OR Maybe, it could be something else! OR Maybe, I misunderstood it as some sound. To avoid ambiguity, I'd prefer the second one - Maybe, it could be something else (not sound). ",Maulik V,https://ell.stackexchange.com/users/3187,http://ell.stackexchange.com/questions/19037/what-is-another-way-to-put-mistaken-about-what-one-saw,CULTURE,ell.stackexchange.com 283,Force garbage collection/compaction with malloc(),"I have a C++ program that benchmarks various algorithms on input arrays of different length. It looks more or less like this: # (1) for k in range(4..20): # (2) input = generate 2**k random points for variant in variants: benchmark the following call run variant on input array # (3) Is it possible to reset the whole heap management at (2) to the state it had at (1)? All memory allocated on the heap that was allocated during the program is guaranteed to be freed at (3). I am using g++ 4.3 on Linux. Edit: I understand that there is no real garbage collection in C/C++. I want to force the memory allocation to join adjacent empty chunks of memory it has in its free list at (2). ",Manuel,https://stackoverflow.com/users/84349,"There's no automatic way, you have to manually delete whatever is on the heap to get back to the state of (1). ",Brian R. Bondy,https://stackoverflow.com/users/3153,http://stackoverflow.com/questions/733900/force-garbage-collection-compaction-with-malloc,STACKOVERFLOW,stackoverflow.com 7171,Postfix or exim: Automated/Programmatic and forwarded email setup,"I'm looking to replace our current use of an external smtp provider with an in-house installation. It should handle the following situations: Certain addresses should be forwarded to gmail addresses; we'd like to continue to use gmail as our primary email interface. Other addresses should be available as pop/imap mailboxes. Other addresses will be handled programmatically: they'll kick off various tasks, get logged, etc. These addresses should either kick off a process to the handle the email addresses, or should store in an easily processable format. It should also be fairly easily configurable with domain keys, spf, and anything else it takes to allow email deliverability. I've used sendmail in the distant past. It seems postfix and exim are the recommended options these days. My main question is: what's the best choice and setup for the forwarding of the addresses to gmail, and for the programmatic access? Is procmail still the way to go or are there better options these days? We're using linux/ubuntu servers. ",Parand,https://serverfault.com/users/6162,"Postfix is solid, well-supported and easy to configure. All the stuff you describe is fairly routine. Forwarding: use virtual_alias maps POP/IMAP mailboxes: local delivery, use something like Dovecot for your POP/IMAP server Programmatic stuff: if you mean you feed the mail to a script, that's done from /etc/aliases. For ""easily processable"", you've got mbox and Maildir format, it's all standard stuff. Domain keys/SPF: SPF is done in DNS. Domain-keys is easy enough to setup as a milter or SMTP proxy. ",furinkan,https://serverfault.com/users/12522,http://serverfault.com/questions/39376,TECHNOLOGY,serverfault.com 3878,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 static all methods and variable have to be static. The main method always is a static method so in the class that the main method exists all variables and methods are declared static if you have to call them in the main method. Also I have noticed that in order to call a static method from another class you do not need to create an object of that you can use the class name. What are the advantages of declaring static variables and methods? When should I declare static variable and methods? ",Nistor Alexandru,https://programmers.stackexchange.com/users/52164,"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 = 3; //instance field private int _Foo2 = 4; //instance property public int Foo2{get{return _Foo2;}set{_Foo2 = value;}} //static constructor public static SomeObject CreateSomeObject(int fooValue) { SomeObject retVal = new SomeObject(); retVal.Foo2 = fooValue; return retVal; } //Parameterless instance constructor public SomeObject() { } public static int Add(int x) { //Static methods can only deal with local variables, or fields that // are also static in the class. This one adds x to the static member foo return x + Foo; //Foo2 is not accessable here! } //Instance method public void AddSomething(int x) { //Add x to the property value of Foo2 return x + this.Foo2; //Note that Foo *is* accessable here as 'SomeObject.Foo' } } I can honestly say that I have never used a class marked as static with the exception of creating extention methods (Quick tutorial on extension methods). Anyways, there are specific design patterns for utilizing static methods, such as factory pattern and singleton pattern, but the important thing to remember is that static methods and constructors do not deal with any specific instance of a class (unless you pass one in). So utilizing static methods is more of a stateless implementation of a methods, e.g. to do calculations or to do a comparison between objects. The ""Main"" method you are refering to is always static, but to see it from a different point of view, see this article. To follow up with this, here is how the difference between static and instantiated methods, fields and properties are called. public static void Main(string[] args) { //This is a static method that starts a thread in an application // space. At this point not everything actually has to be static... //Here is an instantiation with a parameterless contruction SomeObject obj = new SomeObject(); //Here is an instantiation using a static contructor (factory) SomeObject obj2 = SomeObject.CreateSomeObject(3); //Getting field value from static field // Notice that this references the class name, not an instance int fooValue1 = SomeObject.Foo; //Getting property value from instance // Note that this references an object instance int fooValue2 = obj2.Foo2; //Instance method must be called through an object obj2.AddSomething(4); //if default constructor, would return 8 //Static methods must be called through class name SomeObject.Add(4); //Returns 7 } Also, check this post out for a deeper look into static classes. ",iMortalitySX,https://programmers.stackexchange.com/users/63421,http://programmers.stackexchange.com/questions/163457/understanding-the-static-keyword,TECHNOLOGY,programmers.stackexchange.com 4253,display tag and c choose tag,"I use the following code. But it is always go to the otherwise condition. I checked the value , and those are correctly passed from java to the jsp. Any missing points? <c:when test=""${pCount > 0}""> <display:column class=""colPCount"" property=""pCount "" title=""${titlePCount}"" sortable=""true"" headerClass=""sortable"" /> </c:when> <c:otherwise> <display:column class=""colPCount"" title=""${titlePCount}"">&nbsp;-&nbsp;</display:column> </c:otherwise> For the pcount>0 items, still displaying as '-' in the display tag. Even I reverse the checking condition like pCount<0 in the first condition checking, the display tag always show the otherwise condition. It always pointing to the otherwise condition for every value. Edited: Full Code <display:table class=""displayTable"" id=""itemList"" name=""${sessionScope.itemList}"" requestURI=""listItem.action"" pagesize=""15"" defaultsort=""2"" defaultorder=""ascending"" sort=""list""> <display:column class=""colItemName"" property=""name"" title=""${titleItemName}"" sortable=""true"" headerClass=""sortable""/> ... <c:choose> <c:when test=""${pCount > 0}""> <display:column class=""colPCount"" property=""pCount "" title=""${titlePCount}"" sortable=""true"" headerClass=""sortable"" /> </c:when> <c:otherwise> <display:column class=""colPCount"" title=""${titlePCount}"">&nbsp;-&nbsp;</display:column> </c:otherwise> </c:choose> </display:table> ",kitokid,https://stackoverflow.com/users/751689,"Try this way: ${itemList.pCount>0} ",Alex,https://stackoverflow.com/users/1599479,http://stackoverflow.com/questions/12831136/display-tag-and-c-choose-tag,STACKOVERFLOW,stackoverflow.com 7048,Custom stackoverflow settings,"Is it possible to be able to set some default settings, such as the display format of dates of posts? (For example, I would much rather see 2011-13-01 than the current jan 13 '11) In addition to an alternative datetime format one could also think of some other settings, perhaps some color blind settings, light/dark-theme or some other stuff I'm sure some clever people here can think of. ",Deruijter,https://meta.stackexchange.com/users/214628,"No, please do not overcomplicate things with endless little settings to suit each and every user. You can style and tweak Stack Overflow endlessly in your own browser. There are Stylish plugins for Firefox, Chrome, Safari and Opera, with several Stack Overflow themes to choose from already. It is easy to create your own styles. For altering behaviour, you can add Greasemonkey to Firefox and Opera or NinjaKit to Safari; Chrome supports most such scripts out-of-the-box. Then head over to UserScripts.org to find yourself Stack Overflow tweaks. Many of these styles and scripts are also (or only) featured on StackApps.com, the Stack Exchange Q&A site for the SE API, SE applications and scripts. ",Martijn Pieters,https://meta.stackexchange.com/users/140890,http://meta.stackexchange.com/questions/172818/custom-stackoverflow-settings,TECHNOLOGY,meta.stackexchange.com 6178,jQuery Validation not validating on button click,"I have the following JavaScript function: $('div.nextStepBilling').click(function (e) { if ($(this).parent().parent().attr(""id"") == ""newCardDiv"") { $('form#myForm').validate({ rules: { cardHolder: ""required"", cardNumber: { required: true, minlength: 15, maxlength: 16 }, CVV: { required: true, minlength: 3, maxlength: 4 } }, messages: { cardHolder: ""Card holder name is required"", cardNumber: { required: ""Credit card number is required"", minlength: ""Credit card must be at least 15 digits long"", maxlength: ""Credit card must be at most 16 digits long"" }, CVV: { required: ""CVV (security code) is required"", minlength: ""CVV must be at least 3 digits long"", maxlength: ""CVV must be at most 4 digits long"" } } }); if ($('form#myForm').valid()) { alert(""valid""); } else { alert(""invalid""); } } }); When I click on the proper div.nextStepBillingit always alerts valid, even if there is nothing in those inputs. I don't get any errors in the console and I can get jquery validate to work using $('form#myForm').validate().element(""#cardHolder""); I have the latest jquery and jquery validate packages included (in proper order) on the page. Can anyone see anything wrong with the above code? ",hjavaher,https://stackoverflow.com/users/1244328,"Your problem is here: $('div.nextStepBilling').click(function (e) { if ($(this).parent().parent().attr(""id"") == ""newCardDiv"") { $('form#myForm').validate({ // rules & options ... Because .validate() is only the initialization method of the plugin, it is not the testing method. The .validate() method only gets called once on DOM ready to initialize the plugin with your rules & options. All subsequent calls are ignored. You would use the .valid() method to programmatically trigger a validation test on demand. Your code should look more like this... $(document).ready(function() { $('form#myForm').validate({ // initialize the plugin // rules & options }); $('div.nextStepBilling').click(function (e) { if ($(this).parent().parent().attr(""id"") == ""newCardDiv"") { $('form#myForm').valid(); // triggers a test on the form ... Simple DEMOS: http://jsfiddle.net/zSq94/ and http://jsfiddle.net/zSq94/1/ ",Sparky,https://stackoverflow.com/users/594235,http://stackoverflow.com/questions/18223307/jquery-validation-not-validating-on-button-click,STACKOVERFLOW,stackoverflow.com 5792,Can you talk on the iPhone and use Siri with Monster beats headphones?,"I want a set of Beats by Dre headphones and have seen that they come with a control on the cord. Does this have a Mic? and can it be used with Siri in the same way the official Apple ones can? I have looked at online reviews etc, but little is mentioned with iPhone voice compatibility. ",Graeme Hutchison,https://apple.stackexchange.com/users/13247,"Yes. The Monster Beats cables are fully compatible with Apple hardware. They have a mic to support voice actions and Siri. They also have all the hardware buttons for playing music and making phone calls. I happen to own the Beats Solo headphones. This is what the packaging says: ""Made for iPod"", ""Made for iPhone"" and ""Made for iPad"" mean that an electronic accessory has been designed to connect specifically to iPod, iPhone or iPad, respectively, and has been certified by the developer to meet Apple performance standards. (also see MiF logo on Apple's website) These minimum standards would include voice and button actions using the headset. ",gentmatt,https://apple.stackexchange.com/users/13414,http://apple.stackexchange.com/questions/44551/can-you-talk-on-the-iphone-and-use-siri-with-monster-beats-headphones,TECHNOLOGY,apple.stackexchange.com 3705,"Netbook screen display is garbled (has black/white & horizontal line patterns, screen freezes, and/or wrong display position)","Upon powering my netbook on, its screen turns into a garbled display (has black/white patterns, horizontal line patterns, screen freezes and/or wrong display position). This distortion happens even at BIOS startup, continuing to Windows startup. Occasionally, the issue starts around 3 minutes after the Windows desktop appears. Pictures of the monitor (click on image to enlarge): More pictures at: http://imgur.com/a/ArME1 Details: This happens even in safe mode (the last picture above is of the netbook screen in safe mode). I connected the netbook to an external monitor (through VGA) and the display in the external monitor shows up just fine. I have been able to use the netbook without any issues with an external monitor. Aside from the monitor, the netbook still works (I can shut it down with keyboard shortcuts) and the files that it has shared through LAN can be accessed fine. The torrent client's web interface on the netbook can also still be accessed on another computer. The issue sometimes happens even at BIOS startup. The variations of the distortion will sometimes change randomly. Occasionally, the non-distorted screen display will simply freeze. The netbook didn't fall in the ground or get hit by an object. The netbook is mostly used as a torrent seeder and downloader. Its lid is opened and closed around 2 times a day only, but the netbook is powered on almost 24/7 (its lid is closed most of the time). It is mostly accessed through another computer through LAN and is not often used directly. The netbook was bought around 2 years ago. What are the possible causes of this? Any possible fixes or methods of repair I can look into? The netbook is now out of warranty. Netbook details: Model: Samsung NP-N150 OS: Windows 7 Starter Graphics Chip: Intel GMA3150 Monitor: Screen Size 10.1"", LED Backlit Other specs here: http://www.samsung.com/us/computer/laptops/NP-N150-JA01US-specs ",galacticninja,https://superuser.com/users/10259,"Possible causes: Overheating as @Dan Neely says Physical issue with cable connecting LCD to motherboard BIOS not initializing GPU correctly, try BIOS update (this is a long shot) Motherboard needs to be replaced (bad chipset, or bad something else that would cost more than replacing the motherboard to fix) ",LawrenceC,https://superuser.com/users/51705,http://superuser.com/questions/421513,TECHNOLOGY,superuser.com 9159,"Trying to publish ASP.NET project, but VS can't find a particular file","One of the css files disappears from the publish obj/Release/Package/PackageTmp/ folder during publishing and then VS tells me it can't find the file. It's as if one portion of the project says to delete the file and the other tries to find the file. Any ideas? I hope I gave enough info. It's short, but pretty much sums up the issue to my knowledge. csproj file. The only file I'm having an issue with is the survey.css file. It appears just twice in the csproj file. <Content Include=""greybox\logo.gif"" /> <Content Include=""greybox\next.gif"" /> <Content Include=""greybox\night_valley.jpg"" /> <Content Include=""greybox\night_valley_thumb.gif"" /> <Content Include=""greybox\night_valley_thumb.jpg"" /> <Content Include=""greybox\prev.gif"" /> <Content Include=""greybox\salt.jpg"" /> <Content Include=""greybox\salt_thumb.gif"" /> <Content Include=""greybox\w_close.gif"" /> <Content Include=""layout.css"" /> <Content Include=""obj\Debug\Survey.csproj.FileListAbsolute.txt"" /> <Content Include=""obj\Debug\Survey.dll"" /> <Content Include=""obj\Debug\Survey.pdb"" /> <Content Include=""obj\Release\Package\PackageTmp\bin\Survey.dll"" /> <Content Include=""obj\Release\Package\PackageTmp\default.aspx"" /> <Content Include=""obj\Release\Package\PackageTmp\layout.css"" /> <Content Include=""obj\Release\Package\PackageTmp\survey.css"" /> <Content Include=""obj\Release\Package\PackageTmp\ThankYou.aspx"" /> <Content Include=""obj\Release\Survey.csproj.FileListAbsolute.txt"" /> <Content Include=""obj\Release\Survey.dll"" /> <Content Include=""obj\Release\Survey.pdb"" /> <Content Include=""obj\Release\_WPPLastBuildInfo.txt"" /> <Content Include=""survey.css"" /> <Content Include=""SurveyAdded.aspx"" /> <Content Include=""ThankYou.aspx"" /> <Content Include=""Web.config"" /> ",Keith Salmon,https://stackoverflow.com/users/1390247,"I would open your CSProj file up in a text editor and see if you can find where that file is referenced. A simple text search will help. Either you will discover where it is hiding inside your project, or you can just delete it using the text editor. ",MANISHDAN LANGA,https://stackoverflow.com/users/1065365,http://stackoverflow.com/questions/17120488/trying-to-publish-asp-net-project-but-vs-cant-find-a-particular-file,STACKOVERFLOW,stackoverflow.com 2692,How to efficiently delete elements from vector c++,"I have a vector of pair of vectors(V1,V2) called pairV1V2 of the following form: (1,2,3),(938,462,4837) -> (V1,V2) (3,9,13),(938,0472,944) (81,84,93),(938,84,845) Then I need to retain the following: (1,2,3),(938,462,4837) -> (V1,V2) (3,9,13),(938,0472,944) (81,84,93),(84,845) I need to start scanning pairV1V2 from the beginning and where ever any two V1's are not equal, there I need to delete the intersecting elements from V2. I wrote the following code for doing same. However, my code turns out to be very inefficient as my vector pairV1V2 is big and it has many elements in V2 (about a billion). int main(int argc, char** argv) { std::vector<std::pair<std::vector<unsigned>, std::vector<unsigned> > > pairV1V2; std::vector<std::pair <std::vector<unsigned>,std::vector<unsigned> > >::iterator itm2,lm2=pairV1V2.end(); for(std::vector<std::pair <std::vector<unsigned>,std::vector<unsigned> > >::iterator itm=pairV1V2.begin(), lm=pairV1V2.end(); itm!=lm; ++itm) { //Outer values vector<unsigned> outerV1=(*itm).first; vector<unsigned> outerV2=(*itm).second; sort(outerV2.begin(), outerV2.end()); itm2=itm; itm2++; for(itm2;itm2!=lm2;++itm2) { vector<unsigned> innerV1=(*itm2).first; vector<unsigned> innerV2=(*itm2).second; vector<unsigned> setDiffV1; std::set_difference(innerV1.begin(), innerV1.end(), outerV1.begin(), outerV1.end(), std::inserter(setDiffV1, setDiffV1.end())); if(setDiffV1.size()==0) //check whether any two V1's are different { sort(innerV2.begin(), innerV2.end()); if((itm->second.size()!=0)&&(itm2->second.size()!=0)){ std::vector<unsigned> delIntersectingElem; std::set_intersection(outerV2.begin(),outerV2.end(),innerV2.begin(), innerV2.end(), std::back_inserter(delIntersectingElem)); if(delIntersectingElem.size()!=0) //if there are intersecting V2's { for(std::vector<unsigned>::iterator its=(itm2->second).begin(),ls=(itm2->second).end();its!=ls;) { //if *its is present in delIntersectingElem then delete it. if(!(std::find(delIntersectingElem.begin(), delIntersectingElem.end(), (*its)) == delIntersectingElem.end())) { (itm2->second).erase(its); //delete intersecting elements from inner v2 ls--; }else{ ++its; } } } } } } } return 0; } Can someone please help me in improving my present code -- it gives the correct answer (In the example I might have missed a few case for brevity-- but the code handles all of them) but is extremely slow (as diagonalised by perf). I'll be grateful if improvements are suggestion in my present piece of code. However, if the logic of the two codes are same, then a new algorithm is also acceptable ",Steg Verner,https://stackoverflow.com/users/4360034,"There's an underused STL algorithm called remove_if that allows you to efficiently (O(n)) remove all elements matching a predicate from a container. It is most useful if you have a vector or deque, because they have an expensive (O(n)) erase operation for an element ""in the middle"". However, you need to be aware that remove_if doesn't actually erase any element, it only moves all elements that do not match the predicate to the front of the range you specified. The canonical way to do an ""erase_if"" is therefore (in this example, all odd integers will be erased): std::vector ints = …; ints.erase(std::remove_if(begin(ints), end(ints), [](int i) { return i%2 != 0; }), end(ints)); Explanation: remove_if moves all ints not matching the predicate (i.e. the even ints in this example) to the front and returns an iterator one past the last of these elements. Then, we actually erase all elements starting with this one to the end of the vector using the range overload of vector<int>::erase. E.g., assume we have ints == {5,7,4,10,9,16,20,6}. remove_if will turn ints into {4,10,16,20,6,UNSPEC,UNSPEC,UNSPEC} where I used UNSPEC to denote any unspecified value, and it will also return an iterator pointing to the first UNSPEC element. Then, we erase all the elements with unspecified value and get {4,10,16,20,6}, the desired result. UPDATE: With respect to the previous answer, I want to point out that remove_if is stable, i.e. it will not change the order of the remaining elements. ",Arne Vogel,https://stackoverflow.com/users/4083309,http://stackoverflow.com/questions/30611584/how-to-efficiently-delete-elements-from-vector-c,STACKOVERFLOW,stackoverflow.com 834,Using pstool with beamer,"I would like to use pstool with beamer to create a presentation in pdflatex with figures processed by psfrag. However, as the simple example below shows, the figures are processed using the beamer documentclass, so that they each have a full beamer ""frame"" around them. Is there a way around this? \documentclass{beamer} \usepackage{lmodern} \usepackage{graphicx} \usepackage[process=all,crop=pdfcrop]{pstool} \begin{document} \begin{frame} \frametitle{Circle} \begin{figure} \psfragfig[width=0.3\textwidth]{figures/circle} { \psfrag{1}{\(s\)} } \end{figure} \end{frame} \end{document} I suspect that if it's possible to override the documentclass used by pstool to process the figures, that would be a solution, but I haven't found how to do this. Thanks. ",mjr,https://tex.stackexchange.com/users/5238,"The key to solving this is to realise that a ""regular"" compilation process sends your document through pdfLaTeX in PDF mode, and in order to do the psfrag replacements the graphic is sent through pdfLaTeX in DVI mode. Therefore, conditional commands for either the main document only or each graphic only can simply use \ifpdf: \ifpdf % setup for the main document only \else % setup for pstool images only \fi And so in your case: \ifpdf\else \setbeamertemplate{navigation symbols}{} \fi This is entirely unmentioned in the documentation, so I'll go fix that up now. ",Will Robertson,https://tex.stackexchange.com/users/179,http://tex.stackexchange.com/questions/167489/using-pstool-with-beamer,TECHNOLOGY,tex.stackexchange.com 8631,Create and open file with one command?,"I want to create a text file and open it in a text editor with a single command. I know touch file.txt creates a file and open file.txt opens the file, but is there a way to do this with a single command? ",Marcus McLean,https://unix.stackexchange.com/users/36377,"Use vim. Just type vim newfile.txt For vim you need to know the hot-keys. i - Insert text in the file esc - return to the command-input-mode :w - Write (save) :q - Quit (exit) or (Easier to use Nano): nano newfile.txt If you want a GUI type: (Works for ubuntu and other distros) gedit newfile.txt ",AAlvz,https://unix.stackexchange.com/users/31772,http://unix.stackexchange.com/questions/70973/create-and-open-file-with-one-command,TECHNOLOGY,unix.stackexchange.com 3127,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.com/cameron/nick/repair/price.html HTML: <table id=""prices""> <tr> <td class=""clear""></td> </tr> <tr class=""head""> <td class=""clear""></td> <td class=""head""> <a href=""desktop.html""><h3>Desktop</h3></a> </td> <td class=""head""> <a href=""laptop.html""><h3>Laptop</h3></a> </td> <td class=""head""> <a href=""server.html""><h3>Server</h3></a> </td> </tr> <tr id=""priceRow""> <td class=""clear""></td> <td class=""price""> <h2>Testing</h2> </td> <td class=""price""> <h2>Testing</h2> </td> <td class=""price""> <h2>Testing</h2> </td> </tr> <tr class=""catTr""> <td class=""category""> <a href=""services_hwrep.html"">Hardware Repair</a> </td> <td> <a href=""services_hwrep.html""><img src=""../css/images/check.png"" /></a> </td> <td> <a href=""services_hwrep.html""><img src=""../css/images/check.png"" /></a> </td> <td> <a href=""services_hwrep.html""><img src=""../css/images/check.png"" /></a> </td> </tr> <tr class=""catTr""> <td class=""category""> <a href=""services_netts.html"">Network Troubleshooting</a> </td> <td> <a href=""services_hwrep.html""><img src=""../css/images/check.png"" /></a> </td> <td> <a href=""services_hwrep.html""><img src=""../css/images/check.png"" /></a> </td> <td> <a href=""services_hwrep.html""><img src=""../css/images/check.png"" /></a> </td> </tr> <tr class=""catTr""> <td class=""category""> <a href=""services_netts.html"">Network Troubleshooting</a> </td> <td> <a href=""services_hwrep.html""><img src=""../css/images/check.png"" /></a> </td> <td> <a href=""services_hwrep.html""><img src=""../css/images/check.png"" /></a> </td> <td> <a href=""services_hwrep.html""><img src=""../css/images/check.png"" /></a> </td> </tr> <tr class=""catTr""> <td class=""category""> <a href=""services_netts.html"">Network Troubleshooting</a> </td> <td> <a href=""services_hwrep.html""><img src=""../css/images/check.png"" /></a> </td> <td> <a href=""services_hwrep.html""><img src=""../css/images/check.png"" /></a> </td> <td> <a href=""services_hwrep.html""><img src=""../css/images/check.png"" /></a> </td> </tr> <tr class=""catTr""> <td class=""category""> <a href=""services_netts.html"">Network Troubleshooting</a> </td> <td> <a href=""services_hwrep.html""><img src=""../css/images/check.png"" /></a> </td> <td> <a href=""services_hwrep.html""><img src=""../css/images/check.png"" /></a> </td> <td> <a href=""services_hwrep.html""><img src=""../css/images/check.png"" /></a> </td> </tr> <tr class=""foot""> <td div class=""clear""></td> <td class=""foot""> <a href=""contact.html"" class=""action_button"">Contact Us</a> </td> <td class=""foot""> <a href=""contact.html"" class=""action_button"">Contact Us</a> </td> <td class=""foot""> <a href=""contact.html"" class=""action_button"">Contact Us</a> </td> </tr> </table> jQuery: <script> (function() { $('tr.catTr td').not('.category').hover(function(){ var priceSel = $(this).index(); $('tr#priceRow td').eq(priceSel).addClass('price_hover'); $('tr.catTr td').eq(priceSel).addClass('vertFilt'); $(this).closest('tr').find('td.category').addClass('category_hover'); },function(){ var priceSel = $(this).index(); $('tr#priceRow td').eq(priceSel).removeClass('price_hover'); $('tr.catTr td').eq(priceSel).removeClass('vertFilt'); $(this).closest('tr').find('td.category').removeClass('category_hover'); }); })(); </script> Live Link: http://www.sinsysonline.com/cameron/nick/repair/price.html Now, how to highlight EVERY equivalent child in the column.... I know I need to do something with .each(), but I'm unsure where to put it... ",Nicholas Hazel,https://stackoverflow.com/users/2275042,"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,.category_hover') .addClass('vertFilt'); So, for your situation, try this: $('tr.catTr td').not('.category').hover(function(){ var priceSel = $(this).index(); $('table#prices tbody td:nth-child('+priceSel+')') .not('.head,.price,.foot,.category_hover') .addClass('vertFilt'); ... },function(){ var priceSel = $(this).index(); $('table#prices tbody td:nth-child('+priceSel+')') .not('.head,.price,.foot,.category_hover') .removeClass('vertFilt'); ... ",Fallexe,https://stackoverflow.com/users/2430567,http://stackoverflow.com/questions/16868877/jquery-apply-styling-to-all-vertical-td-in-table-on-hover,STACKOVERFLOW,stackoverflow.com 5497,When can an article be omitted?,"I am aware that articles are the modifiers, which introduce a noun/noun_phrase in a sentence, and by the rules of English grammar we should use an article before referring to a noun in a sentence. However, I see that the above rule is not strictly followed. I have seen sentences where though a noun/noun_phrase is used in a sentence but an introductory article is not used. Eg : Login to desktop and start the paint application [ Desktop is a noun, hence I expect either ""Login to a desktop and ...."" or ""Login to the desktop at the corner and .....""] So please help me understand, when can an article be omitted ? Thanks in advance. ",Flair,https://ell.stackexchange.com/users/8260,"The examples given by the original poster are written instructions, where a kind of ""telegraph-ese"" style is employed for the sake of brevity. That style does not reflect natural spoken idiom. Place wax paper on countertop. Place sandwich on wax paper. Fold wax paper around sandwich. Place sandwich in paper bag. Roll bag shut. Go to work. ",Tᴚoɯɐuo,https://ell.stackexchange.com/users/10264,http://ell.stackexchange.com/questions/33304/when-can-an-article-be-omitted,CULTURE,ell.stackexchange.com 8127,Calculate integral for arbitrary parameter n in infinite square well problem,"I'm continuing[1,2] the study of an infinite square well in the context of quantum mechanics. Ultimate goal is to calculate the product $\Delta x\Delta k$, for various eigenstates, that is for various values of number $n$. I have finished with $\Delta x$, but I'm stuck with $\Delta k$. ClearAll[""Global`*""]; (* The length of the well *) L = 1; (* The eigenfunctions, n=1,2,3,... *) u[n_, x_] := If[x <= 0 || x >= L, 0, Sqrt[2/L] Sin[n π x / L]] (* The Fourier transform of eigenfunctions u[n,x] from the position domain onto the momentum domain *) φ[n_, k_] := Simplify[ FourierTransform[u[n, x], x, k, FourierParameters -> {0, -1}], n ∈ Integers] (* The probability density function η(n,k) *) η[n_, k_] := FullSimplify[φ[n, k] \[Conjugate] φ[n, k], {n ∈ Integers, k ∈ Reals}] (* Calculate (Δk)^2 = <k^2> - <k>^2 = <k^2> *) Integrate[ k^2 η[n, k], {k, -∞, +∞}, (* Edited: Was: {n ∈ Integers, n > 0}, but this edit didn't fix the problem. *) Assumptions -> n ∈ Integers && n > 0] The problem is that Mathematica can't calculate the last integral for any arbitrary $n$, although it can, correctly, calculate its value for hardcoded $n$s. Like $n=1,2,...$. My question is: Do you have any idea on how I could calculate it, perhaps by rewriting it a bit, or by using some other trick? In case it helps, the result should be $n^2\pi^2$. Note: Actually it can be calculated with Cauchy's residue theorem, but I'd like to avoid taking that route, if possible. Though, if it can't be done otherwise, I will post a solution with residual calculation so that this question has an answer. Mathematica.SE related (to the physical problem) questions: Is there a more mathematica-y way to label these plots? Why does FourierTransform converge while same integral manually written does not? ",Zet,https://mathematica.stackexchange.com/users/9083,"Here's as close as I can get via Mathematica. First, I just simplify the integrand once for all. Having Simplify in the definition of a function could be really slow. Edit: I added the unsimplified versions of the OP's functions, including a substitution of Boole for If, which I omitted to include in the original answer. u[n_, x_] := Boole[0 <= x <= L] Sqrt[2/L] Sin[n π x/L]; φ[n_, k_] := FourierTransform[u[n, x], x, k, FourierParameters -> {0, -1}]; η[n_, k_] := φ[n, k]\[Conjugate] φ[n, k]; integrand = FullSimplify[k^2 \[Eta][n, k], {n \[Element] Integers, n > 0, k \[Element] Reals,L > 0}] (* -((2 k^2 L n^2 \[Pi] (-1 + (-1)^n Cos[k L]))/(k^2 L^2 - n^2 \[Pi]^2)^2) *) Then, Integrate gets real close, if you make a substitution k -> n k. Since the differential of n k is n dk, you have to multiply the Integrate below by n. int = n Integrate[integrand /. k -> n k, {k, -Infinity, Infinity}]; Simplify[int, {n \[Element] Integers, n > 0}] (* ConditionalExpression[ (L n^2 Pi^2)/Abs[L]^3, L \[Element] Reals && 3 Arg[-L^2] <= 2 \[Pi] && (Re[1/L^2] <= 0 || 1/L^2 \[NotElement] Reals)] *) Reduce[Last[%]] (* False *) The only problem is that the condition in the ConditionalExpression is a contradiction. ",Michael E2,https://mathematica.stackexchange.com/users/4999,http://mathematica.stackexchange.com/questions/35682/calculate-integral-for-arbitrary-parameter-n-in-infinite-square-well-problem,TECHNOLOGY,mathematica.stackexchange.com 6437,What is the Gorel Hagra?,"What is it? How is it performed? May one perform it? And, if so, when may it be used? ",yydl,https://judaism.stackexchange.com/users/128,"In this article from The Seforim Blog, under the heading ""Bibliomancy"", it says: Another interesting method found in this sefer is the method of gorel using a Chumash to find out what to do: ואני הצעיר הכותב קבלתי שצריך לעשות הגורל הנז' בחומש מכתיבת יד שאין בו כי אם חמשה חומשי תורה ואפילו לא הפטרות. והשלך שבעה שביעיות שהם מט, ומן שער החמישים יוצא כזה השלך ז' עלין... (עמ' קפט)‏ This concept has been used by many and is more recently the subject of two books, Gorel Hagra and Hegyon ha-Gorel from E. Martzbach. See also Bromberg's book, Me-Gedolei ha-Torah veha-Chasidut on the Marsham, pp. 129,144; Eliach in his book Ha-Goan, pp. 1110-1127; Alei Tamar, Shabbat, pp.83-4; R. Reuven Margolis, Mekor Chesed, p.214. I haven't actually looked up any of these sources, but I thought someone might find this useful. ",Menachem,https://judaism.stackexchange.com/users/603,http://judaism.stackexchange.com/questions/1774/what-is-the-gorel-hagra,CULTURE,judaism.stackexchange.com 5836,Does Spider-Man shoot spider silk?,"In the comics, Spider-Man shoots synthetic 'webbing' that he created from wrist devices called web-shooters. Is this the same (but scaled up) as spider silk, or is it stronger/different in anyway? ",AncientSwordRage,https://scifi.stackexchange.com/users/3804,"The Marvel Wiki entry on Spider-Man's Web-Shooters says this about the web fluid: The web fluid is a shear-thinning liquid (virtually solid until a shearing force is applied to it, rendering it fluid) whose exact formula is as yet unknown, but is related to nylon. On contact with air, the long-chain polymer knits and forms an extremely tough, flexible fiber with extraordinary adhesive properties. The web fluid's adhesive quality diminishes rapidly with exposure to air. (Where it does not make contact with air, such as the attachment disk of the web-shooter, it remains very adhesive.) After about one to two hours, certain imbibed esters cause the solid form of the web fluid to dissolve into a powder. Because the fluid almost instantly sublimates from solid to liquid when under shear pressure, and is not adhesive in its anaerobic liquid/solid phase transition point, there is no clogging of the web-shooter's parts. The Marvel Directory entry on Spider-Man says that Peter Parker intended to imitate spider's silk. Parker used equipment borrowed from his high school to fabricate a fluid that imitated a spider's silk web, and spinneret devices to project that fluid from his wrists in the form of a web strand. ",Brett White,https://scifi.stackexchange.com/users/2383,http://scifi.stackexchange.com/questions/10614/does-spider-man-shoot-spider-silk,LIFE_ARTS,scifi.stackexchange.com 8885,"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 how to hide the option itself. How can I accomplish this? ",NmdMystery,https://stackoverflow.com/users/2228070,"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 would not be able to close the window at all. So just don't do it. ",Remy Lebeau,https://stackoverflow.com/users/65863,http://stackoverflow.com/questions/24520757/hide-close-window-option-from-taskbar,STACKOVERFLOW,stackoverflow.com 6973,Can a heavy key-chain damage your ignition?,"I just bought a 2012 VW Jetta TDI. The dealer asked me to do a 2,000 mile check-up to make sure everything is within tolerances. At the check-up the service representative said my key-chain was too heavy and if I planned to keep the car for long I should reduce weight on the key-chain to keep from damaging the ignition. I only have six other keys, a hook and two small plastic electronic computer devices on the single key ring. It doesn't seem excessive at all compared to the usual key rings you see. The question is, do new car ignitions still wear out due to key-ring weight? To me this seemed like the kind of advice that might have once been true and is dispensed long after it is no longer the case. ",Copas,https://mechanics.stackexchange.com/users/1799,"On Passat B4 (1995-1997) there were lots of ignition assemblies that failed due to heavy keychains. I believe this is a sound advice from the dealer. ",Andrei Rinea,https://mechanics.stackexchange.com/users/108,http://mechanics.stackexchange.com/questions/3481/can-a-heavy-key-chain-damage-your-ignition,CULTURE,mechanics.stackexchange.com 3615,Can you approximate Cardiac Output by Ohm's law?,"I found this sentence from my notes which I cannot understand PR < CO, CO $\uparrow$, PR > CO $\downarrow$ where \item CO = AP / PR, Cardiac Output = Arterial P / Peripheral Resistance I cannot understand the first sentence. I cannot understand how you can deduce by Ohm's law the relationship. What is the point of the first sentence? ",Léo Léopold Hertz 준영,https://biology.stackexchange.com/users/86,"I don't get the first sentence either, since PR and CO in your notation are in fundamentally different units. It's like saying '4 Celsius < 5 meters.' You will have to think about what you are implicitly holding constant and ignoring in that relationship to make it meaningful. I suspect the first sentence is just emphasizing the inverse relationship between CO and PR (PR goes up, CO goes down, etc). As for Ohm's law, absolutely! You have it written right there. I assume Cardiac output is the flow rate of fluid in a blood vessel, and AP is arterial pressure, and PR is peripheral resistance. Stated another way, $\textrm{Flow} = \frac{\textrm{Pressure}}{\textrm{Resistance}}$, which is exactly Ohm's law. Frequently electrical current is described with a Hydraulic analogy, with pressure$\rightarrow$voltage, fluid flow$\rightarrow$current, and flow resistance$\rightarrow$electrical resistance. It makes a lot of sense, since electric current is literally flow of electrons. Poiseuille's Law that makes this analogy rigorous, deriving an Ohmic relationship between those variables. Interestingly enough, Poiseuille derived the law in the context of blood flow, making it particularly applicable. ",A. Kennard,https://biology.stackexchange.com/users/4840,http://biology.stackexchange.com/questions/14851/can-you-approximate-cardiac-output-by-ohms-law,SCIENCE,biology.stackexchange.com 4583,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? ",user4537,https://serverfault.com/users/106155,"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 use. This allows you to have redundant routers without configuring failover on the routers. On Linux, this does not work. You can have multiple default routes with different metrics, but currently the Linux kernel ignores the metric value. If the default router with the lowest metric disappears, traffic will not flow. ",JPW,https://serverfault.com/users/129119,http://serverfault.com/questions/347032,TECHNOLOGY,serverfault.com 4549,ToolingAPI.cls for Apex: How to get CompilerErrors at ContainerAsyncRequest in v31+?,"Im trying to patch ToolingAPI.cls in order to use it with API v32. I run it successfully for a couple of month now with v29/30, but due to changes to the API, I need to adapt some parts. Unfortunately the latest version available on github is for v30. So far I got somthing which works partly, but: looking at the tooling.wsdl for v32 at <xsd:complexType name=""ContainerAsyncRequest""> it has lost the element <xsd:element name=""CompilerErrors"" minOccurs=""0"" type=""xsd:string"" nillable=""true""/> which I've used to obtain the error details, e. g. when I save an ApexClass containing syntax error, this was the element I used to get the error. Now, since it's gone, how an where can I get the compiler error message? It's not in <xsd:element name=""ErrorMsg"" minOccurs=""0"" type=""xsd:string"" nillable=""true""/> - this one stays empty on syntax errors. ",Uwe Heim,https://salesforce.stackexchange.com/users/9937,"It has been replaced by DeployDetails <xsd:element name=""DeployDetails"" minOccurs=""0"" type=""tns:DeployDetails"" nillable=""true""/> http://www.salesforce.com/us/developer/docs/api_tooling/Content/sforce_api_objects_deploydetails.htm A complex type that contains detailed XML for any compile errors reported in the asynchronous request defined by a ContainerAsyncRequest object. Replaces the JSON field CompilerErrors in Tooling API version 31.0 and later. UPDATE First I still wasn't able to retrieve this information, because I got an Illegal value for primitive error. I've asked another question in order to show my problem and finally is solved thanks to the help of @DanielBallinger here: Patching ToolingAPI.cls for v31+: How to query for DeployDetails at ContainerAsyncRequest? ",Uwe Heim,https://salesforce.stackexchange.com/users/9937,http://salesforce.stackexchange.com/questions/57531/toolingapi-cls-for-apex-how-to-get-compilererrors-at-containerasyncrequest-in-v,TECHNOLOGY,salesforce.stackexchange.com 4467,Law of Multiple Proportions: What is the significance of small whole numbers?,"I'm new to Chemistry and in my textbook, it describes the Law of Definite Proportions and then goes on to describe the Law of Multiple Proportions. The example they give is carbon monoxide and carbon dioxide, where the mass ratio of oxygen to carbon in carbon dioxide is 2.67:1 and the mass ratio of oxygen to carbon in carbon monoxide is 1.33:1. I understand the above example, and I understand that when you compare them in the following way: 2.67g (proportion of oxygen to 1g carbon in carbon dioxide)/ 1.33g (proportion of oxygen to 1g carbon in carbon monoxide) = 2.00, a small whole number. $\frac{Mass~oxygen~to~1g~carbon~in~carbon~dioxide}{Mass~oxygen~to~1g~carbon~in~carbon~monoxide}$ = $\frac{2.67g}{1.33g}$ = 2.00 My textbook doesn't describe what a small whole number is, or what it means... just that, in this example, 2.00 is a small whole number. What is the significance of the 2.00? I understand that carbon dioxide has double the oxygen. Is this where the 2.00 plays a role? ",Melanie Shebel,https://chemistry.stackexchange.com/users/402,"The law of multiple proportions is largely obsolete these days because we all believe that atoms exist. Prior to about 1900 this and similar laws were used to show that, for example, the ratio of oxygen in $\ce{CO}$ to oxygen in $\ce{CO2}$ is 2:1. Of course that's trivially obvious when we write the formulas, but before we believed in atoms the ""small whole number"" ratios were used as an example of an experimental situation (the 2:1 ratio) could be explained by atoms (i.e. quantizing atomic masses.) Today, the law causes more confusion than it cures. Atoms are here to stay. ",Paul J. Gans,https://chemistry.stackexchange.com/users/675,http://chemistry.stackexchange.com/questions/3975/law-of-multiple-proportions-what-is-the-significance-of-small-whole-numbers,SCIENCE,chemistry.stackexchange.com 9235,"Anybody knows if there is a counterpart for CTR+w , that deletes immediate words after cursor","I mean when the cursor is on the left side of the words ,I would like to remove the words on the immediate right side of it . CTR+k remove everything on the right side, i only want one word to be removed. ",Eric,https://serverfault.com/users/67065,"Bash tends to use libreadline for commandline input, so you can create an inputrc file that lets you control what keystrokes do what. man readline 3 should explain the format, you can also find this in the READLINE section of bash's manpage (the specific command you want is kill-word) zsh doesn't use libreadline apparently, but it seems they've mimicked a lot of the functionality. It looks like there are some options to mimic bash's word matching, but you'll need to bind them to a key. ",DerfK,https://serverfault.com/users/56830,http://serverfault.com/questions/226679,TECHNOLOGY,serverfault.com 2690,Unusual Differential Equation,"I have the differential equation $$y''y+n(y')^2=0\tag 1$$ I haven't found any references to equations of this type by searching. Does anyone have a suggestion as to how to proceed? It comes about from the following progression: $$y=(y')^n-\frac 1n\tag 2\\ y'=ny''(y')^{n-1}\implies1=ny''(y')^{n-2}\\ 0=n(n-2)(y'')^2(y')^{n-3}+ny'''(y')^{n-2}\\ 0=(n-2)(y'')^2+y'''y'$$ Taking $y$ in place of $y'$ and $n$ in place of $n-2$ I get the form shown in $(1)$. Are there any good ways to solve any of the other intermediate forms, or even the initial form shown in $(2)$? Further constraints: $y(0)\approx 1.27$ is an otherwise-unknown constant that I am attempting to build an expression for. The initial problem is the recurrence relation with $a_1\approx 1.27$ the unknown constant and $$a_{n+1}=(a_n)^{n+1}-\frac 1{n+1}$$ with the additional constraint $\lim_{n\to\infty}a_n=1$. ",abiessu,https://math.stackexchange.com/users/86846,"Have you thought about doing these: $$y'=u\to y''=u\frac{du}{dy}$$ and so $$y''y+n(y')^2=0\to u(u'(y)y+nu)=0$$ ",Resident Dementor,https://math.stackexchange.com/users/8581,http://math.stackexchange.com/questions/583334/unusual-differential-equation,SCIENCE,math.stackexchange.com 8643,NSLog not printing to terminal,"Ok, so I've been using NSLog in objective-C for awhile now to debug and I know it's supposed to print to the terminal whatever I put in the parentheses. For some reason, it just stopped printing to the terminal and I'm not sure how to fix this error. I was wondering what other people would suggest doing to fix this problem. I've only included part of my code because I don't want to scare away someone from answering this simple (or at least I hope it's simple to fix) problem. When I run the code, the only two statements that print are ""serverButton - Stage 1"" and ""serverButton - Stage 2 - Complete"" but nothing else in between. FYI -(void)startServer is in another class called ""Server"" and I have made ""server"" a pointer to that said class. -(IBAction)serverButton { NSLog(@""serverButton - Stage 1""); [server startServer]; NSLog(@""serverButton - Stage 2 - Complete""); } -(void)startServer { NSLog(@""serverButton - Stage 1""); memset(&hints, 0, sizeof hints); hints.ai_family = AF_UNSPEC; // set to AF_INET to force IPv4 hints.ai_socktype = SOCK_DGRAM; hints.ai_flags = AI_PASSIVE; // use my IP if ((rv = getaddrinfo(NULL, MYPORT, &hints, &servinfo)) != 0) { NSLog(@""ERROR: serverButton - Stage 1""); fprintf(stderr, ""getaddrinfo: %s\n"", gai_strerror(rv)); serverError = 1; NSLog(@""Error""); } ",Josh Bradley,https://stackoverflow.com/users/128422,"Add a check to make sure server is not nil before you call startServer, if it was nil then nothing would get called and no error would be generated. ",Solmead,https://stackoverflow.com/users/2496,http://stackoverflow.com/questions/1095892/nslog-not-printing-to-terminal,STACKOVERFLOW,stackoverflow.com 6874,Security of running openpgp.js in a browser with the private key in HTML5 localStorage,"If I were to write a web application using openpgp.js (http://openpgpjs.org/) for creating PGP encrypted/signed messages and if I stored the user's private key in localStorage, would this be vulnerable to the same complaints about JavaScript cryptography on Matasano's webpage (http://www.matasano.com/articles/javascript-cryptography/)? As far as I can tell, the main points outline by Matasano are: ""Secure delivery of Javascript to browsers is a chicken-egg problem."" (This could be fixed by using HTTPS) JavaScript isn't well suited to cryptography Browsers are too complex for cryptography since they have the potential to contain multiple attack vectors. If localStorage isn't the best place to store something sensitive like a private key, what would be a better place? ",Souvik Banerjee,https://security.stackexchange.com/users/27797,"If you do decide to store the secret in localStorage, you will want to make sure you never store the cleartext session key there. I'm not familiar with openpgpjs, but it probably facilitates secure storage of keys (some form of keyring class I guess). ",Tim Lamballais,https://security.stackexchange.com/users/18463,http://security.stackexchange.com/questions/38219/security-of-running-openpgp-js-in-a-browser-with-the-private-key-in-html5-locals,TECHNOLOGY,security.stackexchange.com 7476,JSP mechanism for nav bar template/module,"I have a navigation bar and, for some pages, a sub-navigation bar as well. I'd like to make this a module so I can easily import the navigation bars on each page. Easy enough to simply put the code in a JSP file and call: <%@include file=""/WEB-INF/jsp/includes/sub_nav_bar.jsp""%> the only issue is the links and their labels change depending on what page you're on. So my options are to create separate navigation bars for various groups of pages or pass in variables representing the links and labels. Separate navigation bars isn't attractive because there are so many variations, particularly with the sub nav bars. I'll end up with tons of navigation bars, all of which I have to maintain. The variables approach works, but I'm hoping there's a better way to do this. It's so messy and lengthy. If I want to later have drop down menus, it's going to be even much worse. Basically, I've done something to this effect: <c:set var=""subNav"" value=""1""/> <c:set var=""subNavLink1"" value=""/""/> <c:set var=""subNavLabel1"" value=""Home""/> <c:set var=""subNavLink2"" value=""/fun""/> <c:set var=""subNavLabel2"" value=""Fun Stuff""/> <c:set var=""subNavLink3"" value=""/more""/> <c:set var=""subNavLabel3"" value=""More Stuff""/> <%@include file=""/WEB-INF/jsp/includes/sub_nav_bar.jsp""%> the sub_nav_bar.jsp include file looks pretty ugly: <ul id=""sub-nav""> <li class=""<c:if test=""${subNav!='1'}"">in</c:if>active""><a href=""<c:url value='${subNavLink1}'/>"">${subNavLabel1}</a></li> <c:if test=""${subNavLink2!=null}""><li class=""<c:if test=""${subNav!='2'}"">in</c:if>active""><a href=""<c:url value='${subNavLink2}'/>"">${subNavLabel2}</a></li></c:if> <c:if test=""${subNavLink3!=null}""><li class=""<c:if test=""${subNav!='3'}"">in</c:if>active""><a href=""<c:url value='${subNavLink3}'/>"">${subNavLabel3}</a></li></c:if> <c:if test=""${subNavLink4!=null}""><li class=""<c:if test=""${subNav!='4'}"">in</c:if>active""><a href=""<c:url value='${subNavLink4}'/>"">${subNavLabel4}</a></li></c:if> </ul> So is there a better way? ",at.,https://stackoverflow.com/users/326389,"Any reason for you to stick to plain JSP/JSTL? Most web frameworks would simplify this work for you. The key would be to have a templating system like tiles, sitemesh, facelet, freemarker, ... ",Damien,https://stackoverflow.com/users/271887,http://stackoverflow.com/questions/3654472/jsp-mechanism-for-nav-bar-template-module,STACKOVERFLOW,stackoverflow.com 19,What filter should I use to avoid overly-whitened daylight images?,"What filter should I use to avoid whitened images (blown highlights) caused by intense daylight? At the moment I am only using an UV Filter, but it doesn't solve the whole problem. I am a newbie in photography, and I've recently bought a Nikon DSLR. ",Daniel,https://photo.stackexchange.com/users/6471,"If you are indeed referring to your images having too much contrast to allow for both a properly exposed subject and sky, then there are a few options. As Zak stated, you could use exposure compensation to darken the entire image (this might make the non-sky portion of the image too dark though) Use a graduated neutral density filter. This will selectively darken one part of an image while leaving the other part alone. This is the old-school method. While it typically limits the transition between the filtered and unfiltered parts to a straight line, it does allow you to fix things at the time of the shot without having to spend time tweaking it on the computer afterwards. HDR (High Dynamic Range) photography. This is the hi-tech way to do things. This requires that you take multiple shots of the same scene at different exposures and use software to combine them into one image where both the highlights and shadows are well-exposed. ",AndrewStevens,https://photo.stackexchange.com/users/6186,http://photo.stackexchange.com/questions/15334/what-filter-should-i-use-to-avoid-overly-whitened-daylight-images,LIFE_ARTS,photo.stackexchange.com 8716,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? ",Zeroth,https://programmers.stackexchange.com/users/97416,"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 using the roll-your-own over the tool in a real project. A few reasons for this are: Your version has only had you use and test it It's hard to hire people that have knowledge of your custom tool You're the only person who can fix it if there's a problem ",Garry Shutler,https://programmers.stackexchange.com/users/10449,http://programmers.stackexchange.com/questions/233092/when-to-use-tools-vs-custom-development,TECHNOLOGY,programmers.stackexchange.com 5832,Does one need a visa to visit Antarctica?,"What is the status of Antarctica in terms of visa regulation? Does one need a visa to visit Antarctica? If so, which country does issue such a visa? ",MOON,https://travel.stackexchange.com/users/15207,"From http://www.lonelyplanet.com/antarctica/practical-information/visas: No single government controls Antarctica, so visitors do not need visas to go there. But with the ratification of the Antarctic Treaty’s Protocol on Environmental Protection in 1998, all visitors who are citizens of countries that are signatories of the Antarctic Treaty must have a permit to visit Antarctica. Cruise ship passengers are covered under the permits applied for by the cruise company. Yacht passengers and crew, and anyone visiting Antarctica by air, should check with their national government to make sure they have their paperwork in order. If you are uncertain about your status, check with your tour operator. ",pnuts,https://travel.stackexchange.com/users/4995,http://travel.stackexchange.com/questions/34817/does-one-need-a-visa-to-visit-antarctica,CULTURE,travel.stackexchange.com 8863,Terminal error File system read only (Solo lectura),"When I install a terminal application in the following error occurs Cuando instalo una applicacion por terminal me ocurre el siguiente error omega@omega-desktop:~$ sudo apt-get install wine [sudo] password for omega: sudo: Can't open /var/lib/sudo/omega/0: Sistema de archivos de solo lectura W: No se utilizan bloqueos para el archivo de bloqueo de sólo lectura /var/lib/dpkg/lock E: se interrumpió la ejecución de dpkg, debe ejecutar manualmente «sudo dpkg --configure -a» para corregir el problema omega@omega-desktop:~$ sudo dpkg --configure -a [sudo] password for omega: sudo: Can't open /var/lib/sudo/omega/0: Sistema de archivos de solo lectura dpkg: error: no se puede acceder al área de estado de dpkg: Sistema de archivos de solo lectura How do I fix this? Como lo soluciono? ",Fer Nando,https://askubuntu.com/users/43409,"It would seem that another application is locking the package manager. Is Synaptic open? Are you updating your system or some applications using Update Manager? Are you installing an application using Software Center? If so, wait until these operations are completed, and try to install your application again. ",SirCharlo,https://askubuntu.com/users/40421,http://askubuntu.com/questions/98219/terminal-error-file-system-read-only-solo-lectura,TECHNOLOGY,askubuntu.com 6230,Probability...coin toss,"A coin having probability $p$ of coming up heads is successively flipped until the $r^{th}$ head appears. Let $X$ be the number of flips required. Find the probability $P(X=n)$. So this means I need to find the probability that $n$ flips are needed to get the $r^{th}$ head. I am not sure how to proceed. Any help/clarification please? Thank you. ",Alti,https://math.stackexchange.com/users/43232,"If $n$ flips are required to get $r$ heads, it means in $n-1$ flips you already have $r-1$ heads and the $n^{th}$ flip is a head. Assuming successive flips are independent, $P(X=n)=P(r-1 \text{ heads in } n-1 \text{ flips})*p$ $P(X=n)=\binom{n-1}{r-1}p^{r-1}{(1-p)}^{n-r}*p$ ",Bravo,https://math.stackexchange.com/users/24451,http://math.stackexchange.com/questions/302238/probability-coin-toss,SCIENCE,math.stackexchange.com 6408,Can I remove the labels from ICs?,"In another question I asked about ways one might obfuscate the design of a system, to prevent unauthorized cloning. One suggestion was that IC manufacturers are often willing to put custom labels on their chips. The idea is interesting, but my quantities are low enough that this would not be cost-effective. How might one remove or otherwise render unreadable the labels on ICs? ",Stephen Collings,https://electronics.stackexchange.com/users/7523,"Google the phrase ""ic remarking"" to find many suppliers of this service. ",Tom Anderson,https://electronics.stackexchange.com/users/36307,http://electronics.stackexchange.com/questions/100161/can-i-remove-the-labels-from-ics,SCIENCE,electronics.stackexchange.com 4060,Paradoxes without self-reference?,"Most paradoxes involves self-reference, the only exception known to me is Yablo's paradox, however it is still debated if it is really without self-reference. So, I was wondering, are there other known paradoxes that works without self-reference? ",Trapszan,https://math.stackexchange.com/users/91616,"It is well known that the natural numbers have the property that if we have some non-empty set $A\subseteq\mathbb{N}$, then $A$ has a minimal element. Now let $$A = \{n\in\mathbb{N}|\,n\mathrm{\ can't\ be\ expressed\ with\ less\ than\ }100\mathrm{\ characters}\}$$ Let $a\in A$ be the smallest element in $A$. Then we can express $a$ as ""$a$ is the smallest number that can't be expressed with less than $100$ characters"". But this is an expression for $a$ containing less than $100$ characters, which would be a contradiction. We deduce that $A=\emptyset$. Thus every natural number can be expressed with less than $100$ characters. But there is only a limited number $n$ of characters, thus there are at most $n^{100}$ natural numbers. This paradox is known with the name of Richard's paradox. ",Daniel Robert-Nicoud,https://math.stackexchange.com/users/60713,http://math.stackexchange.com/questions/475849/paradoxes-without-self-reference,SCIENCE,math.stackexchange.com 2888,Etiquette for closing your own questions,"For all of my questions I have received great answers. I have implemented the answers in code and they work. I now feel compelled to close the questions because I don't believe there are more or better answers out there. Should you close your questions that you feel have been answered sufficiently? Would allowing more people to answer dilute the existing, good answers? Return to FAQ index ",jjnguy,https://meta.stackexchange.com/users/2598,"Euro Micelli's post covered it well. I just wanted to add, I can't tell you how many times I've stumbled onto a Yahoo Answers page that has been closed with several incorrect or incomplete answers. It's quite frustrating, to say the least. We certainly can do better than they have. ",Neil Neyman,https://meta.stackexchange.com/users/231104,http://meta.stackexchange.com/questions/5215/etiquette-for-closing-your-own-questions,TECHNOLOGY,meta.stackexchange.com 9564,Ripening bananas artificially: What is the biological reason,"I am a resident of the tropical island of Sri Lanka, and we have a strange traditional method to ripen our bananas quickly. What we do is this: We dig a pit in earth that is enough to put the whole banana cluster in. Then, after the safely laying the bananas in the pit, we cover up the pit with a sheet such that only a small hole from a side remains: visualize a small 3-4 inch door to the pit. After that, we light a fire with semi-dry leaves just outside the pit's door. (Semi-dry leaves are used to get as much smoke as possible. Dry leaves do not give that much smoke, because they completely oxidize quickly). And the smoke is sent through the door by blowing it with the aid of a bamboo. This sends a good amount of smoke and warms the inside of the pit considerably. And by experience I can tell you that this makes the bananas to ripen really quickly. I have done a controlled experiment where half of the cluster was not put into the pit. Bananas in the pit ripen overnight and the control sample took days to ripen. Can anybody explain what are the bio-mechanisms that are working here? ",Krumia,https://biology.stackexchange.com/users/9948,"Ripening of bananas is induced by ethylene (see reference 1), which acts as a hormone and induces the ripening process. The incomplete combustion of the leaves produces ethylene, additionally the warmth of the process will help the enzymes as well. There is even a paper about this technique (although it is unfortunately not accessible), see reference 2 for more information. Smoking Chambers are routinely used in this process, see reference 3 and 4. References: Role of Ethylene in Fruit Ripening Effects of smoking on some physiological changes in bananas. Fruit Ripening Technology for ripening fruits as important as marketing them ",Chris,https://biology.stackexchange.com/users/5144,http://biology.stackexchange.com/questions/23793/ripening-bananas-artificially-what-is-the-biological-reason,SCIENCE,biology.stackexchange.com 3990,How adding one more electron increases the ionization energy?,"Elements of group 6A, compared to 5A, require less ionization energy due to the paired electrons of 6A. But a question arises: why does group 7A, compared to group 6A, require more ionization energy in spite of the paired electrons in group 7a too. Regardless of the general trend that the ionization energy increases as we go from left to right in periods, why didn't we apply the same procedure as the first comparison? ",user14840,https://chemistry.stackexchange.com/users/14840,"It's not just adding one more electron. Another proton is also added to the nucleus. The overall trend across a row is driven by shielding effects. In general, as you go across a row, the shielding effect is fairly small compared to the effect of increasing nuclear charge. As you note, there is a slight deviation in this trend between 5A (i.e., $\ce{N}$) and 6A (i.e., $\ce{O}$) because the extra electron in oxygen is paired. This increases the electron-electron repulsion, so the ionization energy decreases slightly. As you note, $\ce{F}$ (7A) resumes the overall trend of increasing ionization energy driven by the attractive effects of the higher effective nuclear charge $Z_{eff}$. ",Geoff Hutchison,https://chemistry.stackexchange.com/users/5017,http://chemistry.stackexchange.com/questions/27411/how-adding-one-more-electron-increases-the-ionization-energy,SCIENCE,chemistry.stackexchange.com 4691,Incremental backup of FILESTREAM data?,"Running SQL Server 2012. Consider the database below. The [Document] table contains thousands of large files and has become some 100 GB large. The database must be backed up on a regular basis. Now, let's say I run a full backup my database. Then I add one document of 1 MB. When the next backup is scheduled a new 100+ GB backup file will be created. Obviously, this is not very cost efficient. As far as I understand, SQL Server does not support incremental backups out of the box, but I sense it should be possible to do this manually. Especially for FILESTREAM data where the data resides on the file system. Q: How do I perform incremental backup of FILESTREAM data? CREATE DATABASE [FSTest] GO USE [FSTest] GO ALTER DATABASE [FSTest] ADD FILEGROUP [Document_FileStream] CONTAINS FILESTREAM GO ALTER DATABASE [FSTest] ADD FILE (NAME = 'Document_FileStream', FILENAME = 'C:\FSTest') TO FILEGROUP [Document_FileStream] GO CREATE TABLE [dbo].[Document]( [ID] [int] IDENTITY(1,1) NOT NULL, [Data] [varbinary](max) FILESTREAM NOT NULL, [Guid] [uniqueidentifier] ROWGUIDCOL DEFAULT NEWSEQUENTIALID() NOT NULL UNIQUE, CONSTRAINT [PK_Document] PRIMARY KEY CLUSTERED ([ID] ASC)) ON [PRIMARY] GO ",l33t,https://stackoverflow.com/users/419761,"It sounds like you're taking a full backup every time you take a backup. In my environments, I typically take a full backup once a week and differential backups the other days. A differential backup backs up changes since the last full backup (not, as some people assume, since the last differential!). In order to do a differential backup, you need only add the with differential clause to your normal backup. So something like: backup [myDB] to disk 'c:\temp\myDB.bak' with init --full backup backup [myDB] to disk 'c:\temp\myDB_diff.bak' with init, differential --diff backup I should note that in order to restore in this scenario, you need to restore the full backup with the with norecovery clause and then restore your differential. So something like: restore [myDB] from disk 'c:\temp\myDB.bak' with norecovery --full backup restore [myDB] from disk 'c:\temp\myDB_diff.bak' with recovery --diff backup ",Ben Thul,https://stackoverflow.com/users/568209,http://stackoverflow.com/questions/19809051/incremental-backup-of-filestream-data,STACKOVERFLOW,stackoverflow.com 3340,rabbitmq set message Properties php,"I'm trying to set a message property using the RabbitMQ Bundle in Symfony but I don't see where/how I can do this. Here is how I do it in the RabbitMQ Admin UI The Properties expiration: 50000 is what I would like to set. How can I do this? ",Phill Pafford,https://stackoverflow.com/users/93966,"Since Jan 8, 2014, you cat set message properties using RabbitMQ Bundle, you can review the commit here Now, when you publish a message you cat set the array $additionalProperties public function publish($msgBody, $routingKey = '', $additionalProperties = array()) You can find the supported message properties here For example: $msg = ['arg1' => 'val1']; $queue->setContentType('application/json'); $queue->publish( json_encode($msg), """", ['expiration' => '50000'] ); If you want to use ""headers"" for custom headers, it is a bit more complicated because you have to define the datatype for each value. To send, e.g. $headers['arg1'] = ""val1"" like a string, you have to do something like that: $msg = ['arg1' => 'val1']; $queue->setContentType('application/json'); $queue->publish( json_encode($msg), """", [""application_headers"" => [""arg1"" => [""S"", ""val1""]]] ); Valid datatypes are: S - String I - Integer D - Decimal T - Timestamps F - Table A - Array ",Quique Torras,https://stackoverflow.com/users/1561287,http://stackoverflow.com/questions/14264137/rabbitmq-set-message-properties-php,STACKOVERFLOW,stackoverflow.com 5682,"Is there an ""Appending \let""?","After \def\MyText{\textbf{My Text}} \let\MySaved\MyText \MySaved and \MyText have the same \meaning. What I would like to have further down in the document is % \MyText = \textbf{My Text} \def\MyText{\textit{More Text}} \let\MySaved{\MySaved \MyText} % \MySaved = \textbf{My Text} \textit{More Text} but obviously \let does not allow a group of tokens in the second argument. Is there any way to append like this with the same specific (non-)expansion properties \let has? ",arney,https://tex.stackexchange.com/users/21828,"Since the question is about plain TeX, I would suggest using token list registers for this rather than macros, since token lists are there specifically for this purpose, namely to hold token lists. Create one with \newtoks\MyList Assign an explicit list to it by for instance \MyList={\textbf{My text}} or any other (balanced) token list between the braces; since this is about gathering tokens, you can be sure there is no attempt to expand anything there. Unlike macros, token list registers do no spontaneously expand to the tokens they hold (if TeX encounters the name of a token list register when expecting an action, it will assume this starts an assignment to the register, and protest if no opening brace follows), so to get at the contents, you must explicitly expand with \the. Hence if at the end of the day you want to transfer the tokens to become the body of a macro, you can say \edef\macro{\the\MyList} (the \edef is used because the contents of \MyList is wanted here and now, not later when \macro gets expanded). Note that even though \edef usually keeps expanding as far as it can, the result of \the applied to a token list register is explicitly excluded from any further expansion attempts, so you can be sure that \macro will expand to exactly the tokens that were collected in \MyList. Now to extend to contents of a token list register is fairly simple; you must just ensure the the old contents gets to be expanded into the new token list before the assignment is made. For this a single \expandafter will do: \MyList=\expandafter{\the\Mylist more tokens here} When you need to expand something towards the end of the token list, it takes a bit more effort. Say you want to append to the contents of \MyList that of another token list register \AnotherList. Then you could ensure that the rightmost list gets expanded, and then the leftmost one (can you see why this order is necessary?), all this before the assignment takes place, by a whole slough of \expandafters: \let\x=\expandafter \MyList=\x\x\x{\x\the\x\MyList\the\AnotherList} However there is an easier way, that mixes the expansive nature of \edef and the passive nature of token lists to get detailed control over expansion. It needs an auxiliary macro, say \temp: \edef\temp{\the\MyList\the\AnotherList} \MyList=\exandafter{\temp} I final remark about the question; you suggest that \let serves to copy the expansion of one macro to another macro without further expanding that expansion (as using \edef would do). While \let can be used for that, this is not its main purpose, and in fact this is just a corollary of what \let does in general: transfer the current meaning of one token to another one (provided the latter can have its meaning modified, so it should not be a non-active character). This is not limited to macros: you can make a control sequence stand for a plain character, or for a TeX primitive (as I did above to let \x stand for the primitive \expandafer; note that having instead \x expand to \expandafer would be quite different and quite useless) or for other meanings that a token can have. Just as an example of the last possibility, saying \let\newname=\MyList would transfer the current meaning (not the contents!) of \MyList to \newname. Since \MyList stood for an internal token list register of TeX, this makes \newname stand for the same register: it becomes an alias for \MyList, and assigning to one of them changes the contents of the other as well. ",Marc van Leeuwen,https://tex.stackexchange.com/users/30613,http://tex.stackexchange.com/questions/173062/is-there-an-appending-let,TECHNOLOGY,tex.stackexchange.com 7437,"Origin and meaning of ""The eagle flies at midnight"""," The eagle flies at midnight. What's the origin and meaning of this idiom? ",Anderson Silva,https://english.stackexchange.com/users/1446,"I've never heard it before, certainly not as some kind of common phrase - but it sounds to me like the sort of line you'd hear in a cheesy wartime spy movie. Some sort of code phrase to inform your accomplices of your plans. ",thesunneversets,https://english.stackexchange.com/users/2181,http://english.stackexchange.com/questions/5305/origin-and-meaning-of-the-eagle-flies-at-midnight,CULTURE,english.stackexchange.com 9129,matlab fft phase response square wave,"I am new to phase analysis, recently I have been trying compare the phase between the input signal and output signal of a system. From the code below, I simulated a square wave and plotted the phase, from basic theory, I thought that since this is a simulated signal, I should get near zero values other than the values at each input frequency. So my questions are (based on the following code): 1) Why does Matlab give me pi/2 as phase response of actual input signals, I don't understand the calculation behind it (does it have to do with my signal being sine and not cosine?) 2) If I don't filter out low (near zero) values, the phase response is a sloping line that goes toward very large numbers, and seems to be proportional to the number of samples of FFT I have, is this due to how unwrap works? 3) If I am trying to compare an input signal vs output signal, both of which for the sake of argument looks similar to the square wave I simulated, how do I determine if the system is linear phased? (from theory, the phase delay should be the same therefore, after finding the phase response, should I check if the difference of phase for each input signal between output and input is constant? 4) Also, group delay is considered as the derivative of phase response, and phase delay is the normalization of phase with respect to its corresponding frequency, a perfect square wave should have constant values at each harmonic for group delay and phase delay shouldn't it?, if so can I somehow see this result in my simulation? close all; clear all; fs = 16000; end_time = 6-1/fs; x = 0:1/fs:end_time; x = x'; n=2000; freq = 32; wave = sin(2*pi* freq*x)/(4*pi); for i = 3:2:n wave = wave + sin(i*2*pi*freq*x)/(4*i*pi); end wave = awgn(wave,55,'measured'); wave (1:10000) = 0; NFFT = length(wave); fft_result = fft(wave, NFFT); for i = 1:NFFT if abs(fft_result(i)) < 10^-4 fft_result(i) = 0; end end fft_mag = db(abs(fft_result)); fft_phase = unwrap(angle(fft_result)); fstep = fs/NFFT; f_range = 0:fs/NFFT:fs-1/NFFT; figure plot(f_range, fft_phase); Thank you for being patient enough to read all of this and giving me answers. =) ",user8481,https://dsp.stackexchange.com/users/8481,"Re question (1): Most FFTs, or the way atan2() is commonly used with complex FFT results to compute a phase, produce a zero phase (strictly real) output for strictly symmetric input. This means you want cosine waves, periodic in aperture, not sine waves starting at zero at the window edge, for FFT results with zero phase. ",hotpaw2,https://dsp.stackexchange.com/users/154,http://dsp.stackexchange.com/questions/22134/matlab-fft-phase-response-square-wave,TECHNOLOGY,dsp.stackexchange.com 6933,Why is it not dangerous to dissolve NaCl?,"$$\ce{H2O~(l) + NaCl~(s) ->[\Delta] Na+~(aq) + Cl^{-}~(aq)}$$ When table salt is placed in water, it dissolves due to the polarity of water molecules. When solvation takes place, negatively polar sides of water molecules attach to $\ce{Na+}$ ions, and positively polar sides of water molecules attach to $\ce{Cl-}$ ions. The ions are then carried away by water molecules through diffusion. Since the sodium is now isolated from the chlorine, what keeps it from violently exploding with water in the following chemical reaction? $$\ce{2Na + 2H2O -> 2 NaOH + H2}$$ Also, since chlorine is poisonous, wouldn't that make drinking salted water extremely lethal? ",Daniel Pendergast,https://chemistry.stackexchange.com/users/143,"[A really-good answer to this question should include quantitative evidence, but here is my hand-waving version...] Solvated sodium ions ($\ce{Na+}$) aren't all that reactive. Surrounded by a lot of polar water molecules, they're actually quite stable. What you're thinking of is solid sodium (Na) which will ""react violently with water"" until it's all dissolved - dissolved that is, into stable sodium ions. Same kind of logic applies to chlorine. Solvated chloride ions ($\ce{Cl-}$) are stable and not nearly as poisonous as chlorine gas. (Note: everything is poisonous at some level, i.e. ""the poison is in the dose"". In saying chlorine gas is more poison, that really just means it is a more 'potent' poison: it will kill at lower doses compared to chloride ions.) Another way to think of it: Solid sodium and chlorine gas are at high energy states. Since they can reach much lower energy states by ionzing in the presence with water, the WILL break down and ionize in the presence of water ",user809695,https://chemistry.stackexchange.com/users/1040,http://chemistry.stackexchange.com/questions/6182/why-is-it-not-dangerous-to-dissolve-nacl,SCIENCE,chemistry.stackexchange.com 8027,Get current Activity with Android,"I have a method that scans the position and gets called on every activity I have, everytime an actions trigger I need to show an alertDialog, this is the code: AlertDialog.Builder builder = new AlertDialog.Builder(mMainActivity.this); builder.setMessage(""test"") .setCancelable(false) .setPositiveButton(""go"", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { Intent intent = new Intent(mMainActivity.this,LocationDetails.class); intent.putExtra(""placeId"",1); startActivity(intent); } }) .setNegativeButton(""cancel"", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }); AlertDialog alert = builder.create(); alert.show(); But How can I create the alert on the current activity? Because now it only gets created on AlertDialog.Builder(mMainActivity.this); ",Signo,https://stackoverflow.com/users/3789527,"Have this AlertDialog logic in a public class and make call using a method with passing context . For example: showAlert(youractivitycontext); Use the Context as your current activity. ",Gowtham Kumar,https://stackoverflow.com/users/1614270,http://stackoverflow.com/questions/30511271/get-current-activity-with-android,STACKOVERFLOW,stackoverflow.com 4291,How to use local coordinates to a QGraphicsItem,"I created a custom qGraphicsRectItem which I added to my qGraphicsScene. I would like to add text to this custom rectangle using its local coordinates (i.e. adding to 0,0 places the item at the origin of my rectangle no matter where it its in my scene) When I try to do so, it uses my scene's coordinate system and the text appears out of the rectangle. Any ideas? PackageRect::PackageRect(QString PackageName, qreal x, qreal y, qreal w, qreal h, QGraphicsItem *parent) :QGraphicsRectItem(x, y, w, h, parent) { QGraphicsTextItem *text = new QGraphicsTextItem(PackageName, this); text->setPos(0,0); } ",user1337,https://stackoverflow.com/users/3586350,"What you are trying to do, tends to be used in ""Grouped"" items. There are several mapTo* functions including: http://doc.qt.io/qt-5/qgraphicsitem.html QPointF mapToItem(const QGraphicsItem * item, const QPointF & point) const QPointF mapFromItem(const QGraphicsItem * item, const QPointF & point) const QPointF mapFromScene(const QPointF & point) const QPointF mapToScene(const QPointF & point) const Basically the context you are calling the mapping function from changes the behavior of the mapping call. If you are inside a subclass of QGraphicsItem, and you call this->mapToItem(myRect, QPointF(0,0)); it will return a value in terms of the coordinate system of the Rectangle. And likewise, ff you are inside a subclass of QGraphicsItem, and you call this->mapFromItem(myRect, QPointF(0,0)); it will return a value in terms of the coordinate system of the original item, where 0,0 is the upper left of the rectangle. Here is more documentation on the coordinate system: http://doc.qt.io/qt-5/graphicsview.html#the-graphics-view-coordinate-system But if you are grouping objects in a QGraphicsView, group them and move the group around. http://doc.qt.io/qt-5/graphicsview.html#item-groups http://doc.qt.io/qt-5/qgraphicsitemgroup.html#details Hope that helps. ",phyatt,https://stackoverflow.com/users/999943,http://stackoverflow.com/questions/28376197/how-to-use-local-coordinates-to-a-qgraphicsitem,STACKOVERFLOW,stackoverflow.com 6960,Critique Requested on PHP Pagination Class,"I did most of my PHP coding back with PHP 4, and among the projects I did was a popular pagination class. I've been meaning to bring it up to date with PHP 5 and OOP practices. I've also been working on updating my database code, using PDO over the deprecated mysql* functions. What I'd like from you is your input and feedback about my updates. Pagination Class class Paginator{ public $items_per_page; public $total_items; public $current_page; public $num_pages; public $mid_range; public $limit; public $limit_start; public $limit_end; public $return; public $querystring; public $ipp_array; public $get_ipp; public $get_page; public function __construct($total,$mid_range=7,$ipp_array=array(10,25,50,100,'All')) { $this->total_items = $total; $this->mid_range = $mid_range; $this->ipp_array = $ipp_array; $this->items_per_page = (isset($_GET['ipp'])) ? $_GET['ipp'] : $this->ipp_array[0]; $this->get_ipp = isset($_GET['ipp']) ? $_GET['ipp'] : NULL; $this->get_page = isset($_GET['page']) ? (int) $_GET['ipp'] : 1; $this->default_ipp = $this->ipp_array[0]; if($this->get_ipp == 'All') { $this->num_pages = 1; } else { if(!is_numeric($this->items_per_page) OR $this->items_per_page <= 0) $this->items_per_page = $this->ipp_array[0]; $this->num_pages = ceil($this->total_items/$this->items_per_page); } $this->current_page = (isset($_GET['page'])) ? (int) $_GET['page'] : 1 ; // must be numeric > 0 if($_GET) { $args = explode(""&"",$_SERVER['QUERY_STRING']); foreach($args as $arg) { $keyval = explode(""="",$arg); if($keyval[0] != ""page"" And $keyval[0] != ""ipp"") $this->querystring .= ""&"" . $arg; } } if($_POST) { foreach($_POST as $key=>$val) { if($key != ""page"" And $key != ""ipp"") $this->querystring .= ""&$key=$val""; } } if($this->num_pages > 10) { $this->return = ($this->current_page > 1 And $this->total_items >= 10) ? ""<a class=\""paginate\"" href=\""$_SERVER[PHP_SELF]?page="".($this->current_page-1).""&ipp=$this->items_per_page$this->querystring\"">Previous</a> "":""<span class=\""inactive\"" href=\""#\"">Previous</span> ""; $this->start_range = $this->current_page - floor($this->mid_range/2); $this->end_range = $this->current_page + floor($this->mid_range/2); if($this->start_range <= 0) { $this->end_range += abs($this->start_range)+1; $this->start_range = 1; } if($this->end_range > $this->num_pages) { $this->start_range -= $this->end_range-$this->num_pages; $this->end_range = $this->num_pages; } $this->range = range($this->start_range,$this->end_range); for($i=1;$i<=$this->num_pages;$i++) { if($this->range[0] > 2 And $i == $this->range[0]) $this->return .= "" ... ""; // loop through all pages. if first, last, or in range, display if($i==1 Or $i==$this->num_pages Or in_array($i,$this->range)) { $this->return .= ($i == $this->current_page And $this->get_page != 'All') ? ""<a title=\""Go to page $i of $this->num_pages\"" class=\""current\"" href=\""#\"">$i</a> \n"":""<a class=\""paginate\"" title=\""Go to page $i of $this->num_pages\"" href=\""$_SERVER[PHP_SELF]?page=$i&ipp=$this->items_per_page$this->querystring\"">$i</a> \n""; } if($this->range[$this->mid_range-1] < $this->num_pages-1 And $i == $this->range[$this->mid_range-1]) $this->return .= "" ... ""; } $this->return .= (($this->current_page < $this->num_pages And $this->total_items >= 10) And ($this->get_page != 'All') And $this->current_page > 0) ? ""<a class=\""paginate\"" href=\""$_SERVER[PHP_SELF]?page="".($this->current_page+1).""&ipp=$this->items_per_page$this->querystring\"">Next</a>\n"":""<span class=\""inactive\"" href=\""#\"">Next</span>\n""; $this->return .= ($this->get_page == 'All') ? ""<a class=\""current\"" style=\""margin-left:10px\"" href=\""#\"">All</a> \n"":""<a class=\""paginate\"" style=\""margin-left:10px\"" href=\""$_SERVER[PHP_SELF]?page=1&ipp=All$this->querystring\"">All</a> \n""; } else { for($i=1;$i<=$this->num_pages;$i++) { $this->return .= ($i == $this->current_page) ? ""<a class=\""current\"" href=\""#\"">$i</a> "":""<a class=\""paginate\"" href=\""$_SERVER[PHP_SELF]?page=$i&ipp=$this->items_per_page$this->querystring\"">$i</a> ""; } $this->return .= ""<a class=\""paginate\"" href=\""$_SERVER[PHP_SELF]?page=1&ipp=All$this->querystring\"">All</a> \n""; } $this->return = str_replace('&','&amp;',$this->return); $this->limit_start = ($this->current_page <= 0) ? 0:($this->current_page-1) * $this->items_per_page; if($this->current_page <= 0) $this->items_per_page = 0; $this->limit_end = ($this->get_ipp == 'All') ? (int) $this->total_items: (int) $this->items_per_page; } public function display_items_per_page() { $items = NULL; natsort($this->ipp_array); // This sorts the drop down menu options array in numeric order (with 'all' last after the default value is picked up from the first slot if(is_null($this->get_ipp)) $this->items_per_page = $this->ipp_array[0]; foreach($this->ipp_array as $ipp_opt) $items .= ($ipp_opt == $this->items_per_page) ? ""<option selected value=\""$ipp_opt\"">$ipp_opt</option>\n"":""<option value=\""$ipp_opt\"">$ipp_opt</option>\n""; return ""<span class=\""paginate\"">Items per page:</span><select class=\""paginate\"" onchange=\""window.location='$_SERVER[PHP_SELF]?page=1&amp;ipp='+this[this.selectedIndex].value+'$this->querystring';return false\"">$items</select>\n""; } public function display_jump_menu() { $option=NULL; for($i=1;$i<=$this->num_pages;$i++) { $option .= ($i==$this->current_page) ? ""<option value=\""$i\"" selected>$i</option>\n"":""<option value=\""$i\"">$i</option>\n""; } return ""<span class=\""paginate\"">Page:</span><select class=\""paginate\"" onchange=\""window.location='$_SERVER[PHP_SELF]?page='+this[this.selectedIndex].value+'&amp;ipp=$this->items_per_page$this->querystring';return false\"">$option</select>\n""; } public function display_pages() { return $this->return; } } Sample Instantiation <?php include('paginator.class.php'); try { $conn = new PDO('mysql:host=localhost;dbname=test', 'user', 'pass'); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $num_rows = $conn->query('SELECT COUNT(*) FROM City')->fetchColumn(); $pages = new Paginator($num_rows,9,array(15,3,6,9,12,25,50,100,250,'All')); echo $pages->display_pages(); echo ""<span class=\""\"">"".$pages->display_jump_menu().$pages->display_items_per_page().""</span>""; $stmt = $conn->prepare('SELECT City.Name,City.Population,Country.Name,Country.Continent,Country.Region FROM City INNER JOIN Country ON City.CountryCode = Country.Code ORDER BY City.Name ASC LIMIT :start,:end'); $stmt->bindParam(':start', $pages->limit_start, PDO::PARAM_INT); $stmt->bindParam(':end', $pages->limit_end, PDO::PARAM_INT); $stmt->execute(); $result = $stmt->fetchAll(); echo ""<table><tr><th>City</th><th>Population</th><th>Country</th><th>Continent</th><th>Region</th></tr>\n""; foreach($result as $row) { echo ""<tr><td>$row[0]</td><td>$row[1]</td><td>$row[2]</td><td>$row[3]</td><td>$row[4]</td></tr>\n""; } echo ""</table>\n""; echo $pages->display_pages(); echo ""<p class=\""paginate\"">Page: $pages->current_page of $pages->num_pages</p>\n""; echo ""<p class=\""paginate\"">SELECT * FROM table LIMIT $pages->limit_start,$pages->limit_end (retrieve records $pages->limit_start-"".($pages->limit_start+$pages->limit_end)."" from table - $pages->total_items item total / $pages->items_per_page items per page)""; } catch(PDOException $e) { echo 'ERROR: ' . $e->getMessage(); } ?> Live Demos Demo 1 Demo 2 Areas of Concern I noticed in my query that if I try to execute the SQL with: $stmt->execute( array(':start'=>$pages->limit_start,':end'=>$pages->limit_end) ); I get an error unless I also use $conn->setAttribute(PDO::ATTR_EMULATE_PREPARES, FALSE);. However I can get around that if I use bindParam instead: $stmt->bindParam(':start', $pages->limit_start, PDO::PARAM_INT); $stmt->bindParam(':end', $pages->limit_end, PDO::PARAM_INT); $stmt->execute(); Should I be using $conn->setAttribute(PDO::ATTR_EMULATE_PREPARES, FALSE); or the separate bindParam calls?bindParam seems like a decent solution, whereas using ATTR_EMULATE_PREPARESseems a little hacky. Within the class, am I setting the visibility (public, private, protected) of my parameters and methods properly? If you see anything that jumps out at you like ""what in the world was he thinking?"", you can assume that I was dealing with something I hadn't done before. Any tips or suggestions overall would be appreciated. ",j08691,https://codereview.stackexchange.com/users/10068,"Okay, I’m going to list anything and everything that came in my mind while reading your code. Start documenting your code for better maintainability Validate every and any user input Use proper camelCase notation for property and method names Separate your code into more methods (especially in __construct) Keep everything protected unless you have a good reason to keep it private or expose it with public Use single or double quotes throughout your code, but don’t mix it (consistency) Enclose your variables in {} if you embed them in strings Use single quotes for your HTML if you use double quotes for creating the string (prevent escaping mistakes) Use namespace’s (even if you don’t need them now) An example class: <?php /*! * My license */ namespace \Fleshgrinder; /** * Example class for Code Review at Stack Exchange. * * @author Fleshgrinder <email@example.com> */ class ExampleClass { /** * The example class's example property. * * @var mixed */ protected $camelCasePropertyName; /** * Instantiate new example class. * * @var string $param1 * Example parameter 1. * @var string $param2 [optional] * Optional example parameter 2. * @throws \RuntimeException */ public function __construct($param1, $param2 = ""foo"") { if ($param2 == ""foo"") { $this->camelCasePropertyName = $this->camelCaseMethodName(); } elseif ($param2 == ""bar"") { throw new \RuntimeException(""No bar!""); } else { $this->camelCasePropertyName = $param1; } } /** * Get <var>$str</var> wrapped in <code>span</code> HTML element. * * @param string $str * The string to wrap. * @return string * The wrapped string. */ protected function camelCaseMethodName($str) { return ""<span class='foo'>{$str}</span>""; } } Example regarding creation of methods that help to understand the code better (see comments): <?php // No comments to keep it short, but always write comments! class Database extends FictivePHPDBClass { public function __construct($user, $password, $host, $port, $database) { $this->setUser($user); $this->setPassword($password); $this->setHostname($host); $this->setPort($port); $this->connect(); $this->selectDatabase($database); } protected function setUser($user) { if (empty($user) || !is_string($user)) { throw new \IllegalArgumentException(""Username cannot be empty.""); } $this->user = $user; } protected function setPassword($password) {} protected function setHostname($hostname) {} protected function setPort($port) {} protected function connect() { $phpDB = parent::connect($this->user, $this->password, $this->hostname, $this->port); if ($phpDB->errorCount > 0) { throw new \Fleshgrinder\Exception\DatabaseException(""Couldn't connect to {$this->hostname} database.""); } $this->connection = $phpDB; } protected function selectDatabase($database) { if (empty($database) || !is_string($database)) { throw new \IllegalArgumentException(""Bla bla ...""); } if (!($this->connection instanceof \FictivePHPDBClass)) { throw new \LogicException(""Bla bla ...""); } $this->connection->selectDatabase($database); if ($this->connection->errorCount > 0) { throw new \Fleshgrinder\Exception\DatabaseException(""Bla bla ...""); } } } That's stuff you often see in OO PHP code, wrapping some other classes and trying to make some real OO code out of them. But what I really want to show you is the fact that the methods are short, easy to understand because of that and that you already know what each method does only by reading their name. ",Fleshgrinder,https://codereview.stackexchange.com/users/32057,http://codereview.stackexchange.com/questions/35251/critique-requested-on-php-pagination-class,TECHNOLOGY,codereview.stackexchange.com 7297,Close all file descriptors in bash,"Is there a way to close all the open file descriptors, without having an explicit list of them beforehand? ",Lorenzo Pistone,https://unix.stackexchange.com/users/15172,"No. The kernel can close only one FD at a time, and bash does not have ""group commands"" for FDs. for fd in $(ls -1 /proc/27343/fd); do echo exec ""$fd>&-""; done Remove the echo after testing. If this is not for the shell itself but for a command to be run then you can use nohup. ",Hauke Laging,https://unix.stackexchange.com/users/32191,http://unix.stackexchange.com/questions/123413/close-all-file-descriptors-in-bash,TECHNOLOGY,unix.stackexchange.com 7563,RenderTarget2D behavior in XNA,"I've been dabbling with XNA for a couple of days now. This chunk of code doesn't work as I expect. The goal is to render sprites individually and composite them on another rendertarget. P = RenderTarget2D(with RenderTargetUsage.PreserveContents) D = RenderTarget2D(with RenderTargetUsage.DiscardContents) for all sprites: { graphicsDevice.SetRenderTarget(D); <draw sprite i> graphicsDevice.SetRenderTarget(P); <Draw D> } graphicsDevice.SetRenderTarget(null); <Draw P> The result I get is - only the last sprite is visible. I'm sure I'm missing some piece of information about RenderTarget2D. Any hints on what that might be? ",Utkarsh Sinha,https://gamedev.stackexchange.com/users/3533,"Change this: for all sprites: { graphicsDevice.SetRenderTarget(D); <draw sprite i> graphicsDevice.SetRenderTarget(P); <Draw D> } to this: for all sprites: { graphicsDevice.SetRenderTarget(D); <draw sprite i> } graphicsDevice.SetRenderTarget(P); <Draw D> The problem is that D or P are being cleared somewhere (probably when they get set as a render target), so the only sprite that ""survives"" is the last one. Since you have all your sprites rendered to D you only need to render D onto P once. ",George Duckett,https://gamedev.stackexchange.com/users/6422,http://gamedev.stackexchange.com/questions/26606/rendertarget2d-behavior-in-xna,TECHNOLOGY,gamedev.stackexchange.com 9557,Planet orbits: what's the difference between gravity and centripetal force?,"My physics teacher says that centripetal force is caused by gravity. I'm not entirely sure how this works? How can force cause another in space (ie where there's nothing). My astronomy teacher says that gravity is (note: not like) a 3D blanket and when you put mass on it, the mass causes a dip/dent in the blanket and so if you put another object with less mass it will roll down the dip onto the bigger mass. Is this true and is this what causes the centripetal force. ",Jonathan.,https://physics.stackexchange.com/users/4,"Simple answer: gravity is a centripetal force, and can be envisaged clearly as such in Newtonian mechanics. Centripetal just means a force that is ""radially inwards"" (""directed towards the centre""). The electric force, for example, is also clearly centripetal. (It's slightly harder to define ""centripetal"" for the magnetic force.) Your astronomy teacher is referring to Einstein's theory of general relativity. His description is loosely an overview of the topology (fabric) of space-time and how it interacts with matter/energy - the manifold is however 4-dimensional, not 3D. In fact, test particles (particles which do not really disturb the gravitational field) in general relativity follow a geodesic. This is effectively a generalisation of a straight line (shortest route) of normal Euclidian space to the curved space of GR, and may be seen as the source of centripetal force in Newtonian physics. ",Noldorin,https://physics.stackexchange.com/users/13,http://physics.stackexchange.com/questions/321/planet-orbits-whats-the-difference-between-gravity-and-centripetal-force,SCIENCE,physics.stackexchange.com 3259,Left align equation description,"I have a short description for each of my equations. I want to have them flushleft (similar to the equation numbers which are flushright). How can I do that? Here is a MWE: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \text{this is my first equation: } z = x \end{equation} \begin{equation} \text{this is my second equation: } z = x+y \end{equation} \end{document} And my desired output is like this: ",Salman,https://tex.stackexchange.com/users/26272,"The following example uses environment tabular* to simulate the equations and to achieve the alignment requests: \documentclass{article} \usepackage{amsmath} \usepackage{array} \begin{document} \noindent A\hfill Z \begin{center} \begin{tabular*}{\linewidth}{% @{}l% description @{\extracolsep{\fill}}% >{$\displaystyle}c<{$}% simulate displayed equation >{\refstepcounter{equation}\thetag\theequation}r@{}% equation number } this is my first equation:& z = x &\\ this is my second equation:& z = x + y &\\ \end{tabular*} \end{center} \noindent A\hfill Z \end{document} ",Heiko Oberdiek,https://tex.stackexchange.com/users/16967,http://tex.stackexchange.com/questions/119621/left-align-equation-description,TECHNOLOGY,tex.stackexchange.com 2913,Red flags of unpaid IT internship,"I read the following question: Tips for a first year CS student looking for a summer internship to gain experience? But rather than how to get and/or look for internships, my questions concerns of how to filter companies looking for free labor to do their website VS companies that might not offer a paid check, but it will offer you mentorship and skills. I have a cousin that is a college freshman and she is looking for Sofware development internships, but at this point, she is desperately looking for any internship that is IT related. Besides the big software names and elite small software shops, How do you recognize a good internships in non-it-companies(large or small) doing IT maintenance vs the bad ones? If you don't have work experience, what questions a college student should ask to prevent ripoff? Are there any red flags that you can spot before accepting an offer? ",Armando,https://programmers.stackexchange.com/users/24962,"Fair warning - in my opinion, her biggest detriment is years of college experience. While it's quite true that you can be a great programmer and be a college freshman - big companies with established internship programs that offer the kind of things you are speaking of typically have a set of hardened criteria for reviewing applicants. One of them is years of college experience and most companies don't readily accept interns that are freshman - the earliest is usually after Sophomore year. This is partially because interns - even if they are free - are an investment. They need computers, space to work, and the time of a senior person to supervise them. The cost of this has to be weighed against the value the intern will bring to the team. IMO - most interns are a good deal, but you can't take everyone so a company has to find some set of criteria. So, knowing your cousin is a freshman tells me that if she wants a technical internship, she's already going to have to get creative - it's time to start using every under-the-wire resource and personal connection. You'll want to maximize your contact with people who will see working with her as a plus - and that's a heck of a lot easier with people who know your cousin. The other venue that is ALWAYS worth maximizing is her college's internship system. Most colleges have internal internship job boards where the college and the internship providers have worked together to build a set of opportunities for students. In these cases, the companies realize that they need to give interns a good opportunity. I'm assuming that at this point, though, your cousin has tried everything and she's really scrounging - going to just about every job board and trying just about every opportunity. Assuming she gets an interview, she'll want to remember that interviewing is as much about checking out the company as it is about showing potential. Here's some things I'd look for when going on an internship interview (now that I'm well past my intern years and I know from the other side exactly what a manager can do with an intern!). I'm keeping it broad as IT is a heck of a lot more than just software work! What will I be working on? - good signs are work that involve either making things work or verifying that they are working. Bad signs are doing paperwork while other people make things work. Having to service customer problems (front line tech support) isn't all bad, it may all she can snag, but if that's the case, she should be getting paid. Who will I be working for? - preferably it's someone on the interview list or someone on the interview list is ""sample manager"" - ie a manager who needs interns, but the company may assign the candidate to a similar but different manager in the end - it's just that managers have to handle pools of interviews and often matchmaking is done later on. Ask this manager what they expect from an intern and what they are willing to give. Good signs are ""I expect you to take responsibility"", ""I expect you to ask lots of questions"", ""I expect you'll keep me appraised of your status"", ""I expect that by the end of the internship you'll be able to take on a 3-4 week chunk of work and work with minimal assistance"". Bad signs are - ""you'll follow me around and do exactly what I tell you"", or ""I won't have time to give much guidance, and I don't have anyone that can help, we'll have to figure it out as we go"". How big is the technical team? - hopefully it's a team of 5-10 people with varying degrees of expertise, with at least a few senior people. Also - how much time will the senior people have to spare to answer questions? Good = 15 minutes a day, with a known rampup of longer than that early on. Bad = ""what senior people?"" or ""it's just you"". What are the major goals of the team? What are the key ingredients to success on this project? - this is my particular way (when I do volunteer work) of figuring out whether I've found people I can work with. If it takes 20 minutes to answer this question, we have a failure. Even if I am working alone, with a non-technical person, I may learn a lot of good stuff. But that requires that the people I'm working with have a real clue of what they want to get done. It's amazing how many people really don't know what the problem they are trying to solve is, or what qualifies as a solution. Without that core vision, no matter how technical the team is, it's likely that the internship will be frustrating. All that said - seriously - don't feel awful if an internship doesn't happen in the summer of Freshman year. I had pretty great grades, 3 languages under my belt and a programmer mother and I STILL didn't swing an internship my Freshman summer. I used my touch typing skills to qualify as a Temp and worked answering phones, typing and filing microfiche (boy am I old!) my Freshman summer... at least I got to hang out in A.C.! ",bethlakshmi,https://programmers.stackexchange.com/users/12061,http://programmers.stackexchange.com/questions/82792/red-flags-of-unpaid-it-internship,TECHNOLOGY,programmers.stackexchange.com 3413,Is it possible to encrypt a file so that it can not be brute forced?,"Is there any program or method that allows encryption that can not be brute forced or is it just that any encrypted file can be decrypted by brute force? ",user43351,https://security.stackexchange.com/users/43351,"Check out http://www.theregister.co.uk/2014/01/21/shapeshifter/ and the wiki entries for Oligomorphic Code and Polymorphic Code. I think ultimately, encoding is a means of representing infinite possibilities in a finite set... at the end of the day, there are collisions of the infinite set in the finite representation, ergo ""decoding"" via brute-force could lead to collisions that aren't actually the decoded file. warning: I haven't slept in a couple of days. ",C.J. Steele,https://security.stackexchange.com/users/1090,http://security.stackexchange.com/questions/54724/is-it-possible-to-encrypt-a-file-so-that-it-can-not-be-brute-forced,TECHNOLOGY,security.stackexchange.com 8108,How to Magento Debug,"I have an extension that is giving me an endless loop, and I can't figure out the cause. I tried to follow this (Fundamentals for debugging a Magento store) but can't understand how to do it ? Can anyone help me ? ",user3497472,https://magento.stackexchange.com/users/6250,"Your question is a little broad, but in general. Figure out which controller and action method corresponds to the URL that triggers an endless loop Look at the controller action and figure out how it is calling code in your extension Add a series of exit(__FILE__ . '::' . __LINE__); lines until you pinpoint the section of code that's an endless loop. ",Alan Storm,https://magento.stackexchange.com/users/4,http://magento.stackexchange.com/questions/19050/how-to-magento-debug,TECHNOLOGY,magento.stackexchange.com 11,High memory usage Windows Server 2008r2 on VMware,"We are running Windows Server 2008r2 on VMware and are experiencing extremely high memory use when nothing is running. The server memory usages slowly creeps up to 98-99%. The server is configured to use 8GB of memory. Is there some setting we should be using so the server can better manage it's memory usage. It's behaving as if there is a memory leak. ",Tim Britton,https://serverfault.com/users/72141,"Well to better assist with your question: -Which VMware Product & Version -What is the Windows 2008 R2 VM running? -Where are you seeing the high memory usage? Windows or your VMware product? ",colealtdelete,https://serverfault.com/users/47027,http://serverfault.com/questions/240076,TECHNOLOGY,serverfault.com 3113,How do I join two cables outside so that they're safe and kept dry?,"I have a new pond with a pump but the cable on the pump is far too short. I have some similar cable which will do the job to extend the length. My only concern is the junction outside. I need to make it dry and safe. What recommendations do people have? Can you buy a junction box that is suitable for outside use? If this helps I live in the UK. ",Dean,https://diy.stackexchange.com/users/1868,"I cannot speak to the UK. In the US the answer is yes, and the principles should be pretty much the same. I'll give you the parts I would use; in the US I would be able to find them at any home improvement store. You will want to buy a small single-gang metal junction box that is exterior-rated. You will need a green screw for the inside of this box; the box itself will need to be grounded and above grade. (It can't be buried, in other words. Most people stick them on poles if it HAS to be in the middle of the yard, or just attach them to the house.) The second thing you will want is a fitting that screws into the sockets on the exterior-rated junction box. This fitting will have three parts. The first is the part that screws into it from the inside. The second is a rubber part with a hole in the shape of Romex, which is the standard jacketed cable that we use in the US. The third part is a nut that screws over that and compresses the rubber part between the two metal parts in order to form a watertight seal. After that, you'd do the normal thing -- wire nut the hot and neutral connectors together, and wire the grounds together while also wrapping one leg of the ground around the green grounding screw. ",Karl Katzke,https://diy.stackexchange.com/users/3450,http://diy.stackexchange.com/questions/8259/how-do-i-join-two-cables-outside-so-that-theyre-safe-and-kept-dry,LIFE_ARTS,diy.stackexchange.com 4593,How do I know if which leg is the emitter or the collector? (Transistor),"I'm new to electronics and here's a newbie question that I would like to ask: How do I know if which leg is the emitter or the collector in a Transistor (For both PNP and NPN) using only an analog multimeter? ",Raven,https://electronics.stackexchange.com/users/6910,"Useful information to know (complements the other answers) which applies to both NPN+PNP bipolar transistors and N-channel and P-channel MOSFETs: TO92 transistors are almost always pinned-out as EBC (bipolar) / SGD (MOSFET) when you are facing the flat part of the transistor package and the leads are pointing down. TO220/TO247/DPAK/D2PAK transistors are almost always pinned-out as BCE (bipolar) / GDS (MOSFET) when you are facing the front part of the transistor (tab on the back side) and the leads are pointing down. This is easy to remember by the mnemonic GDS = Gosh Darn Son-of-a-gun. (Or something like that. :-) Transistors with metal tabs (TO220, TO247, DPAK, D2PAK, SOT-223, etc.) almost always have the tab as the collector or drain. This has to do more with the construction of the device than from any sort of convention; the collector/drain is the part of the die that is the most thermally coupled to the metal tab, so it's a natural point of electrical attachment. Surface-mount transistors with two pins on one side and the third standing alone on the other side (SOT-23, SOT-323) almost always have the collector / drain standing alone. This is because the gate-source / base-emitter voltage differential is small, whereas the collector / drain may be tens or hundreds of volts different, so it provides a larger clearance for that voltage differential to have the collector / drain off on its own. The same holds true for DPAK / D2PAK transistors, where the middle pin is cut short and sticks up in the air; it's done to provide voltage clearance and you connect electrically through the collector / drain via the tab, which is (usually) the same piece of metal as the center pin. I suppose there are certain transistor parts that are exceptions to these rules (most likely in the SOT-23 and SOT-323 packages) but I'm not aware of any -- still, always check the datasheet. ",Jason S,https://electronics.stackexchange.com/users/330,http://electronics.stackexchange.com/questions/23305/how-do-i-know-if-which-leg-is-the-emitter-or-the-collector-transistor,SCIENCE,electronics.stackexchange.com 6577,Can anyone learn to sing?,"It may seem as a kinda dumb question, and I'm totally aware of this. But, what I'm going to ask may be specific enough to not get closed: I've been playing guitar and also a few other instruments for quite a while now, but I just can't sing. I can hear a melody in my head, but even if I try to hit the first note, I will fail very often. Now what I want to ask is, can anyone learn to sing in a manner that ""won't hurt the ear of a non-musician""? I'm not asking if anyone could be the next Freddie Mercury, but does anyone have the ability to sing some backing vocals if needed, without just sounding terrible? I always find it hard to get question on music get to the point, so i'll try it with this: Can anyone achieve semi-professional level of singing, even if one doesn't have a ""good"" voice? ",Michael Kunst,https://music.stackexchange.com/users/7091,"If you were learning the violin and stated ""I can hear a melody in my head, but even if I try to hit the first note, I will fail very often."", wouldn't that seem silly? Of course you don't have some inborn ability to make an instrument produce a given pitch. Singing is not talking (assuming that you are not from Switzerland). And speech melody is far less rigid than music pitches. And you would want to employ quite a larger range when singing (assuming that you are not from Switzerland). Pitch control is a matter of practice. If you hear you are wrong, and preferably also hear which direction you are off, you can fix this with practice. ",User8773,https://music.stackexchange.com/users/8773,http://music.stackexchange.com/questions/14253/can-anyone-learn-to-sing,LIFE_ARTS,music.stackexchange.com 3312,Multiple orders in a single list,"I have a problem with a ranking system I am using. Scenario: An online game with around 10k players calculates a real time ranking of points when a certain event occurs. Events don't occur that often, around 1 time per minute. This ranking is kept in the cache for quick calculations, sorting and access. Now players can form groups and play against each other, but the scoring system is the same, only the ranking is based for the players in that group. At first I created for every group a separate ranking, effectively having the same scores as the complete ranking, but with different positions in the ranking. This is trivial because there are over 1.000 groups and every time an event occurs all the groups would have to be updated. So what I did now is when the group ranking is requested take only the players that are in that group from the complete ranking and show them. The positions would have to be re-counted. That re-counting is where the problem is. Because the sub-list is by-reference from the complete ranking list I cannot change the position of the player in the sub-ranking without updating it in the complete ranking, because it's just a reference. I came up with two solutions: Create a copy from the record every time it is requested and do some output caching (not very desirable because the rankings are live) Create a copy and store this in a cache which is reset when an event occurs. Create a sub-list with just the positions which is updated when an event occurs. And the last solution: do the position counting in the output instead in the business side. This would be the best solution, only problem is that on some pages this text appears: ""You are on position # in the ranking"" where # is your ranking position. This number would be tedious to get then. Does anybody have any suggestions to this problem? ",YesMan85,https://programmers.stackexchange.com/users/24248,"As you say yourself, the best solution is to do the counting in the output, instead of storing it in the various lists. That way you don't have to store (and recalculate) the ranking numbers on each event for each (sub-)list, but you only calculate them when needed. For the ""You are on position # in the ranking"" text, you could have a method in the class that represents the ranking list, like this: RankingList::getRankingOf(Player). Only if this information is costly to obtain and you only need the ranking from the overall list, you could consider caching the current ranking numbers in the overall list (as an optimisation strategy). ",Bart van Ingen Schenau,https://programmers.stackexchange.com/users/5099,http://programmers.stackexchange.com/questions/198803/multiple-orders-in-a-single-list,TECHNOLOGY,programmers.stackexchange.com 7944,abelian higgs vortices,"Dear fellow mathematicians, during some gauge-theoretic explorations I've stumble upon a recent paper by Nick Manton on Abelian higgs vortices where he studies Abelian higgs ""vortices"" on hyperbolic surfaces. Does anyone have any historical knowledge of whether the word vortex in this context have any connection with point vortices from fluid dynamics? ",swallowtail ,https://mathoverflow.net/users/10137,"I expect that this terminology came from an analogy of an analogy. Quoting from Quantum Field Theory of Anyons, by Fröhlich and Marchetti (1988), ""Particles with real spin and intermediate statistics have been called 'anyons' by Wilczek [1]. He suggested that electrically charged magnetic vortices, occuring in certain Higgs models, may be examples of such particles."" So certain types of anyons can reasonably be, and have been, called vortices. I looked at the Manton paper, but didn't understand it at all; however, my guess is that the things Manton is calling vortices are related to the electrically charged magnetic vortices mentioned above (and if you consider these just mathematically and not physically, there is no apparent reason that they should be called vortices). I would welcome corrections from anyone with better knowledge of the historical record (my answer came from knowing about the anyonic vortex terminology and Google). ",Peter Shor,https://mathoverflow.net/users/2294,http://mathoverflow.net/questions/42567,SCIENCE,mathoverflow.net 3792,I am a Resident Alien for tax purposes. Can I claim exemptions from the India - US Tax Treaty (21)?,"I am an Indian citizen living in the US since 2008 with an F1 Visa. I am a resident for tax purposes. Can I claim exemption under the India US Tax Treaty (21) ""Students and Business Apprentices From India""? So Do I have to file the 1040NR in spite for being a resident alien for tax purposes? Could anyone site me IRS publications which clarifies this? I am looking through p519 and am lost :-/ ",Lord Loh.,https://money.stackexchange.com/users/13083,"I was able to find several references that claim that the Indo-US treaty provision is limited to five years: Here it says this (on page 20): Generally the treaty exemption for students is limited to the first five calendar years that the international student is in the U.S. However there is no set time limit for students from Belgium, Bulgaria, China, The Netherlands, and Pakistan. However, I couldn't find any specific time limit neither in the treaty nor in the technical explanation. The explanation says: Thus, for example, an Indian resident who visits the United States as a student and becomes a U.S. resident according to the Code, other than by virtue of acquiring a green card, would continue to be exempt from U.S. tax in accordance with this Article so long as he is not a U.S. citizen and does not acquire immigrant status in the United States. The saving clause does apply to U.S. citizens and immigrants. However, the treaty explicitly says this: The benefits of this Article shall extend only for such period of time as may be reasonable or customarily required to complete the education or training undertaken. The reason for this last paragraph is to ensure that you don't artificially prolong your student status, and the 5 year limit may come out of the interpretation of this specific paragraph. Similar paragraph exists in the US-China treaty, and the explanation for that treaty says this: These exemptions may be claimed only for the period reasonably necessary to complete the education or training. In some cases, the course of study or training may last less than year. For most undergraduate college or university degrees the appropriate period will be four years. For some advanced degrees, such as in medicine, the required period may be longer, e.g., seven years. Based on this, it is my personal impression that if you're an undergraduate student and studying the same degree (and not, for example, finished your BA, and started your MS) - you are no longer eligible for the treaty benefit. But I suggest you ask a professional (EA/CPA licensed in your State) for a more reliable tax advice on the matter. I'm not a tax professional and this is not a tax advice. ",littleadv,https://money.stackexchange.com/users/2998,http://money.stackexchange.com/questions/28257/i-am-a-resident-alien-for-tax-purposes-can-i-claim-exemptions-from-the-india,LIFE_ARTS,money.stackexchange.com 864,How can I get my SSL certificate signed by an CA for web application that runs on localhost,"I have a web application that runs on localhost. I have a self-signed certificate for tomcat configured but when loading the website on firefox, I get a security exception. Can I get a CA to sign my SSL certificate so that this error is not thrown? ",Questioner,https://security.stackexchange.com/users/47553,"You can't and you absolutely SHOULD NOT! The main feature of X509 certificate signature in SSL/TLS is that a third party guarantees that you're actually connecting to a system that has been approved by the owner of a domain name (it is the assumption that you already know the relation between the domain name and the actual entity you're trying to interact with). Issuing a certificate for a name that isn't uniquely linked to an entity does not allow that validation to take place: such a signed certificate wouldn't carry any guarantee. The bright point, however, is that if the only way you're using SSL is to validate the server identity, then it simply it doesn't matter if the certificate is signed by a trusted CA: you should be using certificate pinning in any case (not that it matters much, mind you, since you can assume that if someone can hijack your service listening on the loopback address, he can also grab the private key associated with the certificate). ",Stephane,https://security.stackexchange.com/users/20934,http://security.stackexchange.com/questions/59049/how-can-i-get-my-ssl-certificate-signed-by-an-ca-for-web-application-that-runs-o,TECHNOLOGY,security.stackexchange.com 6240,What are all of the quotes in the OP of Eden of the East from?,"In the Eden of the East opening, there are a lot of quotes from different sources. The only one I know the origin of is ""The abuse of greatness is when it disjoins remorse from power,"" which is from Julius Caesar by William Shakespeare. I don't know what the other quotes that show up on the screen are from or are in reference to. Can someone tell me? ",kuwaly,https://anime.stackexchange.com/users/93,"This blogpost has a transcript of all of the text from the opening. Not all of them are famous quotes. ""I saw you in Heaven and heard of your glory You saved our world from the fallen angels I saw Messiah standing Standing before me with no words Nothing but ""Hope"" When we lost dread, a Demon was laughing But now you are showing us wonder Giving your love With awe, down on my knees again I've got to know you're the one The only one reveals the world"" This is repeated multiple times throughout the OP and seems to be part of the song 東のエデン挿入歌「Reveal The World」 ""The abuse of greatness is when it disjoins remorse from power."" As you've noted, it's Brutus from Julius Caesar, by William Shakespeare. ""Mail Own date Media tool Appli Camera Phone book Iseg Music Service Setting You've got mail Calling Talking"" These seem to be options (partially obscured) of the phone. ""Let me walk with you when I'm lost in the wild I know you always lead me to another Eden Let me bless your name, O Lord, O Lord Your words will never fade away Since we believe you're the light on earth Reveals the world"" Also from the ""Reveal the world"" song lyrics. The rest seems to be proper names and instances from the show itself, like ""noblesse oblige"", and ""Juiz"", and ""Selecao system 12 persons selected in Japan"". So the only real quote I guess is from the Julius Caesar play. ",Jon Lin,https://anime.stackexchange.com/users/91,http://anime.stackexchange.com/questions/4869/what-are-all-of-the-quotes-in-the-op-of-eden-of-the-east-from,CULTURE,anime.stackexchange.com 8848,IPython Qt Console doesn't have a title in GNOME app switcher," When I use the app switcher in GNOME 3.16, the IPython Qt Console (version 3.1.0) doesn't have a title under its icon (see image, and compare with Chromium). I also noticed that the icon doesn't have a title in the GNOME dock, nor is it present in the GNOME bar at the top. I thought that maybe the title would be set in the .desktop file, but then I had a look at my /usr/share/applications/ipython-qtconsole.desktop and it doesn't look any different from other applications (i.e. it has a Name label set to an IPython value). Is there a way to add a title manually? I'm on Arch Linux using GNOME 3.16.1. ",Stefan van den Akker,https://unix.stackexchange.com/users/73808,"This has never happened to me but this is more a ""menu"" issue than an application one. As a starting point I suggest you navigate to the file ~/.config/menus/gnome-application.menu See if its listed there and if there are any issues with the listing. There is also an app called ""menulibre"" which allows you to add/modify icon names. It available in the AUR. ",user112694,https://unix.stackexchange.com/users/112694,http://unix.stackexchange.com/questions/199801/ipython-qt-console-doesnt-have-a-title-in-gnome-app-switcher,TECHNOLOGY,unix.stackexchange.com 2561,How does one build a mizbeah?,"Are there specifications to build a mizbeah? I understand that stones were used , are there other requirements? Can one build a mizbeah in our days? ",alice fine,https://judaism.stackexchange.com/users/3293," Are there specifications to build a Mizbeah? Yes, there are specification for building a Mizbeach - and the Rambam has codified them in the first 2 chapters of הלכות בית הבחירה Can one build a Mizbeah in our days? The Rambam (ibid 1:3) says that after the temple was built (i.e. nowadays), individuals may no longer have their private temples nor make private sacrifices. כֵּיוָן שֶׁנִּבְנָה הַמִּקְדָּשׁ בִּירוּשָׁלַיִם נֶאֶסְרוּ כָּל הַמְּקוֹמוֹת כֻּלָּן לִבְנוֹת בָּהֶן בַּיִת לַה' וּלְהַקְרִיב בָּהֶן קָרְבָּן That leaves the option of building the Mizbeach on the Temple Mount. Two issues arise. The Rambam says (ibid 1:4) we don't have enough details to build the 3rd Temple. וְכֵן בִּנְיָן הֶעָתִיד לְהִבָּנוֹת אַף עַל פִּי שֶׁהוּא כָּתוּב בִּיחֶזְקֵאל אֵינוֹ מְפֹרָשׁ וּמְבֹאָר The Rambam says (ibid 2:1) that the Mizbeach must be built on its precise location; no deviation allowed. הַמִּזְבֵחַ מְקוֹמוֹ מְכֻוָּן בְּיוֹתֵר. וְאֵין מְשַׁנִּין אוֹתוֹ מִמְּקוֹמוֹ לְעוֹלָם Building it nowadays would require deciding between various opinions as to its location. A job best left to Eliyahu HaNavi, may he arrive speedily in our lifetime. ",Danny Schoemann,https://judaism.stackexchange.com/users/501,http://judaism.stackexchange.com/questions/57644/how-does-one-build-a-mizbeah,CULTURE,judaism.stackexchange.com 661,How to render a curve without creating meshes?,"I am able to render a curve by bevelling it. However, for a scientific visualisation that I am working on, this doesn't render the way I wish it to. I would like the curve to render as a fixed width line irrespective of the distance from the camera. Currently, I have to adjust the bevelling amount based on camera distance, and also play with rendering samples to get a smooth looking line. Is there a cleaner approach that I am missing? I am currently using the ""cycles"" renderer, but I am open to suggestions for any other renderer. Thanks! Clarification: This is an animated visualisation. Hence, the distance from camera varies continuously. Here's an example video of what I am trying to do. The comet orbit is the curve I am worried about. ",HRJ,https://blender.stackexchange.com/users/81,"You could use OpenGL render (the button in the 3D View header) in Wireframe view mode. Every curve is rendered as a line without the need for any beveling. Animations can also be OpenGL rendered. It is very fast. But there is no possibility to set the line width. It's always 1px. To support transparency you have to set the shading mode to GLSL (press N in 3D View and look for Shading). ",Maccesch,https://blender.stackexchange.com/users/151,http://blender.stackexchange.com/questions/3580/how-to-render-a-curve-without-creating-meshes,TECHNOLOGY,blender.stackexchange.com 51,More than 2 resistors in parallel,"Most people know the formula for the total resistance of parallel resistors: \$ \dfrac{1}{R_t} = \dfrac{1}{R_1} + \dfrac{1}{R_2} + {}...{} + \dfrac{1}{R_n} \$ If there are only 2 resistors, that can be easily rearranged to solve for Rt: \$ {R_t} = \dfrac{(R_1 \cdot R_2)}{(R_1 + R_2)} \$ Is there a safe way to do that for n resistors? ",Bluefire,https://electronics.stackexchange.com/users/15851,"This is not an answer to your question but rather, additional information that may (or may not) be helpful in thinking about this kind of problem. When I teach introductory circuit classes, I always emphasize the notion of duality which, when mastered, can give you deep insight into many fundamental ""rules"" of circuit analysis. The idea is that if you know the answer for, say, a series circuit, you can take the dual of the result and get a correct answer for a seemingly very different problem. So, here is short list of circuit duals: Voltage - Current Resistance - Conductance Inductance - Capacitance Impedance - Admittance Series - Parallel Thevenin - Norton There are others but these will do most of the time. Ohm's law is usually written as: \$V = I R \$ To take the dual, replace all the variables in the above equation with their duals: The dual of Ohm's Law: \$I = VG \$ where \$G = \dfrac{1}{R} \$ Recall that for resistors in series, resistances add, so that the equivalent resistance is just the sum. Consider the dual of this, conductances in parallel. From the principle of duality, parallel conductances add just as series resistances. So, if you have 3 conductances in parallel, the equivalent conductance is: \$G_{eq} = G_1 + G_2 + G_3 \$ Now, convert back to resistance: \$R_{eq} = \dfrac{1}{G_{eq}} = \dfrac{1}{G_1 + G_2 + G_3} = \dfrac{1}{\frac{1}{R_1}+\frac{1}{R_2} +\frac{1}{R_3}}\$ In other words, the equivalent resistance of \$n\$ parallel resistors is the reciprocal of the sum of the reciprocals. This is the origin of your first formula. ",Alfred Centauri,https://electronics.stackexchange.com/users/10475,http://electronics.stackexchange.com/questions/47185/more-than-2-resistors-in-parallel,TECHNOLOGY,electronics.stackexchange.com 1695,Why does cyclopropane give bromine water test?,"This question was in my exam and all I could tell was that it is related to high angle strain as the angle is $60^\circ$ in stead of required $109.5^\circ$. No book I have read mentions this. Also, what is the product formed? ",evil999man,https://chemistry.stackexchange.com/users/4597,"The $\ce{H-C-H}$ angle in cyclopropane has been measured to be 114 degrees. From this, and using Coulson's Theorem $$\ce{1+\lambda^2cos(114)=0}$$ where $\ce{\lambda^2}$ represents the hybridization index of the bond, the $\ce{C-H}$ bonds in cyclopropane can be deduced to be $\ce{sp^{2.46}}$ hybridized. Now, using the equation $$\ce{\frac{2}{1+\lambda^_{C-H}^2}+\frac{2}{1+\lambda_{C-C}^2}=1}$$ (which says that summing the ""s"" character in all bonds at a given carbon must total to 1) we find that $\ce{\lambda_{c-c}^2=3.74}$, or the C-C bond is $\ce{sp^{3.74}}$ hybridized. We see that the C-C bond in cyclopropane is very high in $\ce{P}$ character. It is this high $\ce{P}$ content that allows cycloprane to behave in a similar fashion to an olefin in terms of stabilizing adjacent charge, absorbing bromine, etc. By the way, an x-ray study of a cyclopropane derivative (Acta Cryst., 20, 80 (1966)) shows significant electron density only exterior to the cyclopropane ring, there is NO significant electron density interior to the ring, consistent with this analysis. ",ron,https://chemistry.stackexchange.com/users/4231,http://chemistry.stackexchange.com/questions/10653/why-does-cyclopropane-give-bromine-water-test,SCIENCE,chemistry.stackexchange.com 65,Silverlight: Returning value from synchronous method using Rx,"I am writing a simple Silverlight application and WCF Service. I want to create a synchronous method that return a value. The method itself, call an asynchronous method from WCF Services. After I call asynchronous method, I want to get it value, and return to sender. I hear that Rx can solve this kind of problem. This is my code : private void btnCreate_Click(object sender, RoutedEventArgs e) { string myResult = getMyBook(txtBookName.Text); MessageBox.Show(""Result\n"" + myResult); // myResult will be use for another purpose here.. } // I want this method can be called anywhere, as long as the caller still in the same namespace. public string getMyBook(string bookName) { Servo.ServoClient svc = new ServoClient(); string returnValue = """"; var o = Observable.FromEventPattern<GetBookCompletedEventArgs>(svc, ""GetBookCompleted""); o.Subscribe( b => returnValue = b.EventArgs.Result ); svc.GetBookAsync(bookName); return returnValue; } When I click btnCreate, myResult variable still empty. Is that something wrong with my code? Or maybe I am just don't understand with Rx concept? I am new to Rx. My goal is : I need to get the result (myResult variable) from asynchronous method, and then used in later code. ",Trom,https://stackoverflow.com/users/1219992,"Remember that GetBookAsync returns immediately, and will return the value stored in returnvalue. When the data arrives returnvalue will be out of scope, and by then btnCreate will have finished. U could use await on the GetBookAsync, so that it will wait for the data to arrive before continuing. Don't forget that would mean u also need the async on the method. Not a great example or use of either RX or await, but trying is how we learn! ",codeputer,https://stackoverflow.com/users/176338,http://stackoverflow.com/questions/15583781/silverlight-returning-value-from-synchronous-method-using-rx,STACKOVERFLOW,stackoverflow.com 2127,Can you make a hash out of a stream cipher?,"A comment on another question made me wonder about something: Assume you're on a rather constrained platform — say, a low-end embedded device — with no built-in crypto capabilities, but you do have access to a simple stream cipher; say, RC4 or one of the eSTREAM ciphers. What other crypto primitives can you build out of that stream cipher? In particular, are there any practical ways to build a cryptographic hash function and/or a MAC out of just a stream cipher? We already have questions about turning a hash into a stream cipher and about turning a stream cipher into a block cipher, but this particular transformation doesn't seem to have been covered yet. Obviously, if the platform constraints permit it, one could ignore the stream cipher and just implement a standard hash function from the ground up. What I'm wondering is whether having the stream cipher available might let one do better than that in terms of code size, memory usage and/or speed. While a construction that treats the stream cipher as a black box would be nice, schemes that only use parts of the stream cipher (like RC4-Hash, which, alas, has practical collision attacks) would be interesting too, at least if they're simple enough. ",Ilmari Karonen,https://crypto.stackexchange.com/users/598,"I am pretty sure that it is not advisable to use a stream model to construct a cryptographic hash. I do not have a full theoretic proof in hand, but can think about it from the perspective of a famous stream cipher, RC4. It is susceptible to related-key attack. Now to use RC4 for constructing a hash function, you need to argue that it should be resistant to a stronger adversarial model, viz chosen-key attack, whereupon the adversary can target the weakness in key scheduling. I am sure full chosen-key is not under consideration for RC4 (correct me if I am wrong). On the other hand, you allow the adversary to pick the key in the very first part of the definition of any form of resistance (apart from chosen-target-forced-prefix resistance which is not yet formally defined) for cryptographic hash function! So, I am pretty sure that it is not advisable. However, if we look at few results from the theoretical point of view, Coron et al. showed the equivalence between ideal cipher model and the random oracle model. This give some hope: convert the stream cipher to block cipher secure in the ideal cipher model and then by equivalence it is secure in random oracle model; but we get stuck here (how to move from RO model to an instantiation of a hash function. After all, the million dollar question is whether we trust random oracle model after Canetti et al worked showed weakness in the random oracle model! ",Jalaj,https://crypto.stackexchange.com/users/1114,http://crypto.stackexchange.com/questions/2214/can-you-make-a-hash-out-of-a-stream-cipher,TECHNOLOGY,crypto.stackexchange.com 7842,How to Construct the Coproduct of Pointed Categories?,"A pointed category is a (small) category together with a distinguished object, called the basepoint $*$. How does one explicitly construct the coproduct of two pointed categories? This problem reduces to constructing the coproduct of two pointed connected categories. If both categories have one object, this becomes the free product of monoids. ",Gao 2Man,https://mathoverflow.net/users/6301,"It is useful to consider this construction in more generality, as is well written up in the case of groupoids (see Higgins' book ""Categories and groupoids""). Let $C$ be a small category, and $f: Ob(C) \to Y$ a function. Then there is a category $f_*(C)$ with object set $Y$ and satisfying a universal property with regard to functors on $C$ whose object function factors through $f$. If $C,D$ are two categories with base points, then you get the free product by taking the disjoint union of $C$ and $D$ and then identifying the base points. To put this in a more general light, the objects of a (small) category can be regarded as a functor Ob from the category $\mathsf{Cat}$ of small categories and functors to the category $\mathsf{Set}$ of sets and functions, and then this functor Ob is both a fibration (this is about pullbacks) and cofibration (this is about pushouts). There is a basic account of these ideas, which originated with Grothendieck, in R. Brown and R. Sivera, `Algebraic colimit calculations in homotopy theory using fibred and cofibred categories',  Theory and Applications of Categories, 22 (2009) 222-251. ",Ronnie Brown,https://mathoverflow.net/users/19949,http://mathoverflow.net/questions/93486,SCIENCE,mathoverflow.net 5561,Importing data from an XLS File using ADO and Delphi,"I want to import some data from an Excel file ( xls ) by using TADOConnection and TADOTable. I connect to file with no problem, but when i open TADOTable some fields have ftFloat datatype because their values in excel file are numeric, but their values are not a number! I want all fields of TADOTable (columns of Excel file) to have ftString datatype. I set the types of columms in Excel file to Text but no changes affected! How can I do this? ",G3ntle_Man,https://stackoverflow.com/users/955719,"I am guessing you have a majority of columns that may appear to be numeric, but also some that are pure text. ADO effectively ignores the column type when importing an Excel. Instead, it guesses the column types, as stated in this MSDN link: A Caution about Mixed Data Types As stated previously, ADO must guess at the data type for each column in your Excel worksheet or range. (This is not affected by Excel cell formatting settings.) A serious problem can arise if you have numeric values mixed with text values in the same column. Both the Jet and the ODBC Provider return the data of the majority type, but return NULL (empty) values for the minority data type. If the two types are equally mixed in the column, the provider chooses numeric over text. One way to load all fields as strings is to use the IMEX extended property in your connection string like following: Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myFolder\myExcel2007file.xlsx; Extended Properties=""Excel 12.0 Xml;HDR=YES;IMEX=1""; Setting IMEX to 1 makes ADO treat all columns as text, as stated in following ConnectionStrings page: Use this one [IMEX=1] when you want to treat all data in the file as text, overriding Excels column type ""General"" to guess what type of data is in the column. You can find more information about the IMEX property in this SO question. Update: The field data type retrieved using this would be ftWideString. ",Guillem Vicens,https://stackoverflow.com/users/279592,http://stackoverflow.com/questions/21154190/importing-data-from-an-xls-file-using-ado-and-delphi,STACKOVERFLOW,stackoverflow.com 3139,What does Arch Linux offer?,"I use Macs, Ubuntu, FreeBSD, OpenBSD, and Fedora for different purposes. I'm fairly busy and trying out a new distro takes a lot of time, but I hear lots of good things about Arch Linux from people I admire. I do mostly scientific computing (and some web development), and use Linux as both a desktop and a server. Does Arch offer anything I'm not already getting from one of my current installs? I'm particularly interested in the differences between Arch and Debian ",Ali,https://unix.stackexchange.com/users/3850,"Is there any merit in trying Arch? Of course there is. Provided you: Are prepared to read all of the excellent documentation that the community had provided; Are willing to assume complete responsibility for your system and not expect to have your hand held; Are comfortable with the (admittedly infrequent) occasions where newer packages cause issues, or even breakage, that comes with a rolling release. Whether or not there are advantages to you depends entirely on your needs and inclinations. Arch means having the the newest packages, but that comes at a cost in terms of attentiveness to your system. There is no particular ""magic"" to Arch (and no inherent ""coolness"" either); it's a distro like any other that scratches an itch... ",jasonwryan,https://unix.stackexchange.com/users/6761,http://unix.stackexchange.com/questions/25466/what-does-arch-linux-offer,TECHNOLOGY,unix.stackexchange.com 1074,Using jdbc-user-service inside user-service-ref,"I am using spring security and for database based authentication I used following configuration and its working fine <authentication-manager alias=""authenticationManager""> <authentication-provider> <jdbc-user-service data-source-ref=""dataSource"" users-by-username-query=""SELECT ...... U.email_address=?"" authorities-by-username-query=""SELECT ... U.email_address=?""> </authentication-provider> </authentication-manager> now I wanted to add extra info to the session and came across Adding user to session, spring security default login, I tried it and now I have a problem. XML says I cant use user-service-ref and jdbc-user-service combined. Is there a way to sort it out or else what I have to do if I have to use user-service-ref tag only to authenticate users? What can be the other way to add extra info say a whole Users object to the session.? Your help will be appreciated. ",khobab,https://stackoverflow.com/users/1468338,"After hours of searching and experimenting I was able to do it like this. Make a new service say MyUserService that will implement org.springframework.security.core.userdetails.UserDetailsService and has annotation @Service. UserDetailsService only has one method loadUserByUserName. Implementation of this method will be in MyUserService. It will look like this. @Service public class MyUserService implements UserDetailsService { @Override public UserDetails loadUserByUsername(String arg0) throws UsernameNotFoundException { MyUser user=new MyUser(); /*get details of user and authorities from database whose username is arg0 and place them in user instance */ return user; } } MyUser is also a new class that implements org.springframework.security.core.userdetails.UserDetails and all its methods are implemented inside MyUser class. It will look like this. public class MyUser implements UserDetails { private static final long serialVersionUID = 1L; /*All the variables their getter setters that you wish to store in session. And implementation of all the methods of UserDetails go here.*/ } Define a bean like this <bean id=""customUserDetailsService"" class=""org.aurora.timeexpense.service.MyUserService""/> Where org.aurora.timeexpense.service.MyUserService is the path of my defined service that implements UserDetailsService. 4.And Spring Security Configuration will go like this <authentication-manager alias=""authenticationManager""> <authentication-provider user-service-ref=""customUserDetailsService""> </authentication-provider> </authentication-manager> You are good to go. ",khobab,https://stackoverflow.com/users/1468338,http://stackoverflow.com/questions/13475575/using-jdbc-user-service-inside-user-service-ref,STACKOVERFLOW,stackoverflow.com 7831,Is there a name for the number of values a variable can take?,"For example, a bit or a boolean can be either 0 or 1 so the number 2 is associated with it. Similarly, for a byte which is 8 bits, the maximum number of different assignments would be 2^8. Is there a name for this number? When we pass everything through our system that has ECMAScript, Java and MySQL, then a boolean does not have only two possible assignments. For instance, a false boolean gets saved as a 0 and the boxed value could be null so a boolean suddenly can get true, false, 0, 1, null or even undefined or <missing>. I think it could get problematic in tests to guarantee that the values are not inconsistent. For instance, a value boolean locked could become null and then when a script or a layout template evaluates it then it will evaluate to false somewhere if the real value was null and similar problems. So why don't we always assert that a boolean has the same number of possible values (2 values) and similarly for other types? There is a mathematical term named ""arity"" that is something similar but not exactly, and statistics and probability theory also has the concept of ""event space"" that would be almost exactly what I mean. For instance, the event space for a boolean would be the set {0,1} which has cardinality 2 and that cardinality doesn't get preserved throughout the system, especially when data is passed as polyglots and/or serialized (json, jsonp, xml, yaml). ",Niklas Rosencrantz,https://programmers.stackexchange.com/users/12893,"I would call it cardinality (and indeed I have used it in that sense). It is strictly the cardinality of the set of all values a variable can take. Edit: for example, a 16-bit integer can take exactly 65536 values. The cardinality of the set of all values that the integer can take is 655536. Once you start to consider variables that have a range of valid values and also a range of invalid values (like a boolean with a bitwise value of 17), then you have to extend the concept somewhat, but you can still describe those values with set notation and the concept of cardinality still applies. Edit: Yes, this is the mathematical set, not programming Set. If you were to apply the concept to the C# type short and derive the type short?, this would not have 65537 values, represented by the union of the set of 65536 values mentioned previously and one additional value, null. ",david.pfx,https://programmers.stackexchange.com/users/114930,http://programmers.stackexchange.com/questions/233316/is-there-a-name-for-the-number-of-values-a-variable-can-take,TECHNOLOGY,programmers.stackexchange.com 8200,"Which definition is more used for ""determine""?","I've seen ""determine"" used for two completely different meanings: Zeus' mood will determine tomorrow's weather. (determine = control, dictate) The weather forecaster will determine tomorrow's weather. (determine = forecast, predict) Are these meanings used equally often, or is one much more common than the other? ",Gary,https://english.stackexchange.com/users/34,"The first example looks correct. I don't recognise the meaning illustrated by the second example. To me (as a British English speaker), it looks like it's saying that the weather forecaster can control the weather! ",Steve Melnikoff,https://english.stackexchange.com/users/303,http://english.stackexchange.com/questions/1817/which-definition-is-more-used-for-determine,CULTURE,english.stackexchange.com 5973,Lorentz Invariance of Maxwell Equations,"I am curious to see a simple demonstration of how special relativity leads to Lorentz Invariance of the Maxwell Equations. Differential form will suffice. ",user7348,https://physics.stackexchange.com/users/7348,"Another way to see it is when deriving the EM wave equation from Maxwell equations. The Lorentz Invariance means that the amplitude should be symmetric under translations of space and time and rotations. In the wave eq. you have only 2nd derivatives (time and space), hence symmetry under Lorentz is preserved. ",bla,https://physics.stackexchange.com/users/11676,http://physics.stackexchange.com/questions/35038/lorentz-invariance-of-maxwell-equations,SCIENCE,physics.stackexchange.com 4200,"""Find ten apples and oranges"" Do I find 10 or 20?","If I read the sentence Find ten apples and oranges. Do I need to find ten or twenty pieces of fruit? ",lmd,https://english.stackexchange.com/users/73228,"I think its ambiguous. If the question was: ""Find ten apples and ten oranges."" this is no ambiguity. It is the writer's responsibility to communicate clearly and without ambiguity. If you have to struggle to determine which of three or four possible questions is actually being asked, it's not YOUR fault, it's his. ",Gary's Student,https://english.stackexchange.com/users/71576,http://english.stackexchange.com/questions/166286/find-ten-apples-and-oranges-do-i-find-10-or-20,CULTURE,english.stackexchange.com 97,How to access Event object inside javascript tag of Aspx page header content?,"I am trying to fire a event from script inside aspx page. To fire a event I am using Event.observe() method. In that line I am getting error like ""Event is not an object"". Please help me inthis issue.Thanks in advance. My code: function Submitkeyword() { obj = document.getElementById(""select"");//select is button id Event.observe(obj, 'change', function () { var e = document.getElementById(""lookupvaluesDropdown"");//lookupvaluesDropdown is dropdownlist id var valueddl = e.options[e.selectedIndex].value; }); fireEvent(obj, 'submit'); window.close(); //To close the popup window } function fireEvent(element, event) { if (document.createEventObject) { // dispatch for IE var evt = document.createEventObject(); return element.fireEvent(event, evt); } else { // dispatch for firefox + others var evt = document.createEvent(""HTMLEvents""); evt.initEvent(event, true, true); // event type,bubbling,cancelable return !element.dispatchEvent(evt); } } ",P.Muralikrishna,https://stackoverflow.com/users/1244671,"Event.observe requires the Prototype JavaScript library loaded. If its not loaded and you try to use it you will get the error ""Event is not an object"" You need to include that in your <head> as follows : <script src=""/path/prototype.js"" type=""text/javascript""></script> ",ManseUK,https://stackoverflow.com/users/572939,http://stackoverflow.com/questions/9717107/how-to-access-event-object-inside-javascript-tag-of-aspx-page-header-content,STACKOVERFLOW,stackoverflow.com 2759,Why the use of resistors when pulling something up or down?,"When pulling something up or down why is a resistor used and it not just connected straight to the +V or 0V rail? ",Dean,https://electronics.stackexchange.com/users/1623,"It limits current to protect the switch (transistor, etc.) and allows signal sources with limited driving capability to change that node's voltage. Rails generally have high drive capability, or low resistance. Think voltage divider, including source impedance of signal and rail, then let the rail impedance be 0-ohms for simplicity. Other factors, other than operating current and voltage drops, to determine the pull resistance is charge time and substrate leakage. A 2M-ohm pull-down resistor on a top layer exposed to humidity and salts won't do anything due to sub-1M-ohm electrical resistance of grime layer. ",tyblu,https://electronics.stackexchange.com/users/2118,http://electronics.stackexchange.com/questions/11112/why-the-use-of-resistors-when-pulling-something-up-or-down,TECHNOLOGY,electronics.stackexchange.com 3690,Quantity based discount for single product in Expresso Store,"I'm using latest build of Expresso Store, 2.3.1. I need to apply quantity based discounts to products, but the discount needs to apply to a single product. For example: I have 10% off discount for all products in store when you order 10 or more of a single product, but the discount only applies to the particular product. So I order 11 of Product 1, 10 of Product 2 and 5 of Product 3. Products 1 and 2 will get the discount, product 3 will be full price. As far as I can see this is not possible in Store. If so are there any ways I can handle this in the template? As our discount will likely be pretty simple, with the same discount being applied store wide. Failing that, what are our options for extending Store to achieve this? Update: Just to clarify, we are looking to apply this discount at a category or store wide level, rather than updating the pricing of an individual product, as there are thousands of products this would not be viable, in particular as we will likely just have one percentage discount that is the same for all products. ",neekster,https://expressionengine.stackexchange.com/users/587,"We've just had the bulk discount configured to work with store 2.4 by another extension developer. You're right, it doesn't accept percentage discounts however you could easily use Datagrab to import the matrix fields all at once across any product range you wanted. I'm sure we could put you in touch with the developer that made the add on compatible with store 2 if you wanted... ",Jos Medinger,https://expressionengine.stackexchange.com/users/3835,http://expressionengine.stackexchange.com/questions/24812/quantity-based-discount-for-single-product-in-expresso-store,TECHNOLOGY,expressionengine.stackexchange.com 6735,migrating a document library from sharepoint 2010 to sharepoint 2013 without using 3rd party tools,"I have to migrate a document library from sharepoint 2010 to sharepoint 2013 without using any 3rd party tool. any nice approach to achieve it? ",Rajesh Singh,https://sharepoint.stackexchange.com/users/29819,"Their are 3 ways to get this done. Export from 2010 and import in 2013(with little tricks) Content Database Migration 3rd party tools. Method 1. Export the list from SharePoint 2010 using either the Central Administration or PowerShell (Export-SPWeb). In the Central Administration, go to Backup and Restore > Export a site or list. Choose your list, and click Start Export Copy the exported list (.cmp file) to your desktop and change the extension to .cab. You can then extract it using a software like WinRar. Open the SystemData.XML file with an editor like NotePad++ and change the version from 14.0.0.0 to 15.0.0.0 , and the build version from your 14.0.x.x to 15.0.x.x (depending on the build you have on both your farms). Here is a screenshot with before and afte Now we have to repackage it as a .cab file. I used a software called CabPack. Select your Source and Destination. Change the CabinetNameTemplate if you want, and click on OK. Change the extension from .cab to .cmp Copy the .cmp file back on the network share or directly on the SharePoint 2013 Server. Open SharePoint 2013 Management Shell as an administrator. Run this command by changing the parameters of course! Import-SPWeb -Identity http://teamsite.vlad.local/ -Path \sp2010-itest\Exports\MyCusttomList.cmp -Verbose Open up your SharePoint Site and your list should be there source:http://absolute-sharepoint.com/2013/08/how-to-move-a-list-from-sharepoint-2010-to-sharepoint-2013.html Method 2) I am sure you already have you 2013 farm up and running. Backup the Content Database of the Site Collection in which the list is. (SharePoint 2010) Create a Temporary Web Application in the SharePoint 2013 Farm. Run SharePoint 2013 Management Shell as an administrator, and run the following command to dismount the content database: Get-SPContentDatabase -WebApplication http://sitename.com | Dismount-SPContentDatabase Restore the Backup you took in Step 1, on the SQL Instance hosting your SharePoint 2013 Farm. Make sure you give the farm account db_owner permissions on the database. In the SharePoint 2013 Management Shell, run the following command. Mount-SPContentDatabase MyDatabase -WebApplication http://sitename.com Navigate to the Site Collection, and if you didn’t have too many development and custom things done, it should open no problem. Make sure the list you want to export is ok. Go in the Central Administration, go to Backup and Restore > Export a site or list. Choose your list, and click Start Export Open SharePoint 2013 Management Shell as an administrator. Run this command by changing the parameters of course! ` Import-SPWeb -Identity http://teamsite.vlad.local/ -Path \sp2010itest\Exports\MyCusttomList.cmp -Verbose Open up your SharePoint Site and your list should be there ",Waqas Sarwar MVP,https://sharepoint.stackexchange.com/users/21563,http://sharepoint.stackexchange.com/questions/104226/migrating-a-document-library-from-sharepoint-2010-to-sharepoint-2013-without-usi,TECHNOLOGY,sharepoint.stackexchange.com 8488,Do Not Track header,"Does Stack Overflow honor the Do not track header... or is support going to be added later? ...(it doesn't seem to honor the header at the moment). ",user155454,https://meta.stackexchange.com/users/155454,"We do not do anything special for the proposed spec. There is no requirement anywhere that we implement anything. A bill may be passed in congress one day, who knows. If this proposal gains tons of traction and the industry starts following this practice we will stop serving the quantcast and google analytics tracking if the header is present. Keep in mind, the proposal says nothing about internal tracking, its about 3rd parties. You will not be able to use this header to hide your tracks we will always continue storing every hit to our sites in our mega haproxy database. ",waffles,https://meta.stackexchange.com/users/17174,http://meta.stackexchange.com/questions/109726/do-not-track-header,TECHNOLOGY,meta.stackexchange.com 364,Change Product Quantity Without Edit on Magento,"I have a question here, how to change product stock without click ""Edit"" on Magento ? Thanks Before ",Reggie Trichandra P,https://magento.stackexchange.com/users/23144,"There are third party modules for that. Take a look at http://www.magentocommerce.com/magento-connect/catalogsearch/result/?q=grid+edit&pl=0 ",Jeroen,https://magento.stackexchange.com/users/3156,http://magento.stackexchange.com/questions/59703/change-product-quantity-without-edit-on-magento,TECHNOLOGY,magento.stackexchange.com 6094,Using \item within \newcommand,"I tried defining a new command \Quest as follows but the error Lonely \item--perhaps a missing list environment appears. \def\solnversion{0} %%set this to 1 to get solutions \newcommand\Quest[3]{\item\ifnum\solnversion=1 #3\else #2\fi} But if the \item command is removed, the error Something's wrong--perhaps a missing \item appears instead. How should the code be corrected? ",Grandfather,https://tex.stackexchange.com/users/27625,"Something's wrong--perhaps a missing \item Is a notorious error message in LaTeX, it is almost never caused by a missing \item. It is actually generated if you use \addvspace in horizontal mode. As you have not given any context all we can say is that whatever you passed in as argument #2 or #3 is not allowed at the place where you used the command. The newcommand and the \ifnum test are not really relevant to the error. Since the command you are passing as argument needs to be in vertical mode, a wild guess is that putting it in vertical mode might be sufficient, \par will end the previous paragraph and get TeX into vertical mode so perhaps \newcommand\Quest[3]{\par\ifnum\solnversion=1 #3\else #2\fi} will work, If not (and in future questions) Please supply a complete small document that shows the problem, ",David Carlisle,https://tex.stackexchange.com/users/1090,http://tex.stackexchange.com/questions/103200/using-item-within-newcommand,TECHNOLOGY,tex.stackexchange.com 6872,Why making additional payment to mortgage counts towards principal? Why does it matter?,"When it comes to mortgage advice, some people recommend making an extra payment. The logic is :""These extra payments are automatically applied to your principal, not interest"". Why does it matter if the extra payment is applied to the principal and not interest? ",Victor123,https://money.stackexchange.com/users/2991,"I'm not sure where the ""not interest"" part of your quoted statement comes from; that's not the way this advice is normally given. Perhaps you worded the statement that way because you think there are only two possibilities: payments either are applied to the principal or to the interest? If so, there's a misunderstanding here. Here are two other possibilities: (1) the mortgage holder puts the extra payments in escrow/holding, to be used in the future should you fail to make a payment; (2) the mortgage holder records the payment as being made in advance, without giving you any benefit (such as reduced interest). (Another way of thinking of this is that the mortgage holder moves up the due date, essentially giving you credit for having made the final payment. Unfortunately, this isn't just theoretical.) In short, ""applied to principal"" is a shorthand way of saying that the mortgage holder treats the extra payment in a particular way (which benefits you the most), and not in a way (see (1) and (2), above) that benefits the mortgage holder the most. ",John Broughton,https://money.stackexchange.com/users/3452,http://money.stackexchange.com/questions/7917/why-making-additional-payment-to-mortgage-counts-towards-principal-why-does-it,LIFE_ARTS,money.stackexchange.com 1952,Why are two eigen-state-kets with different eigenvalues orthogonal?,"The operators $J_1^2$, $J_2^2$, $J_{1z}$, and $J_{2z}$ are mutually commuting operators. Likewise, $J_1^2$, $J_2^2$, $J^2$, and $J_z$ are mutually commuting operators. The two groups are incompatible, and the simultaneous eigenkets along with their eigenvalues are given by: ${J_1}^2 \left|j_1,j_2;m_1,m_2\right> = j_1 \left(j_1+1\right) \hbar^2 \left|j_1,j_2;m_1,m_2\right>$ ${J_2}^2 \left|j_1,j_2;m_1,m_2\right> = j_2 \left(j_2+1\right) \hbar^2 \left|j_1,j_2;m_1,m_2\right>$ $J_{1z} \left|j_1,j_2;m_1,m_2\right> = m_1 \hbar \left|j_1,j_2;m_1,m_2\right>$ $J_{2z} \left|j_1,j_2;m_1,m_2\right> = m_2 \hbar \left|j_1,j_2;m_1,m_2\right>$ and ${J_1}^2 \left|j_1,j_2;j,m\right> = j_1 \left(j_1+1\right) \hbar^2 \left|j_1,j_2;j,m\right>$ ${J_2}^2 \left|j_1,j_2;j,m\right> = j_2 \left(j_2+1\right) \hbar^2 \left|j_1,j_2;j,m\right>$ $J^2 \left|j_1,j_2;j,m\right> = j \left(j+1\right) \hbar^2 \left|j_1,j_2;j,m\right>$ $J_z \left|j_1,j_2;j,m\right> = m \hbar \left|j_1,j_2;j,m\right>$ I read that each set of eigenkets are mutually orthogonal [1] (for eigenkets corresponding to different sets of eigenvalues). This is what I don't understand. In principle it makes sense, but when I plug in numbers I don't get zero for the inner product. For example take the first eigenket: $\left|j_1,j_2;m_1,m_2\right>$. If I choose different eigenvalues for this eigenket (e.g. let $j_1 = 0$ and then let $j_1 = 1$) I get the following: for $j_1 = 0$ I can have: $\left|0,j_2;0,m_2\right>$ for $j_1 = 1$ I can have any of the following, since $\left|m_1\right| \leq j_1$: $\left|1,j_2;-1,m_2\right>$ $\left|1,j_2;0,m_2\right>$ $\left|1,j_2;1,m_2\right>$ If I take the inner-product of the $j_1 = 0$ eigenket with any of the $j_1 = 1$ eigenkets I do not get zero, e.g.: $\left<0,j_2;0,m_2 \mid 1,j_2;-1,m_2\right> = {j_2}^2+{m_2}^2$ which is non-zero unless $j_2 = 0$. What am I misunderstanding here? How do you show that eigenkets with different eigenvalues are orthogonal? ",okj,https://physics.stackexchange.com/users/3597,"The error is most likely that you are using $$\left<j_1,j_2;m_1,m_2 \mid j'_1,j'_2;m'_1,m'_2\right> = j_1j'_1+j_2j'_2+m_1m'_1+m_2m'_2, \quad \mathrm{(Wrong!)}$$ where you should be using $$\left<j_1,j_2;m_1,m_2 \mid j'_1,j'_2;m'_1,m'_2\right> = \delta_{j_1,j'_1}\delta_{j_2,j'_2}\delta_{m_1,m'_1}\delta_{m_2,m'_2},$$ where $\delta_{k,\ell}$ is the Kronecker delta function. In other words, the $j$'s and $m$'s are not the coefficients $v^i$ of a vector $\vec{v}=\sum_i v^i \vec{e}_i$ in a Hilbert space, where $\vec{e}_i$ is an orthonormal basis, so that $$ \left<\vec{v}\mid\vec{v}'\right> = \sum_i (v^i)^*v'^i, \qquad \left<\vec{e}_i\mid\vec{e}_{i'}\right> = \delta_{i,i'}. $$ Rather, the $j$'s and $m$'s correspond to the $i$-labels of the basis $\vec{e}_i$. For brevity, we often write $\left< i \mid i'\right>$ instead of $\left<\vec{e}_i\mid\vec{e}_{i'}\right>$. Finally, to give a complete answer, let me include my comment above that it is a general property of eigenvectors for different eigenvalues of a Hermitian operator, that they are orthogonal to each other, see e.g., Lubos Motl's answer or here. ",Qmechanic,https://physics.stackexchange.com/users/2451,http://physics.stackexchange.com/questions/10426/why-are-two-eigen-state-kets-with-different-eigenvalues-orthogonal,SCIENCE,physics.stackexchange.com 4293,Configuring a biblatex bibliography style,"I just switched from natbib to biber + biblatex, and the closest bibliography style to my preferred style is ""ieee"" (by Joseph Wright). I am using it with the citation style ""authoryear"". This makes the numbers in the bibliography useless; how do I remove them? ",Neil G,https://tex.stackexchange.com/users/512,"I can't test it right now, but it should be possible to load biblatex with the options citestyle=authoryear,bibstyle=ieee and then to add authoryear's bibenvironment definition to the preamble: \usepackage[citestyle=authoryear,bibstyle=ieee]{biblatex} \defbibenvironment{bibliography} {\list {} {\setlength{\leftmargin}{\bibhang}% \setlength{\itemindent}{-\leftmargin}% \setlength{\itemsep}{\bibitemsep}% \setlength{\parsep}{\bibparsep}}} {\endlist} {\item} ",lockstep,https://tex.stackexchange.com/users/510,http://tex.stackexchange.com/questions/61370/configuring-a-biblatex-bibliography-style,TECHNOLOGY,tex.stackexchange.com 3906,Can EE handle Millions of Users?,"I’m new to the expression engine project at our business. We are being acquired by a large company and they’re worried that expression engine cannot handle traffic for a exp_members table of 10M, and concurrent connections at about 10k. I know that most people will naturally ask “It all depends on server resources, and how big is your database…”, and we can always have bigger boxes, I’m not really interested in theoretical limits, my question is a bit more practical than that. Has anyone had experience with using EE for 5+ millions of users and approx 10k concurrent users, and what has been your experience been with it? Please help me understand your experience. It’s a classic “Executive Decision makers (and what they think they understand from a sales slick” versus Coders and EE fans. Thank you. ",titicus james,https://expressionengine.stackexchange.com/users/3809,"There's an old post (from 2012) here which might go some way to answer the question. You'll note that there are some major sites there. Ultimately, as you've acknowledged, the matter is one of resources and network infrastructure and not one of software. No system will cope with 10K concurrent connections unless the network is built in such a way as to allow it. ",foamcow,https://expressionengine.stackexchange.com/users/159,http://expressionengine.stackexchange.com/questions/26842/can-ee-handle-millions-of-users,TECHNOLOGY,expressionengine.stackexchange.com 4857,"Graphic Design - Video games -- events, seminars, workshops, etc","My daughter loves drawing - using pencil. She wants to be a Graphic Designer - mainly for video games area. We got her a drawing tablet, but she is more comfortable using the pencil. I have not idea if GD is the best thing for her, &/or how I can help her. Are there any events, seminars, she could attend to? She is in 10th grade now... I want to make sure this is really what she wants to do. I don't want her to realize later on, it is not really what she thought she was going into. Thank you B ",BAS,https://graphicdesign.stackexchange.com/users/32793,"Well this is still very broad but to try and help you out. NYC is a capital of the design world, you'd be hard-pressed to have a single weekend without some sort of design event. As far as hands-on for kids, that's getting a bit more specific. You might want to look into http://aigany.org/get-involved/mentoring/ though it sounds like at least initially it will only be open to students at New York City High School of Art and Design but it never hurts to inquire. They might know another option for you. Again you're in the design mecca. Look at any number of schools and they probably have a program for her. The first (and only one) I looked at is FIT and sure enough: http://fitnyc.edu/5915.asp You could probably find similar programs at Parsons, Pratt, Cooper Union (maybe?), SUNY, RIT, RPI, Rutgers, Syracuse, and everywhere else. Then there's private tutors. Or just call up a few designers and see if any would be willing to let her sit-in for a day or two at their office. ",Ryan,https://graphicdesign.stackexchange.com/users/2611,http://graphicdesign.stackexchange.com/questions/41404/graphic-design-video-games-events-seminars-workshops-etc,LIFE_ARTS,graphicdesign.stackexchange.com 6071,Can one follow Rabbeinu Tam time for beginning Shabbos?,"Does anyone today follow Rabbineu Tam time for the beginning of Shabbos? Reading some tshuvas (e.g. Eretz haTzvi) it is clear this was widespread in Europe. If one has previously been accustomed to accept Shabbos according to the Gra/Baal HaTanya, can one switch to Rabbeinu Tam? (In particular, if one is sure his ancestors did so in Europe, can one revive this minhag after it fell into disuse after migrating to America?) ",Curiouser,https://judaism.stackexchange.com/users/1627,"I have no source, but have heard that when Rav Yoel of Satmar came to America, he and his followers did follow Rabenu Tam. Rav Moshe Feinstein, the story goes, asked him if he could desist, explaining that Americans would follow his own view for the end of Shabas and Rav Yoel's for the start, and Rav Yoel agreed to. ",msh210,https://judaism.stackexchange.com/users/170,http://judaism.stackexchange.com/questions/8778/can-one-follow-rabbeinu-tam-time-for-beginning-shabbos,CULTURE,judaism.stackexchange.com 9151,Non Qt console app in Qt Creator,"I want to create the simple console app below in Qt Creator: #include <iostream> int main(int argc, char* argv[]) { std::cout << ""Hello WOrld""; return 0; } I've seen some possible duplicates on SO, I have ticked the ""Run in Terminal"" option in Run Settings. A console window does pop up on CTRL+R, but it does not display ""Hello World"", simply ""Press Enter to exit"". The above is by creating an Empty Project. I have tried creating a ""Qt Console Application"" which generates the code below. This does work fine, but I want the simple non Qt version above. #include <QtCore/QCoreApplication> #include <iostream> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); std::cout << ""Hello World""; return a.exec(); } ",M Perry,https://stackoverflow.com/users/285683,"Besides ticking ""Run in Terminal"" you need to add ""CONFIG += console"" to your .pro file (if you are using qmake). TEMPLATE = app CONFIG += console SOURCES += main.cpp ",Bojan,https://stackoverflow.com/users/101179,http://stackoverflow.com/questions/6246696/non-qt-console-app-in-qt-creator,STACKOVERFLOW,stackoverflow.com 2831,Adding parent_id attribute value in model,"I have created a module and EAV tables for that. Module's tables are very similar to customer_Address entity and i have defined Attribute AttrA, AttrB and AttrC for this table. So table structure is very similar to as follows: +------------------+----------------------+------+-----+---------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------------+----------------------+------+-----+---------------------+----------------+ | entity_id | int(10) unsigned | NO | PRI | NULL | auto_increment | | entity_type_id | smallint(5) unsigned | NO | | 0 | | | attribute_set_id | smallint(5) unsigned | NO | | 0 | | | increment_id | varchar(50) | YES | | NULL | | | parent_id | int(10) unsigned | YES | MUL | NULL | | | created_at | timestamp | NO | | 0000-00-00 00:00:00 | | | updated_at | timestamp | NO | | 0000-00-00 00:00:00 | | | is_active | smallint(5) unsigned | NO | | 1 | | +------------------+----------------------+------+-----+---------------------+----------------+ and AttrA, AttrB and AttrC values are stored in tables with respective data type. Now using the basic syntax, I am able to add value of attributes AttrA, AttrB and AttrC. Which is: $model = Mage::getModel('customer/address'); $model->setAttrA('ValA')->setAttrB('ValB')->setAttrC('ValC'); doing this correctly sets the values of AttrA, AttrB and AttrC but value of parent_id in customer_entity sets to NULL by default. Here I want to be able to set the parent_id to some other value. For this i tried suggestion given in different post using setParentId(<parent-id-value>). Which is not working in my case. Any idea how i can do this? ",Lalit,https://magento.stackexchange.com/users/6411,"Even if parent_id is a column in the main table, you still need it as an attribute in the eav_attribute table. Just create one attribute called parent_id (the same as the column) with the backend_type ""static"". This is how it works for the sku attribute for products. ",Marius,https://magento.stackexchange.com/users/146,http://magento.stackexchange.com/questions/23636/adding-parent-id-attribute-value-in-model,TECHNOLOGY,magento.stackexchange.com 3948,Etiquette for posting civil and informative comments,"Sometimes I leave a comment like ""Stack Overflow is not your personal research assistant,"" but am accused of being rude. How can I craft a comment that is seen as civil to the community and instructive to the OP? What tone should I strike in comments? What are some examples of bad comments and their better replacements? ",Robert Harvey,https://meta.stackexchange.com/users/102937,"The other two answers are quite good, so this is more of a clarification than a complete answer. Considering the example: Question: ""I'm trying to xxx and it's not working."" unfriendly: ""Look, we're not mind readers here. What do you mean it's not working?"" neutral: ""What did you expect to see, and what did you see instead?"" friendly: ""Sorry to hear that... I hope we can help you! But we need a bit more information. What did you expect to see, and what did you see instead?"" I think one thing that's being missed here is the sheer scale of Stack Overflow. Civility is always required when commenting, but big cities are less overtly friendly than small towns because there are certain realities about the scale of the population and amounts of time available. Would you rather write one baroque, florid ultra-friendly comment to a single user, or three civil-but-direct comments to three different users? Which choice best achieves the goals of Stack Exchange? I can't recommend frequently adding a bunch of noisy, unnecessary, non-content ""friendly"" words to a comment, words that everyone on the Internet has to read through and parse before getting to the actual information in the comment. This isn't what Stack Exchange is about.* Therefore, favor the short neutral comment response. Never be rude, but get to the point quickly and efficiently so we can help as many people as possible get answers to their questions. That's what we are here to do. * Now, if we could pare it down to one additional word instead of the seventeen in the above example, perhaps that'd work. ",Jeff Atwood,https://meta.stackexchange.com/users/1,http://meta.stackexchange.com/questions/138173/etiquette-for-posting-civil-and-informative-comments,TECHNOLOGY,meta.stackexchange.com 7316,Is the particular skill of singing the melody correctly necessary to be able to play the trumpet?,"I mean, there are people who can't sing melodies correctly but they are able to play the guitar perfectly. Will such person be able to play the trumpet? When you hit the note on the trumpet do you have to worry about the correctness of the note or trumpet does it for you? I play the guitar, I even sing sometimes but I'm worried, will my musical hearing be good enough for the trumpet? Hope I made myself clear. ",musicinmusic,https://music.stackexchange.com/users/12741,"Trumpet - sort of. Trombone - absolutely not. The reason is that with a trumpet you have 8 possible fingerings, and for each there is a limited number of tones from which to choose by lip pressure. As a beginner you will only need the lower tones, which are spaced so far apart that it's extremely hard to hit the wrong one without noticing. Only getting a clean intonation might be tricky for you because it involves having precisely the right amount of lip pressure to get the intended result - so you have to hear whether the intonation is right. (I don't think this is a big issue with the guitar once it has been tuned.) With the trombone, instead of fingering you'd have to find exactly the right spot on a continuous scale. That's harder than hitting the right tone when singing. Of course if you have a musical ear and there is merely something wrong with your vocal cords, then this is not an issue either. (In that case the comb, the kazoo and the didgeridoo are the only instruments I can think of right now that would be problematic.) ",Hans Adler,https://music.stackexchange.com/users/12768,http://music.stackexchange.com/questions/22404/is-the-particular-skill-of-singing-the-melody-correctly-necessary-to-be-able-to,LIFE_ARTS,music.stackexchange.com 7078,How to find element count from child to parent with jquery?,"I have a slight issue where i need to count nest level of elements. Problem is that parent element can hold multiple child elements and child elements can have their own child elements. Please see from where i want to start count (marked with text ""I start here""). HTML: <div class=""main_set""> <div class=""child_set""> <div class=""child_set""> <div class=""child_set"">I start here!</div> </div> <div class=""child_set""></div> </div> <div class=""child_set""> <div class=""child_set""></div> </div> </div> I have tried couple things to get count 3. For example my last attempt: $(this).closest('.main_set').find('.child_set'); This one obviously returns 6 tho counting all child_sets. How to count child_set elements from start place to main_set taking into account only nesting. So basically in my example how to get count 3? ",arma,https://stackoverflow.com/users/386222,"You can use parents() from this to find all parents (with a special selector); for the length you have to add one for the current. alert($(this).parents('.child_set').length + 1); Also see this example. ",scessor,https://stackoverflow.com/users/843985,http://stackoverflow.com/questions/11419287/how-to-find-element-count-from-child-to-parent-with-jquery,STACKOVERFLOW,stackoverflow.com 4142,Is it okay to vacuum a laptop keyboard?,"Is it okay to vacuum a laptop keyboard? Would it cause any damage? ",dsafdsf,https://superuser.com/users/97559,"You can use vacuum cleaner, but make sure your laptop's keyboard doesn't have ""pop off"" keys that could possibly be sucked up by the vacuum. A can of compressed air will safely blow dust right out of the little crevices between your keys. You may want to read this article from LifeHacker. ",Mehper C. Palavuzlar,https://superuser.com/users/13567,http://superuser.com/questions/334626,TECHNOLOGY,superuser.com 1971,"CS paper rejected for lack of technical contribution; what does this mean, and how can I fix it?","I recently got two papers rejected with the reviewers asserting a lack of technical contribution. They contained good ideas, at least in my eyes, and used common methodologies in the experimentation. So my question related to the CS field is, what is the difference between a good idea that was tested and a technical contribution? What should an idea have to become a technical contribution? Another observation I had is that other papers, that got accepted, were actually worse from the research methodologies and were previously published in similar form (so the idea was not very original) at that conference, so the “contribution” of these papers is much lower than mine would have been (again it’s just from my perspective). So I don’t understand why those papers got accepted and if the reviewer’s decisions actually make sense, what is it that makes such papers accepted? I aim at enhancing my now rejected papers because I still think they contain original ideas that should be published, I just don’t know where to start. ",user09123789542,https://academia.stackexchange.com/users/20106,"Since you ask those questions, I assume you are relatively new to CS research. I do not know if you have previous research experience in any other scientific area, but let's assume you are new to research all together. Correct me if I am wrong. When your paper gets rejected, the feeling of rejection sucks. It sucks a lot. But in research you have to deal with this rejection and move-on. It does not matter if other people's works that you consider worse have been accepted. Maybe they are better than yours maybe not. But that is really irrelevant. Focus on your work and how to improve it. The questions you should be asking: Is this problem you are trying to solve interesting? Is your solution substantially better than previous state-of-the-art? Are you certain that you described related and recent literature thoroughly? Are you up-to-date on related literature? Did you make clear the benefits on your approach? Is your paper well presented and written? Have you explained your approach thoroughly (with pseudocode, figures) and not just with words? Were your experiments thorough? Did you use many datasets for your experiments? Have you used the datasets that the related papers use or at least similar if not bigger in size and scope? Have you compared your results with previous approaches? Have you many charts demonstrating the various aspects of your solution? Have you advertised your work by finding many test-cases for your problem? If any of those answer is NO, then you must turn them to YES, before resubmitting your work. You must understand that if your paper or the problem you try to solve is boring, then it gets rejected. It is as simple as that. In that cases, the most usual reason for rejection is ""not enough contribution"". So, probably it is also your presentation that needs to be fixed. Also, it seems rather strange that although you are probably new to research, you have submitted two papers at the same time. Perhaps this is too ambitious and it would be better to focus on one of them, improve it and resubmit it. Perhaps, they should be sent to different venues that are more tailored for each one of them. And last but not least. Do not worry. It gets better with time. Both the way you handle rejection and the way you write papers. So, improve what needs to be fixed and everything will work out. ",Alexandros,https://academia.stackexchange.com/users/10042,http://academia.stackexchange.com/questions/26701/cs-paper-rejected-for-lack-of-technical-contribution-what-does-this-mean-and-h,LIFE_ARTS,academia.stackexchange.com 3779,"What does ""pie"" mean in the following sentence?","I once saw a sentence: I will go to a restaurant for pie. Native speakers didn't correct this sentence. I don't know why. I would say ""I will go to a restaurant to eat a pie"". But maybe that sentence was right. Could you please explain to me what that (first) sentence means? ",user5369,https://ell.stackexchange.com/users/5369," I will go to a resturant for pie. There is nothing wrong with this sentence. I imagine the speaker will soon be seated in a restaurant, ordering a slice of pie. However: I will go to a resturant to eat a pie. This is the version that would make me look surprised. When you ""eat a pie"", that typically means you eat the whole pie. The same could be said for cake: ""eat cake"" means ""eat some cake"", but ""eat a cake"" means ""eat the entire cake."" We don't usually use the word ""a"" unless a person eats the whole thing as a single unit (in this context, ""a"" means ""one""): I went to the restaurant and ate a sandwich. I went to the restaurant and ate a gyro. I went to the restaurant and ate a salad. or unless we specify the unit somehow: I went to the restaurant and ate a bowl of soup. I went to the restaurant and ate a piece of pie. I went to the restaurant and ate a rack of ribs. I went to the restaurant and drank a glass of wine. But no article is used when there is an unspecified amount of food (the lack of the word ""a"" means ""some""): When I get to the restaurant, I'll order scrambled eggs. When I get to the restaurant, I'll order spaghetti. When I get to the restaurant, I'll order shrimp. When I get to the restaurant, I'll order pie for dessert. When I get to the restaurant, I'll get coffee. Here's something a bit more advanced: The word ""the"" can be used when referring to a particular restaurant's version of a dish. What would you like today, sir? I'll have the veal saltimbocca. ",J.R.,https://ell.stackexchange.com/users/113,http://ell.stackexchange.com/questions/20276/what-does-pie-mean-in-the-following-sentence,CULTURE,ell.stackexchange.com 3666,Using conditionals to set tag parameters,"I have this opening low search result tag {exp:low_search:results {if segment_2}query=""{segment_2}""{/if} group_id=""7"" limit=""4"" paginate=""bottom"" } I wanted to do more checks on segment_2 before deciding if I should set query param(checking if the segment is for pagination such as P1 or P4). {exp:low_search:results {if segment_2 == '' OR {exp:segment_search keyword=""/^P\d+$/"" segments=""2"" regex=""yes""}}{if:else}query=""{segment_2}""{/if} group_id=""7"" limit=""4"" paginate=""bottom"" } However, I don't think this will work. I think it has something to do with the parse order where you can't set complex conditionals inside a tag. If so, is there an alternative way to set the query param? UPDATE: The reason I am asking is because the code below does not work {if {segment_2} == '' OR {exp:segment_search keyword=""/^P\d+$/"" segments=""2"" regex=""yes""}} {exp:low_search:results {if segment_1 == ""foo""}group_id=""6""{/if} {if segment_1 == ""bar""}group_id=""7""{/if} limit=""4"" paginate=""bottom""} {if:else} {exp:low_search:results query=""{segment_2}"" {if segment_1 == ""foo""}group_id=""6""{/if} {if segment_1 == ""bar""}group_id=""7""{/if} limit=""4"" paginate=""bottom""} {/if} I always get a Parse error: syntax error, unexpected T_ELSE in the code where I don't set the query param. ",arvinsim,https://expressionengine.stackexchange.com/users/636,"You problem is you're trying to do a complex conditional within the tag parameters, that's not possible. Here's a good article regarding parsing conditionals within tags: http://johndwells.com/blog/expressionengine-parse-order-advanced-conditionals-as-tag-parameters As you state, the problem is simple conditionals versus complex conditionals. The problem with your second code: {if {segment_2} == '' OR {exp:segment_search keyword=""/^P\d+$/"" segments=""2"" regex=""yes""}} {exp:low_search:results {if segment_1 == ""foo""}group_id=""6""{/if} {if segment_1 == ""bar""}group_id=""7""{/if} limit=""4"" paginate=""bottom""} {if:else} {exp:low_search:results query=""{segment_2}"" {if segment_1 == ""foo""}group_id=""6""{/if} {if segment_1 == ""bar""}group_id=""7""{/if} limit=""4"" paginate=""bottom""} {/if} ...Is that you won't be able to have the opening tag in a separate conditional to the closing tag - EE parses conditionals at a separate stage to tags. It's not linear (working from top to bottom). This may work: {if {segment_2} == '' OR {exp:segment_search keyword=""/^P\d+$/"" segments=""2"" regex=""yes""}} {exp:low_search:results {if segment_1 == ""foo""}group_id=""6""{/if} {if segment_1 == ""bar""}group_id=""7""{/if} limit=""4"" paginate=""bottom""} {title} {/exp:low_search:results} {if:else} {exp:low_search:results query=""{segment_2}"" {if segment_1 == ""foo""}group_id=""6""{/if} {if segment_1 == ""bar""}group_id=""7""{/if} limit=""4"" paginate=""bottom""} {title} {/exp:low_search:results} {/if} ...Where each tag pair is contained within the same conditional. There's an additional problem in your revised conditional that is showing a parse error: {if {segment_2} == '' OR {exp:segment_search keyword=""/^P\d+$/"" segments=""2"" regex=""yes""}} If there is no keyword, that tag will return an empty string, resulting in your conditional looking like this prior to EE parsing it: {if {segment_2} == '' OR } ...Which will result in the parse error. This is safer: {if {segment_2} == '' OR '{exp:segment_search keyword=""/^P\d+$/"" segments=""2"" regex=""yes""}'} With the quotes, it can be parsed correctly as {if {segment_2} == '' OR ''} Or how I'd approach it, by including in an embed and doing all the conditionals in the parent: {if {segment_2} == '' OR {exp:segment_search keyword=""/^P\d+$/"" segments=""2"" regex=""yes""}} {embed=template-group/search-results group_id=""{if segment_1 == ""foo""}6{/if}{if segment_1 == ""bar""}7{/if}"" query=""""} {if:else} {embed=template-group/search-results group_id=""{if segment_1 == ""foo""}6{/if}{if segment_1 == ""bar""}7{/if}"" query='query=""{segment_2}""'} {/if} And in the embed template: {exp:low_search:results group_id=""{embed:group_id}"" {embed:query} limit=""4"" paginate=""bottom""} {title} {/exp:low_search:results} Note: for the first embed, query will be an empty string which is fine to pass as a parameter. ",Peter Lewis,https://expressionengine.stackexchange.com/users/425,http://expressionengine.stackexchange.com/questions/11826/using-conditionals-to-set-tag-parameters,TECHNOLOGY,expressionengine.stackexchange.com 9449,Is it reasonable to use Javascript MVC Frameworks for closed source paid web applications?,"I am wondering if it is reasonable to write closed source, paid web apps in Javascript (JS MVC Frameworks like AngularJS, Backbone, Knockout, ...)? I'm concerned because in this type of frameworks you use typically a REST backend for CRUD operations and the majority of business and application logic happens in Javascript which can be looked up by anyone using my app. He can see how i do things. When I use for example PHP or Java (Wicket) most of the logic is happening on the server and so a lot less of my source code is exposed. This seems to me a lot safer if I want to have an edge over my competitors, so potentially I earn more money. So is it reasonable to use JavaScript MVC Frameworks for paid applications? Does it depend on something and if yes on what? ",Robert Niestroj,https://programmers.stackexchange.com/users/80370,"If you are only using REST as your entire backend to communicate with the database, that maybe your problem. Using EJB and JPA, the business logic is abstracted away from the user, and handled by the server and its database. If your application logic is happening in your java code, well then I would suggest that it is not clean code. A servers job is to respond to the questions asked by the client. If the business application logic happens in javascript, then the client is essentially answering their own questions. Essentially, your questions makes no sense. ",jononeeno,https://programmers.stackexchange.com/users/88261,http://programmers.stackexchange.com/questions/194845/is-it-reasonable-to-use-javascript-mvc-frameworks-for-closed-source-paid-web-app,TECHNOLOGY,programmers.stackexchange.com 8908,Show Windows 7 logon time?,"On Windows 7 Ultimate, is there a way to see when I logged on into the current session? I want to find out how long I have been at the PC / when I started it up. ",magnattic,https://superuser.com/users/69189,"You can also use systeminfo and next to System Boot Time: It will be in the format 9/17/2011, 10:16:38 PM ",Alpine,https://superuser.com/users/71055,http://superuser.com/questions/310128,TECHNOLOGY,superuser.com 7536,Listview doesn't display data when I run on real device(API 8) but displays when i run on emulater(API 16),"Can anyone please tel me what can be the problem? This is my code public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.book_list); lst = (ListView) findViewById(R.id.listView1); new Thread(new Runnable() { public void run() { data = fetchData(); runOnUiThread(new Runnable() { @Override public void run() { ArrayList<String> users = parseJSON(data); } }); } }).start(); final SimpleAdapter adapter = new SimpleAdapter(this, mylistData, R.layout.rowlayout, row , new int[] {R.id.label,R.id.label1}); lst.setAdapter(adapter); ERROR LOG 05-24 11:08:32.218: E/AndroidRuntime(19121): FATAL EXCEPTION: Thread-12 05-24 11:08:32.218: E/AndroidRuntime(19121): android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. 05-24 11:08:32.218: E/AndroidRuntime(19121): at android.view.ViewRoot.checkThread(ViewRoot.java:3041) 05-24 11:08:32.218: E/AndroidRuntime(19121): at android.view.ViewRoot.invalidateChild(ViewRoot.java:647) 05-24 11:08:32.218: E/AndroidRuntime(19121): at android.view.ViewRoot.invalidateChildInParent(ViewRoot.java:673) 05-24 11:08:32.218: E/AndroidRuntime(19121): at android.view.ViewGroup.invalidateChild(ViewGroup.java:2511) 05-24 11:08:32.218: E/AndroidRuntime(19121): at android.view.View.invalidate(View.java:5255) 05-24 11:08:32.218: E/AndroidRuntime(19121): at android.widget.TextView.invalidateCursor(TextView.java:3774) 05-24 11:08:32.218: E/AndroidRuntime(19121): at android.widget.TextView.spanChange(TextView.java:6680) 05-24 11:08:32.218: E/AndroidRuntime(19121): at android.widget.TextView$ChangeWatcher.onSpanAdded(TextView.java:6805) 05-24 11:08:32.218: E/AndroidRuntime(19121): at android.text.SpannableStringBuilder.sendSpanAdded(SpannableStringBuilder.java:906) 05-24 11:08:32.218: E/AndroidRuntime(19121): at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:611) 05-24 11:08:32.218: E/AndroidRuntime(19121): at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:514) 05-24 11:08:32.218: E/AndroidRuntime(19121): at android.text.Selection.setSelection(Selection.java:74) 05-24 11:08:32.218: E/AndroidRuntime(19121): at android.text.Selection.setSelection(Selection.java:85) 05-24 11:08:32.218: E/AndroidRuntime(19121): at android.text.method.ArrowKeyMovementMethod.initialize(ArrowKeyMovementMethod.java:280) 05-24 11:08:32.218: E/AndroidRuntime(19121): at android.widget.TextView.setText(TextView.java:2798) 05-24 11:08:32.218: E/AndroidRuntime(19121): at android.widget.TextView.setText(TextView.java:2671) 05-24 11:08:32.218: E/AndroidRuntime(19121): at android.widget.EditText.setText(EditText.java:178) 05-24 11:08:32.218: E/AndroidRuntime(19121): at android.widget.TextView.setText(TextView.java:2646) 05-24 11:08:32.218: E/AndroidRuntime(19121): at com.example.book.ManageAuthor.parseJSON(ManageAuthor.java:198) 05-24 11:08:32.218: E/AndroidRuntime(19121): at com.example.book.ManageAuthor$1.run(ManageAuthor.java:77) 05-24 11:08:32.218: E/AndroidRuntime(19121): at java.lang.Thread.run(Thread.java:1019) ",Programmer,https://stackoverflow.com/users/1884804,"Try to use http://developer.android.com/reference/android/view/View.html#post(java.lang.Runnable). For example: public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.book_list); lst = (ListView) findViewById(R.id.listView1); new Thread(new Runnable() { public void run() { data = fetchData(); lst.post(new Runnable() { @Override public void run() { ArrayList<String> users = parseJSON(data); SimpleAdapter adapter = new SimpleAdapter(this, mylistData, R.layout.rowlayout, row , new int[] {R.id.label,R.id.label1}); lst.setAdapter(adapter); } }); } }).start(); In that way you can parse the JSON data asynchronously and modify the data of the listview in a thread safe manner. ",s.froehlich,https://stackoverflow.com/users/575693,http://stackoverflow.com/questions/16728456/listview-doesnt-display-data-when-i-run-on-real-deviceapi-8-but-displays-when,STACKOVERFLOW,stackoverflow.com 7265,What are the components needed for this receiver?,"I want to build a simple crystal radio receiver. I do not want amplify the signal received. I want to detect the presence of a transmitted signal, and then use the presence of the received signal as a trigger to switch on another device (battery powered). My knowledge is VERY basic, and I have been trying to learn more. I have found a schematic on the web. http://www.circuitdiagram.org/how-to-make-build-crystal-radio.html Is this design suitable for my intended purpose? (minus the Earpiece) From what I can tell, this receiver is made up of an inductor, a variable capacitor, and a diode. I am assuming my circuit would need a transistor switch as well. What else would I need? (I have assumed here that the antenna is part of the inductor coil - is that correct?) I am looking for components I can use to make up this circuit. I want to receive the signal across a range of 60 feet and I want the circuit to be small (>1cm). What else do I have to ascertain in order to start searching for the components I need? If anyone can to suggest suitable inductors, capacitors and/or diodes - this novice would be grateful! ",Eddie,https://electronics.stackexchange.com/users/18652,"Since you are trying to switch on battery power, you have battery power available. So use it. Your design brief contains two completely incompatible requirements; powered from the signal, and small size. To get significant power from the signal, you need to collect significant signal; and that means a large antenna. The classic AM band ""crystal set"" circuitry you are studying needs about a hundred foot wire antenna to collect enough power to run sensitive headphones. At which point you might as well run the wire to the transmitter! At higher frequencies you can reduce the antenna size to some extent but if you need the antenna to be small you MUST expect the received power to be very low, and need amplification. Even your transistor switch is an amplifier, so admit it; there will be amplification. Then focus on the least power you need to power that amplifier - off the battery. One way might be to use a very low power micro like the MSP430 (under 1 microamp in the right usage pattern) to turn the receiver on very briefly every few seconds, to see if a signal is being transmitted. ",Brian Drummond,https://electronics.stackexchange.com/users/16324,http://electronics.stackexchange.com/questions/57709/what-are-the-components-needed-for-this-receiver,TECHNOLOGY,electronics.stackexchange.com 5037,House rules to make the cloister less of a game winning tile in Carcassonne?,"In my experience, cloister tiles in Carcassonne are often ""too lucky"". If you draw a cloister tile in the beginning of the game, it will typically still require an investment of quite a bit of ""meeple"" time to obtain the full 9 points, which makes it a fair trade-off. However, after about half of the game, it's relatively likely that you can ""parachute"" a cloister tile in some spot and get 8 or 9 points immediately. This adds a lot of randomness to the game. What house rules work well to diminish this effect? ",Erik P.,https://boardgames.stackexchange.com/users/30,"One option that I've used before is to disallow placing cloister tiles in spots where they are adjacent to more than three existing tiles. ",Erik P.,https://boardgames.stackexchange.com/users/30,http://boardgames.stackexchange.com/questions/8/house-rules-to-make-the-cloister-less-of-a-game-winning-tile-in-carcassonne,CULTURE,boardgames.stackexchange.com 7873,Is there a general term for a single note or a chord?,"Take a passage like this: Fill in the blank: Each of these boxes denote a ______ Is there a single general term for these that's better than note or chord? Or maybe there's a term for ""anything that has a duration"" that also encompasses rests? It seems like enough of a fundamental concept that it should have a name. ",Trillian,https://music.stackexchange.com/users/16,"Sound is as good as any. That's till someone writes a rest. Then I'm in trouble... ",Tim,https://music.stackexchange.com/users/2808,http://music.stackexchange.com/questions/17282/is-there-a-general-term-for-a-single-note-or-a-chord,LIFE_ARTS,music.stackexchange.com 6601,"Low beam headlights don't work, High beam headlights do","The vehicle is a 2003 Chevrolet Trailblazer. The low beams aren't working. High beams are. The fuse is perfectly fine (tested and swapped out). The bulbs are fine too. A mechanic told me it could be the ""body modulator"". I've never heard of this before. Could this be the problem? If so, how hard is it to change out for a shade tree mechanic? If not, what else could this be? ",surfer,https://mechanics.stackexchange.com/users/979,"I'd get a multimeter and check though the circuit - as Brian says the point at which the current is switched is a common failure point - either in the switch or the relay if one is fitted. I've never heard of a body modulator and can't see how one would be fitted in a headlamp circuit! ",Nick C,https://mechanics.stackexchange.com/users/373,http://mechanics.stackexchange.com/questions/1792/low-beam-headlights-dont-work-high-beam-headlights-do,CULTURE,mechanics.stackexchange.com 7094,"Multiple-prime RSA; how many primes can I use, for a 2048-bit modulus?","In standard RSA, the modulus $n=p_1 p_2$ is a product of two primes $p_1,p_2$ of the same size. Suppose we construct the modulus as a product of multiple primes $p_1,\dots,p_k$, i.e., $n=p_1 p_2 \cdots p_k$, where all the primes are of about the same size. I'm wondering how much this reduces the security of RSA, for typical modulus sizes. Let me be more concrete. I want security comparable to that obtained with standard RSA with a 2048-bit modulus. Can I use $k=3$ (three primes) without significant loss of security? $k=4$? What's the largest number of primes $k$ that I can use, without significant loss of security? Assume that each prime is $2048/k$ bits long, so all the prime factors are of equal length. Related: see also Who first published the interest of more than two prime factors in RSA?, which asks about the inventor of this technique. I'm asking something slightly different; in this question, I'm not asking about its inventor; I'm asking about concrete security levels. ",D.W.,https://crypto.stackexchange.com/users/351,"For a 2048-bit modulus, based on current knowledge of attacks: you can use up to $k=3$ primes without any loss in security. Using $k=4$ primes apparently causes some loss in security (it's not clear to me exactly how much loss it causes, though). I've found two sources that support this conclusion: The blog post Multi-prime RSA trade offs analyzes the security of a 2048-bit $k$-prime modulus against the NFS and ECM factoring algorithms. For $k=2$ and $k=3$, the security level is 107 bits (NFS is the best attack). For $k=4$, the article claims that the security level is 106 bits (ECM is slightly faster than NFS for four primes), so we've lost about one bit of security, though this estimate seems like it might over-simplify. Table 3 of the paper Unbelievable Security: Matching AES security using public key systems also addresses this issue. It suggests that, for a 2048-bit modulus, $k=3$ primes offers no measurable loss of security. Starting in 2030, $k=4$ primes will offer no loss in security (it changes over time because NFS factoring speeds up faster than ECM factoring). Here is Table 3: ",D.W.,https://crypto.stackexchange.com/users/351,http://crypto.stackexchange.com/questions/15823/multiple-prime-rsa-how-many-primes-can-i-use-for-a-2048-bit-modulus,TECHNOLOGY,crypto.stackexchange.com 8201,How to convert particles to mesh,"I need to convert a Particle System to a mesh object, so I can export it to Unity 3D. How could I do this? ",kholyphoenix1,https://blender.stackexchange.com/users/10890,"This is pretty easy to do for hair particles. In Blender, particles are ""stored"" in a Modifier, which means it can be applied like any other; This only works for hair particles, for obvious reasons. To convert your Particles, go to the Properties editor and navigate to the Modifiers tab; Here, you'll find all modifiers applied to the selected object, including the Particle System modifier. You can then press Convert to convert your particles into a mesh. ",someonewithpc,https://blender.stackexchange.com/users/3078,http://blender.stackexchange.com/questions/24274/how-to-convert-particles-to-mesh,TECHNOLOGY,blender.stackexchange.com 737,What are lightbox / modal window UI best practices for viewing full-sized images in a gallery?,"I'm an artist and amateur web designer. On my portfolio website, I've grouped my work into projects. Most of my projects contain few (20 or less) images, so I just display them in full size and let the visitor scroll (example) because this is how I prefer to browse other artist's work as well. For projects containing more images, I use thumbnails which link to the full-sized images, because, again, when I browse other artist's portfolios, if there are lots of images on a page it's kinda cumbersome to load. Recently I wrote some jQuery to implement a lightbox effect (modal window overlay) so when you click on a thumbnail, the full-sized image appears (example). My main reasons for implementing this: it's much more presentable than having a direct link to the image, which is what I used to do if the visitor shares the image on something like tumblr or Pinterest, the link back will be to the project page instead of a direct link to the image if the visitor wants to right-click on the thumbnails to load several images in several new browser tabs/windows, they can still do so (the lightbox is triggered on left click) I did not include a close button because it seems like more work for the visitor to have to look for a close button, than to simply click anywhere to close the lightbox (which is what I did). What are your thoughts regarding lightbox interface for this particular use? The goal would be the best way to showcase visual art/design work, and the target audience would be, well, anyone who wants to view the work. The display method, in this case a lightbox interface, should be efficient, useable, and presentable (it should highlight, not detract from, the work). ",Feanne,https://ux.stackexchange.com/users/13655,"One important point is keyboard accessibility: Let the user browse with the ← and → buttons, and make esc work as close button. You may offer further details when the user presses ↑ … but that requires probably some hints. Mouse users need clickable buttons to navigate images and to close the active one. These buttons can be hidden when the cursor is not over the image, but they should be available. ",fuxia,https://ux.stackexchange.com/users/193,http://ux.stackexchange.com/questions/19527/what-are-lightbox-modal-window-ui-best-practices-for-viewing-full-sized-images,TECHNOLOGY,ux.stackexchange.com 2413,basic date comparsion for expiration checking,"i want to create a traffic lights system that will tell me how many days are left to go until a document reaches its expiration date. I want it to be marked by colors in my html. green: if the document has 31 days or more to go until it expires. amber: 30 days or less until it expires. red: for 7 days or less. I also want to display a text, telling me how many days until expiration. The expiration date comes from my database in the field called insurance_date Heres my code i am new to php so struggling to put my code together, if someone could show me how to restructure my code in order to achieve what im trying to do id be greatful, thanks. my code: <?php include 'config.php'; $data = mysql_query(""SELECT * FROM supplier_stats"") or die(mysql_error()); while($info = mysql_fetch_array( $data )) { echo ""<p>Insurance Expires ! - <font color=\""red\"">"".$info['insurance_date'] . ""</font></p>""; } $date_diff = 60*60*24*7; // 7 days // time()+$date_diff will be a timestamp 7 days in the future if ($info['insurance_date'] < time()+$date_diff) { echo ""less than 7 days left!""; } ",user3488706,https://stackoverflow.com/users/3488706,"In your while loop, you iterate over all entries in the supplier_stats table. For every iteration, you output ""<p>Insurance Expires ! .... You probably do not want to do that. Edit your query to only select the entries that will expire within your range. Example: SELECT * FROM supplier_stats WHERE insurance_date >= yourDateToCompareTo Depending on how you did set up your Database, insurance_date may be of 'MySQL Type DATE or String or even Integer. Depending on that, you have to make the Comparsion to check if the date is close to your expiration range. After your loop (closed by }) you still use the $info in your if ($info['insurance_date'] which will only use the LAST entry in your table. This is however a very, very basic Question and i'd advise you to read up on some very basic beginners tutorials which can be found easily using an internet search engine. ",Andresch Serj,https://stackoverflow.com/users/532495,http://stackoverflow.com/questions/23060541/basic-date-comparsion-for-expiration-checking,STACKOVERFLOW,stackoverflow.com 1098,"Without a map or miniatures, how to best determine line-of-sight, etc?","I think the title says it all. Let's say you're mastering a game without the benefit of miniatures, maps, or any kind of physical representation of the environment. How would you keep track of details like line-of-sight, ranged attack viability, and all the other small nuances which go with creating a ""believable-enough"" environment in which your PCs live and thrive? (I admit that @LoganMacRae, who is my own DM, is an inspiration for this question. He does this with panache, and in my one-off, I feel like I have some mighty big shoes to fill!) ",John Rudy,https://rpg.stackexchange.com/users/108,"Burning Wheel generalizes these kinds of issues quite elegantly in a ""positioning test"" which then becomes one phase of the combat sequence. Opponents need to determine their tactical position against each other on a regular basis, and the benefits of their success or failure at this test accrue against the actions they take later in the round. In this way, it's sort of like testing ""initiative"" at the top of the round. I would be tempted to do something similar in a game with no map reference; every so often have an opposed skill challenge of some sort that maps onto the notion of positional advantage. ",Viktor Haag,https://rpg.stackexchange.com/users/380,http://rpg.stackexchange.com/questions/1602/without-a-map-or-miniatures-how-to-best-determine-line-of-sight-etc,CULTURE,rpg.stackexchange.com 478,When to use layoutSubview in iOS,"I am writing iOS application for iPad that require custom layout. The layout from portrait and landscape are totally difference, so it can't be solve by using UIAutoResizingMask. I try to use the layoutSubview Method, but I detected that layout subview is called a lot (from UIScrollView). How can i reduce the layoutSubview call to optimize the code , or I should call it by my self when ever the device is rotated. Thank. ",Isara Rungvitayakul,https://stackoverflow.com/users/475479,"You should not do expensive calculations in layoutSubviews: ",Albert Schulz,https://stackoverflow.com/users/1176264,http://stackoverflow.com/questions/6953373/when-to-use-layoutsubview-in-ios,STACKOVERFLOW,stackoverflow.com 489,Why do we use singular verb with third person after gerund?,"Why do we use singular verb in sentences like this: Just sitting here and watching the world go by. (not goes) Just sitting here and watching paint dry. (not dries) The world goes, doesn't it? ",Dmitry,https://ell.stackexchange.com/users/6944,"Because the world and the paint aren't the subjects of the sentences, which means there's not a fixed point in time when the world goes or the paint dries. Consider this sentence: The clock ticks The clock is the subject, so we conjugate ""to tick"" into the present simple. However if the clock is not the subject, then the verb ""to tick"" doesn't get conjugated: Electricity makes the clock tick This is because the ticking doesn't just happen in the present tense, the electricity gives the clock the ability to tick, which is why we use the infinitive. ",Mark,https://ell.stackexchange.com/users/15703,http://ell.stackexchange.com/questions/54932/why-do-we-use-singular-verb-with-third-person-after-gerund,CULTURE,ell.stackexchange.com 4935,generic helper to get ObjectResult that will match any given EntityObject,"trying to make a generic SQL Query via a method that will fetch data i was making this code public ObjectResult<theSelectedTableNameModel> getUsersRes(string sqlStr, string ColNameAsfilter, string FiltersValue,string OrderByFilter="""") { string SqlCmd = """"; string By = """"; if (OrderByFilter.isNotEmptyOrNull()) By = string.Concat("" ORDER BY "", OrderByFilter); SqlCmd = string.Format(""{0} WHERE {1}={2}{3}"", SqlStr, ColNameAsfilter, FiltersValue, By); return anEntityName.ExecuteStoreQuery<theSelectedTableNameModel>(SqlCmd); } i have copied my code and edited real names and other variables /parameters so i might have made a mistake, but the question is , how could i make it more generic than this ? this is a working approach that lets me specify the query of the sqlCommand i wanted it to fit any entity and any model/object/table how could it be done ? i guess there's a ready solution for this or the engeniring of EF not ment to be generic... i'm using asp.net 4.0 , and latest EF.. ",Avia Afer,https://stackoverflow.com/users/1930832,"after some time of testing every possible option, while i did not find any similar code on the net.. this is my solution , as an extension method, did i conduct a bad search/research ? or just no one use it like this , although the extesion is for the type ObjectContext it does return an ObjectResult list of optional parameters for where clause + another for order by and it does the work string firstPartSql=""SELECT * FROM YourTblName""; list of string for WHERE filter will contain elements like ""columnName=value"", ""columnName Like '%val%'"" list of string for Order by will contain elements like ""ColumnName"" ,""ColumnName DESC"" public static ObjectResult<T> getUsersResStatic<T>(this ObjectContext Entt, string sqlBeginhing, List<string> LstSelectWhersFilter = null, List<string> LstOby = null) { string SqlCmd = """"; string StrWhereFilterPrefix = """"; string StrFinalWHEREFiter =""""; string StrKeyOb1 = """"; string StrKeyOb2 = """"; string StrFinalOrderBy = """"; if (LstSelectWhersFilter != null) { StrWhereFilterPrefix = ""WHERE""; for (int CountWhers = 0; CountWhers < LstSelectWhersFilter.Count; CountWhers++) { if (CountWhers == 0) StrFinalWHEREFiter = string.Format("" {0} {1} "", StrWhereFilterPrefix, LstSelectWhersFilter.ElementAt(CountWhers)); else { StrWhereFilterPrefix = ""AND""; StrFinalWHEREFiter += string.Format("" {0} {1} "", StrWhereFilterPrefix, LstSelectWhersFilter.ElementAt(CountWhers)); } } } if (LstOby != null) { StrKeyOb1 = ""ORDER BY""; if (LstOby.Count > 1) { StrKeyOb2 = "",""; for (int i = 0; i < LstOby.Count; i++) { if (i == 0) StrFinalOrderBy = string.Format(""{0} {1}"", StrKeyOb1, LstOby.ElementAt(i)); else StrFinalOrderBy += string.Format(""{0} {1}"", StrKeyOb2, LstOby.ElementAt(i)); } } else StrFinalOrderBy = string.Format(""{0} {1}"", StrKeyOb1, LstOby.ElementAt(0)); SqlCmd = string.Format(""{0} {1} {2}"", sqlBeginhing, StrFinalWHEREFiter, StrFinalOrderBy);//StrKeyOb2, ob2); } if (LstSelectWhersFilter == null && LstOby == null) SqlCmd = sqlBeginhing; return Entt.ExecuteStoreQuery<T>(SqlCmd); } any kind of comment will be helpfull (well...almost any) ",Avia Afer,https://stackoverflow.com/users/1930832,http://stackoverflow.com/questions/18523463/generic-helper-to-get-objectresultt-that-will-match-any-given-entityobject,STACKOVERFLOW,stackoverflow.com 9566,Potential PHP problems with EE 1.13 or CE 1.8,"My client is on an old server running PHP 5.2.17, should I encourage him to upgrade to 5.3 or will it be ok? ",brentwpeterson,https://magento.stackexchange.com/users/3132,"I suggest to try with PHP 5.4. If it is EE installation please talk to support first as 5.4 is not officially supported yet (not fully tested) but works correctly since 1.13/1.8 based on the feedback i got. ",Piotr Kaminski,https://magento.stackexchange.com/users/90,http://magento.stackexchange.com/questions/7926/potential-php-problems-with-ee-1-13-or-ce-1-8,TECHNOLOGY,magento.stackexchange.com 7103,How do I stop Windows from moving desktop Icons?,"I have two monitors connected to my computer. (same graphics card. One HDMI, the other DVI). Whenever I do one of the following things, my icons move around on my desktop: Play a Game Turn off one monitor When I stop playing the game or turn one of the monitors back on, Windows 7 does not properly restore the icon locations. Is there is a way I can prevent Windows from moving my desktop icons around? ",ray023,https://superuser.com/users/37183,"I figured out one way to handle this. I have an application I use (fences) which allows me to group all my icons. I already had most of my desktop icons grouped with this application and noticed that they restore properly. So, I just created a ""Miscellaneous"" group and threw all my stray icons in there. I don't like this solution, but it's the best one I can come up with since windows will not properly restore icons or allow me to turn that ""feature"" off. :P ",ray023,https://superuser.com/users/37183,http://superuser.com/questions/290078,TECHNOLOGY,superuser.com 6789,Why did Benjen Stark take the Black?,"OK, I've waited until I finished ADWD in case there was any explanation there. Why was Benjen Stark on the Wall? Was there an explanation I have missed? I appreciate, as a younger brother, he would have had less opportunity than Brandon (or Eddard), and may have been looking for adventure or honour, but the Wall, by the time he would have joined, was hardly at the height of its renown. Joining the Black wouldn't be, I would have thought, a particularly obvious option for Benjen, if he was simply looking for a title or a role in life to fit the name of Stark. ",johnc,https://scifi.stackexchange.com/users/34,"There was no direct answer in anything I've read either. But the Starks have always taken the Wall more seriously than the other Great Houses. They are, after all, close enough to the Wall that Wildling raids are a real threat. And I suspect Stark sons were under more pressure (socially) to join up if they had no other prospects. ",System Down,https://scifi.stackexchange.com/users/887,http://scifi.stackexchange.com/questions/5895/why-did-benjen-stark-take-the-black,LIFE_ARTS,scifi.stackexchange.com 7571,A Question on Auto-Adjoint functors,"Let $F: \mathscr{C}\to \mathscr{C}^{op}$, with an adjoint $G$, and $\eta: 1_\mathscr{C} \Rightarrow G\circ F $ and $\varepsilon: F\circ G\Rightarrow 1_{\mathscr{C}^{op}}$ with components (in $\mathscr{C}$): $\eta_M: M\to G(F(M))$ and $\varepsilon^{op}_N: N\to F(G(N))$ such that the compositions (in $\mathscr{C}$): $F(M) \xrightarrow{\varepsilon^{op}_{F(M)}} FGF(M) \xrightarrow{F^{op}(\eta_M)}F(M)$ and $G(N) \xrightarrow{\eta_{G(N)}}GFG(N) \xrightarrow{G(\varepsilon_N)}G(N)\ $ are units. Moreover suppose $G=F^{op}$ and $\eta$ a isomorphis transformation. Follow that $F$ is full, faithfull and reflect isomorphisms (consider $F(f)\circ \eta_M=\eta_{M'}\circ f$ for $f: M\to M'$), then also $G=F^{op}$ reflect isomorphisms, from above: $\varepsilon$ is Iso. Observe that the components of $\eta: 1_\mathscr{C} \Rightarrow F^{op}\circ F $ and $\varepsilon^{op}: 1_{\mathscr{C}}\Rightarrow F^{op}\circ F$ are of type: $\eta_M: M\to F\circ F(M)$ and $\varepsilon^{op}_M: M\to F\circ F(M)$. Question: Is true that $\eta =\varepsilon^{op}$ ? ",Buschi Sergio,https://mathoverflow.net/users/6262,"It's a good question; the answer is no. Suppose $F \dashv F^{op}$ with unit $\eta: 1_C \to F^{op} F$ and counit $\varepsilon: F F^{op} \to 1_{C^{op}}$. Since $\varepsilon$ is the unique transformation $\theta: F F^{op} \to 1$ such that $$1_{F^{op}} = (F^{op} \stackrel{\eta F^{op}}{\to} F^{op} F F^{op} \stackrel{F^{op}\theta}{\to} F^{op})$$ the question is whether $F^{op}\eta^{op} = (\eta F^{op})^{-1}$. Take $C$ to be an commutative group $G$, considered as a category with one object $\bullet$. Here we may simply identify $G^{op}$ with $G$, i.e., the identity $1_G \colon G \to G$ may be seen as a contravariant functor because we have $1_G(g h) = 1_G(h)1_A(g)$ by commutativity. Now take $F$ and therefore $F^{op}$ to be the identity on $G$. Any element $u \in G$ as morphism $\bullet \to \bullet = F^{op} F \bullet$ can serve as the unit transformation (naturality also follows from commutativity). But then, as soon as $u$ is not equal to $u^{-1}$, we have $F^{op}u^{op} = u \neq u^{-1} = (u F^{op})^{-1}$. Therefore taking $G$ to be the additive group $\mathbb{Z}$ and $u = 1 \in \mathbb{Z}$, we reach a counterexample. ",Todd Trimble,https://mathoverflow.net/users/2926,http://mathoverflow.net/questions/106198,SCIENCE,mathoverflow.net 6033,How to replace jquery attr rel with id,"I would like to make my webpages a w3c valid.so i rectifying the errors step by step to be valid , i used html5 doctype, I found an error Line 348, Column 81: RDFa Core attribute rel is not allowed on the li element in HTML5 + RDFa 1.1 Lite documents. Consider checking against the HTML5 + RDFa 1.1 schema instead. so i tried to replaced id instead of rel , w3c valid but the code doesn't work . How to work the below code without using rel? <script type=""text/javascript""> $(document).ready(function() { $("".tab_content"").hide(); $("".tab_content:first"").show(); $(""ul.tabs li"").click(function() { $(""ul.tabs li"").removeClass(""active""); $(this).addClass(""active""); $("".tab_content"").hide(); var activeTab = $(this).attr(""rel""); $(""#""+activeTab).fadeIn(); }); }); </script> <ul class=""tabs""> <li class=""active"" rel=""tab2"">&nbsp;&nbsp;Reviews&nbsp;&nbsp;</li><li rel=""tab3"">News</li><li rel=""tab4"">&nbsp;&nbsp;Articles&nbsp;</li></ul> <div id=""tab1"" class=""tab_content"" style=""width:326px;"">data</div> <div id=""tab2"" class=""tab_content"" style=""width:326px;"">data tab2</div> ",ADHI,https://stackoverflow.com/users/1483967,"Manually (not with Javascript) go through the HTML, find each <li> element, and replace rel with id. Make sure the id is unique on the page. So you will have to change them to something like liTab2, liTab3, etc. Then, in your jQuery, replace $(this).attr(""rel""); with this.id.replace(""li"", """").toLowerCase();. Not entirely sure what else you're looking for in an answer.... ",Travesty3,https://stackoverflow.com/users/259457,http://stackoverflow.com/questions/12679775/how-to-replace-jquery-attr-rel-with-id,STACKOVERFLOW,stackoverflow.com 5219,How are futures contracts setup at an exchange?,"I'm having a hard time wrapping my head around how the actual contracts are structured at an exchange. Here are my questions: If an exchange facilitates the trading of futures contracts and nobody intends to take delivery of the product, nor do they own it so they can deliver it, then how are the contracts issued? Is there a fixed number of contracts that are created and traded, or is there an ""unlimited"" number of contracts? If none of the traders intend to take delivery nor do they want to deliver, then where do the sellers get the contracts to sell? How does that process work? It's easy to figure out how it works with trading stocks or currencies: the stocks are issued by the company and granted to the owners, then they sell the stocks. Currencies are much the same: you have accumulated some cash and you want to trade it. But in both of those cases the trader either owns something or buys it from somebody else. How do traders of futures contracts obtain them? P.S. I'm not sure if this is the correct place to get clarification on this subject, but if there is a better stackexchange sub-domain for it, then I'll go there. ",Kiril,https://money.stackexchange.com/users/9500," If an exchange facilitates the trading of futures contracts and nobody intends to take delivery of the product, nor do they own it so they can deliver it, then how are the contracts issued? Say I want to buy a future contract that allows me to buy coffee at a given price in December 2013. Technically, this contract allows me to buy 37,500 pounds of coffee at the specified price in December 2013. I have two options. If the contract already exists in the market (this contract does), I can simply purchase the contract in the market. If it doesn't exist, however, the process works like this: I approach a futures commission merchant, who sends the buy order to a broker on the trading floor/pit or to the exchange order system. Assuming someone else has put in a sell order for the same commodity, expiration, etc. the orders are matched at the agreed upon price, and the futures contract is created. Also, the FCM reports the trade to the exchange's clearing house, which guarantees the trade and removes counter-party risk. In other words, if the price of coffee changes dramatically, and one of the parties in the trade cannot meet its buy or sell obligation, there isn't a default. The clearing house settles the trade. Is there a fixed number of contracts that are created and traded, or is there an ""unlimited"" number of contracts? No, there is no fixed number. The Wikipedia article on futures exchanges sums this up: Futures contracts are not issued like other securities, but are ""created"" whenever Open interest increases; that is, when one party first buys (goes long) a contract from another party (who goes short). Contracts are also ""destroyed"" in the opposite manner whenever Open interest decreases because traders resell to reduce their long positions or rebuy to reduce their short positions. If none of the traders intend to take delivery nor do they want to deliver, then where do the sellers get the contracts to sell? How does that process work? The futures market doesn't consist of only traders. The terminology that you usually hear are speculators and hedgers. Speculators are the traders you're thinking of, while hedgers are farmers, oil producers, or companies that rely on commodities. All of these groups enter the futures market in order to lock in a future price at which to buy or sell the products they need, in order to protect themselves from future price swings. For example, if I'm an oil producer like ExxonMobil, the price of oil significantly affects my future revenue. The price of Brent crude oil is currently around $108/barrel. If this price increases to $120/barrel in a year, they may earn much more revenue. However, if the price drops to $80/barrel, however, their revenue stream is negatively affected. Therefore, I go to the futures market and sell a futures contract that expires in one year and allows me to sell oil for $108/barrel. If the price of oil jumps to $120/barrel in one year, I would have been better off without a futures contract. However, if the price drops to $80/barrel, I saved myself a considerable loss. This is how the futures market lowers risk and helps to smooth commodity prices in the long run. Who takes the other side of the trade? Consider an airline company that knows it will need oil1 for its planes in a year. The airline company will earn more revenue if the price of oil drops to $80/barrel (the exact opposite of ExxonMobil), but lose revenue if the price jumps to $120/barrel. The airline may decide to enter the futures market and agree to buy oil at $108/barrel in one year, thus completing the trade. The futures contract is created and traded in the market.2 3 Expiration When the contract expires, the buyer/seller either takes delivery of the commodity or the contract is settled for cash between parties. As maturity nears, the price of the contract usually converges to the spot price. Consider our example oil contract, which was created at $108/barrel. If in one year, the spot price of oil has increased to $120/barrel, the contract's price will converge to $120/barrel. Exxon received $108 for its sale of the contract, and now owes $120 in cash or $120 in oil. The cost of its hedge was $12. The airline company bought the contract for $108, and now receives $120. It profited $12 from its hedge, so Exxon would pay the airline company $12. Exxon could sell oil for $120/barrel, but because of the cost of its hedge, it's only receiving $108/barrel, exactly the price it locked in by selling the contract in the first place. Consider what happens if the price of oil had decreased to $80/barrel. Exxon received $108 for its sale of the contract, and now owes only $80, for a profit of $28. The airline company, however, paid $108, but only received $80 in return, for a loss of $28, so the airline company would pay Exxon $28. Similar to above, Exxon can only fetch $80/barrel for its oil in the spot market, but because it earned $28/barrel by selling a futures contract, it's really receiving $108/barrel for the barrels in the contract. 1 In reality, planes don't run on oil; they run on jet fuel. Since there isn't a futures contract for jet fuel, the airline could study the past relationship between prices of jet fuel and oil in order to estimate the future price of jet fuel, given a future price of oil. Since the company can lock in the price of oil through a futures contract, they'll lock in a price of oil that, based on their estimated model of jet fuel/oil prices, will give them enough funds to purchase the appropriate amount of jet fuel. 2 It's also important to understand that not all hedgers will operate this way. It's certainly possible for a company to hedge too much, and therefore not benefit at all if the price swings in their favor. This has happened to airline companies in the past; even when oil prices have fallen, they haven't benefited because their hedges were expensive enough to outweigh the potential gain. However, had the price increased dramatically, their hedge would have been highly effective. 3 Also, in this simple example, two companies may choose to bypass the futures market all together and create an over-the-counter (OTC) contract instead. For example, ExxonMobil could agree to sell oil to a specific company at $108/barrel in one year, without entering the futures market at all. This option may be cheaper than entering the futures market, but futures markets also have the benefit of clearing houses to mitigate counterparty risk. If Exxon agrees to sell oil to a company, which then goes bankrupt, Exxon is protected if the hedging was done through the futures market. In the OTC market, this protection isn't always there. OTC contracts can be useful, however, if (for example), the company wants to make or take delivery of a commodity at a different location than that specified in the standardized contracts available on an exchange. ",John Bensin,https://money.stackexchange.com/users/7590,http://money.stackexchange.com/questions/24442/how-are-futures-contracts-setup-at-an-exchange,LIFE_ARTS,money.stackexchange.com 2959,Why is a precoder necessary for DQPSK and what does it accomplish?,"I've implemented a soft-decoder for DQPSK using the wonderful answers I received here: How to soft decode DQPSK? To get the soft-decoder working properly I needed to precode the data I was sending out. I implemented the precoder mentioned in this paper: $I_k=\overline{u_k \oplus v_k}*(u_k \oplus I_{k-1})+(u_k \oplus v_k)*(v_k \oplus Q_{k-1})$ $Q_k=\overline{u_k \oplus v_k}*(v_k \oplus Q_{k-1})+(u_k \oplus v_k)*(u_k \oplus I_{k-1})$ I'd like to know why this precoder is necessary -- what does that complicated expression of XORs actually accomplish? Here's a table showing what the equation yields. If ""to_encode"" is 00, the to_send symbol is the same as the previous (""prev"") symbol. If the ""to_encode"" is 11, the to_send symbol is the previous symbol xor 11. What is the meaning in other cases? to_encode prev to send [ 0 0 ] [ 0 0 ] [ 0 0 ] [ 0 1 ] [ 0 0 ] [ 1 0 ] [ 1 0 ] [ 0 0 ] [ 0 1 ] [ 1 1 ] [ 0 0 ] [ 1 1 ] [ 0 0 ] [ 0 1 ] [ 0 1 ] [ 0 1 ] [ 0 1 ] [ 0 0 ] [ 1 0 ] [ 0 1 ] [ 1 1 ] [ 1 1 ] [ 0 1 ] [ 1 0 ] [ 0 0 ] [ 1 0 ] [ 1 0 ] [ 0 1 ] [ 1 0 ] [ 1 1 ] [ 1 0 ] [ 1 0 ] [ 0 0 ] [ 1 1 ] [ 1 0 ] [ 0 1 ] [ 0 0 ] [ 1 1 ] [ 1 1 ] [ 0 1 ] [ 1 1 ] [ 0 1 ] [ 1 0 ] [ 1 1 ] [ 1 0 ] [ 1 1 ] [ 1 1 ] [ 0 0 ] ",Dan Sandberg,https://dsp.stackexchange.com/users/3435,"Differential encoder to the Gray mapping is to remove the 90 degree phase variance, e.g. the received constellations are 90 degree rotated. The receiver doesn't reply on the absolute phase of the QAM constellations but uses the transition between consecutive symbols to demodulate the data. ",Phil Lin,https://dsp.stackexchange.com/users/16655,http://dsp.stackexchange.com/questions/8119/why-is-a-precoder-necessary-for-dqpsk-and-what-does-it-accomplish,TECHNOLOGY,dsp.stackexchange.com 385,Why do I have to explicitly add perl before the script for getops to run properly?,"When i run my script like so: C:\>perl script.pl -f file It works fine. But, if I just do: C:\>script.pl -f file then I don't get any errors but getopts doesn't assign anything to $opt_f This works just fine on perl 5.8 Windows XP, but it doesn't work on perl 5.12 on Windows 7. There aren't any other versions of perl installed (its a new OS build). Code: use Getopt::Std; our ($opt_f); getopts('f:'); print ""input file is: $opt_f \n""; print ""$0\n Run with: C:\> perl get.pl -f sadf input file is: sadf get.pl Run without: C:\>get.pl -f sadf input file is: Nothing! EDIT: fixed and this question was a repeat... http://stackoverflow.com/questions/1695188/how-do-i-make-perl-scripts-recognize-parameters-in-the-win32-cmd-console The OP of that post figured it out. I had to do the same but also recreate the assoc in the gui (in addition to in the reg and on the command line with ftype.) ",Alex,https://stackoverflow.com/users/8676,"When you invoke your code as perl script.pl -f file, you are explicitly running the perl executable and passing it a filename and options to parse. But when you invoke it as script.pl -f file, you are asking your login shell to run the file, which it will parse as a shell script in the absence of any other information -- this is not what you want, as your file is not a bash script, but a perl script! Normally such information (what program to use to parse the script) is given in what is called a shebang line. If you add this to the top of your script, it should run properly: #!/usr/bin/perl (or perhaps #!/bin/env perl, if you want the env program to find perl in your $PATH for you). ",Ether,https://stackoverflow.com/users/40468,http://stackoverflow.com/questions/4065054/why-do-i-have-to-explicitly-add-perl-before-the-script-for-getops-to-run-properl,STACKOVERFLOW,stackoverflow.com 8570,Identify my Motobécane racing bike,"I bought a Motobécane last year (pics below), and now that the bottom bracket is broken, I really need to know the model of the bike, to help me change that piece. It would also be helpful if someone could redirect me to the Motobécane catalogs of the years 82, 83, I can't find them, and I suspect my bike is from this period. Technical specifications: frame color: green and black (How customizable was that? I think they didn't sell the same colors each year) frame: tubing inexternal 707, ""trainer"" (I don't find the appropriate info about it) brakes: Weinmann derailleur: Sachs - Huret. 12 gears Wheel: Maillard Bottom Crank: ?? width of the shell: 74mm. From this page http://sheldonbrown.com/vrbn-g-n.html, the old french ones have special dimensions. Also on Motobécane, they are swiss type (left-threaded). I don't know if this is a cotterless one, shimano octalink, or if I can put something more standard? [EDIT: As suggested by @Blam, I took the bottom bracket out. First mistake: shell width doesn't correspond to the red line on the pic, but less, so width should be 68mm, I'll double check on the bike. The Brand is Stronglight, french brand, but the threading is the normal one (left-threaded on the right side, and right-threaded on the left side). The axle is 120mm long, tapered square. Like this model: http://www.ebay.com/itm/VP-Components-Bottom-Bracket-120mm-Square-Taper-Unsealed-Bike-NEW-/311359596201?pt=LH_DefaultDomain_0&hash=item487e7a66a9 But anyway, I'm still interested in knowing the model of this bike, and/or finding the Motobécane catalogues of years 1982-83] Important Note: The rear wheel is not the original (was broken). I also changed the part of the crank where I put the feet when I bought it (maybe I shouldn't have...). Sorry if it looks quite dirty, I didn't have time to clean. Pics: ",PlasmaBinturong,https://bicycles.stackexchange.com/users/19414,"Small correction, my mistake should have read "" ""MBK Trainer"" on the down tube "" .. (but with a Motobecane Badge on the Steerer, some also with Motobecane in smaller letters on the top tube). Checked a couple of the searches I had, you truly have a confounding model. Hi-Ten, Cro-Mo, Motolite, 2040, one states Vitus tubes, but I can't read the sticker to verify it. Some with proper lugs on the steerer, some with ""inexternal"". I wonder if they were using up stock, after many of the older established models were discontinued after 84. Fwiw, as long as you are happy with the weight and feel of the bike, nothing wrong with Hi-Ten. As long as I'm only on paved surfaces, I still enjoy loaded touring with a 76 Super Mirage with lowly 1020 tubing. The only bike I've always kept, still very comfortable at the end of long days in the saddle. Motobecane stared phasing out the Swiss BBs in the early eighties, you are lucky not to have one, tough to find and expensive, the Mirage unfortunately does. Many report good result with the BSA BBs for stripped threads. Mine was in need and was lucky and found one incorrectly listed as French on the bay, I hope I will never need another. Geo ",Geo,https://bicycles.stackexchange.com/users/20354,http://bicycles.stackexchange.com/questions/30473/identify-my-motob%C3%A9cane-racing-bike,CULTURE,bicycles.stackexchange.com 4444,Private IP getting routed over Internet,"We are setting up an internal program, on an internal server that uses the private 172.30.x.x subnet... when we ping the address 172.30.138.2, it routes across the internet: C:\>tracert 172.30.138.2 Tracing route to 172.30.138.2 over a maximum of 30 hops 1 6 ms 1 ms 1 ms xxxx.xxxxxxxxxxxxxxx.org [192.168.28.1] 2 * * * Request timed out. 3 12 ms 13 ms 9 ms xxxxxxxxxxx.xxxxxx.xx.xxx.xxxxxxx.net [68.85.xx.xx] 4 15 ms 11 ms 55 ms te-7-3-ar01.salisbury.md.bad.comcast.net [68.87.xx.xx] 5 13 ms 14 ms 18 ms xe-11-0-3-0-ar04.capitolhghts.md.bad.comcast.net [68.85.xx.xx] 6 19 ms 18 ms 14 ms te-1-0-0-4-cr01.denver.co.ibone.comcast.net [68.86.xx.xx] 7 28 ms 30 ms 30 ms pos-4-12-0-0-cr01.atlanta.ga.ibone.comcast.net [68.86.xx.xx] 8 30 ms 43 ms 30 ms 68.86.xx.xx 9 30 ms 29 ms 31 ms 172.30.138.2 Trace complete. This has a number of us confused. If we had a VPN setup, it wouldn't show up as being routed across the internet. If it hit an internet server, Private IP's (such as 192.168) shouldn't get routed. What would let a private IP address get routed across servers? would the fact that it's all comcast mean that they have their routers setup wrong? ",WernerCD,https://serverfault.com/users/53719," would the fact that it's all comcast mean that they have their routers setup wrong? Set up wrong? Yes, private addressing should absolutely be filtered within the interior of their network. But if they've been a bit sloppy then it's possible if the path is all Comcast- in carrier networks, especially sloppy ones like Comcast, private addressing is filtered at the edge networking diligently, but not nearly as much at the core or access portions. In your case it appears that the entire route is Comcast-only, so it is 'reasonable' that this might actually be forwarded to a destination also within Comcast that actually answers for it. It isn't a clean networking implementation, to be sure, and you did go from the Baltimore area to Denver and finally to Georgia, but it is possible within a complete ""autonomous system"" that allows for it. ",danno,https://serverfault.com/users/78403,http://serverfault.com/questions/374126,TECHNOLOGY,serverfault.com 9252,Python Condensing Code,"My code is pretty long and I need help condensing it to make it more convenient. The code I have is suppose to do the set of instructions I commanded it to do on a fluke robot. I am using python. The robot is suppose to do the following code using it sensors. I need help condensing it. EDIT: My code: from Myro import * from Graphics import * init('/dev/tty.IPRE6-366079-DevB') def markYellow(pic): for pix in getPixels(pic): r = getRed(pix) g = getGreen(pix) b = getBlue(pix) if r > 200 and b < 90 and g > 150: setRed(pix,255) setGreen(pix,255) setBlue(pix,255) else: setRed(pix,0) setGreen(pix,0) setBlue(pix,0) def pctMarked(pic): totalPixels = 0 whitePixels = 0 for pix in getPixels(pic): if getRed(pix) == 255: whitePixels = whitePixels + 1 totalPixels = totalPixels + 1 result = whitePixels / float(totalPixels) return result def findAvgX(pic): pixelCount = 0 totalXCount = 0 for pix in getPixels(pic): if getRed(pix) == 255: x = getX(pix) totalXCount = totalXCount + x pixelCount = pixelCount + 1 avgX = totalXCount / float( pixelCount) return avgX def turn(): findAvgX(pic) if wallLocation <= 85: turnLeft(1,0.25) elif ballLocation >= 170: turnRight(1,0.25) def celebrate(): move(0.25,1) beep(1,800) beep(1,1600) beep(1,800) stop() def main(): p = takePicture() markYellow(p) pctMarked(p) while pctMarked(pic) < 0.2: rotate(1,1) p = takePicture() markYellow(p) pctMarked(p) turn() while getObstacle('center')> 1000: # I'm not sure about the number. We can test it tomorrow forward(1,1) celebrate() ",Q.matin,https://stackoverflow.com/users/1670186,"# helper functions def getRGB(pix): return getRed(pix), getGreen(pix), getBlue(pix) def setRGB(pix, r, g, b): setRed(pix,r) setGreen(pix,g) setBlue(pix,b) def markYellow(pic): for pix in getPixels(pic): r, g, b = getRGB(pix) if r > 200 and b < 90 and g > 150: setRGB(pix, 255, 255, 255) else: setRGB(pix, 0, 0, 0) def pctMarked(pic): # is there a more direct way to get the totalPixels? # totalPixels = len(pic) # perhaps? totalPixels = sum(1 for pix in getPixels(pic)) whitePixels = sum(getRGB(pix) == (255, 255, 255) for pix in getPixels(pic)) return whitePixels / float(totalPixels) ",John La Rooy,https://stackoverflow.com/users/174728,http://stackoverflow.com/questions/13169971/python-condensing-code,STACKOVERFLOW,stackoverflow.com 4682,How can toddlers expend seemingly boundless energy when they eat so little?,"A toddler's food intake seems very little: only milk and water and some solid food. Therefore, from where does this energy come? ",Jack,https://biology.stackexchange.com/users/6589,"Just to add to the answer from @buzrw: Using data from here and here I have estimated recommended calorie intake per kg for a 2 yr old and for an adult. I've used figures for males and assumed 70 kg for the adult weight which is the ""international standard man"": toddler: 120 Cal kg-1 adult: 40 Cal kg-1 So yes, the energy intake of toddlers is higher than that of an adult. ",Alan Boyd,https://biology.stackexchange.com/users/1320,http://biology.stackexchange.com/questions/17117/how-can-toddlers-expend-seemingly-boundless-energy-when-they-eat-so-little,SCIENCE,biology.stackexchange.com 4337,Is it an absolute must that we ignore/delete all compiled files before committing?,"I am working on a Drupal theme. I am going to be using ""intermediary"" languages to develop it, ie Stylus for styles, and CoffeeScript for some of the front-end scripts. I am going to be using a git hosting service to be able to share the code among colleges. I am also going to be using it to update the code locally and then push onto hosting service, to be later pulled by the live drupal site. This makes things really elegant. However, I have noticed that a lot of developers tend to .gitignore all compiled code. If it were a good practice, I would've loved to follow it, if and only if there wasn't this one issue: recompiling all the code that is needed in order for the theme to work out correctly. This means that when I do a pull, I will have to recompile all the CSS and JavaScript code. Now, if I were to do a pull on the live site, there's a risk that a user goes to the site right at the moment I do the pull. No styles and scripts will be loaded on the user's end, so long as the code hasn't compiled. Of course, compiling takes about a second, and the user might probably think to him/herself ""meh, it was just my internet connection."" But there is also the issue that the server doesn't have the compilers installed to begin with. So now, I would do a pull, but there will be no styles, and no scripts. Is it an absolute must that I delete all compiled code, or can I go ahead and include them in the commit? ",skizeey,https://programmers.stackexchange.com/users/17183,"MainMa's answer is great but it should be noted that this is a prime case for continuous integration. Setting up a machine (either a hosted solution or one of your own) that will identify when a commit has come in, compile the code, run appropriate tests, and build the deployment package if the tests succeed. This approach could be taken a step further and automate a scheduled deployment when your criteria for a deployment has been met. ",Skyler,https://programmers.stackexchange.com/users/53137,http://programmers.stackexchange.com/questions/146820/is-it-an-absolute-must-that-we-ignore-delete-all-compiled-files-before-committin,TECHNOLOGY,programmers.stackexchange.com 1275,What are good situations to use Multi-Flash / Repeating Flash feature?,"What can be done with the MULTI-Flash feature of a 580ex II flash? What are good situations to use this feature? ",EtienneT,https://photo.stackexchange.com/users/6,"Stroboscopic flash (Multi mode on Canon, Repeating Flash on Nikon) fires several flashes within short time, by using shutter time long enough you can capture them all. You can calculate needed shutter time (in seconds) by dividing number of flashes by frequency in Herz. For example, 10 flashes at 5 Hz takes 2 seconds to fire. Typical application is single-frame chronophotography - capturing several phases of movement on same photo. So a suitable situation is where some interesting movement occurs. If the subject stays in one place during its movement (e.g. a dancer spinning), you can slowly pan your camera instead to have different phases recorded on different locations in your frame. A variation of this is capturing the same subject from several angles on single frame by moving your camera around it while the flash is strobing. The subject is still, but the camera is moving. So a suitable situation is when there are several views of the same subject you want to show simultaneously. For these techniques, dark background and light-colored subject tend to give better results. Another case would be when you want to imitate multiple flashes with one flash and you need constant frequency to form a pattern - when your flash is moving at constant speed this will give you flashes at equal distances: If you don't need constant frequency, manually triggering the flash (e.g. with ""Test"" button) will give you more control over the outcome. ",Imre,https://photo.stackexchange.com/users/4390,http://photo.stackexchange.com/questions/16339/what-are-good-situations-to-use-multi-flash-repeating-flash-feature,LIFE_ARTS,photo.stackexchange.com 1876,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 static all methods and variable have to be static. The main method always is a static method so in the class that the main method exists all variables and methods are declared static if you have to call them in the main method. Also I have noticed that in order to call a static method from another class you do not need to create an object of that you can use the class name. What are the advantages of declaring static variables and methods? When should I declare static variable and methods? ",Nistor Alexandru,https://programmers.stackexchange.com/users/52164,"Here's Joshua Bloch's way of explaining it, which I find brilliant like most of what he says (yes I'm a Joshua Bloch fan boy :) ). This is quoted from memory. Imagine that a class is the equivalent of a blue-print for a house. Image then that a house is to the blueprint as an instance of the class is for the class. You can have one class (blue-print) and multiple instances (houses) created from it. Now common sense dictates that most of the functions/behaviors that a house (instance) can have/do, even though they are declared in the blue-print, cannot be used until an actual house (instance) is made out of that blue-print (class). Like, your blue print might contain in it the place where the light switches and the light bulbs should go, but you have no way of making those work on the blue-print, you have to actually build the house in order to be able to switch the light switch on and off and have certain light bulbs go on and off. However, you might have some behavior that is applicable to the blue-print directly, and which you could use/access directly on the blue print without needing to make an actual house out of that blue print. Imagine that your blue-print has a button that, upon pressing, will display the footprint of the house contained in that blue print (by calculating all the lengths of the walls and such). Obviously you COULD build a house first, then go around measuring its footprint, but you can do this with he blue-print alone, so it would be more helpful to have this behavior implemented in the blue-print. Such a blue-print embedded button that calculates the footprint of the house is the equivalent of having a static function in a class. ",Shivan Dragon,https://programmers.stackexchange.com/users/38218,http://programmers.stackexchange.com/questions/163457/understanding-the-static-keyword,TECHNOLOGY,programmers.stackexchange.com 7041,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> #include <OpenGLES/ES1/glext.h> #include ""IRenderingEngine.hpp"" class RenderingEngine1 : public IRenderingEngine { public: RenderingEngine1(); void Initialize(int width, int height); void Render() const; void UpdateAnimation(float timeStep) {} void OnRotate(DeviceOrientation orientation) {} private: float m_currentAngle; GLuint m_framebuffer; GLuint m_renderbuffer; }; IRenderingEngine* CreateRenderer1() { return new RenderingEngine1(); } struct Vertex { float Position[2]; float Color[4]; }; // Define the positions and colors of two triangles. const Vertex Vertices[] = { {{-0.5, -0.866}, {1, 1, 0.5f, 1}}, {{0.5, -0.866}, {1, 1, 0.5f, 1}}, {{0, 1}, {1, 1, 0.5f, 1}}, {{-0.5, -0.866}, {0.5f, 0.5f, 0.5f}}, {{0.5, -0.866}, {0.5f, 0.5f, 0.5f}}, {{0, -0.4f}, {0.5f, 0.5f, 0.5f}}, }; RenderingEngine1::RenderingEngine1() { glGenRenderbuffersOES(1, &m_renderbuffer); glBindRenderbufferOES(GL_RENDERBUFFER_OES, m_renderbuffer); } void RenderingEngine1::Initialize(int width, int height) { // Create the framebuffer object and attach the color buffer. glGenFramebuffersOES(1, &m_framebuffer); glBindFramebufferOES(GL_FRAMEBUFFER_OES, m_framebuffer); glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, m_renderbuffer); glViewport(0, 0, width, height); glMatrixMode(GL_PROJECTION); // Initialize the projection matrix. const float maxX = 2; const float maxY = 3; glOrthof(-maxX, +maxX, -maxY, +maxY, -1, 1); glMatrixMode(GL_MODELVIEW); } void RenderingEngine1::Render() const { glClearColor(0.5f, 0.5f, 0.5f, 1); glClear(GL_COLOR_BUFFER_BIT); glPushMatrix(); glRotatef(m_currentAngle, 0, 0, 1); glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_COLOR_ARRAY); glVertexPointer(2, GL_FLOAT, sizeof(Vertex), &Vertices[0].Position[0]); glColorPointer(4, GL_FLOAT, sizeof(Vertex), &Vertices[0].Color[0]); GLsizei vertexCount = sizeof(Vertices) / sizeof(Vertex); glDrawArrays(GL_TRIANGLES, 0, vertexCount); glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_COLOR_ARRAY); glPopMatrix(); } void RenderingEngine1::OnRotate(DeviceOrientation orientation) { float angle = 0; switch (orientation) { case DeviceOrientationLandscapeLeft: angle = 270; break; case DeviceOrientationPortraitUpsideDown: angle = 180; break; case DeviceOrientationLandscapeRight: angle = 90; break; } m_currentAngle = angle; } ",node ninja,https://stackoverflow.com/users/404020,"remove the body class RenderingEngine1 : public IRenderingEngine { public: ... void OnRotate(DeviceOrientation orientation) {} ... -> void OnRotate(DeviceOrientation orientation); ",Anders K.,https://stackoverflow.com/users/45685,http://stackoverflow.com/questions/4221443/why-am-i-getting-a-redefinition-error,STACKOVERFLOW,stackoverflow.com 4468,Delete un-seen mesh with Blender,"I am wondering if there is a way to delete un-seen mesh with Blender. Here's an example. I have a cube, and it has 3 cubes inside of that cube. Is there a way to delete the mesh inside of the cube without selecting the cubes manually? This would clear up lots of extra mesh and speed up my render engine. I am using Cycles, so if Cycles has an option to not render hidden meshes, that would be good too. (although deleting them would be better). A Python script would also do. :) Thanks! ",rioforce,https://blender.stackexchange.com/users/1828,"You could select something of the surrounding object (vertex,edge or face) in Edit Mode and select linked L followed by invert selection Ctrl-I Faces where all edges are connected to more than 2 other faces (users) can be selected via Select Menu / Interior Faces ",stacker,https://blender.stackexchange.com/users/29,http://blender.stackexchange.com/questions/12353/delete-un-seen-mesh-with-blender,TECHNOLOGY,blender.stackexchange.com 2641,Rice gets burnt and watery,"I am following the recipe of the rice I am making which is: Add 2 cups of water and heat Add 1 teaspoon of salt and 1 teaspoon of butter Add 1 cup of rice then wait for 18 to 20 minutes and it should be ready to serve. But the problems with this are: The rice is always watery It is flavorless Some rice gets burnt and makes it really hard to clean the pan ",Furious,https://cooking.stackexchange.com/users/22612,"I have a bullet proof method which many chefs may not like. 1 cup rice to 2 cups water. In a bowl with no lid and microwave for 12 - 15 min until no liquid is left. Leave to stand and fluff with a fork. ",user22653,https://cooking.stackexchange.com/users/22653,http://cooking.stackexchange.com/questions/41235/rice-gets-burnt-and-watery,LIFE_ARTS,cooking.stackexchange.com 7351,Which color scheme to choose for applications that require long work hours?,"I'm working on a ERP / Accounting (lots of tables and data) web app and was wondering what color scheme would be appropriate for this type of application? Users will be sitting in front of their computers for 8+ hours enetering lots of data on daily basis and I would like to make that experience as comfortable as possible to their eyes. Most of these application I've seen are using some sort of a white/grey/blue scheme with white being dominant but I'm concerned that this color might strain their eyes to much especially considering different brightness of monitors and working in the dark. Any help would be appreciated. ",Mirko Filipovic,https://ux.stackexchange.com/users/44053,"I've always felt that for long copy, reversed text is really difficult to read but for long hours it's a godsend. Consider how most programmers look at their environment. There is a good reason for this: The JetBrains Darcula theme has been exceedingly popular as it is both high contrast and desaturated. You can offer a similar option in midnight blues that is equally pleasing on the eyes. Note that we throw out the top and bottom 20% of the brightness scale as well. Would I read a novel like this? Probably not. This style of interface is great for digesting blocks of information for hours on end. It's awful for paragraphs. ",Imperative,https://ux.stackexchange.com/users/44151,http://ux.stackexchange.com/questions/52833/which-color-scheme-to-choose-for-applications-that-require-long-work-hours,TECHNOLOGY,ux.stackexchange.com 7562,Why is my MacBook Pro's screen going black for a second?,"I have a new MacBook Pro, when I'm using it the screen goes suddenly blank for a second and comes back, it feels like as if someone unplugged my screen and plugged it back immediately.. why does this happen? Initially I thought it was only happening when I'm running on battery, but happens even when I'm connected too. This is very sporadic. ",Broken Link,https://apple.stackexchange.com/users/349,"Ive had similar problem, The inverter and screen has been replaced by warranty. Does it happens when you change angle of your lid? ",S.T.A.L.K.E.R.,https://apple.stackexchange.com/users/480,http://apple.stackexchange.com/questions/567/why-is-my-macbook-pros-screen-going-black-for-a-second,TECHNOLOGY,apple.stackexchange.com 9163,C#: Is it possible to have partial extension classes,"I am looking to create Extension classes that extend Entity Framework Entities in a different assembly to the EF Entities. I also want to code gen some additional/generic methods in an extension methods class (using T4), then have the ability to create a partial extension methods class with additional custom methods. Is this possible. ",Mark Redman,https://stackoverflow.com/users/45967,"You don't need them. Just write another extension class. namespace Namespace1 { public static class MyEntityBlibblingExtensions { public void Blibble(this MyEntity self) { // ... } } } Then, elsewhere... namespace Namespace2 { public static class MyEntityFurtlingExtensions { public void Furtle(this MyEntity self) { // ... } } } Anything importing Namespace1 will see the extension method Blibble() while anything importing Namespace2 will see Furtle(), and importing both will see both. They can be in different assemblies or anywhere which imports MyEntity's namespace. So, partial extensions aren't really a valid concept. In fact, the very idea of putting extension methods inside classes is a bit of a hack as it is - a shame they couldn't unbend C#'s rules enough to let extension methods live outside of classes. ",Matthew Walton,https://stackoverflow.com/users/241544,http://stackoverflow.com/questions/10811928/c-is-it-possible-to-have-partial-extension-classes,STACKOVERFLOW,stackoverflow.com 3519,Direction of Tefillin Winding,"Why do some people have the custom to wind the Tefillin-Shel-Yad towards themselves, while others wind it away from themselves? What is the reason behind these two customs, and which sects of Judaism generally follow which method? ",yydl,https://judaism.stackexchange.com/users/128,"It's pretty much a question of which eida you come from: Ashkenazim wind inwards, Sfaradim wind outwards. (And, confusingly, right-handed ashkenazi using left-handed ashkenazi tfillin would also be winding backwards...) The link that @jake posted in comments illustrates this very nicely - it depends on which eida's minhag you use. (Sorry, I don't know the reasoning behind the different minhagim - though I find it likely that each do it that way, because thats the way they do it...) ",AviD,https://judaism.stackexchange.com/users/459,http://judaism.stackexchange.com/questions/8308/direction-of-tefillin-winding,CULTURE,judaism.stackexchange.com 8683,How to transfer personal auto lease to business auto lease?,"What is involved in transferring a personal auto lease to a business auto lease? We have a car for our business that was leased prior to establishing our LLC, therefore it is under our names, personally. How do we go about transferring it to the business, in order to account for it as a business expense? ",Brian David Berman,https://money.stackexchange.com/users/1886,"See what the contract says about transfers or subleases. A lease is a credit agreement, so the lessor may not allow transfers. You probably ought to talk to an accountant about this. You can probably recognize most of the costs associated with the car without re-financing it in another lease. ",duffbeer703,https://money.stackexchange.com/users/1288,http://money.stackexchange.com/questions/9781/how-to-transfer-personal-auto-lease-to-business-auto-lease,LIFE_ARTS,money.stackexchange.com 7761,what is exactly the difference between the Selberg class and the set of Artin L-functions?,"The question is in the title: from what I read in the answer to another question, Artin L-functions are conjecturally cuspidal automorphic L-functions for some algebraic group that can be transfered to $GL_{n}$. On the other hand, elements of the Selberg class are widely believed to be (cuspidal?) automorphic L-functions for $GL_{n}$. So where exactly lies the difference between those two sets of L-functions? Thanks in advance. ",Sylvain JULIEN,https://mathoverflow.net/users/13625,"We talk about three rather different but not unrelated conjectures here: (1) Artin $L$-functions are automorphic $L$-functions; (2) automorphic $L$-functions belong to the Selberg class; (3) the Selberg class consists of automorphic $L$-functions. The three families of $L$-functions occurring here are defined very differently. Artin $L$-functions are defined in terms of Galois representations, automorphic $L$-functions are defined in terms of automorphic representations, while the Selberg class is defined via natural axioms of an analytic nature. Conjectures (1) and (2) are instances of the Langlands conjectures, while (3) strengthens the idea that sufficiently nice analytic properties of a Dirichlet series are always ""caused by"" an automorphic form (or automorphic representation) behind the Dirichlet series. ",GH from MO,https://mathoverflow.net/users/11919,http://mathoverflow.net/questions/207306,SCIENCE,mathoverflow.net 533,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 encryption OTP appears scheme that is impossible to make work and if it works benefits are not clear. Requirement that the key needs to be the same size than input seems to be unbearable for many of modern use cases for encryption. Is there any practice where OTP is useful in modern cryptography except: As a component used on some proofs. As a example ideal of encryption algorithm. I.e.: Is it possible to base on OTP and provide the ""information theoretic"" strength to hashing (apparently not), authentication, etc. ",user4982,https://crypto.stackexchange.com/users/4982,"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, you need to each bit to be independent of every other bit and for there to be no bias whatsoever in the output. Now practically every hardware RNG you're going to get does not fufil this in practice. They almost always run the bits through a hash function or some sort of entropy extraction routine. However, these routines do not carry a security proof that they preserve the underlying independent non-bias nature of the bits passed to them. It's quite possible that if you the entropy extraction routine over enough bits, that a very small bias would be observed. However, any such bias, no matter how small would destroy the OTP security proof. So you need to design your own RNG using only de-biasing techniques that maintain the security proof. Worse, you need to build an RNG with no detectable bias whatsoever over gigabits of output. Key Distribution Key distribution is a pain because the key has to be as long as the message. This immediately raises the question of why bother with encryption if you already have a secure channel of transmitting the key. Even with this massive key you haven't authenticated the cipher-text! You need provisions for that too. This limits the OTP to scenarios where you want to time-shift a secure channel. It works okay in scenarios like the following. If Alice lives in Hong Kong and Bob lives in New York, they can meet twice a year and exchange a gigabyte or two of pad and be on their way. Even if you're using QKD you've just moved the problem elsewhere. The problem now moves from a key distribution problem to an engineering problem. You've got to make a QKD device that is 100% reliable, doesn't have any side channel attacks, and is not susceptible to induced errors. Such as slightly overpowering/underpowering device to get duplicate photons, shinning a laser at the device to subtly break it or some other error inducing attack. You've got many of the same problems of hardware quality as you had with the PRG. Good luck with that! Key Destruction Once you've used the key you have to make sure it is properly destroyed in both places. This is again more tricky than it seems at first. If you don't do this properly and you use the key-stream twice, you have no security at all. If the program that manages the pad for you suffers some sort of error and fails to delete the used portion of the pad then re-use becomes quite likely. Worse, because the pad is the same length as the message there's quite a lot of key stream to leak. This can leak in a number of ways. Parts of the key stream might have been paged to disk, for example, during encryption/decryption process. An attacker could then decipher parts of your ciphertext by simply XORing bytes from your recovered hard-drive against the ciphertext. Conclusion The reason that the OTP isn't really fielded is that despite its strong security proof, the practical considerations around it actually render it insecure. This is actually quite common in cryptography. Things with strong security proofs tend to be unworkable. For every section of my reply, there is a documented case where precisely the problem I've raised has led to OTP messages being compromised. OTPs are really hard to use properly and are typically less secure overall than a conventional scheme. Small secrets, by virtue of them being small, are less likely to be leaked, easier to generate, easier to destroy and easier to transmit. All of these properties make them more secure. ",Simon Johnson,https://crypto.stackexchange.com/users/623,http://crypto.stackexchange.com/questions/11009/is-otp-useful-in-modern-electronic-communication,TECHNOLOGY,crypto.stackexchange.com 1069,Is there a way I can share the 3.42 GB download of Windows 8.1 from Windows Store?,"Windows 8.1 is out, and I would like to know if it is possible to share the Windows 8.1 download upgrade between different computers so that I don't have to download it over and over again? This might be helpful for people who are on a metered connection. Store is downloading 3.42 GB of data so it must be stored somewhere. Is there a way I can copy it to my other computers and start the setup so that I don't have to download it over and over again on each computer I own? ",LoneWOLFs,https://superuser.com/users/85063,"Here are the direct Windows Store ESD (encrypted ISO) links from official website (EN-UK version): Windows 8.1 x86 Windows 8.1 x64 Windows 8.1 Pro x86 Windows 8.1 Pro x64 ",George Dima,https://superuser.com/users/215915,http://superuser.com/questions/661402,TECHNOLOGY,superuser.com 3694,Will enclosing my porch keep my house warmer?,"Will enclosing my porches during the winter help keep my house warmer? There is a lot of wind hitting the house, and I'm afraid that is causing a drop in temperature. ",Anthony Powell,https://diy.stackexchange.com/users/27718,"If your porch gets any sun, it should help. My dad enclosed his each fall and opened it back up in the spring to let the breeze through. Worked great, but this was in the high desert where it would be sunny and below freezing at the same time. ",scollier,https://diy.stackexchange.com/users/27719,http://diy.stackexchange.com/questions/52440/will-enclosing-my-porch-keep-my-house-warmer,LIFE_ARTS,diy.stackexchange.com 4240,drive 3 phase induction motor with only DC (not pwm) thru each phase,"I've been researching making a driver for a 3 phase induction motor powered by DC source using PWM to approximate sine waves in each phase. However, the switching speeds of the PWM signal for the rotational speed I want is difficult to obtain with hobby microcontroller boards like the arduino. Can I just switch the DC directly thru each phase at the correct time only twice per cycle ? Essentially I would be approximating a sine wave with only 2 different voltages thru the coils, ie: +V and -V (using H bridge circuitry here) Will this create enough of a rotating magnetic field that sufficient current is induced in the rotor cage ? What will be the losses in power / efficiency for this, or any other drawbacks for this system ? The bonus is greatly simplified drive electronics. ",bobjandal,https://electronics.stackexchange.com/users/16361,"You may be considering a simple 3phase AC inverter design or a powerful high torque variable frequency drive (VFD) electronics. Your choice depends on detailed specs including torque vs speed and budget. In both cases, a square wave would not be desireable as the eddy current losses would be excessive so multi-level low impedance drive is needed to appropximate the sine wave. ",Tony Stewart. EE since '75,https://electronics.stackexchange.com/users/17574,http://electronics.stackexchange.com/questions/49698/drive-3-phase-induction-motor-with-only-dc-not-pwm-thru-each-phase,TECHNOLOGY,electronics.stackexchange.com 6807,Why don't wifi managers remember mac addresses for hotspots to defeat the jasager attack?,"So I just learned about the jasager attack, via the wifi pineapple and it struck me immediately that it wouldn't work at all if network managers (privately) associated MAC addresses with hotspots and asked for explicit permission if you were going to connect to a new physical device. Obviously this would be mildly irritating in public hotspots where devices change and hundreds of diverse locations share network names, but it would make home and work networks much harder to penetrate. I haven't found any wifi managers that do this, or at least I haven't found information that any do. My question: Am I missing something obvious? Would remembering MACs not actually increase security? If it would, are there any network managers that do this? (I'm on Linux, but if there are tools for other OS's I think it's worth having them in the answers) ",quodlibetor,https://security.stackexchange.com/users/8391,"MAC address spoofing is trivial for an attacker to carry out, any form of mac address filtering will not help secure any network. However, MAC address filtering can cause real problems for legitimate users. What if you buy a new router and give it the same SSID? The best defense against this sort of attack is WPA. It isn't prefect, WPA-PSK is pretty easy to break, but its better than anything else consumers have. ",rook,https://security.stackexchange.com/users/975,http://security.stackexchange.com/questions/14854/why-dont-wifi-managers-remember-mac-addresses-for-hotspots-to-defeat-the-jasage,TECHNOLOGY,security.stackexchange.com 2361,What is difference between SPContext.Current.Web.URL and SPContext.Current.Site when using SPSite object?,"SPSite spsite1=new SPSite(SPContext.Current.Web.URL); SPSite spsite2=SPContext.Current.Site; What is the difference and when do we decide which one to use? I feel both give us the site collection object. Example: SPWeb spweb=spsite1.RootWeb; will mean same as spsite2.RootWeb; Then why are there 2 ways to do it? ",variable,https://sharepoint.stackexchange.com/users/21463,"SPSite spsite1=new SPSite(SPContext.Current.Web.Url); will give you SPSite object. But it will be site collection object only when SPContext.Current.Web.Url is that of root web. If the web object is that of a sub site then SPSite object won't be a site collection object. The second statement SPSite spsite2=new SPSite(SPContext.Current.Site); is wrong because there is no overload of SPSite which has SPSite as parameter. UPDATE If the intention is to get the rootweb then second is a better way of doing it as you are not instantiating a new SPSite object. Moreover, in the first case you will need to dispose SPSite object as you are creating a new one compared to second in which SPSite is retrieved through SPContext which should not be disposed explicitly. ",Nadeem Yousuf,https://sharepoint.stackexchange.com/users/9472,http://sharepoint.stackexchange.com/questions/95812/what-is-difference-between-spcontext-current-web-url-and-spcontext-current-site,TECHNOLOGY,sharepoint.stackexchange.com 6841,"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 question. The SE Community Team seems to have a different opinion as Shog9 points out (emphasis mine): the results have been... Not great so far: a significantly smaller number of people are clicking through to randomly-selected questions than to the top questions, which hints that the algorithm may've been doing a better job of identifying general-interest questions across topics than some expected. Disclaimer: This should not be taken as a slight of the community team whatsoever, nor do I think this is some cause for revolt or a boxing match as the below prose may indicate. These are just poorly applied literary tools to emphasize the drastically different approaches to the same list between two groups. In the Red Corner, the Community Members The goal of the hot questions should be to drive up interest in the site. The hot questions should be a lure to encourage SE network users to contribute to other content, not just do a drive-by on the hot question. In the Blue Corner, the Community Team The goal of the hot questions should be to drive traffic to general-interest questions. After all, the Hot Network Questions used to be more accurately named as ""Popular Questions"". What is the Goal of Advertising Network Questions? Before discussing how to calculate hotness, or how the list should be ordered, we need to come to an agreement on what the heck we are actually trying to achieve. Once we know what we are looking to accomplish, we can find the best way to do that. The list of questions from a variety of sites is in a great location screen-wise, it is readily accessible and does get a lot of eyes on it. But as with any marketing, the goal isn't just to grab eyes, it's to grab the right eyes.* * I have nothing against left eyes. Most of my friends have left eyes too. And they are awesome. But in the context right eyes are not a geospatial thing, but rather in the 'correct' sense. So what are the right eyes? What type of people do we want to attract to our site? What would we determine as 'success'? How can we measure that success? Please do not limit yourself to the very narrowly scoped topic above. Think outside the box if you'd like. On every page across the network we have a nice piece of real estate for showing off the rest of the network. How can that space best be used if not on a list of questions picked by an arbitrary algorithm? ",jmac,https://meta.stackexchange.com/users/209637,"I agree that increasing viewership to good questions and driving users to sites they may wish to join but might not naturally visit are both good goals. I would like to mention a third goal: In the....other corner, random intermittent positive reinforcement Studies have shown that random intermittent positive reinforcement can be more effective that purely positive reinforcement. This means that a reward that is given for good behaviour, but only sometime and to varying degrees, is more effective than a proportional reward. This is perhaps because people are always chasing the next ""big score"". So what has this got to do with hot questions? Hot questions are (one can only hope) good questions with a good answer since the upvotes are a major part of what drives them - So the positive part is taken care of. However, it is rare to get one of your questions/answers on the ""Hot questions"" list, and I haven't been able to detect much of a pattern (except that the questions seem to be more easily understandable to a general audience and are high quality) - So the intermittent random portion is taken care of. And I think we can all agree you are heavily rewarded for having a good answer/question in the hot questions list. My experience When I got my first answer on the hot questions list it was the most exciting Stack Exchange had been since the initial honeymoon period was over. These rare periodic large rewards are key to keeping long term expert users loving the site. Conclusion I'm not saying that random intermittent positive reinforcement should be the main goal of the hot questions list. But it is an additional positive effect to take into consideration. ",Richard Tingle,https://meta.stackexchange.com/users/220332,http://meta.stackexchange.com/questions/219922/what-is-the-goal-of-hot-network-questions,TECHNOLOGY,meta.stackexchange.com 1639,Applications of recoil principle in classical physics,"Are there any interesting, important or (for the non physicist) astonishing examples where the recoil principle (as special case of conservation of linear momentum) is applied beside rockets and guns? I am teaching physics in high school and was just wondering if there are any more interesting examples than the two textbook standard examples above. I am not interested in examples which are not in the domain of macroscopic, classical physics like Mößbauer-effect or something like that. ",Ariane Miller,https://physics.stackexchange.com/users/6014,"Yarkovsky effect (almost like a photon rocket, I think). Non-uniform thermal radiation (because 'day' is hotter than 'night') of a celestial object can give a net recoil. More spoiler: http://en.wikipedia.org/wiki/Yarkovsky_effect ",pcr,https://physics.stackexchange.com/users/1814,http://physics.stackexchange.com/questions/16608/applications-of-recoil-principle-in-classical-physics,SCIENCE,physics.stackexchange.com 3160,Where to put video transcripts?,"Is there any official guidance on where to put a transcript for a video? Should it go on the same page as the video or on a separate page? ",Kevin Brydon,https://ux.stackexchange.com/users/35773,"Transcripts and videos are one in the same thing. Having them on a separate page can be quite a frustrating experience. Let's take a look at other examples Lynda.com has the transcripts right below the video: This allows for easy reading and watching at the same time. And the current line is highlighted for easy access. Youtube had the ""transcripts"" right in the video, so no need to scroll if you have a smaller screen. I recommend easy access so you don't have to have the user jumping from place to place. ",Majo0od,https://ux.stackexchange.com/users/22695,http://ux.stackexchange.com/questions/45242/where-to-put-video-transcripts,TECHNOLOGY,ux.stackexchange.com 7360,How to get src from CDATA in RSS?,"I am fetching data from RSS feed with Magpie. $rss[description] contains CDATA with html elements: <![CDATA[ <div> <a href='url'> <img src='img_url' alt='aaa' title='bbb' border='0' width='116' height='116'> </a> </div>]]> Some other text How can I fetch ""img_url"" from this? Is preg_match() the only way? Maybe I can use simpleXML? ",lvil,https://stackoverflow.com/users/533861,"CDATA you have is a string containing HTML. So first treat it as text, but since this text is meant to contain HTML, parse this text using solution appropriate for parsing HTML. In other words: use appropriate tool (HTML parser) for the job (parsing HTML). There are already existing solutions for parsing HTML in PHP - eg. see answers to this questions: How to parse and process HTML with PHP? Robust, Mature HTML Parser for PHP. So, basically, you already are able to get the HTML string from your XML. Now parse the HTML and get source of the image using some of the solutions mentioned above. Using preg_match() for parsing HTML is not a good idea, as it would need to be very complex to do a simple thing HTML parser is suitable for. ",Tadeck,https://stackoverflow.com/users/548696,http://stackoverflow.com/questions/8838742/how-to-get-img-src-from-cdata-in-rss,STACKOVERFLOW,stackoverflow.com 4504,To what extent does the Law of Moses still apply?," Matthew 5:17-18 (KJV) 17 Think not that I am come to destroy the law, or the prophets: I am not come to destroy, but to fulfil. 18 For verily I say unto you, Till heaven and earth pass, one jot or one tittle shall in no wise pass from the law, till all be fulfilled. As I understand it, the Law of Moses is fulfilled in Christ. We don't make sacrifices anymore, and many other of the finer points in the Pentateuch are no longer preached. Yet, I still see people reference these books for doctrine (for example the 10 Commandments). How much of the Law of Moses still applies? ",tjameson,https://christianity.stackexchange.com/users/130,"Paul writes that in our baptism we go down into the water with Jesus and die with him, setting us free from our old husband, the law,-then,...still in Christ, we also participate in Jesus' resurrection and we come up out of the water with Jesus into resurrected new life in Christ, and Paul writes, 'we are free to marry another', which we do, and it is Jesus. This is the clearest picture of what happens to us as we are baptized into Christ and become married to him. Because we died, we are free from our former spouse, the law,.. ....because death dissolves marriages and frees the living spouse to marry again, as Jesus taught. The law our former spouse did not change, we changed, because we died 'in Christ' we became 'free from the law'. The law with all of its demands is still the law, but, because we died with Jesus, 'in Him', the law can no longer access us, because we, upon resurrecting with Jesus, became free to marry another, and we do, we marry Jesus, becoming His spouse. The law is the same with its demands, we have changed. We have a new relationship with one who is all-encompassing and in whom we find our all in all, who protects us from the law and all of its effects. Paul further writes, 'does this mean that we should sin freely, then? By all means, No!' However, 'sin will no longer have any dominion over us.' Romans 7:4-6King James Version (KJV) 4 Wherefore, my brethren, ye also are become dead to the law by the body of Christ; that ye should be married to another, even to him who is raised from the dead, that we should bring forth fruit unto God. (a fruitful marriage partner) 5 For when we were in the flesh, the motions of sins, which were by the law, did work in our members to bring forth fruit unto death. 6 But now we are delivered from the law, that being dead wherein we were held; that we should serve in newness of spirit, and not in the oldness of the letter. (In other words, don't continue to sin, but for a new and different reason and with a new and different source of power) (Romans 6, concurs) ",Hello,https://christianity.stackexchange.com/users/15134,http://christianity.stackexchange.com/questions/456/to-what-extent-does-the-law-of-moses-still-apply,CULTURE,christianity.stackexchange.com 3406,GIS Software Choice for a small university research centre,"I need to choose a GIS system for a small university research centre. We are handling a broad range of data, (for example, numerical tidal analyses, weather data, poverty, isolated economic activity, skills availability and renewable energy resource availability) and operate primarily in countries with relatively poor existing data sets. We interact with other groups, some of which use ARCGIS. Do I have to wade through every GIS software descriptor on the web, or can someone please give an indication of likely candidates? ",Alan Owen,https://gis.stackexchange.com/users/8127,"Desktop For many users, GIS means ESRI ArcGIS. While expensive in a commercial setting, they have rather generous educational licensing, including the provision of free copies to educators for distribution to students, one per licensed seat per year. I would advise at least ticking this box; I don't think people who learned GIS in other ways are less capable, but they might be less employable given the keyword-filtering resumes go through these days. The extensions to ArcGIS range from basic things that should be integrated into the main application to the amusingly archaic to essential tools for a certain niche. The OSGeo stack is an obvious addition to this, but I don't think it's yet capable of being a full replacement in desktop GIS, at least not with the usability of Arc. Due to constant complaining about ESRI's annoyances, I tried to replace it for an entire summer with mostly QGIS, and failed. QGIS w/ plugins + GRASS + POSTGIS can be hacked around to achieve a lot of GIS functionality, I can believe that, but for learning GIS rapidly, I wouldn't recommend it. There are a lot of different projects under the OSGeo heading, though - in all likelihood you'll find use for some of them even if you don't touch the desktop functionality. I'm always seeing MapInfo installations mentioned, but the one I used wasn't really mature / feature-ful in the same sense ArcGIS has been. The user interface was lacking, so perhaps it just hid the functionality from me. Manifold has been highly regarded as an ArcGIS competitor that is at once commercially affordable, comprehensive, and extensively higher-performance than the sometimes antiquated ArcGIS code. They seem to be dragging their feet on updates & bug-fixes in the last few years, though. At the least, if ArcGIS fails to operate on extreme datasets, try this. RS Remote sensing software is its own niche, with lots of features that aren't present in the ESRI stack. I've been exposed to ERDAS, and heard about ENVI and PCI. Those three constitute a majority share, but I'm aware that there are a decent number of options out there, some open source (I've heard good things about Opticks). In my own research area, 3D remote sensing is rapidly becoming a thing, as well - LIDAR and automated photogrammetry would be short topics in any RS course I'd teach. See: Meshlab, VSFM, & Photoscan. Carto For static-map cartography, you'll ideally want Adobe Illustrator, but there are several less expensive commercial choices that may suffice. My experience with Inkscape is a lot like my experience with QGIS - almost there, but missing crucial features like an effective layer dialog. Scripting In the field of data manipulation, you'll definitely want to look at a thorough exploration of Python w/ LabPy. It's too versatile not to teach as a general tool at this point, there's the added inducement of ArcPy, and RPy adds the capability to use basically every statistical algorithm in the world. In addition, very big datasets are typically more amenable to a scripting environment than desktop GIS. CAD CAD & CAD-like GIS software, often used for surveyors / engineers, has a broad number of options led by Autocad which I'm not qualified to compare, but may not be necessary for a pure GIS program. Client - Server Hosting client-server stacks, which becomes important for some classes of GIS user, is the last niche I'm going to mention, but the requirements here are so varied as to make comparison difficult. Other than ArcSDE, The software here is often free, but the server setup and sysadmin to use it is not. EDIT: I've had the opportunity to revisit QGIS recently and it does seem to have considerably improved, going from 1.5 -> 1.8, in stability & features. ",MappingTomorrow,https://gis.stackexchange.com/users/8027,http://gis.stackexchange.com/questions/27188/gis-software-choice-for-a-small-university-research-centre,TECHNOLOGY,gis.stackexchange.com 398,Freeform timing out on return page,"I have EE v2.5.3 and Freeform Pro 4.0.10 among other things. When submitting forms with admin notify turned on I get a server timeout error. The form data still submits to the db and I still get a notification email but the server hangs and eventually times out instead of loading the return page. If I turn on admin notify it works properly, but obviously no notification, which I very much need. ",Allan Kukral,https://expressionengine.stackexchange.com/users/357,"This sounds like it's an issue on your server since it was working and now is not. I'd first test to see if you are having timeouts when sending from the Communicate page in EE. If you can't send from the Communicate page, enable Email Debugging to see what's going on. Also check your PHP error logs to see what you see. An error related to the timeout may exist there. If necessary, contact your host to see if they have changed anything on the server related to PHPMail/SMTP (I'm not clear from your comment which one you are using exactly)... Send them the info you find in the debugging and logs. ",Anna_MediaGirl,https://expressionengine.stackexchange.com/users/28,http://expressionengine.stackexchange.com/questions/5291/freeform-timing-out-on-return-page,TECHNOLOGY,expressionengine.stackexchange.com 2679,FIPS 140 compliance for encrypted files,"Does FIPS 140-2 require specific key sizes, or does it have specific requirements for the data? In other words, if I encrypt a file, how I can check whether it is FIPS-compliant or not? Does only the key need to be checked, or does the encrypted file have to be checked too? If yes, is it possible to elaborate on how to check an encrypted file for FIPS compliance? ",user39576,https://crypto.stackexchange.com/users/2854,"You cannot tell anything related to FIPS 140 by looking at a key or by looking at a file. FIPS 140 doesn't say anything about the choice of encryption algorithm, other than requiring that all every encryption algorithm must be “approved security function” (as defined in the glossary) and there must be at least 1. FIPS 140 is all about the module, i.e. the software or hardware component that performs the encryption and decryption. The standard sets security requirements for how keys are stored, how access to keys is controlled and so on. If you have an encrypted file, you cannot tell whether it was encrypted by a FIPS 140-compliant module or not: an encrypted file looks like any other encrypted file produced from the same plaintext with the same key no matter who or what performed the encryption. If you have a key, you cannot tell whether that key is used in a FIPS 140-compliant module or not; although if you can access the key outside the module, it's likely that either the module isn't compliant — because it shouldn't let keys escape — or an authorized operator misused the module and let the key leak. There is only a way to be sure that a key or encrypted file did not come from a FIPS 140-compliant module, which is if the key or algorithm is not one of the approved security functions (as defined in other standards). ",Gilles,https://crypto.stackexchange.com/users/214,http://crypto.stackexchange.com/questions/5743/fips-140-compliance-for-encrypted-files,TECHNOLOGY,crypto.stackexchange.com 4799,"Do airlines replace cancelled short-haul flights by buses? If not, why not?","When trains are cancelled (at least in Europe), and there are no alternative ways to get travellers to their destination by train a little bit later, there are often replaced by buses to get travellers to their destination. Currently, I've been rebooked twice to get on a flight to a destination that is only 383 km by road. Originally I should have flown on Monday evening, and currently I'm booked on a flight Wednesday morning, effectively a 36 hour delay. If the airline had booked a bus, all Monday evening passengers would have arrived to the other airport by Monday night, with perhaps a 4–5 hour delay. To me, it would make sense from the perspective of customer satisfaction. Does it happen that airlines offer to bus passengers to their destination when cancellations lead to multi-day delays, but a bus would take only several hours? If not, why not? Many passengers, including me, travel to destinations beyond the airport that is 383 km by road, but travelling the short-haul flight segment by bus in order to wait for the first available connection would still benefit travellers. ",gerrit,https://travel.stackexchange.com/users/2509,"I've been offered train connections (rather than bus) in two intra-German cases with Lufthansa where the flight was cancelled, but a good ICE (high speed train) connection between the two cities exist. Basically airline staff gave me the choice: be re-booked for next day, or take the train and arrive a few hours late. (The fact that Lufthansa often cooperates with Deutsche Bahn anyway may play a role here, including that some connections marketed with regular flight numbers are actually high speed train connections - especially short hops from Frankfurt, e.g. Frankfurt-Stuttgart. But: the particular trains I was given were NOT such trains and I was simply given a normal train ticket + reservation by the airline.) In this case I suppose cost for accommodation or train would have worked out roughly the same for the airline, so they offered the choice to the customer - but that's a guess of course. ",greyshade,https://travel.stackexchange.com/users/19079,http://travel.stackexchange.com/questions/35745/do-airlines-replace-cancelled-short-haul-flights-by-buses-if-not-why-not,CULTURE,travel.stackexchange.com 1729,Copying Files in a Folder To Individual Folders,"This might sound like something quite odd but for my HTPC, I need to rearrange how my files are stored such that each of the individual files in a folder needs to be moved to a subdirectory of its own (with the same name as the file). I.E. - Currently the directory is: directory/ - a.file - b.file - c.file and I want to change it to: directory/ - a/ -- a.file - b/ -- b.file - c/ -- c.file I don't think this is terribly tricky but it's just odd and I haven't found anybody doing it before: I think it can be done with find and exec but I'm a bit of a battler and can't quite get it. Thank you very much in advance (or even just for taking the time to read this). ",paddymelon,https://unix.stackexchange.com/users/42178,"Write a shell script which gets the files as parameters: #!/bin/bash for filepath; do parentpath=""${filepath%/*}"" if [ ""$parentpath"" != ""$filepath"" ]; then # $file contains a / file=""${filepath#""$parentpath""/}"" else file=""$filepath"" parentpath="""" fi filename=""${file%.*}"" if [ -z ""$parentpath"" ]; then mkdir -p ""$filename"" && mv ""$file"" ""$filename"" else mkdir -p ""${parentpath}/$filename"" && mv ""$filepath"" ""${parentpath}/$filename"" fi done You can call this script as ./script *.ext1 *.ext2 *.ext3 for not too huge numbers of files or as find ... -exec ./script {} + for huge numbers. ",Hauke Laging,https://unix.stackexchange.com/users/32191,http://unix.stackexchange.com/questions/81280/copying-files-in-a-folder-to-individual-folders,TECHNOLOGY,unix.stackexchange.com 7708,Is it possible to jailbreak an iPad 2 (A1395) after updating to iOS 6.0.1?,"I have a jailbroken iPad 2 (A1395) running Version 5.0.1 (9A405). If I update to 6.0.1, can I jailbreak untethered? Will I have to re-install all my Cydia apps & settings, or do they get backed up and restored? Confused by too many Google results! ",Ze'ev,https://apple.stackexchange.com/users/18438,"Dont do it!!!!!!!!!!!!! If you upgrade you will kill any chance (at present of jailbreaking). I did mine last year without thinking and have regretted it ever since. stay with ios 5.1. Trust me there is no benefit at all in upgrading only losses ",Uncle10foot,https://apple.stackexchange.com/users/40288,http://apple.stackexchange.com/questions/79565/is-it-possible-to-jailbreak-an-ipad-2-a1395-after-updating-to-ios-6-0-1,TECHNOLOGY,apple.stackexchange.com 9295,ASP.Net WebForms requiredfieldvalidator not working in FireFox?,"I have a WebForms app that uses a field validator on a dropdownlist. It works in IE but not FireFox. This is pretty straightforward stuff I'm doing. Here are the setups for the dropdown and validator: <asp:DropDownList ID =""dmbFileActNo"" runat=""server"" CssClass=""DROPDOWN_MEDIUM"" AutoPostBack=""True""></asp:DropDownList> <asp:requiredfieldvalidator EnableClientScript=""true"" id=""rfvFileActNo"" Display=""None"" ControlToValidate=""dmbFileActNo"" Runat=""server"" InitialValue=""-1""></asp:requiredfieldvalidator> I'm running ASP.Net 2.0 on the web server. Javascript is enabled on the FireFox browser-- this problem happens on all FF browsers I've tested, on multiple everyday machines, so I don't believe it's due to a locked down install. ",larryq,https://stackoverflow.com/users/172617,"I got this working by modifying the web.config. As it turns out, someone had <xhtmlConformance mode=""Legacy""/> in there, which is an older setting (the current default is ""transitional""). Thanks for everyone's help. ",larryq,https://stackoverflow.com/users/172617,http://stackoverflow.com/questions/2723127/asp-net-webforms-requiredfieldvalidator-not-working-in-firefox,STACKOVERFLOW,stackoverflow.com 9234,Integrate a division of polynomials,"Hi I have the following integral: $$\int \frac{2x}{x^2+6x+3}\, dx$$ I made some changes like: $$\int \dfrac{2x+6-6}{x^2+6x+3}\, dx$$ then I have: $$\int \dfrac{2x+6}{x^2+6x+3}\, dx -\int\dfrac{6}{x^2+6x+3}\, dx$$ and thus: $$\ln(x^2+6x+3)-\int\dfrac{6}{x^2+6x+3}\, dx$$ Ok, I have decomposed $$\frac{2x}{x^2+6x+3} $$ in: $$ \frac{3+\sqrt6}{\sqrt6(x+\sqrt 6+3)} + \frac{3-\sqrt6}{\sqrt6 (-x+\sqrt6-3)}$$ How can I integrate this expressions? ",Luis Armando,https://math.stackexchange.com/users/162185,"HINT: As $\displaystyle x^2+6x+3=(x+3)^2-(\sqrt6)^2,$ using Trigonometric substitution, set $x+3=\sqrt6\sec\theta$ or use $\#1$ of this ",lab bhattacharjee,https://math.stackexchange.com/users/33337,http://math.stackexchange.com/questions/882692/integrate-a-division-of-polynomials,SCIENCE,math.stackexchange.com 9073,"Is potential energy and ""work done"" the same thing?","Is potential energy and ""work done"" the same thing? If they are not one and the same thing then why is potential energy always associated with ""work done""? Could you explain me with some examples? ",Uzair,https://physics.stackexchange.com/users/36559,"Suppose you drive your car to the store and back. Your car started and finished in the same place (on your drive) so its potential energy hasn't changed but during the trip the car engine did a lot of work. This is an example where the work done is not equal to the change in potential energy. Generally speaking in physics we are interested in conservative forces, and one of the definitions of a conservative force is that the work done is equal to the change in potential energy. This normally means energy neither leaves or enters the system we are considering. The reason the example I gave of the car journey is non-conservative is that friction and drag causes energy to leave the system (as heat). In principle if your car had no friction or drag then it would use no energy going to the store unless the store was at a different height. If the store was at a different height then any energy used going to the store would be recovered on the way back. ",John Rennie,https://physics.stackexchange.com/users/1325,http://physics.stackexchange.com/questions/94077/is-potential-energy-and-work-done-the-same-thing,SCIENCE,physics.stackexchange.com 1181,How to determine directions of vectors of an electromagnetic wave,"I did an exercise which probably is quite popular, in which you draw an electromagnetic wave and prove that it should propagate at the speed of light $1 \over \sqrt {\mu_0\epsilon_0}$ using Farday's law and Ampere's law. Basically if this is the wave: Let's say the E-field (red) is in the X direction, the B-Field (blue) is in the Y direction, and the velocity of the wave is in the Z direction. You take for example for ampere's law a surface in the ZY plane with a length L equal to the amplitude of the wave, and a width equal to $\lambda\over 4$ You do a similar thing with Faraday's law and you get the speed of light, assuming you know that the E-field and B-field propagate in this manner. I got the right answer but I wondered about this: Let's say I only had the E-field and I know the wave propagates at the speed of light, I assume this is enough information to draw the B-field at each point. But how will I know the direction? Both Faraday's law and Ampere's law say you need a closed loop integral and the rules I've been taught say you go over the loop in a clockwise direction for example and take the normal to the surface according to the right hand rule etc. But clockwise and counter-clockwise direction don't really give me much information in this case, so how can I determine the direction of the B-field if I only have the E-field? ",fiftyeight,https://physics.stackexchange.com/users/6743,"If you're careful about how you define the surface, then you will get the correct direction out of Maxwell's equations. In vector calculus (and generally in math and physics), a surface has an orientation, which also specifies the orientation of the loop that forms its boundary. So you can't just pick a direction to go around the loop at random. The direction in which you go around the loop is related to the orientation of the normal vector to the surface. Of course, you don't actually need to do a surface integral to figure this out. The electric and magnetic fields in an EM wave (at any given position and moment in time) are related by the equation $$\mathbf{B} = \frac{1}{c}\hat{\mathbf{k}}\times\mathbf{E}$$ where $\hat{\mathbf{k}}$ is a unit vector that points in the direction of propagation of the wave. If you don't know which direction the wave is moving, you can't tell which way the magnetic field points. ",David Z,https://physics.stackexchange.com/users/124,http://physics.stackexchange.com/questions/20970/how-to-determine-directions-of-vectors-of-an-electromagnetic-wave,SCIENCE,physics.stackexchange.com 9424,"iPhone dock connector problems, with and without accessories","I started to experience problems with my iPhone that seem to be related to the dock connector. Upon plugging my iPhone into my (officially supported) car stereo, I started to get the message ""This accessory is not supported by iPhone"" on the screen. Didn't think much of it as I only use it for charging purposes, and that still worked so I ignored it. Then I bought a small ANT+ dongle, which is a little accessory you plug into the dock connector to allow your phone to receive data from various health/fitness devices like heart rate monitor, and cycle sensors etc. It produces the same error message every time I plug it in, and the apps that use the dongle will not recognise it. The dongle does officially support my hardware and OS level. I've checked that it is not broken by plugging it into an iPhone 5, an iPad 3 and an iPod of some description, none of which showed the error. The supported apps find the device on the iPad, the iPhone 5 does not have the apps installed but offers to do so as soon as I plug it in, so I know the dongle is working correctly. In addition to the above, when nothing is plugged into the dock connector, it still occassionally thinks that something is, resulting in a muted phone. When it's in this state I am not able to hear anything or change any volume settings (music playback or ringer volume) with the physical keys. Going into the Music app shows that it thinks it's outputting the music to the dock connector. Why is this accessory not working on my iPhone, and how can I get it working? What causes my iPhone to think that it's docked when it isn't? ",stuffe,https://apple.stackexchange.com/users/9495,"In order for the line out audio to work for an iPhone 5 or 5s dock, make sure you have iOS 7. I had iOS 6 running on the iPhone 5 and the line out audio would not work. ",Conservativevote,https://apple.stackexchange.com/users/67137,http://apple.stackexchange.com/questions/83545/iphone-dock-connector-problems-with-and-without-accessories,TECHNOLOGY,apple.stackexchange.com 7735,struts2+spring3: passing a variable from action to jsp (javascript code),"First of all, thank you very much to all these that are trying to solve our problems in this forum;) I am developing a web application with struts2+spring3. And I have a question about how to pass a variable (an array of arrays) from the action class to the jsp page. I know that the only you need to do is to declare a private variable in my action and a get method for that variable and then its possible to access these variable from the jsp, I have done it and it works. public class Workspace extends ActionSupport { private String[][] objects=null; public String[][] getObjects() { return objects; } public String execute() throws Exception{ The problem is that I want to access to this variable from the javascript code before loading the whole web page. I have tried by different ways but it is never working. $(function() { var objectsMap=new Array(); $(document).ready(function() { objectsMap = $objects; }); neither works (the alert says: ""Value: undefined""): <s:set name=""auxObj"" value=""%{objects}""/> <script> alert(""Value: ""+$(""#auxObj"").val()); </script> Anyone have idea about how could I do that? Thank you very very much! ",Aleix,https://stackoverflow.com/users/743194,"Thank you people, It works finally, I type the code here for in case is useful for other one: var $linesMap=new Array(); $(document).ready(function() { var $arr; <s:iterator value=""objects"" var=""item"" status=""stat""> $arr=new Array(); <s:iterator value=""item"" var=""item2"" status=""stat2""> $arr.push(['${item2[0]}','${item2[1]}']); </s:iterator> $linesMap.push($arr); </s:iterator> }); Then I can use $linesMap in the javascript code :) Thank you very much, Aleix ",Aleix,https://stackoverflow.com/users/743194,http://stackoverflow.com/questions/5922326/struts2spring3-passing-a-variable-from-action-to-jsp-javascript-code,STACKOVERFLOW,stackoverflow.com 9251,Need directions regarding the learning process I should follow for learning Photoshop,"I am starting out as a freelance website developer so I need to improve my graphics drawing skill. Up till now I'm using an open source tool GIMP to create the concepts and mock ups of the websites I design.I know that Photoshop is the Industry standard(at least as far as I know). So,what books can help me in learning some advanced Photoshop techniques used frequently in web designing.Also I want to learn how to draw cartoon characters like this.I know it is a matter of creativity but still there must be some techniques which I can learn.Please express your views. Just for the record, I'm basically a web developer so my graphics drawing capabilities are very limited(but I want to improve that). You can have a look at this site I designed using GIMP. ",Rajat Saxena,https://graphicdesign.stackexchange.com/users/7481,"Experiment a lot, test out all those buttons and functions one by one, read tutorials, try them out, bring your knowledge over from Gimp such as how to use layers, repeat. You can always buy a book and test out the techniques there, but unless you aim to become a 100% graphic designer I will recommend you to keep it simple at first, more related to what your purpose with it is. (the cartoon you link to is probably made with Illustrator though) Edit: if you specifically want to this for web design, check also Adobe Fireworks which is more targeted towards web design than PS is. ",K3N,https://graphicdesign.stackexchange.com/users/7179,http://graphicdesign.stackexchange.com/questions/11487/need-directions-regarding-the-learning-process-i-should-follow-for-learning-phot,LIFE_ARTS,graphicdesign.stackexchange.com 9054,iMac wakes up without any noticeable reason,"I have a iMac 27"" late 2012, OS X 10.8.4 and last night it woke up from sleep-mode while I was 3 meters away from it. Nobody but me was in the room. The login-Screen was visible. After some seconds the main screen went black again, but the screen of the second monitor (from LG, connected via a thunderbolt-adapter) kept glowing in a dark gray light. So I hit a key on the keyboard, the mac woke up again, and I sent it to sleep by pressing the power-button. Now both screen was black and I went to bed. I did google that today and I found the command pmset -g log which prints out a hybernate-log, and in this log I found evidence for even more strange wake-up-events. This is a part of this log: Time stamp Domain Message Duration Delay ========== ====== ======= ======== ===== UUID: EBB08E57-0FC8-4724-AD4B-30629C0130BE 2013-08-10 18:49:57 MESZ Sleep Power Button Sleep Sleep: Using AC 4204 secs 2013-08-10 18:49:57 MESZ Assertions PID 182(apsd) Released ApplePushServiceTask ""com.apple.apsd-waitingformessages-push.apple.com"" 00:16:58 id:0xc00000d3d Aggregate:0x1040 2013-08-10 18:49:57 MESZ WakeRequests Clients requested wake events: None 2013-08-10 20:00:01 MESZ DarkWake DarkWake due to EC.SleepTimer/SleepTimer: Using AC 0 secs 2013-08-10 20:00:01 MESZ HibernateStats hibmode=0 standbydelay=4200 rd=662 ms 2013-08-10 20:00:01 MESZ Sleep Maintenance Sleep Sleep: Using AC 10250 secs 2013-08-10 20:00:04 MESZ Assertions PID 13(UserEventAgent) Created BackgroundTask ""Checking for Software Updates (com.apple.SoftwareUpdate.DarkWakeFire)"" 00:00:04 id:0xc00000d86 Aggregate:0x1040 2013-08-10 20:00:04 MESZ Assertions PID 1979(SoftwareUpdateC) Created BackgroundTask ""Checking for Software Updates (com.apple.SoftwareUpdate.BackgroundDownload)"" 00:00:04 id:0xc00000d88 Aggregate:0x1040 2013-08-10 20:00:06 MESZ Assertions PID 1979(SoftwareUpdateC) Released BackgroundTask ""Checking for Software Updates (com.apple.SoftwareUpdate.BackgroundDownload)"" 00:00:06 id:0xc00000d88 Aggregate:0x1040 2013-08-10 20:00:06 MESZ Assertions PID 13(UserEventAgent) Released BackgroundTask ""Checking for Software Updates (com.apple.SoftwareUpdate.DarkWakeFire)"" 00:00:06 id:0xc00000d86 Aggregate:0x1040 2013-08-10 20:00:17 MESZ SlowResponse PMConnection: Response from mDNSResponder is slow (powercaps:0x0) 15994 ms 2013-08-10 20:00:17 MESZ WakeRequests Clients requested wake events: None 2013-08-10 22:50:51 MESZ Wake Wake from Standby due to EC.SleepTimer/SleepTimer: Using AC 39 secs 2013-08-10 22:50:51 MESZ HibernateStats hibmode=0 standbydelay=4200 rd=654 ms 2013-08-10 22:50:59 MESZ Assertions PID 182(apsd) Created ApplePushServiceTask ""com.apple.apsd-waitingformessages-push.apple.com"" 00:00:05 id:0xc00000dca Aggregate:0x1040 2013-08-10 22:51:13 MESZ Assertions PID 182(apsd) TimedOut ApplePushServiceTask ""com.apple.apsd-waitingformessages-push.apple.com"" 00:00:19 id:0xc00000dca Aggregate:0x1040 2013-08-10 22:51:13 MESZ Assertions Summary- Aggregate:0x40 Using AC Sleep/Wakes since boot:27 Dark Wake Count in this sleep cycle:1 Time stamp Domain Message Duration Delay ========== ====== ======= ======== ===== UUID: 5CD9A4D4-6924-4423-A3FF-D2DCC23BAD4F 2013-08-10 22:51:30 MESZ Sleep Power Button Sleep Sleep: Using AC 4205 secs 2013-08-10 22:51:30 MESZ SlowResponse Kernel: Response from powerd is slow 15997 ms 2013-08-10 22:51:30 MESZ Assertions PID 182(apsd) Released ApplePushServiceTask ""com.apple.apsd-waitingformessages-push.apple.com"" 00:00:37 id:0xc00000dca Aggregate:0x1040 2013-08-10 22:51:30 MESZ WakeRequests Clients requested wake events: None 2013-08-11 00:01:35 MESZ DarkWake DarkWake due to EC.SleepTimer/SleepTimer: Using AC 0 secs 2013-08-11 00:01:35 MESZ HibernateStats hibmode=0 standbydelay=4200 rd=654 ms 2013-08-11 00:01:35 MESZ Sleep Maintenance Sleep Sleep: Using AC 10240 secs 2013-08-11 00:01:40 MESZ Assertions PID 144(UserEventAgent) Created BackgroundTask ""Checking for Software Updates (com.apple.SoftwareUpdate.DarkWakeFire)"" 00:00:04 id:0xc00000de6 Aggregate:0x1040 2013-08-11 00:01:44 MESZ Assertions PID 144(UserEventAgent) Released BackgroundTask ""Checking for Software Updates (com.apple.SoftwareUpdate.DarkWakeFire)"" 00:00:09 id:0xc00000de6 Aggregate:0x40 2013-08-11 00:01:51 MESZ SlowResponse PMConnection: Response from mDNSResponder is slow (powercaps:0x0) 16002 ms 2013-08-11 00:01:51 MESZ WakeRequests Clients requested wake events: None 2013-08-11 02:52:04 MESZ Assertions PID 2005(helpd) Created BackgroundTask ""com.apple.helpd.sdmbuilding"" 00:00:07 id:0xc00000df9 Aggregate:0x1040 2013-08-11 02:52:15 MESZ Wake Wake from Standby due to EC.SleepTimer/SleepTimer: Using AC 313 secs 2013-08-11 02:52:15 MESZ HibernateStats hibmode=0 standbydelay=4200 rd=717 ms 2013-08-11 02:52:25 MESZ Assertions PID 182(apsd) Created ApplePushServiceTask ""com.apple.apsd-waitingformessages-push.apple.com"" 00:00:08 id:0xc00000e23 Aggregate:0x1040 2013-08-11 02:52:37 MESZ Assertions PID 182(apsd) TimedOut ApplePushServiceTask ""com.apple.apsd-waitingformessages-push.apple.com"" 00:00:20 id:0xc00000e23 Aggregate:0x1040 2013-08-11 02:52:37 MESZ Assertions Summary- Aggregate:0x1040 Using AC 2013-08-11 02:53:17 MESZ Assertions PID 2016(SubmitDiagInfo) Created PreventSystemSleep ""com.apple.SubmitDiagInfo.run"" 00:00:00 id:0x800000e35 Aggregate:0x11140 2013-08-11 02:53:18 MESZ Assertions PID 2016(SubmitDiagInfo) Released PreventSystemSleep ""com.apple.SubmitDiagInfo.run"" 00:00:00 id:0x800000e35 Aggregate:0x1040 2013-08-11 02:57:28 MESZ Assertions PID 2005(helpd) Released BackgroundTask ""com.apple.helpd.sdmbuilding"" 00:05:32 id:0xc00000df9 Aggregate:0x40 Sleep/Wakes since boot:29 Dark Wake Count in this sleep cycle:1 Time stamp Domain Message Duration Delay ========== ====== ======= ======== ===== UUID: B5690C9E-7E6A-4FC8-9C71-D561FC8CD702 2013-08-11 02:57:28 MESZ Sleep Idle Sleep Sleep: Using AC 4204 secs 2013-08-11 02:57:28 MESZ SlowResponse Kernel: Response from powerd is slow 15998 ms 2013-08-11 02:57:28 MESZ Assertions PID 182(apsd) Released ApplePushServiceTask ""com.apple.apsd-waitingformessages-push.apple.com"" 00:05:11 id:0xc00000e23 Aggregate:0x1040 2013-08-11 02:57:28 MESZ WakeRequests Clients requested wake events: None 2013-08-11 04:07:32 MESZ DarkWake DarkWake due to EC.SleepTimer/SleepTimer: Using AC 0 secs 2013-08-11 04:07:32 MESZ HibernateStats hibmode=0 standbydelay=4200 rd=717 ms 2013-08-11 04:07:32 MESZ Sleep Maintenance Sleep Sleep: Using AC 5314 secs 2013-08-11 04:07:38 MESZ Assertions PID 144(UserEventAgent) Created BackgroundTask ""Checking for Software Updates (com.apple.SoftwareUpdate.DarkWakeFire)"" 00:00:05 id:0xc00000e4a Aggregate:0x1040 2013-08-11 04:07:42 MESZ Assertions PID 144(UserEventAgent) Released BackgroundTask ""Checking for Software Updates (com.apple.SoftwareUpdate.DarkWakeFire)"" 00:00:09 id:0xc00000e4a Aggregate:0x40 2013-08-11 04:07:48 MESZ SlowResponse PMConnection: Response from mDNSResponder is slow (powercaps:0x0) 15995 ms 2013-08-11 04:07:48 MESZ WakeRequests Clients requested wake events: None 2013-08-11 05:36:06 MESZ Wake Wake from Standby due to EHC1/: Using AC 1786 secs 2013-08-11 05:36:06 MESZ HibernateStats hibmode=0 standbydelay=4200 rd=807 ms 2013-08-11 05:36:14 MESZ Assertions PID 182(apsd) Created ApplePushServiceTask ""com.apple.apsd-waitingformessages-push.apple.com"" 00:00:06 id:0xc00000e6e Aggregate:0x1040 2013-08-11 05:36:28 MESZ Assertions PID 182(apsd) TimedOut ApplePushServiceTask ""com.apple.apsd-waitingformessages-push.apple.com"" 00:00:20 id:0xc00000e6e Aggregate:0x1040 2013-08-11 05:36:28 MESZ Assertions Summary- Aggregate:0x40 Using AC 2013-08-11 05:36:53 MESZ Assertions PID 124(coreaudiod) Created NoIdleSleepAssertion ""com.apple.audio.'AppleHDAEngineOutput:1B,0,1,2:0'.noidlesleep"" 00:00:08 id:0x100000e7d Aggregate:0x42 2013-08-11 05:37:31 MESZ Assertions PID 124(coreaudiod) Released NoIdleSleepAssertion ""com.apple.audio.'AppleHDAEngineOutput:1B,0,1,2:0'.noidlesleep"" 00:00:45 id:0x100000e7d Aggregate:0x40 2013-08-11 05:38:01 MESZ Assertions PID 124(coreaudiod) Created NoIdleSleepAssertion ""com.apple.audio.'AppleHDAEngineOutput:1B,0,1,2:0'.noidlesleep"" 00:00:07 id:0x100000e82 Aggregate:0x42 2013-08-11 05:40:44 MESZ Assertions PID 124(coreaudiod) Released NoIdleSleepAssertion ""com.apple.audio.'AppleHDAEngineOutput:1B,0,1,2:0'.noidlesleep"" 00:02:50 id:0x100000e82 Aggregate:0x40 2013-08-11 05:42:05 MESZ Assertions PID 124(coreaudiod) Created NoIdleSleepAssertion ""com.apple.audio.'AppleHDAEngineOutput:1B,0,1,2:0'.noidlesleep"" 00:00:07 id:0x100000e8a Aggregate:0x42 2013-08-11 05:47:15 MESZ Assertions PID 124(coreaudiod) Released NoIdleSleepAssertion ""com.apple.audio.'AppleHDAEngineOutput:1B,0,1,2:0'.noidlesleep"" 00:05:17 id:0x100000e8a Aggregate:0x40 2013-08-11 05:57:31 MESZ Assertions PID 124(coreaudiod) Created NoIdleSleepAssertion ""com.apple.audio.'AppleHDAEngineOutput:1B,0,1,2:0'.noidlesleep"" 00:00:07 id:0x100000e9b Aggregate:0x42 2013-08-11 05:58:25 MESZ Assertions PID 124(coreaudiod) Released NoIdleSleepAssertion ""com.apple.audio.'AppleHDAEngineOutput:1B,0,1,2:0'.noidlesleep"" 00:01:01 id:0x100000e9b Aggregate:0x40 2013-08-11 05:58:57 MESZ Assertions PID 124(coreaudiod) Created NoIdleSleepAssertion ""com.apple.audio.'AppleHDAEngineOutput:1B,0,1,2:0'.noidlesleep"" 00:00:07 id:0x100000e9d Aggregate:0x42 2013-08-11 05:59:18 MESZ Assertions PID 124(coreaudiod) Released NoIdleSleepAssertion ""com.apple.audio.'AppleHDAEngineOutput:1B,0,1,2:0'.noidlesleep"" 00:00:28 id:0x100000e9d Aggregate:0x40 2013-08-11 06:00:08 MESZ Assertions PID 124(coreaudiod) Created NoIdleSleepAssertion ""com.apple.audio.'AppleHDAEngineOutput:1B,0,1,2:0'.noidlesleep"" 00:00:07 id:0x100000e9e Aggregate:0x42 2013-08-11 06:05:41 MESZ Assertions PID 124(coreaudiod) Released NoIdleSleepAssertion ""com.apple.audio.'AppleHDAEngineOutput:1B,0,1,2:0'.noidlesleep"" 00:05:40 id:0x100000e9e Aggregate:0x40 Sleep/Wakes since boot:31 Dark Wake Count in this sleep cycle:1 The spooky wake-up-event I was watching was at 2013-08-10 22:50:51 But the logfile shows even more activities while I was sleeping in my bed: 2013-08-11 00:01:35 2013-08-11 02:52:04 2013-08-11 04:07:32 The next wake-up was initiated by me: 2013-08-11 04:07:32 But what are the reasons for those events in the middle of the night? Why did my iMac wake up? UPDATE syslog |grep -i ""Wake reason"" Aug 10 20:00:00 huberts-imac kernel[0] <Debug>: Wake reason: EC.SleepTimer (SleepTimer) Aug 10 22:50:31 huberts-imac kernel[0] <Debug>: Wake reason: EC.SleepTimer (SleepTimer) Aug 11 00:01:34 huberts-imac kernel[0] <Debug>: Wake reason: EC.SleepTimer (SleepTimer) Aug 11 02:51:55 huberts-imac kernel[0] <Debug>: Wake reason: EC.SleepTimer (SleepTimer) Aug 11 04:07:31 huberts-imac kernel[0] <Debug>: Wake reason: EC.SleepTimer (SleepTimer) Aug 11 05:35:46 huberts-imac kernel[0] <Debug>: Wake reason: EHC1 Aug 11 07:15:55 huberts-imac kernel[0] <Debug>: Wake reason: EC.SleepTimer (SleepTimer) Aug 11 09:15:54 huberts-imac kernel[0] <Debug>: Wake reason: EHC1 Aug 11 11:14:09 huberts-imac kernel[0] <Debug>: Wake reason: EC.SleepTimer (SleepTimer) Aug 11 12:40:27 huberts-imac kernel[0] <Debug>: Wake reason: EHC1 Aug 11 13:11:04 huberts-imac kernel[0] <Debug>: Wake reason: EHC1 Aug 11 15:08:25 huberts-imac kernel[0] <Debug>: Wake reason: EC.SleepTimer (SleepTimer) Aug 11 17:23:56 huberts-imac kernel[0] <Debug>: Wake reason: EHC1 EHC1 corresponds with the times when I did wake up the machine. EC.SleepTimer are wake-ups that happened without my interaction. What are EHC1 and EC.SleepTimer? ",Hubert Schölnast,https://apple.stackexchange.com/users/25938,"Check your log messages by typing following in Terminal while looking for the time stamp for when it occurred. syslog |grep -i ""Wake reason"" which will give you a comprehensive report only for wake up reasons. UPDATE: Looking at your log now, it all looks normal. Be aware that the only time your computer can do some housekeeping is during the sleep time. That is intended by design. However, to prevent unwanted wake ups disable the wake for wifi network access. ",Buscar웃,https://apple.stackexchange.com/users/46541,http://apple.stackexchange.com/questions/98606/imac-wakes-up-without-any-noticeable-reason,TECHNOLOGY,apple.stackexchange.com 4981,"How to construct a closed, filled, path made of semi-circles and attach annotations to it with TikZ?","I have very limited LaTeX knowledge. I am trying to plot the following figure using ""tikz"" and I appreciate if anyone can help me to finish plotting my figure. I did the following so far: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (0,0) arc (0:180:6); \draw (-12,0) - -(0,0); \draw (-8,0) arc (0:180:2); \draw (0,0) arc (0:180:4); \draw (-6,-0.1) - - (-6,0.1); \end{tikzpicture} \end{document} There is a BIG semi-circle and two inner SMALL semi-circles. I want to label the right endpoint of the BIG semi-circle by ""A"" and the left endpoint of the BIG semi-circle by ""B"". I want to label the center of the BIG semi-circle by ""O"", and I want to label the point where the two SMALL semicircles meet by ""P"". I also want to shade the area inside the BIG semi-circle and outside the two SMALL semi-circles. I also want to mention on the figure that the radius of the big circle is: 6. and the distance between the point ""O"" and the point ""P"" is ""x"" Any help is much appreciated ",Pat_Ho,https://tex.stackexchange.com/users/60077,"Here is a quick attempt: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[fill=blue] (0,0)node[below]{$A$} arc (0:180:6) node[below]{$B$}; \draw (-12,0) - -(0,0); \draw[fill=white] (-8,0) arc (0:180:2); \draw[fill=white] (0,0) arc (0:180:4)node[below]{$P$}; \draw (-6,-0.1) -- node[below]{$O$} (-6,0.1); \draw[<->](-8,-0.6)--node[below]{$x$}(-6,-0.6); \draw[<->](-6,-0.6)--node[below]{$6$}(0,-0.6); \end{tikzpicture} \end{document} This produces: Note that colouring/filling is cumulative: you can fill one region with a colour and then fill another overlapping region with a different colour, or white to remove the colour. The last colour in any given region wins. ",Andrew,https://tex.stackexchange.com/users/30471,http://tex.stackexchange.com/questions/194381/how-to-construct-a-closed-filled-path-made-of-semi-circles-and-attach-annotati,TECHNOLOGY,tex.stackexchange.com 6878,Is apt-get upgrade a dangerous command?,"When I use apt-get update and apt-get upgrade,there are some packages should installed in newest version,like below: The following packages will be upgraded: accountsservice apparmor apport apt apt-transport-https apt-utils binutils cloud-init cpp-4.8 dpkg fuse g++-4.8 gcc-4.8 gcc-4.8-base gdisk gnupg gpgv grub-common grub-legacy-ec2 grub-pc grub-pc-bin grub2-common initscripts isc-dhcp-client isc-dhcp-common libaccountsservice0 libapparmor-perl libapparmor1 libapt-inst1.5 libapt-pkg4.12 libasan0 libatomic1 libbsd0 libcurl3-gnutls libdrm2 libedit2 libfuse2 libgcc-4.8-dev libgd3 libgomp1 libitm1 libjson-c2 libjson0 libnuma1 libpam-systemd libpolkit-agent-1-0 libpolkit-backend-1-0 libpolkit-gobject-1-0 libquadmath0 libstdc++-4.8-dev libstdc++6 libsystemd-daemon0 libsystemd-login0 libtsan0 libudev1 libxext6 linux-libc-dev ntpdate openssl overlayroot patch policykit-1 ppp python-urllib3 python3-apport python3-problem-report python3-update-manager rsyslog systemd-services sysv-rc sysvinit-utils tcpdump tzdata udev update-manager-core 75 upgraded, 0 newly installed, 0 to remove and 4 not upgraded. If I didn't know every one of there packages what will happen if there update in newest version.I shouldn't execute this command(apt-get upgrade). For example: This php version is before I upgrade yzxu@ubuntu:/tmp/git-2.1.2$ php --version PHP 5.6.6-1+deb.sury.org~precise+1 (cli) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies and after I upgrade: yzxu@ubuntu:/tmp/git-2.1.2$ php --version PHP 5.6.10-1+deb.sury.org~precise+1 (cli) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies The php version is changed.And if I didn't what what was change in two version,should I upgrade it?Is it will influence product? ",大易归真,https://askubuntu.com/users/422775,"When you run apt-get upgradeit updates all installed packages on your system. It is perfectly safe (unless you cut it off before it finishes) as all packages are from the repos (you should only install one's you trust) and are (probably) well tested before uploading. The only small risk is a risk of bugs within the packages there self, but this could happen to any thing on any OS that was upgraded as bugs are common in any software and come and go based on version. Should you upgrade ? Well thats up to you, I would say yes, if you don't like upgrade use the application-updater app, same thing no output to make you worried. Here is some documentation for apt so you can find out more ",Mark Kirby,https://askubuntu.com/users/75060,http://askubuntu.com/questions/639822/is-apt-get-upgrade-a-dangerous-command/639838,TECHNOLOGY,askubuntu.com 6039,Implement scroll bar for content in samsung smart tv apps,"I have a simple Smart TV app (javascript app) that shows a list of items. And I want pagination for list of items. My solution is create scroll bar for apps. But how to implement scroll bar in samsung smart tv apps. Please help me! ",My Mai,https://stackoverflow.com/users/2163514,"Samsung Browser does not support displaying scrollbars, you need to implement it yourself. Also 2010-2011 TV Browser don't support horizontal scrolling. ",Ivan Solntsev,https://stackoverflow.com/users/1004997,http://stackoverflow.com/questions/15516093/implement-scroll-bar-for-content-in-samsung-smart-tv-apps,STACKOVERFLOW,stackoverflow.com 937,Do volcano blast changes earth's course?,"Volcano blasts are one of the most powerful calamities on earth. When they blast they release large amount of mass in the air just like a jet does. Does such a blast have any effect on the course of the Earth? Does it change the Earth's orbit in any way? If not then how big a blast is needed to do it? Would a full eruption of the Yellowstone Supervolcano do it? ",Dimensionless,https://physics.stackexchange.com/users/9023,"The effect would be less than that of the weather, or even large earthquakes. By “earth’s course” you could mean earth’s orbit around the sun, the earth’s rate of rotation about its own axis, and the orientation of the earth’s axis relative to distant stars. Any process that involves the redistribution of mass can affect the motion of the earth – an earthquake, a volcanic eruption, seasonal weather, ocean currents, or driving your car. Although the effect can be calculated, the redistribution of mass by driving your car would much too small to measure using present technology. The most advanced methods of measuring earth orientation were required to detect that the great 2011 Japan Quake shortened the length-of-day and moved the earth’s axis. The effect of a volcanic eruption has not yet been measured. Because a volcanic eruption would redistribute relatively less mass, the calculated effect of the event upon the oblateness and moment of inertia of the earth would be less than an earthquake and much less than seasonal weather. The formation of a shield volcano the size of the Olympus Mons (on Mars) on Earth would change the Earth’s rotation from what it is presently. The distribution of mass associated with the Yellowstone hotspot contributes to the Earth’s present moment of inertia. ",Mark Rovetta,https://physics.stackexchange.com/users/12951,http://physics.stackexchange.com/questions/72451/do-volcano-blast-changes-earths-course,SCIENCE,physics.stackexchange.com 7605,Lead Free Soldering and bad looking joints,"For years I've been soldering with normal Sn60Pb40 solder wire. But now I try to switch to lead free solder. In many forums over the internet I found the Amasan BF32-3 solder wire. It's a Sn95Ag4Cu solder wire with 3.5% flux. So I tried it and was very disappointed. Nearly every solder joint was looking different. Some of them were (partially) shiny; some (the most) of them were dull. And the worst thing was, that even with additional flux, the solder didn't flow like the leaded. So there is no way, I could solder fine pith SMD stuff with it. I’m using a JBC soldering iron station with a C245-907 2.2mm chisel tip and tried different temperatures starting with 290°C to 360°C. The best results I get with about 315°C, with 350°C I got the worst results. I used the Amtech NC-559 Flux – the original, not the fake from china. Some other guys told me, that maybe the solder wire is not the best. That's why I'm looking for other soldering wires. But there are so many on market. Some with copper, some are Sn96.5Ag3.5 like the Amtech ASN96A3.5-0.50. So can someone tell me, with what type of solder wire or what product I can get nice shiny solder joints. And yes, I now that dull joints were not a sign for a bad or even cold joint. ",user39063,https://electronics.stackexchange.com/users/39063,"The simple answer is get good old lead based solder wire and some flux and most chances it will be easy to get shiny looking solder joints. I have worked with many lead free solder wires at work and although they are all different, the end result is always a dull looking solder joint. Having that said - a shiny solder joint is on itself not an indication of a good bond. The shape of the solder in respect with the hole size and other geometrical parameters is (look up NASA soldering standards). The appearance of your solder joints also got to do with the cooling of the joint, how fast it cools etc. This will cause different looks and textures, not indicating anything about the electrical properties of the bond. If you absolutely must have shiny joints try looking into solder pasts. ",user34920,https://electronics.stackexchange.com/users/34920,http://electronics.stackexchange.com/questions/103778/lead-free-soldering-and-bad-looking-joints,SCIENCE,electronics.stackexchange.com 507,How to enable or disable services?,"I read about how to enable and disable services in Ubuntu and it seems that there are different possibilities to manage them. The first method I found is update-rc.d to add new services to startup, which aims on the /etc/init.d folder and its contents. The other one I found is to edit .conf files in the /etc/init folder. What's the recommended way to enable / disable / add services and why? Could you please give a short bulletproof step by step example on how to add a service in Ubuntu and enable and disable it? ",NES,https://askubuntu.com/users/7155,"Currently there are actually 2 different ways for software to be started as a service in Ubuntu. A service is defined here as a program run by the system in the background, as opposed to one started and run directly by the user. The traditional way to start services in Linux was to place a script in /etc/init.d, and then use the update-rc.d command (or in RedHat based distros, chkconfig) to enable/disable it. This command, btw, uses some mildly complicated logic to create symlinks in /etc/rc#.d, that control the order of starting services. If you run ls /etc/rc2.d you can see the order that services will be killed (K##xxxx) and started (S##xxxx). The issue with that was that when booting the system, everything had to be done in serial, one thing after another, making system boot times really slow. Attempts were made to parallelize this, but they were haphazard and hard to take full advantage of. This was the main reason that Upstart was created. Upstart uses job definition files in /etc/init to define on what events a service should be started. So, while the system is booting, upstart processes various events, and then can start multiple services in parallel. This allows them to fully utilize the resources of the system, for instance, by starting a disk-bound service up while another CPU-bound service runs, or while the network is waiting for a dynamic IP address to be assigned. You can see all of the upstart job files by running ls /etc/init/*.conf Let me just stop here and say that if you don't know what a service is, or what it does, DO NOT disable it! Not all services have been converted to upstart. While working on the server team at Canonical for the past few months, I've worked on a number of converted job files, and the nicest part is that it allows one to get rid of all the script ""magic"" and just put in a few commands here and there to define exactly how to start the service, and nothing more. But for now, only a handful of traditional network services, like squid and samba, have been converted. In order to figure out if a service is upstart based, you can run the status command: status servicename If its an upstart job, it will show this: $ status statd statd start/running, process 942 But if its not, you'll see something more like this: $ status apache2 status: Unknown job: apache2 In this case, apache2 has not been converted to upstart. So, to disable apache2 you just run sudo update-rc.d apache2 disable sudo service apache2 stop Upstart job definitions do not have an update-rc.d command. To disable the job, you need to edit the job file directly to disable it. There are two ways to do this. If you want to still be able to manually start it, then you need to comment out the 'start on' condition. Say you want to install samba, but not have it start automatically.. here is its job file (in natty): description ""SMB/CIFS File Server"" author ""Steve Langasek <steve.langasek@ubuntu.com>"" start on local-filesystems stop on runlevel [!2345] respawn pre-start script RUN_MODE=""daemons"" [ -r /etc/default/samba ] && . /etc/default/samba [ ""$RUN_MODE"" = inetd ] && { stop; exit 0; } install -o root -g root -m 755 -d /var/run/samba end script exec smbd -F To disable it, you can just put a # in front of the 'start on local-filesystems'. Note that while it won't start back up on boot, you still need to stop it this time with sudo service smbd stop If, however, you never want it to start, I'd suggest actually removing the package. If, however, you want it installed, but not startable, you can also do: mv /etc/init/smbd.conf /etc/init/smbd.conf.disabled Starting with the version of upstart that will be in 11.04, there is a new keyword that disables the 'start on' and 'stop on' stanzas, it is 'manual'. So another way to disable the service as of 11.04 is to do: command using sudo echo 'manual' | sudo tee /etc/init/mysql.override command from root shell echo manual >> /etc/init/mysql.override And, hopefully real soon, you will be able to create an ""override"" file to disable a service without editing the job definition at all, by just putting the 'manual' keyword in it. ",SpamapS,https://askubuntu.com/users/813,http://askubuntu.com/questions/19320/how-to-enable-or-disable-services,TECHNOLOGY,askubuntu.com 1843,Footnote in booktabs package,"I wish to add a footnote somewhere in a table. I am using booktabs package. I wrote the footnote using \footnote. It is showing symbol 1 inside a small box but it is not showing the footnote anywhere. \documentclass[12pt,a4paper]{article} \usepackage{amsmath,amsthm,amsfonts,latexsym,amscd,amssymb,mathrsfs,hyperref,textcomp,booktabs} We have already discussed about completeness. \begin{table}[ht] \begin{minipage}{\linewidth} \def\arraystretch{1.4}\tabcolsep=2pt\small\centering \begin{tabular}{@{} l l l l l @{}}\toprule Order&Group $G$&Gap Id&Presentation&$\Gamma_d(G)$\footnote{We shall exclude the cases $d=1,|G|$, since $\Gamma_1(G)=K_1=\Gamma_{|G|}(G)$}\\ \midrule 1&$C_1$&1(1)&$\langle a;a^1\rangle$&$\Gamma_1(C_1)=K_1$ \\ 2&$C_2$&2(1)&$\langle a;a^2\rangle$&$\Gamma_1(C_2)=\Gamma_2(C_2)=K_1$ \\ 3&$C_3$&3(1)&$\langle a;a^3\rangle$&$\Gamma_1(C_3)=\Gamma_3(C_3)=K_1$ \\ 4&$C_4$&4(1)&$\langle a;a^4\rangle$&$\Gamma_1(C_4)=\Gamma_2(C_4)=\Gamma_4(C_4)=K_1$\\ &$C_2\times C_2$&2(2)&$\langle a,b;a^2,b^2,aba^{-1}b^{-1}\rangle$&$\Gamma_1(G)=\Gamma_4(G)=K_1,\Gamma_2(G)=K_3$\\ 5&$C_5$&5(1)&$\langle a;a^5\rangle$&$\Gamma_1(C_5)=\Gamma_5(C_5)=K_1$\\ \bottomrule \end{tabular} \end{minipage} \caption{Abelian groups} \end{table} This table shows $\Gamma_d(G)$ for some abelian groups. \end{document} This is showing the line This table shows $\Gamma_d(G)$ for some abelian groups. before the table and table is showing on next page. Also i want the symbol * or \dagger at the place of a and I do not want the line before footnote. ",Shodharthi,https://tex.stackexchange.com/users/36162,"Use a minipage for the tabular. However, your tabuloar is too wide and, of course, you shouldn't use too many lines. Without it it makes it more readable: \documentclass[12pt,a4paper]{article} \usepackage{amsmath,amsthm,amsfonts,latexsym,amscd,amssymb,mathrsfs,hyperref,textcomp,booktabs} \hypersetup{colorlinks} \begin{document} \begin{table}[ht] \centering \begin{minipage}{\linewidth} \begin{tabular}{|p{0.9cm}|p{1.6cm}|p{1.6cm}|p{4cm}|p{4.5cm}|} \hline Order&Group $G$&Gap Id&Presentation&$\Gamma_d(G)$\footnote{We shall exclude the cases $d=1,|G|$, since $\Gamma_1(G)=K_1=\Gamma_{|G|}(G)$}\\ \hline 1&$C_1$&1(1)&$\langle a;a^1\rangle$&$\Gamma_1(C_1)=K_1$ \\ \hline 2&$C_2$&2(1)&$\langle a;a^2\rangle$&$\Gamma_1(C_2)=\Gamma_2(C_2)=K_1$ \\ \hline 3&$C_3$&3(1)&$\langle a;a^3\rangle$&$\Gamma_1(C_3)=\Gamma_3(C_3)=K_1$ \\ \hline 4&$C_4$&4(1)&$\langle a;a^4\rangle$&$\Gamma_1(C_4)=\Gamma_2(C_4)=\Gamma_4(C_4)=K_1$\\ \cline{2-5} &$C_2\times C_2$&2(2)&$\langle a,b;a^2,b^2,aba^{-1}b^{-1}\rangle$&$\Gamma_1(G)=\Gamma_4(G)=K_1,\Gamma_2(G)=K_3$\\ \hline 5.&$C_5$&5(1)&$\langle a;a^5\rangle$&$\Gamma_1(C_5)=\Gamma_5(C_5)=K_1$\\ \hline \end{tabular} \end{minipage} \caption{Abelian groups} \end{table} \begin{table}[ht] \begin{minipage}{\linewidth} \def\arraystretch{1.4}\tabcolsep=2pt\small\centering \begin{tabular}{@{} l l l l l @{}}\toprule Order&Group $G$&Gap Id&Presentation&$\Gamma_d(G)$\footnote{We shall exclude the cases $d=1,|G|$, since $\Gamma_1(G)=K_1=\Gamma_{|G|}(G)$}\\ \midrule 1&$C_1$&1(1)&$\langle a;a^1\rangle$&$\Gamma_1(C_1)=K_1$ \\ 2&$C_2$&2(1)&$\langle a;a^2\rangle$&$\Gamma_1(C_2)=\Gamma_2(C_2)=K_1$ \\ 3&$C_3$&3(1)&$\langle a;a^3\rangle$&$\Gamma_1(C_3)=\Gamma_3(C_3)=K_1$ \\ 4&$C_4$&4(1)&$\langle a;a^4\rangle$&$\Gamma_1(C_4)=\Gamma_2(C_4)=\Gamma_4(C_4)=K_1$\\ &$C_2\times C_2$&2(2)&$\langle a,b;a^2,b^2,aba^{-1}b^{-1}\rangle$&$\Gamma_1(G)=\Gamma_4(G)=K_1,\Gamma_2(G)=K_3$\\ 5.&$C_5$&5(1)&$\langle a;a^5\rangle$&$\Gamma_1(C_5)=\Gamma_5(C_5)=K_1$\\ \bottomrule \end{tabular} \end{minipage} \caption{Abelian groups} \end{table} \end{document} ",Herbert,https://tex.stackexchange.com/users/2478,http://tex.stackexchange.com/questions/172958/footnote-in-booktabs-package,TECHNOLOGY,tex.stackexchange.com 2141,"How should a Christian respond to ""Does this dress me look fat?""?","If your wife asks, ""Does this dress make me look fat?"" And you think it does, but you tell her, ""Of course not, honey!"" Is that a sin? ",Jim G.,https://christianity.stackexchange.com/users/1100,"Just as a small counter-argument to the obvious answer, remember that Jesus said the entire law was summed up as this: 30 Love the Lord your God with all your heart and with all your soul and with all your mind and with all your strength.’ 31 The second is this: ‘Love your neighbor as yourself.’ There is no commandment greater than these.” The question, of course, is whether being a true witness would cause injury. Oddly enough, if your wife is just looking to see that you love her, I would argue it is loving to ""lie"". A better tack, however, might be to answer a different question - to say that indeed, to you, she looks beautiful. And really, her words may be ""Am I fat?"" but she's really wanting to know, ""Am I beautiful?"" Answer that question instead, and you'll be safe. If she were asking a medical question, a loving answer might be, ""Dear, the doctor does want to you lose weight, and because I love you and want you to be with me for a long time, yes I think you need to do what the doctor says."" If she insists on asking the question out of vanity, however, then may I suggest the best answer is found in Job 40:14: Behold, I am of small account; what shall I answer you? I lay my hand on my mouth ",Affable Geek,https://christianity.stackexchange.com/users/1039,http://christianity.stackexchange.com/questions/6469/how-should-a-christian-respond-to-does-this-dress-me-look-fat,CULTURE,christianity.stackexchange.com 236,Why did Voldemort assume that no-one knew about Room of Hidden Things?,"Voldemort hid one of his Horcruxes inside Hogwarts. It seemed to be relying on security through obscurity as far as protecting it. But as we know, it ended up not being so secure because it wasn't so obscure - Harry Potter knew about the Room of Hidden Things. My question is, the way Rowling describes this hints at the fact that Riddle had an assumption that very few people would ever stumble upon that room. *WHY??? First, let's show Harry's theory on what Voldemort was thinking, how and why: Here's Harry understanding Voldemort's thinking in HP7 once he figured out where the Diadem was (bold emphasis mine): Tom Riddle, who confided in no one and operated alone, might have been arrogant enough to assume that he, and only he, had penetrated the deepest mysteries of Hogwarts Castle. Of course, Dumbledore and Flitwick, those model pupils, had never set foot in that particular place, but he, Harry, had strayed off the beaten track in his time at school – here at least was a secret area he and Voldemort knew, that Dumbledore had never discovered – ...and later on, with Harry explains the location to Ron/Hermione: “He hid it exactly where I had my old Potions book, where everyone’s been hiding stuff for centuries. He thought he was the only one to find it. Come on.” “And he never realized anyone could get in?” said Ron, his voice echoing in the silence. “He thought he was the only one,” said Harry. . Yet, from available evidence, that seems to be a completely wrong assumption, even at Voldemort's time. Let's examine that last quote again, with emphasis on other info available: “He hid it exactly where I had my old Potions book, where everyone’s been hiding stuff for centuries.” ... ... “And he never realized anyone could get in?” said Ron, his voice echoing in the silence. “He thought he was the only one,” said Harry. “Too bad for him I’ve had to hide stuff in my time... this way,” he added. “I think it’s down here... “ They sped off up adjacent aisles; Harry could hear the others’ footsteps echoing through the towering piles of junk, of bottles, hats, crates, chairs, books, weapons, broomsticks, bats... . OK, so if there's a truckload (or train-load, by the description) of stuff in that room, isn't the only reasonable conclusion: ""the room is a fairly popular destination with plenty of people who've found their way there in the past, and therefore, likely, plenty who will in the future""? Doesn't matter what your arrogance level is, the evidence seems to point to only one conclusion - it's quite fine as a place to temporarily bury your dirt so teachers won't tag you for your misdeeds, but this is NOT the place to hide something that you want permanently safe! So why did Voldemort make such a moronic mistake? ",DVK-on-Ahch-To,https://scifi.stackexchange.com/users/976,"Voldemort knew other people knew about the room, he must have, considering it is written in the book the history of Hogwarts, which Hermione points out. He knew this, and so used the room to hide the horcrux. Like someone said earlier, how many people are going to accidentally find the room of requirement, accidentally find the diadem and accidentally destroy it? Not many, I'm guessing. Also, as Cho points out, the diadem has been lost for centuries, and no living person has seen it (which isn't technically correct, as Voldemort had seen it, but anyway...). This means that even if someone saw it, they wouldn't think it was the lost diadem. The 'truck load' of stuff in the room may not have necessarily been hidden by students. Someone needs a place to hide their stuff, you are hardly going to be shown a plain room, with nothing to hide the object in. All the other items have probably been created by the room to help the student hide the item. ",Katy,https://scifi.stackexchange.com/users/4218,http://scifi.stackexchange.com/questions/8734/why-did-voldemort-assume-that-no-one-knew-about-room-of-hidden-things,LIFE_ARTS,scifi.stackexchange.com 9428,Finding columns that do not match existing primary key,"I'm trying to add a Foreign Key to a table, but database, Sql Server 2005, does not like it. It says that columns do not match an existing primary key or unique constraint. How can I find the columns in question so I can delete/change them and add the foreign key? ",Chin,https://stackoverflow.com/users/135687,"SELECT ForeignKey FROM FK_TABLE f LEFT JOIN PK_TABLE p ON f.ForeignKey = p.PrimaryKey WHERE p.PrimaryKey = NULL That should do it. ForeignKey = the column you want to make into a foreign key PK_TABLE = the table you want the foreign key to reference PrimaryKey = the column ForeignKey will be a foreign key to. ",Sean,https://stackoverflow.com/users/112713,http://stackoverflow.com/questions/1178377/finding-columns-that-do-not-match-existing-primary-key,STACKOVERFLOW,stackoverflow.com 5852,Copy file from web to Google Drive,"There is a document on the web that I want to store in my Google Drive. The only way I know to do this is saving the document on my computer and then upload it again to my Google Drive. Is there a more straightforward way to do this? ",José,https://webapps.stackexchange.com/users/6651,"Try this IFTTT receipt. Upload file from URL This Action will download a file at a given URL and add it to Google Drive at the path you specify. ",Alex,https://webapps.stackexchange.com/users/1512,http://webapps.stackexchange.com/questions/70126/copy-file-from-web-to-google-drive,TECHNOLOGY,webapps.stackexchange.com 467,Need directions regarding the learning process I should follow for learning Photoshop,"I am starting out as a freelance website developer so I need to improve my graphics drawing skill. Up till now I'm using an open source tool GIMP to create the concepts and mock ups of the websites I design.I know that Photoshop is the Industry standard(at least as far as I know). So,what books can help me in learning some advanced Photoshop techniques used frequently in web designing.Also I want to learn how to draw cartoon characters like this.I know it is a matter of creativity but still there must be some techniques which I can learn.Please express your views. Just for the record, I'm basically a web developer so my graphics drawing capabilities are very limited(but I want to improve that). You can have a look at this site I designed using GIMP. ",Rajat Saxena,https://graphicdesign.stackexchange.com/users/7481,"Personally, I find that Illustrator (with pixel preview and align to pixel grid) has been much more useful than Photoshop in a web workflow. Artboards are intuitively helpful when designing for multiple output devices, the Pathfinder panel allows you to create more nuanced objects, and the Symbols palette allows you to develop more modularity in your approach to asset creation. Modularity = rapid development = the way to go in the current industry environment. Plus, the way Illustrator handles layers and stacking order is more simple than Photoshop's Layers panel. I apologize for slightly derailing the question, but I feel that Illustrator is a tool much better suited for web work than Photoshop—it's more maintainable and intuitive, once you've gotten past the initial unfamiliarity that comes from working with vector files instead of raster files. I think the links I've provided will serve as a pretty good primer for getting yourself situated with using Illustrator as an alternative to Photoshop for web development. ",Brendon Roberto,https://graphicdesign.stackexchange.com/users/7455,http://graphicdesign.stackexchange.com/questions/11487/need-directions-regarding-the-learning-process-i-should-follow-for-learning-phot,LIFE_ARTS,graphicdesign.stackexchange.com 706,Extending Magento API with customer login,"I followed a lot of tutorials about how to extend Magento API but I didn't figure it out why I always get ""Invalid api path."" My goal is to extend Mage_Customer_Model_Customer_Api in order to add a new method to login a customer in site. I don't know if something like that is possible, but I need at least to be able to add a new method which just returns a message. Can someone provide me a link where I can find a working module which extends Magento API? Is it possible what I want to achieve? Thank you, Yeee..I figured out ""Invalid api path."" error. Instead of calling $result = $client->call($session_id, 'gw_base_order.createandcapture'); it has to be $result = $client->call($session_id, 'resource_name.createandcapture'); Wrong tuturial: Extending Magento API and others like this. I still need an answer for the second question. ",Denisa,https://magento.stackexchange.com/users/4749,"The functionality of logging users in to access their data from a mobile app for example is more a case for OAuth. You can read more about OAuth in Magento here and about the configuration here. The API's are more meant to exchange information not tied to a specific user. ",Sander Mangel,https://magento.stackexchange.com/users/50,http://magento.stackexchange.com/questions/13261/extending-magento-api-with-customer-login,TECHNOLOGY,magento.stackexchange.com 6958,Why are papers without code but with results accepted?,"I just started reading some papers (Computer Science, specifically Computer Vision) and thought ""now let's look at the source code"" and was quite astonished that most of the papers don't have any source code implementing the described methods to look at, while claiming some performance or being better than other papers. How do these papers get accepted in journals / conferences? Do people have to submit their source code privately to the reviewers at least, so that they can reproduce the experiment if possible. Do most journals / conferences just ""trust"" that people who submit the paper really implemented the theory and got those exact results? I always had this idea that any experiment should be reproducible by others else it's not scientific justified. Been wondering about this the last few days. ",Sam Stoelinga,https://academia.stackexchange.com/users/17302,"I would think that most readers/reviewers would find a sufficiently detailed algorithm enough. You write your paper showing, oh, C++ code, and I use SPSS in my shop -- your code is useless to me. Not that most readers would enjoy reimplementing the code (especially for non-CS papers), but with a specific code that runs on a specific platform, there's bound to be a lot of clutter to wade through. An algorithm reduces it to its bare essentials. If my paper is showing the improvement in speed of my new Quicksort method over the standard Bubble Sort, showing algorithms for the two methods would make it easier to support my claims for O (n log n) vs O (n^2) speedup. If my paper is on population age distributions in wealthy vs developing economies, unless there's a really neat trick I used to process the data, most readers probably wouldn't even care about the algorithm, except in very broad brushstrokes. It's going to depend on the subject area (general, say, Computer Science) and the specific subarea (say, sorting methods), as well as how heavy an impact the algorithm used has on the results, as to whether the algorithm is necessary. If I'm showing compiler differences in Fortran code, then it would be good to include actual code. Otherwise, code itself is rarely of interest. ",Phil Perry,https://academia.stackexchange.com/users/13080,http://academia.stackexchange.com/questions/23237/why-are-papers-without-code-but-with-results-accepted,LIFE_ARTS,academia.stackexchange.com 4317,How to modify source port in mount application linux,"I need to modify mount app, so that I can specify the source port to be one specific one not the randomly generated by the OS. For example lets say we are trying to mount a filesystem in a computer with ip 10.0.0.55 and our computer where we going to be executing the mount is 10.0.0.40 so when you do the command the destination port (ie the port 10.0.0.55 is listening ) is fine but when you do the command the source port is randomly generated by the os and that is the port 10.0.0.55 uses to reply back to the other pc that pc is behind a router so there have to be an specific port Any ideas I have tried modifying where the function bindresvport() is called and binding that socket to an specific port but it doesnt seem to work ",user2948982,https://stackoverflow.com/users/2948982,"I already solve this, the answer was to create a new struct sockaddr, open a socket for that struct bind it to the port you want and then call connect to the struct that the mount client is using and with you socket. That way you force the kernel not to choose the src port for you. Note that you will have to do the same when you are going to ask the server (Where the filesystem you are trying to mount is) for the file handles. Also in the end of the mount client calls the mount function from the kernel and it puts a random port again for the src port, so this approach is good if you want to modify the kernel as well. Maybe I did not explain myself well, when I made the question but what I was trying to accomplish was to mount a filesystem in Computer A from Computer B. Computer A is behind a router Computer B is on the router's outside network or like the isp network For Example Computer A will have lets said 192.168.1.99 Router (Gateway) 192.168.1.1 Router Wan Ip 10.0.0.26 Computer B 10.0.0.55 so in order for computer B to talk to computer A there have to be a port opened in Router to allow the traffic to go through. And when you issue a mount the src port is generated randomly in the range 512-1023 and happens to be the same port that computer B sends info to. I solve this by open it up that range on the router, It was not an option for me to modify the kernel. I hope this helps @mikea ",user2948982,https://stackoverflow.com/users/2948982,http://stackoverflow.com/questions/24164925/how-to-modify-source-port-in-mount-application-linux,STACKOVERFLOW,stackoverflow.com 3227,SQL Server. Join/Pivot/Performance help please,"I've created this view that is painfully slow to query and creating performance issues. I think I need to utilize PIVOT but I can't really wrap my head around it... Here's what I've got currently. select p.instrumentsettingsid, sum(case when p1.id is null then 0 else 1 end) as 'Cash', sum(case when p2.id is null then 0 else 1 end) as HighInterest, sum(case when p3.id is null then 0 else 1 end) as 'ML Loan', sum(case when p4.id is null then 0 else 1 end) as 'Investment Note', sum(case when p5.id is null then 0 else 1 end) as 'Trading', sum(case when p6.id is null then 0 else 1 end) as 'DD Trading', sum(case when p7.id is null then 0 else 1 end) as 'ML Trading', sum(case when p8.id is null then 0 else 1 end) as 'NMLTrading', sum(case when p9.id is null then 0 else 1 end) as 'Individual Custody', sum(case when p10.id is null then 0 else 1 end) as 'ML Individual Custody', sum(case when p11.id is null then 0 else 1 end) as 'Custody', sum(case when p12.id is null then 0 else 1 end) as 'ML Custody Trading', sum(case when p13.id is null then 0 else 1 end) as 'Portfolio', sum(case when p14.id is null then 0 else 1 end) as 'ML Personal Portfolio', sum(case when p15.id is null then 0 else 1 end) as Other, i.status from (select distinct instrumentsettingsid from res_db..instrumentproducttypepermissions) p inner join res_db..instrumentsettings i on p.instrumentsettingsid = i.id left join res_db..instrumentproducttypepermissions p1 on p.instrumentsettingsid = p1.instrumentsettingsid and p1.enabled = 1 and p1.producttypeid = 1 left join res_db..instrumentproducttypepermissions p2 on p.instrumentsettingsid = p2.instrumentsettingsid and p2.enabled = 1 and p2.producttypeid = 2 left join res_db..instrumentproducttypepermissions p3 on p.instrumentsettingsid = p3.instrumentsettingsid and p3.enabled = 1 and p3.producttypeid = 3 left join res_db..instrumentproducttypepermissions p4 on p.instrumentsettingsid = p4.instrumentsettingsid and p4.enabled = 1 and p4.producttypeid = 4 left join res_db..instrumentproducttypepermissions p5 on p.instrumentsettingsid = p5.instrumentsettingsid and p5.enabled = 1 and p5.producttypeid = 5 left join res_db..instrumentproducttypepermissions p6 on p.instrumentsettingsid = p6.instrumentsettingsid and p6.enabled = 1 and p6.producttypeid = 6 left join res_db..instrumentproducttypepermissions p7 on p.instrumentsettingsid = p7.instrumentsettingsid and p7.enabled = 1 and p7.producttypeid = 7 left join res_db..instrumentproducttypepermissions p8 on p.instrumentsettingsid = p8.instrumentsettingsid and p8.enabled = 1 and p8.producttypeid = 8 left join res_db..instrumentproducttypepermissions p9 on p.instrumentsettingsid = p9.instrumentsettingsid and p9.enabled = 1 and p9.producttypeid = 9 left join res_db..instrumentproducttypepermissions p10 on p.instrumentsettingsid = p10.instrumentsettingsid and p10.enabled = 1 and p10.producttypeid = 10 left join res_db..instrumentproducttypepermissions p11 on p.instrumentsettingsid = p11.instrumentsettingsid and p11.enabled = 1 and p11.producttypeid = 11 left join res_db..instrumentproducttypepermissions p12 on p.instrumentsettingsid = p12.instrumentsettingsid and p12.enabled = 1 and p12.producttypeid = 12 left join res_db..instrumentproducttypepermissions p13 on p.instrumentsettingsid = p13.instrumentsettingsid and p13.enabled = 1 and p13.producttypeid = 13 left join res_db..instrumentproducttypepermissions p14 on p.instrumentsettingsid = p14.instrumentsettingsid and p14.enabled = 1 and p14.producttypeid = 14 left join res_db..instrumentproducttypepermissions p15 on p.instrumentsettingsid = p15.instrumentsettingsid and p15.enabled = 1 and p15.producttypeid = 15 group by p.instrumentsettingsid, i.status Can someone who knows about SQL please tell me (show me?) how I can make this faster/less hideous please. Also those 15 account names are hardcoded, in a perfect world it would get the product name from the table producttypes Sorry to ask such an annoying question. Thank you! ",Michael Doyle,https://stackoverflow.com/users/439360,"Use: SELECT p.instrumentsettingsid, i.status, SUM(CASE WHEN p.producttypeid = 1 THEN 1 ELSE 0 END) as 'Cash', SUM(CASE WHEN p.producttypeid = 2 THEN 1 ELSE 0 END) as HighInterest, SUM(CASE WHEN p.producttypeid = 3 THEN 1 ELSE 0 END) as 'ML Loan', SUM(CASE WHEN p.producttypeid = 4 THEN 1 ELSE 0 END) as 'Investment Note', SUM(CASE WHEN p.producttypeid = 5 THEN 1 ELSE 0 END) as 'Trading', SUM(CASE WHEN p.producttypeid = 6 THEN 1 ELSE 0 END) as 'DD Trading', SUM(CASE WHEN p.producttypeid = 7 THEN 1 ELSE 0 END) as 'ML Trading', SUM(CASE WHEN p.producttypeid = 8 THEN 1 ELSE 0 END) as 'NMLTrading', SUM(CASE WHEN p.producttypeid = 9 THEN 1 ELSE 0 END) as 'Individual Custody', SUM(CASE WHEN p.producttypeid = 10 THEN 1 ELSE 0 END) as 'ML Individual Custody', SUM(CASE WHEN p.producttypeid = 11 THEN 1 ELSE 0 END) as 'Custody', SUM(CASE WHEN p.producttypeid = 12 THEN 1 ELSE 0 END) as 'ML Custody Trading', SUM(CASE WHEN p.producttypeid = 13 THEN 1 ELSE 0 END) as 'Portfolio', SUM(CASE WHEN p.producttypeid = 14 THEN 1 ELSE 0 END) as 'ML Personal Portfolio', SUM(CASE WHEN p.producttypeid = 15 THEN 1 ELSE 0 END) as Other, FROM res_db..instrumentproducttypepermissions p JOIN res_db..instrumentsettings i ON i.id = p.instrumentsettingsid WHERE p.enabled = 1 AND p.producttypeid BETWEEN 1 AND 15 GROUP BY p.instrumentsettingsid, i.status No need for the LEFT JOIN... Also those 15 account names are hardcoded, in a perfect world it would get the product name from the table producttypes Dynamic columns requires dynamic SQL. ",OMG Ponies,https://stackoverflow.com/users/135152,http://stackoverflow.com/questions/4211789/sql-server-join-pivot-performance-help-please,STACKOVERFLOW,stackoverflow.com 1206,"Are there English equivalents to the Japanese saying, “There’s a god who puts you down as well as a god who picks you up”?","There is an old Japanese saying, “捨てる神あれば、拾う神あり-Suterukami areba hirou kami ari,” meaning “There’s a god who puts you down as well as a god who picks up you.” In other words, “In this world, some people help you, and some people harm you” or “Fortune and misfortune come alternately.” For example, when you are fired from an IT company, and then hired by its rival company with a higher salary three months later, your peers will say to you “You're a lucky man. There’s a god who throws you away as well as a god who picks you up.” I’m curious to know if there are similar sayings in English to “Suterukami areba hirou kami ari.” ",Yoichi Oishi,https://english.stackexchange.com/users/3119,"Sometimes You Eat The Bear, Sometimes The Bear Eats You (The quote from one great movie to lighten down this solemn thread.) ",oakad,https://english.stackexchange.com/users/55040,http://english.stackexchange.com/questions/169134/are-there-english-equivalents-to-the-japanese-saying-there-s-a-god-who-puts-yo,CULTURE,english.stackexchange.com 6987,C compiler supported by Windows 7,"I'm having a problem finding which compiler can support Windows7 for C or C++ programming. I had installed Turbo but it does not work in full screen on Windows 7. Please let me know which compiler will be appropriate. ",shruti bansal,https://superuser.com/users/52642,"lcc-win32 is a free compiler for Windows. ",vtest,https://superuser.com/users/38596,http://superuser.com/questions/200435,TECHNOLOGY,superuser.com 3840,perl how to print out a hash with multiple keys?,"i'm setting my hash in my function as $hash{$loginId}{$month}=$hash{$loginId}{$month}+$time1; and I can print the value in one spot as print ""$hash{maclawty796}{Sep}\n""; #just some name and date in the text file i imported But I want to print out all the values. When i use print ""@{[%hash]}\n""; I get a bunch of weird results and what looks like memory addresses. How can i print out the loginId's Months and times? Here's the full code if you need it # # adapted from regex9.pl # $file ='timelog.txt'; open(INFO, $file) or die(""Could not open file.""); use strict; my ($loginId, $month, $time1, $time2, $pts, $line, $time1T, $time2T); my %hash=(); while (<INFO>) { $line=$_; #assignment of Login ID's if( ($loginId) = /([a-y]*(\d|\w)*)/ ){ printf(""%-15s"", $loginId); } if( ($month) = /((Jan)|(Fed)|(Mar)|(Apr)|(May)|(Jun)|(Jul)|(Aug)|(Sep)|(Oct)|(Nov)|(Dec))/ ){ printf(""%-5s"", $month); } if(($time1, $time1T, $time2,$time2T)= /(\d\d):(\d\d)\s-\s(\d\d):(\d\d)/ ){ #print($time1, "" "", $time1T, "" "", $time2,"" "", $time2T,""\n""); #for testing $time1=($time2*60+$time2T)-($time1*60+$time1T); printf (""%-5s minutes\n"" ,$time1); } $hash{$loginId}{$month}=$hash{$loginId}{$month}+$time1; print ""hash $hash{$loginId}{$month}\n""; } print ""@{[%hash]}\n""; print ""$hash{maclawty796}{Sep}\n""; ",Michael Kimin Choo,https://stackoverflow.com/users/2116655,"The values in %hash are references to other hashes. If you want to print the keys and values of those hashes, you'll have to instruct Perl to do so. for my $loginId (keys(%hash)) { for my $month (keys(%{ $hash{$loginID} })) { print(""$loginID $month $hash{$loginID}{$month}\n""); } } ",ikegami,https://stackoverflow.com/users/589924,http://stackoverflow.com/questions/22333699/perl-how-to-print-out-a-hash-with-multiple-keys,STACKOVERFLOW,stackoverflow.com 3760,Command key in MacVim,"How do I use the command key in MacVim? For example I would like to be able to press Cmdt to open CtrlP or Cmdn to open NerdTree. ",Andy,https://stackoverflow.com/users/1560514,"See :help <D-. Use <D-t> to map to ⌘-T; however, ⌘-T is already mapped to ""New Tab"" within MacVim's menu. You'll have to remove that to be able to use it in a Vim map. Some keys are OS-bound and you just can't access them, but ⌘-T can be made available and is actually the example they use in the help file (see :help Actions.plist and scroll up a few lines to 4.). You'll need to unset the ""New Tab"" binding with :macmenu File.New\ Tab key=<nop> and then map ⌘-T with nnoremap <D-t> whatever. ",Conner,https://stackoverflow.com/users/899344,http://stackoverflow.com/questions/11979313/command-key-in-macvim,STACKOVERFLOW,stackoverflow.com 5929,The Kindle app on my iPhone 4s isn't downloading books,"I've been using the Kindle reader app on my iPhone and it was working as advertised for a while. However, yesterday for no apparent reason it has stopped being able to download books. I bought a book, went to my list of books in the Kindle app, and tapped the ""download"" control. The message reads ""Downloading 0.0%"" and just stays there. I tried downloading another recent purchase. Same deal. I tried restarting the Kindle app, and then the iPhone, but that didn't help. I tried going onto the Amazon and ""sending"" the books to my iPhone with no result. I made sure the iPhone is connected to my home wi-fi network. Has anyone else seen this problem? Know of a solution? ",Agvorth,https://apple.stackexchange.com/users/6548,"You say it suddenly started working again? My best guess is that it was caused by GoDaddy's DNS servers going down. This has caused generally odd behavior across the internet as many sites and URLs were 'forgotten' temporarily. Many sites became unreachable. There's a chance the Kindle downloading mechanism relied on an address that was affected. ",Kalamane,https://apple.stackexchange.com/users/7340,http://apple.stackexchange.com/questions/63571/the-kindle-app-on-my-iphone-4s-isnt-downloading-books,TECHNOLOGY,apple.stackexchange.com 9318,What is meant when it is said that the universe is homogeneous and isotropic?,"It is sometimes said that the universe is homogeneous and isotropic. What is meant by each of these descriptions? Are they mutually exclusive, or does one require the other? And what implications rise because of this? ",voithos,https://physics.stackexchange.com/users/3395,"A homogeneous cosmology is one in which there are no ""special"" places in the universe: at a given instant in time, the universe appears the same at every location (on large enough spatial scales). An isotropic cosmology is one in which there are no ""special"" directions: at a given instant in time, the universe appears the same in every direction (again, on sufficiently large spatial scales). Together, they form the Cosmological principle. As pointed out by Brian Hooper, these symmetries (when applied to physical laws) give rise to the conservations of linear and angular momentum as a result of Noether's theorem. In addition, the cosmological principal is important for the physical interpretation of observational data, and not only because it is a generally unspoken assumption when using physical laws tested on Earth to model distant objects (galaxies, quasars, etc.) For example, it supports the interpretation of the Hubble diagram as the result of the expansion of the universe as opposed to evidence that the Earth (or someplace ""nearby"") was at the center of a very big conventional explosion. After all, in a conventional explosion, the fragments that travel the farthest are those that had the highest velocity, so some time after the explosion, faster moving fragments are further away from the center. If, however, observers on all fragments see the same density of galaxies and relationship between velocity and distance in all directions, then this model doesn't work. ",EHN,https://physics.stackexchange.com/users/1225,http://physics.stackexchange.com/questions/24881/what-is-meant-when-it-is-said-that-the-universe-is-homogeneous-and-isotropic,SCIENCE,physics.stackexchange.com 7395,Retirement Funds: Betterment vs Vanguard Life strategy vs Target Retirement,"I'm a 20 something grad student and would like to open a hands off retirement account with beta exposure to the market and would make monthly contributions. I'm fairly illiterate when it comes to investing, and the betterment account seems so user friendly. However, I realize it is a more expensive fund. Being that I can do math, I realize these fees add up over time. However, I like that betterment re-balances it self and I really like that it allows one to easily change the allocation of stocks and bonds. I know I said I wanted a hands off account, but what if the stock market crashes and I want to allocate more to bonds??? Does Vanguard re-balance and allow you to reallocate? So far, I'm am leaning towards Vanguard? Does Betterment have advantages? Which Vanguard fund is more appropriate for a hands off investment account for retirement? Both Vanguard accounts (Life strategy vs Target retirement) seem to have very similar fees and returns over the last 5 years. Thank you in advance. ",SoilSciGuy,https://money.stackexchange.com/users/9974,"Katherine from Betterment here. I wanted to address your inquiry and another comment regarding our services. I agree with JAGAnalyst - it's detrimental to your returns and potential for growth if you try to time the market. That's why Betterment offers customized asset allocation for each portfolio based on the nature of your goal, time horizon, and how much you are able to put towards your investments. We do this so regardless of what's happening in the markets, you can feel comfortable that your asset allocation plus other determining factors will get you where you need to go, without having to time your investing. We also put out quite a bit of content regarding market timing and why we think it's an unwise practice. We believe continuously depositing to your goal, especially through auto-deposits, compounding returns, tax-efficient auto-rebalancing, and reinvesting dividends are the best ways to grow your assets. Let me know if you would like additional information regarding Betterment accounts and our best practices. I am available at buck@betterment.com and am always happy to speak about Betterment's services. Katherine Buck, Betterment Community Manager ",Katherine Buck,https://money.stackexchange.com/users/10103,http://money.stackexchange.com/questions/22205/retirement-funds-betterment-vs-vanguard-life-strategy-vs-target-retirement,LIFE_ARTS,money.stackexchange.com 7231,Bootstrap datepicker default date,"I'm using Bootstrap datepicker and I'd like to make that when datepicker shows, default date would be set after 14 days from today. I've got this code but it doesn't work, default date is still set to today. Could anyone explain what am I missing? Thanks in advance. JS: var plus14days = new Date(); plus14days.setDate(plus14days.getDate() + 14 ); $("".datepicker"").datepicker(""setValue"", plus14days); ",Jess,https://stackoverflow.com/users/2699017,"Just a consideration, api changed setValue to setDate (http://bootstrap-datepicker.readthedocs.org/en/release/methods.html#setdate) ",Luca Trazzi,https://stackoverflow.com/users/127041,http://stackoverflow.com/questions/18329789/bootstrap-datepicker-default-date,STACKOVERFLOW,stackoverflow.com 5823,Not Proper Table Alignment in Bootstrap,"I'm trying to develop an application with help of Bootstrap in order to respect Desktop, Tablet and Mobile. Currently I'm facing an issue with the table responsiveness Below I have provided the screenshot and the code, kindly let me know where i do a mistake. You can see from the second screenshot, where the second getting aligned to responsiveness but the other not. Screenshot 1 :: Perfect alignment on tablet Screenshot 2 :: Not perfect on mobile CODE :: <!DOCTYPE html> <html lang=""en""> <head> <meta charset=""utf-8""> <meta http-equiv=""X-UA-Compatible"" content=""IE=edge""> <meta name=""viewport"" content=""width=device-width, initial-scale=1""> <meta name=""description"" content=""""> <meta name=""author"" content=""""> <link rel=""icon"" href=""../../favicon.ico""> <title>Fixed Top Navbar Example for Bootstrap</title> <!-- Bootstrap core CSS --> <link href=""js/libs/bootstrap/css/bootstrap.min.css"" rel=""stylesheet""> <!-- Custom styles for this template --> <link href=""js/libs/bootstrap/customcss/navbar-fixed-top.css"" rel=""stylesheet""> </head> <body> <!-- Fixed navbar --> <div class=""navbar navbar-default navbar-fixed-top"" role=""navigation""> <div class=""container""> <div class=""navbar-header""> <button type=""button"" class=""navbar-toggle"" data-toggle=""collapse"" data-target="".navbar-collapse""> <span class=""sr-only"">Toggle navigation</span> <span class=""icon-bar""></span> <span class=""icon-bar""></span> <span class=""icon-bar""></span> </button> <a class=""navbar-brand"" href=""#"">Project Title</a> </div> <div class=""navbar-collapse collapse""> <ul class=""nav navbar-nav""> <li class=""active""><a href=""#"">Home</a></li> <li class=""dropdown""> <a href=""#"" class=""dropdown-toggle"" data-toggle=""dropdown"">Mission <span class=""caret""></span></a> <ul class=""dropdown-menu"" role=""menu""> <li class=""divider""></li> <li class=""dropdown-header"">Nav header</li> <li><a href=""#"">Separated link</a></li> <li><a href=""#"">One more separated link</a></li> </ul> </li> <li class=""dropdown""> <a href=""#"" class=""dropdown-toggle"" data-toggle=""dropdown"">Request <span class=""caret""></span></a> <ul class=""dropdown-menu"" role=""menu""> <li class=""divider""></li> <li class=""dropdown-header"">Nav header</li> <li><a href=""#"">Separated link</a></li> <li><a href=""#"">One more separated link</a></li> </ul> </li> </ul> <ul class=""nav navbar-nav navbar-right""> <li><a href=""../navbar/"">Default</a></li> <li><a href=""../navbar-static-top/"">Static top</a></li> <!--li class=""active""><a href=""./"">Fixed top</a></li --> </ul> </div><!--/.nav-collapse --> </div> </div> <div class=""container""> <!-- Main component for a primary marketing message or call to action --> <div class=""jumbotron""> <h1>Project Title</h1> <p></p> <p></p> <p> <a class=""btn btn-lg btn-primary"" href=""../../components/#navbar"" role=""button"">View navbar docs &raquo;</a> </p> </div> <div class=""row""> <div class=""col-md-12""> <div class=""panel panel-warning""> <div class=""panel-heading""> <h3 class=""panel-title"">Panel title</h3> </div> <div class=""panel-body""> <div class=""col-md-12""> <table class=""table table-bordered table-condensed files"" border=""1""> <thead> <tr> <th>Emp Id</th> <th>Emp Name</th> <th>Start Date</th> <th>End Date</th> <th>Days</th> <th>Status</th> <th>Status</th> </tr> </thead> <tbody> <tr> <td>123456</td> <td>Employee First & Last Name</td> <td>04/DEC/14</td> <td>30/JAN/15</td> <td>35</td> <td> <button type=""button"" class=""btn btn-success""> <i class=""glyphicon glyphicon-ok-sign""></i> <span>Validated</span> </button> </td> <td> <button type=""button"" class=""btn btn-warning""> <i class=""glyphicon glyphicon-question-sign""></i> <span>Pending</span> </button> </td> </tr> </tbody> </table> </div> </div> </div> </div> </div> </div> <!-- /container --> <!-- Bootstrap core JavaScript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> <script src=""js/libs/jQuery/js/jquery-2.0.3.js""></script> <script src=""js/libs/bootstrap/js/bootstrap.min.js""></script> </body> </html> ",Arun,https://stackoverflow.com/users/2535203,"Here is working fiddle' http://jsfiddle.net/52VtD/9293/ <div class=""container""> <!-- Main component for a primary marketing message or call to action --> <div class=""jumbotron""> <h1>Project Title</h1> <p></p> <p></p> <p> <a class=""btn btn-lg btn-primary"" href=""../../components/#navbar"" role=""button"">View navbar docs &raquo;</a> </p> </div> <div class=""row""> <div class=""col-md-12""> <div class=""panel panel-warning""> <div class=""panel-heading""> <h3 class=""panel-title"">Panel title</h3> </div> <div class=""panel-body""> <div class=""table-responsive""> <table class=""table table-bordered""> <thead> <tr> <th>Row</th> <th>First Name</th> <th>Last Name</th> <th>Email</th> <th>Biography</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>John</td> <td>Carter</td> <td>johncarter@mail.com</td> <td> <button type=""button"" class=""btn btn-warning""> <i class=""glyphicon glyphicon-question-sign""></i> <span>Pending</span> </button> </td> </tr> <tr> <td>2</td> <td>Peter</td> <td>Parker</td> <td>peterparker@mail.com</td> <td> <button type=""button"" class=""btn btn-warning""> <i class=""glyphicon glyphicon-question-sign""></i> <span>Pending</span> </button> </td> </tr> <tr> <td>3</td> <td>John</td> <td>Rambo</td> <td>johnrambo@mail.com</td> <td> <button type=""button"" class=""btn btn-warning""> <i class=""glyphicon glyphicon-question-sign""></i> <span>Pending</span> </button> </td> </tr> </tbody> </table> </div> </div> </div> </div> </div> ",Miomir Dancevic,https://stackoverflow.com/users/2266992,http://stackoverflow.com/questions/27223500/not-proper-table-alignment-in-bootstrap,STACKOVERFLOW,stackoverflow.com 8026,json load more items,"I worked JSON. I have two classes (private class LoadDataToServer extends AsyncTask and class loadMoreListView extends AsyncTask) in the first grade, I parsing JSON and show item in the ListView and the second class, I'm trying to load multiple items. my problem is when I call the new loadMoreListView (). execute (); .. on listView.setOnScrollListener there is an error. my problem is adapter this is my code private class loadMoreListView extends AsyncTask>> { @Override protected void onPreExecute() { pd.show(); } @Override protected ArrayList<HashMap<String, String>> doInBackground( Void... params) { jsonparser = new JSONParser(); URL = ""http://bri.ge/api/getList.aspx?count=2&time="" + dateTime; jsonarray = new JSONArray(); JSONObject jsonobject = jsonparser.getJSONfromURL(URL); try { jsonarray = jsonobject.getJSONArray(""data""); for (int i = 0; i < jsonarray.length(); i++) { jsonobject = jsonarray.getJSONObject(i); HashMap<String, String> map = new HashMap<String, String>(); map.put(""journal"", jsonobject.getString(KEY_journal)); map.put(""image"", jsonobject.getString(KEY_image)); map.put(""title"", jsonobject.getString(KEY_title)); map.put(""description"", jsonobject.getString(KEY_description)); map.put(""JournalID"", KEY_JournalID); map.put(""pubDate"", jsonobject.getString(KEY_pubDate)); Content cont = new Content(jsonobject.getString(""journal""), jsonobject.getString(""image""), jsonobject.getString(""title""), jsonobject.getString(""pubDate""), jsonobject.getString(""description""), jsonobject.getInt(""JournalID"")); contents.add(cont); itemList.add(map); } // adapter.notifyDataSetChanged(); } catch (JSONException e) { Log.e(""Error"", e.getMessage()); e.printStackTrace(); } dateTime = itemList.get(itemList.size() - 1).get(KEY_pubDate); return itemList; } @Override protected void onPostExecute(ArrayList<HashMap<String, String>> result) { super.onPostExecute(result); if (pd.isShowing()) { pd.dismiss(); try { // itemList.clear(); int currentPosition = list.getFirstVisiblePosition(); // Appending new data to menuItems ArrayList adapter = new LazyAdapter(MainActivity.this, itemList); adapter.notifyDataSetChanged(); list.setAdapter(adapter); // list.add // Setting new scroll position list.setSelectionFromTop(currentPosition + 1, 0); } catch (NullPointerException e) { e.printStackTrace(); } } } } private class LoadDataToServer extends AsyncTask>> { @Override protected void onPreExecute() { super.onPreExecute(); pd.show(); } @Override protected ArrayList<HashMap<String, String>> doInBackground( Void... params) { jsonparser = new JSONParser(); @SuppressWarnings(""static-access"") JSONObject jsonobject = jsonparser.getJSONfromURL(URL); try { jsonarray = jsonobject.getJSONArray(""data""); for (int i = 0; i < jsonarray.length(); i++) { jsonobject = jsonarray.getJSONObject(i); HashMap<String, String> map = new HashMap<String, String>(); map.put(""journal"", jsonobject.getString(KEY_journal)); map.put(""image"", jsonobject.getString(KEY_image)); map.put(""title"", jsonobject.getString(KEY_title)); map.put(""description"", jsonobject.getString(KEY_description)); map.put(""JournalID"", KEY_JournalID); map.put(""pubDate"", jsonobject.getString(KEY_pubDate)); // contents = new ArrayList<Content>(); Content cont = new Content(jsonobject.getString(""journal""), jsonobject.getString(""image""), jsonobject.getString(""title""), jsonobject.getString(""pubDate""), jsonobject.getString(""description""), jsonobject.getInt(""JournalID"")); contents.add(cont); itemList.add(map); } } catch (JSONException e) { Log.e(""Error"", e.getMessage()); e.printStackTrace(); } dateTime = itemList.get(itemList.size() - 1).get(KEY_pubDate); return itemList; } @Override protected void onPostExecute(ArrayList<HashMap<String, String>> result) { super.onPostExecute(result); pd.dismiss(); // itemList.clear(); // Appending new data to menuItems ArrayList adapter = new LazyAdapter(MainActivity.this, itemList); adapter.notifyDataSetChanged(); list.setAdapter(adapter); // list.add // Setting new scroll position } } list.setOnScrollListener(new OnScrollListener() { @Override public void onScrollStateChanged(AbsListView view, int scrollState) { if (scrollState == 0) { // new loadMoreListView().execute(); } } @Override public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { final int lastItem = firstVisibleItem + visibleItemCount; if (lastItem == totalItemCount) { new loadMoreListView().execute(); } } }); ",Jambul Kukhalashvili,https://stackoverflow.com/users/2702722,"When you get new data then after setting data to adapter please call adapter.notifyDataSetChanged(); That will notify the list that the data in adapter is changed hope this will help ",farrukh,https://stackoverflow.com/users/1239930,http://stackoverflow.com/questions/20572822/json-load-more-items,STACKOVERFLOW,stackoverflow.com 3857,"Without using dowels, how do I join 2x4s edge to edge to be 1.5"" x 7""?","I am trying to join a 2x4 supporting a workbench tabletop to another to make a backsplash of sorts. Any ideas how to do this without dowels? (No, I can't use 2x8) ",Jens Turner,https://diy.stackexchange.com/users/15656,"I would definitely use Pocket-hole joinery My brother got me a jig that is very easy to use, and the joints are incredibly strong even without wood glue; also if you use glue the joins are ""self clamping"". Basically this allows you to edge-join, or do 45 degree angles, etc. just by drilling a couple of perfectly angled holes and screwing the pieces together such that the screw doesn't protrude from your work. Obviously, I wouldn't get a jig for just one project, but I have totally stopped using dowels, biscuits, and other fancy techniques in favor of pocket holes. Hope this helps! ",bebryan,https://diy.stackexchange.com/users/15667,http://diy.stackexchange.com/questions/32868/without-using-dowels-how-do-i-join-2x4s-edge-to-edge-to-be-1-5-x-7,LIFE_ARTS,diy.stackexchange.com 3394,"C# & VS error: ""make sure that the maximum index on a list is less than the list size""","I faced the error mentioned in the title when doing my homework, and simply can't find a way to remove it. Here is the method that I have this problem with: public static double LaskeMiidi(double[] luvut) { double ka = Keskiarvo(luvut); double miidi = luvut[0]; for (int i = 0; i < luvut.Length; i++) { if (luvut[i] - ka < luvut[i + 1] - ka) // The line error points to! { miidi = luvut[i]; } else { miidi = luvut[i + 1]; } } return miidi; } So basically the problem is that when I say luvut[i + 1], at some point this index might become more than the length of the array is. I just can't figure out any ways to solve this problem, since I'm only a beginner with programming. ",user2884188,https://stackoverflow.com/users/2884188,"Yes, this is the problem: for (int i = 0; i < luvut.Length; i++) { if (luvut[i] - ka < luvut[i + 1] - ka) When i is luvut.Length - 1, then i + 1 will be luvut.Length - and therefore an invalid index. (For an array of length x, the valid indexes are 0 to x - 1 inclusive.) You probably want to end one iteration earlier: for (int i = 0; i < luvut.Length - 1; i++) That way i + 1 will still be a valid index in the array - both in the if condition and in the body of the else clause. ",Jon Skeet,https://stackoverflow.com/users/22656,http://stackoverflow.com/questions/19391293/c-sharp-vs-error-make-sure-that-the-maximum-index-on-a-list-is-less-than-the,STACKOVERFLOW,stackoverflow.com 1719,Best action to call add_rewrite_rule,"In Codex I found that the best action to call add_rewrite_rule is the init action. So in this way the function is called every time the site load. But to save the rule in rewrite_rules option it would be better to call it in register_activation_hook? ",Giovanni Putignano,https://wordpress.stackexchange.com/users/60293,"Rules should be added on init because other code might flush rewrite rules, which would cause your rules to disappear. ",Milo,https://wordpress.stackexchange.com/users/4771,http://wordpress.stackexchange.com/questions/172655/best-action-to-call-add-rewrite-rule,TECHNOLOGY,wordpress.stackexchange.com 4108,"GIN/GiST Full Text searches through openlayers, geoserver and postgres","I have a a web app that automatically maps recent tweets and allows you to search for certain keywords. it uses Postgres for the database, geoserver as the server, and openlayers as the cartographic library. Right now tweet keywords are done using the ILIKE query. This works pretty well if the keyword i'm looking for is a commonly used word, like 'love' , 'friend', 'OMG', etc. but less common words like ""geospatial"" need to search through a lot more data in order to find the last n instances of the word. This is dead slow. To combat my slowness I'm building a GIN index on my tweet field in postgres. Two days later and i'm still waiting for the index to complete. Once it's built though, I'll try a few queries using SQL view parameters and hopefully this will dramatically speed things up. Even if this approach works though, it's not going to be all that useful if the index takes so long to create -- the maintenance of it will not be able to keep up will the incoming flood of data. I think I will try out the GiST index next and see how long it takes as I understand it is much faster to this build index. Beyond this, what can I do next? Do options like Solr work with Geoserver?? Are there any common approaches to this type of problem and data size/rate? ",mikedotonline,https://gis.stackexchange.com/users/24616,"You could use GeoAlchemy + Full Text Search (FTS). It can probably increase the speed of your queries. However, it seems that FTS needs to be adapted to do such work in GA. I put below some links that may give you some more insights on both tools: GeoAlchemy: http://frankpurcell.com/code/tutorial http://www.geoalchemy.org/_sources/tutorial.txt https://github.com/geoalchemy/geoalchemy/tree/master/examples https://geoalchemy-2.readthedocs.org/en/latest/orm_tutorial.html FTS (with SqlAlchemy, but it's already adapted to SA as a patch): http://nibrahim.net.in/2013/11/29/sqlalchemy_and_full_text_searching_in_postgresql.html ",Gery,https://gis.stackexchange.com/users/10596,http://gis.stackexchange.com/questions/82627/gin-gist-full-text-searches-through-openlayers-geoserver-and-postgres,TECHNOLOGY,gis.stackexchange.com 3302,How to submit errata when a coauthor disagrees,"Some years ago, I was the primary author on a paper in which some of the work was performed by a grad student. At the time I did not notice an error in his work, and so the derivation provided in the paper is incorrect. I contacted my coauthors, included the (former) grad student. The other authors readily agreed to have their names on the errata paper, but the former grad student disagreed and feels that his work was without error. And so he said that he did not want his name on the errata. Contacting the journal that published the original paper, the editor is not willing to publish an errata paper in which the author list does not include the entire list of authors from the original paper. So I'm stuck. I'm quite certain about the error, and frustrated with the former student's insistence on being correct. But now there is no way to get the errata into the literature. The journal editor suggested perhaps publishing the changes as a ""comment paper"", but comment papers are only allowed if written by someone other than one of the original authors. So that's no help either. I can publish the errata on ArXiV, but many readers of the original paper will never find it. Does anyone have suggestions on how to get this correction into the literature? ",nzh,https://academia.stackexchange.com/users/33781,"I'll give a few options that occur to me. Talk to the editor. Essentially ask him what to do. On the one hand he has a policy he wants to follow, and on the other hand he presumably wants corrections of erroneous papers to appear. After all, the alternative is that someone points the error out in a different venue, and the whole community laughs at his journal. Perhaps he will be willing to bend his rules a bit. You will need to discuss any possible solution with the editor, anyway, so you may want to start out with the most obvious option. What's to keep you from writing something titled ""Erratum"" with the whole list of authors X, Y and Z, but with two sections ""1. The Erratum (X, Y)"" and ""2. A dissenting point of view (Z)""? Yes, of course we want a paper to have a unified message, but in this particular case, I'd say that getting the word out in any way is better than burying the discussion under mounds of policy. Propose that you write the erratum, but allow the dissenting author to comment on the erratum and explain why he thinks the erratum is erroneous. Then send both the erratum and the comment out to review and see what the reviewers say. Perhaps you can do the discussion under point 2. above on the ArXiv, but publish an ""erratum"" with the full author list that does not discuss the error but only points to this discussion on the ArXiv. One bonus for options 2-4: actually writing up these papers will force everyone to really think about the derivation in question, and either you or the dissenting author may change his mind about whether there is or is not an error. Option 1 puts the onus on the editor, who may not be very flexible, judging from your question. (Of course, we don't know what he would say.) Options 2-4 are pretty ""meh"", and involve getting both the editor and the dissenting author on board. So given that these three options involve convincing two people, anyway, it may be worthwhile to look at other solutions involving communications. How deeply have you discussed the putative error with the dissenting author? It may be easier to convince him that there is an error than to convince both him and the editor to collaborate on a ""solution"" nobody is happy with. How sure are you that in fact there is an error? I'd assume the dissenting author is not completely out of his mind, so perhaps he does have a point? Options 4 and 5 really involve taking the time to discuss the issue in depth with the dissenting author. I'd recommend doing this in person, if at all possible, not via email or the phone. And do this one-on-one with the dissenter, not together with all the other authors - if he perceives everyone else ""ganging up"" on him, he may become defensive. Approach this with an open mind. Maybe there is a simple misunderstanding, and the two of you are really thinking of different things when you think you are talking about the same thing. Often you will learn a lot from this kind of discussion. In the best possible case, you will find two different ways of looking at the issue, and maybe even the germ of a follow-up paper. If all else fails and the editor is in fact an associate editor, you can always escalate the issue to the chief editor. ",Stephan Kolassa,https://academia.stackexchange.com/users/4140,http://academia.stackexchange.com/questions/44428/how-to-submit-errata-when-a-coauthor-disagrees,LIFE_ARTS,academia.stackexchange.com 3012,Combine jQuery .addClass() on button click only to element that button is in,"I am trying to combine multiple click functions with toggle class into one that will affect multiple elements separately. As seen on image i want to change css of element on click only for one which is inside same parent element as button ignoring any other elements with same class. HTML: <div style=""display: inline-block""> <section class=""container2""> 1 </section> <section> <p><button id=""button"">change</button></p> </section> </div> CSS: .background { background: red !important; } .container2 { background: black; width: 100px; height: 50px; color: white; } jQuery: var removeClass = true; $(""#button"").click(function () { $('.container2').toggleClass('background'); removeClass = false; }); $("".container2"").click(function() { removeClass = false; }); $(""html"").click(function () { if (removeClass) { $("".container2"").removeClass('background'); } removeClass = true; }); http://jsfiddle.net/dkhhecf2/1/ I know i can write something like this $(""#one, #two, #three"").click... But is there any other way? http://i.stack.imgur.com/wJhKu.png Any help would be greatly appreciated. ",damian1205,https://stackoverflow.com/users/4343798,"First of all, id has to be unique. So, you can NOT have the same id for different element. And, in order to fire the function to different elements, it is easy that elements have different id. Hence, $(""#button1"").click(function(){ $(""#1"").toggleClass(""background""); }); $(""#button2"").click(function(){ $(""#2"").toggleClass(""background""); }); http://jsfiddle.net/dkhhecf2/3/ ",Matilda Yi Pan,https://stackoverflow.com/users/3935978,http://stackoverflow.com/questions/27392464/combine-jquery-addclass-on-button-click-only-to-element-that-button-is-in,STACKOVERFLOW,stackoverflow.com 9319,PDFNet SDK Convert files on Azure storage,"I have a web app that needs to convert PDFs to XODs (PDFTron’s format to display documents in their WebViewer). My Web App is hosted on Azure, the PDFs are on Azure Storage. We would like to go along with the on-premises conversion via PDFNet SDK (http://www.pdftron.com/webviewer/getstarted.html, see “Choosing a deployment model for conversions), my code so far is the following: WebRequest req = HttpWebRequest.Create(""url of PDF on Azure Storage here""); using (Stream stream = req.GetResponse().GetResponseStream()) { PDFDoc pdfdoc = new PDFDoc(stream); var converted = pdftron.PDF.Convert.ToXod(pdfdoc); //pdfdoc.Save(stream, pdftron.SDF.SDFDoc.SaveOptions.e_linearized); //not clear to me } My approach here is to create a stream from the file on azure storage and convert that stream to XOD. I still don’t know if I should call “Save” and in that case where the file would be saved. My questions are: Since everything runs on the cloud does it make sense to use the CloudAPI instead of the self-hosted solution or does it not make any difference? In both cases, where is the converted file stored (since I am getting it from the Azure storage and not from a local server), since I would then need to move it to my azure storage account. Does the file get saved locally (meaning on the web/worker role which is processing it) and therefore needs to be moved to the storage? Here (http://www.pdftron.com/pdfnet/samplecode.html) there are conversion code samples but they all use files on local machine, which would not be my case. ",Mirko Lugano,https://stackoverflow.com/users/2122875," Since everything runs on the cloud does it make sense to use the CloudAPI instead of the self-hosted solution or does it not make any difference? In both cases, where is the converted file stored [...] If you were to go with the cloud solution, you would transfer your files to PDFTron's servers, where they will be converted. Then you would download the converted files. If you were to go with the on-premises solution, you would need to run DocPub CLI (https://www.pdftron.com/docpub/downloads.html) on your Azure instance, and its only communication with PDFTron would be to increment the billing counter for your PWS account (https://www.pdftron.com/pws/index.html). You'd have to decide for yourself which solution works best for you. Here (http://www.pdftron.com/pdfnet/samplecode.html) there are conversion code samples but they all use files on local machine, which would not be my case. [Note: these samples show how to use the PDFNet SDK to run conversions. To run PDFNet you would need an additional license. So you probably want to use DocPub CLI or the cloud converter instead.] The samples show how to convert the files locally, since XOD conversion would need to be run server-side. How most people do so is by setting up some web service to upload PDF (or other format) files. Then they convert the documents server-side, and place the converted XOD files someplace where the WebViewer can serve them. ",user3609640,https://stackoverflow.com/users/3609640,http://stackoverflow.com/questions/30030735/pdfnet-sdk-convert-files-on-azure-storage,STACKOVERFLOW,stackoverflow.com 2390,Idolatry in churches allowed?,"It is very frequent to see idols of Jesus or any biblical entities in a Church , So is such idolatry allowed by the bible,considering the following verses? ""You must not make for yourself an idol of any kind or an image of anything in the heavens or on the earth or in the sea"". Exodus 20:4 History tells us that: sometimes objects that God instructed to be made were turned into idols by the Israelites. The Book of Numbers contains a narrative in which God instructed Moses to make a bronze snake as part of addressing a plague of venomous snakes that had broken out among the Israelites as a punishment for sin. The bronze snake is mentioned again in 2 Kings 18; however, rather than remaining a memorial of God's providence, it became an idol that the people named and worshiped. Thus the bronze snake was destroyed in King Hezekiah's reforms. More specifically in India I see Christians carry idols of Jesus and other biblical entities with them kiss them and revere them too. Infact they allow the Hindus in the Church and let them perform worship in their way(Like putting incense sticks, offering flowers , foodstuff to the Idol of Jesus etc) as shown below a very common view in India. I studied in a Christian school for 10 years and i am yet to see Christians not doing these things. I have seen the same on TV and in videos of people venerating the Idol of biblical entities. ",JesusBoughtIslam,https://christianity.stackexchange.com/users/3812,"The whole iconoclastic controversy has raged for thousands of years. In a nutshell, iconoclasts are taking your position, whereas iconodules maintain the position that what Christians do is venerate not worship these images. Muslims obviously are strict iconoclasts, and thus reject any depiction whatsoever. Over the centuries, Christian thought has alternated on what artistic representations are. When Cromwell took Power in the 1650s, for example, they went all Iconoclast and started smashing all the icons they could find, not altogether unlike the rebels in Mali or the Taliban in Afghanistan who blew up the Bamuyan Buddhas. The Seventh Ecumenical Council in particular weighed in on this, however, declaring that representations of Christ do not infringe on the person of Christ and are thus not idols. Unlike Hinduism where there is a spectrum of attitude towards what one is doing with, say, a lingam, there is official ruling, accepted by ""all"" of the worlds Christians (at least by Catholics, Protestants and orthodox ) that declares this is veneration and not Latreia. St. John of Damascus says: Concerning the charge of idolatry: Icons are not idols but symbols, therefore when an Orthodox venerates an icon, he is not guilty of idolatry. He is not worshipping the symbol, but merely venerating it. Such veneration is not directed toward wood, or paint or stone, but towards the person depicted. Therefore relative honor is shown to material objects, but worship is due to God alone. We do not make obeisance to the nature of wood, but we revere and do obeisance to Him who was crucified on the Cross... When the two beams of the Cross are joined together I adore the figure because of Christ who was crucified on the Cross, but if the beams are separated, I throw them away and burn them. Does actual practice sometimes get this wrong? Sure. The nature of syncretism is such that in some cultures, practices bleed across beliefs. Offering incense, devotion, and performing rites that look like idol. Worship is not surprising in a culture where the majority pursues it. Doesn't mean it's orthodox in any event. One could look at the perversion of Jihad and say, ""Muslims are all suicide bombers, "" too- but many don't because we can distinguish between orthodoxic pronouncement and individual (mis)practice. You would do well to consider the same. ",Affable Geek,https://christianity.stackexchange.com/users/1039,http://christianity.stackexchange.com/questions/14615/idolatry-in-churches-allowed,CULTURE,christianity.stackexchange.com 6845,Count consecutive null rows from a joined table,"I have the following tables: members: ---------------------------------------------- | member_id | member_name | member_join_date | ---------------------------------------------- events: ------------------------- | event_id | event_name | ------------------------- event_dates: -------------------------------------- | event_id | event_date | event_week | -------------------------------------- attendance: ------------------------------------------------------------ | member_id | event_id | attendance_date | attendance_week | ------------------------------------------------------------ So I have members who joined the organization at a certain time and they may attend weekly events (the occurrences of which are monitored by the event_dates table) What I want to do is get all members that have at least 3-consecutive absences I did all I could and I think I have each part of the query but don't know how to merge them together. Get all events that they could've attended: SELECT m.member_id AS id, ed.event_id, ed.event_week FROM members AS m LEFT JOIN event_dates AS ed ON ed.event_date >= m.member_join_date Get all the events they actually attended: SELECT m.member_id AS id, a.event_id FROM members AS m LEFT JOIN attendance AS a ON a.member_id = m.member_id And probably the answer to this question if I manage to merge the two queries into one: http://stackoverflow.com/questions/1321670/count-of-consecutive-not-null-values But this time I want to count NULL values ",Rolando Cruz,https://dba.stackexchange.com/users/10755,"(Assuming that the (event_id, event_date) is the primary or a unique key in event_dates table): SELECT m.member_id AS id, ed_start.event_id, ed_start.event_date AS miss_start, ed_end.event_date AS miss_end, COUNT(*) AS consecutive_misses FROM members AS m JOIN event_dates AS ed_start ON ed_start.event_date >= m.member_join_date JOIN event_dates AS ed_end ON ed_end.event_id = ed_start.event_id AND ed_end.event_date >= ed_start.event_date JOIN event_dates AS ed_mid ON ed_mid.event_id = ed_start.event_id AND ed_mid.event_date >= ed_start.event_date AND ed_mid.event_date <= ed_end.event_date LEFT JOIN attendance AS a ON a.member_id = m.member_id AND a.event_id = ed_mid.event_id AND a.attendance_date = ed_mid.event_date GROUP BY m.member_id, ed_start.event_id, ed_start.event_date, ed_end.event_date HAVING COUNT(*) >= 3 AND COUNT(a.attendance_date) = 0 ; Test in SQL-Fiddle The above may give (too many) multiple results if the consecutive misses are more than 3. So, If you want only the members and events they missed but not when they missed attendance, replace the SELECT with (test: SQL-Fiddle-2): SELECT DISTINCT m.member_id AS id, ed.event_id, FROM ... You could also wrap the query (as a derived table) inside an external query and do another grouping for this to work (test: SQL-Fiddle-3) And if you want only the members and not the events they missed nor when they missed attendance: SELECT DISTINCT m.member_id AS id FROM ... ",ypercubeᵀᴹ,https://dba.stackexchange.com/users/993,http://dba.stackexchange.com/questions/24852/count-consecutive-null-rows-from-a-joined-table,TECHNOLOGY,dba.stackexchange.com 8177,Isn’t the FAQ label obsolete by now?,"Don’t get me wrong in the beginning of reading this. I really mean the label and not the content of FAQ. The content is very useful if its’ made the right way (as here on ux.se), but there are plenty of examples where it isn’t. The real question concerns the label which is a convention I’d like to challenge. History In 1647 Matthew Hopkins wrote The Discovery of Witches which were introduced as ""Certain Queries answered"" and had the form of a list of Question and Answer, even if the topic is inappropriate by today’s standards. The label FAQ origins from the early 1980s mailing lists where NASA hoped to get new users read the old mail conversations, which were not the case. Instead the same questions were answered again and again and the need for FAQ was born. The acronym FAQ was invented by Eugene Miya and FAQ were later used in mail on a weekly basis at first and later on as a daily mail. Today FAQ is more frequently used to refer to the list, and a text consisting of questions and their answers is often called an FAQ regardless of whether the questions are actually frequently asked, if they are asked at all.[1] Problem Acronyms are generally bad, since it excludes those who do not know the meaning. They either have to search for the acronym, if they are interested, or just ignore it. If a label is ignored, there is not much use of it and an entire section of valid content is lost by bad labeling. However, it is a very strong web convention which might lead to confusion over time for experienced users. Also the original meaning have changed (see quote), which also implies that the label would be wrong. Question Isn’t the FAQ label obsolete by now? and if so How do we relabel it to suit both experienced and new users? Edit: I’d really like to know why we can or cannot change the label FAQ. Current answer does not meet that criterion. [1] http://en.wikipedia.org/wiki/FAQ ",Benny Skogberg,https://ux.stackexchange.com/users/4679,"There is no reason you cannot relabel FAQ. Contrary to belief, most popular websites refrain from using the term altogether. For example, Twitter labels their FAQ section ""help"", as does both Facebook and Google. If you want to relabel FAQ, go with either help or support. Both translate worldwide and the meanings are easier to conceptualize than FAQ. ",ditto,https://ux.stackexchange.com/users/5134,http://ux.stackexchange.com/questions/18600/isn-t-the-faq-label-obsolete-by-now,TECHNOLOGY,ux.stackexchange.com 6710,What does mathematics have to do with programming?,"I just started a diploma in software development. Right now we're starting out with basic Java and such (so right from the bottom you might say) - which is fine, I have no programming experience apart from knowing how to do ""Hello World"" in Java. I keep hearing that mathematics is pertinent to coding, but how is it so? What general examples would show how mathematics and programming go together, or are reliant on one another? I apologize of my question is vague, I'm barely starting to get a rough idea of the kind of world I'm stepping into as a code monkey student... ",Rory,https://programmers.stackexchange.com/users/48536,"Two examples that immediately come to mind are: functions - The idea of applying a transformation to input variables to produce an output variable is strongly rooted in mathematics. The notion of passing a function around as a parameter to another function even more so. In general, the notion of abstract thinking associated with programing parallels mathematics quite closely. bitMasks - This common programming approach to solving problems requires at least a basic understanding of boolean algebra to even grasp the concept. ",JohnFx,https://programmers.stackexchange.com/users/287,http://programmers.stackexchange.com/questions/136987/what-does-mathematics-have-to-do-with-programming,TECHNOLOGY,programmers.stackexchange.com 4378,"Without a map or miniatures, how to best determine line-of-sight, etc?","I think the title says it all. Let's say you're mastering a game without the benefit of miniatures, maps, or any kind of physical representation of the environment. How would you keep track of details like line-of-sight, ranged attack viability, and all the other small nuances which go with creating a ""believable-enough"" environment in which your PCs live and thrive? (I admit that @LoganMacRae, who is my own DM, is an inspiration for this question. He does this with panache, and in my one-off, I feel like I have some mighty big shoes to fill!) ",John Rudy,https://rpg.stackexchange.com/users/108,"I'd use hiding rules. In AD&D that would be a hide in shadows roll for the thief to not be in line of sight, in d20, anybody could attempt a sneak check, or perhaps an acrobatics or tumbling check to see if they can get behind cover of some sort, and appropriately hide themselves. ",migo,https://rpg.stackexchange.com/users/1520,http://rpg.stackexchange.com/questions/1602/without-a-map-or-miniatures-how-to-best-determine-line-of-sight-etc,CULTURE,rpg.stackexchange.com 5655,Can't install Pantheon desktop environment,"I've tried to install Pantheon desktop environment several times. I tried sudo apt-get update and sudo apt-get upgrade, but it's no use. I’m just a very new beginner. This is what I’ve done: quanglong@ubuntu:~$ sudo add-apt-repository ppa:elementary-os/daily [sudo] password for quanglong: You are about to add the following PPA to your system: ATTENTION! Do NOT install this PPA if you want a tested running system, this PPA contains the newest and most unstable development of elementary, it's useful only if you are a developer and are not afraid to encounter CRITICAL BUGS. Also this PPA may overwrite already installed packages you don't want it to! More info: https://launchpad.net/~elementary-os/+archive/daily Press [ENTER] to continue or ctrl-c to cancel adding it gpg: keyring `/tmp/tmpkz5d_z/secring.gpg' created gpg: keyring `/tmp/tmpkz5d_z/pubring.gpg' created gpg: requesting key 4E1F8A59 from hkp server keyserver.ubuntu.com gpg: /tmp/tmpkz5d_z/trustdb.gpg: trustdb created gpg: key 4E1F8A59: public key ""Launchpad PPA for elementary OS team"" imported gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1) OK /bin/rm: cannot remove `/run/user/root/gvfs': Is a directory quanglong@ubuntu:~$ sudo apt-get update Hit http://ppa.launchpad.net quantal Release.gpg Get:1 http://security.ubuntu.com quantal-security Release.gpg [933 B] Hit http://us.archive.ubuntu.com quantal Release.gpg Hit http://ppa.launchpad.net quantal Release.gpg Get:2 http://security.ubuntu.com quantal-security Release [49.6 kB] Get:3 http://us.archive.ubuntu.com quantal-updates Release.gpg [933 B] Hit http://us.archive.ubuntu.com quantal-backports Release.gpg Hit http://ppa.launchpad.net quantal Release Hit http://us.archive.ubuntu.com quantal Release Hit http://ppa.launchpad.net quantal Release Get:4 http://us.archive.ubuntu.com quantal-updates Release [49.6 kB] Hit http://ppa.launchpad.net quantal/main Sources Get:5 http://security.ubuntu.com quantal-security/main Sources [74.3 kB] Hit http://ppa.launchpad.net quantal/main amd64 Packages Hit http://ppa.launchpad.net quantal/main i386 Packages Hit http://us.archive.ubuntu.com quantal-backports Release Hit http://us.archive.ubuntu.com quantal/main Sources Hit http://us.archive.ubuntu.com quantal/restricted Sources Hit http://us.archive.ubuntu.com quantal/universe Sources Hit http://ppa.launchpad.net quantal/main Sources Hit http://us.archive.ubuntu.com quantal/multiverse Sources Get:6 http://security.ubuntu.com quantal-security/restricted Sources [1,833 B] Hit http://us.archive.ubuntu.com quantal/main amd64 Packages Hit http://ppa.launchpad.net quantal/main amd64 Packages Hit http://us.archive.ubuntu.com quantal/restricted amd64 Packages Get:7 http://security.ubuntu.com quantal-security/universe Sources [23.8 kB] Hit http://ppa.launchpad.net quantal/main i386 Packages Hit http://us.archive.ubuntu.com quantal/universe amd64 Packages Hit http://us.archive.ubuntu.com quantal/multiverse amd64 Packages Get:8 http://security.ubuntu.com quantal-security/multiverse Sources [1,169 B] Hit http://us.archive.ubuntu.com quantal/main i386 Packages Hit http://us.archive.ubuntu.com quantal/restricted i386 Packages Get:9 http://security.ubuntu.com quantal-security/main amd64 Packages [207 kB] Hit http://us.archive.ubuntu.com quantal/universe i386 Packages Hit http://us.archive.ubuntu.com quantal/multiverse i386 Packages Hit http://us.archive.ubuntu.com quantal/main Translation-en Hit http://us.archive.ubuntu.com quantal/multiverse Translation-en Hit http://us.archive.ubuntu.com quantal/restricted Translation-en Hit http://us.archive.ubuntu.com quantal/universe Translation-en Get:10 http://us.archive.ubuntu.com quantal-updates/main Sources [134 kB] Get:11 http://security.ubuntu.com quantal-security/restricted amd64 Packages [3,469 B] Get:12 http://security.ubuntu.com quantal-security/universe amd64 Packages [72.4 kB] Ign http://ppa.launchpad.net quantal/main Translation-en_US Get:13 http://us.archive.ubuntu.com quantal-updates/restricted Sources [2,564 B] Ign http://ppa.launchpad.net quantal/main Translation-en Get:14 http://us.archive.ubuntu.com quantal-updates/universe Sources [96.7 kB] Ign http://ppa.launchpad.net quantal/main Translation-en_US Get:15 http://security.ubuntu.com quantal-security/multiverse amd64 Packages [1,488 B] Ign http://ppa.launchpad.net quantal/main Translation-en Get:16 http://security.ubuntu.com quantal-security/main i386 Packages [205 kB] Get:17 http://us.archive.ubuntu.com quantal-updates/multiverse Sources [5,269 B] Get:18 http://us.archive.ubuntu.com quantal-updates/main amd64 Packages [337 kB] Get:19 http://us.archive.ubuntu.com quantal-updates/restricted amd64 Packages [4,804 B] Get:20 http://us.archive.ubuntu.com quantal-updates/universe amd64 Packages [218 kB] Get:21 http://security.ubuntu.com quantal-security/restricted i386 Packages [3,531 B] Get:22 http://security.ubuntu.com quantal-security/universe i386 Packages [73.0 kB] Get:23 http://us.archive.ubuntu.com quantal-updates/multiverse amd64 Packages [12.1 kB] Get:24 http://security.ubuntu.com quantal-security/multiverse i386 Packages [1,726 B] Hit http://security.ubuntu.com quantal-security/main Translation-en Get:25 http://us.archive.ubuntu.com quantal-updates/main i386 Packages [334 kB] Hit http://security.ubuntu.com quantal-security/multiverse Translation-en Hit http://security.ubuntu.com quantal-security/restricted Translation-en Hit http://security.ubuntu.com quantal-security/universe Translation-en Get:26 http://us.archive.ubuntu.com quantal-updates/restricted i386 Packages [4,841 B] Get:27 http://us.archive.ubuntu.com quantal-updates/universe i386 Packages [219 kB] Get:28 http://us.archive.ubuntu.com quantal-updates/multiverse i386 Packages [12.3 kB] Hit http://us.archive.ubuntu.com quantal-updates/main Translation-en Hit http://us.archive.ubuntu.com quantal-updates/multiverse Translation-en Hit http://us.archive.ubuntu.com quantal-updates/restricted Translation-en Hit http://us.archive.ubuntu.com quantal-updates/universe Translation-en Hit http://us.archive.ubuntu.com quantal-backports/main Sources Hit http://us.archive.ubuntu.com quantal-backports/restricted Sources Ign http://security.ubuntu.com quantal-security/main Translation-en_US Hit http://us.archive.ubuntu.com quantal-backports/universe Sources Ign http://security.ubuntu.com quantal-security/multiverse Translation-en_US Hit http://us.archive.ubuntu.com quantal-backports/multiverse Sources Ign http://security.ubuntu.com quantal-security/restricted Translation-en_US Hit http://us.archive.ubuntu.com quantal-backports/main amd64 Packages Ign http://security.ubuntu.com quantal-security/universe Translation-en_US Hit http://us.archive.ubuntu.com quantal-backports/restricted amd64 Packages Hit http://us.archive.ubuntu.com quantal-backports/universe amd64 Packages Hit http://us.archive.ubuntu.com quantal-backports/multiverse amd64 Packages Hit http://us.archive.ubuntu.com quantal-backports/main i386 Packages Hit http://us.archive.ubuntu.com quantal-backports/restricted i386 Packages Hit http://us.archive.ubuntu.com quantal-backports/universe i386 Packages Hit http://us.archive.ubuntu.com quantal-backports/multiverse i386 Packages Hit http://us.archive.ubuntu.com quantal-backports/main Translation-en Hit http://us.archive.ubuntu.com quantal-backports/multiverse Translation-en Hit http://us.archive.ubuntu.com quantal-backports/restricted Translation-en Hit http://us.archive.ubuntu.com quantal-backports/universe Translation-en Ign http://us.archive.ubuntu.com quantal/main Translation-en_US Ign http://us.archive.ubuntu.com quantal/multiverse Translation-en_US Ign http://us.archive.ubuntu.com quantal/restricted Translation-en_US Ign http://us.archive.ubuntu.com quantal/universe Translation-en_US Ign http://us.archive.ubuntu.com quantal-updates/main Translation-en_US Ign http://us.archive.ubuntu.com quantal-updates/multiverse Translation-en_US Ign http://us.archive.ubuntu.com quantal-updates/restricted Translation-en_US Ign http://us.archive.ubuntu.com quantal-updates/universe Translation-en_US Ign http://us.archive.ubuntu.com quantal-backports/main Translation-en_US Ign http://us.archive.ubuntu.com quantal-backports/multiverse Translation-en_US Ign http://us.archive.ubuntu.com quantal-backports/restricted Translation-en_US Ign http://us.archive.ubuntu.com quantal-backports/universe Translation-en_US Fetched 2,151 kB in 45s (47.7 kB/s) Reading package lists... Done /bin/rm: cannot remove `/run/user/root/gvfs': Is a directory quanglong@ubuntu:~$ sudo apt-get install elementary-desktop Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package elementary-desktop /bin/rm: cannot remove `/run/user/root/gvfs': Is a directory quanglong@ubuntu:~$ ",user275846,https://askubuntu.com/users/275846,"Okay I got build errors. Haven't got time to test it at the moment :(. Also: ""After this operation, 1779 MB of additional disk space will be used."" So make sure you have a few GB's set aside if you're going to do this. Okay so I got it working by following this: How to install the Pantheon desktop environment? Basically the PPA everyone is suggesting works, is 404-ing for me (and presumably you) when I try and access it. 1) This is syslinux-themes-elementary-isis, and the .sh script apparently requires it. Sudo apt-get didn't find it for me. You could probably test removing this dependency from the .sh if you are feeling bold. I installed amd64 version of this (as I am on 64 bit, if you are on 32 bit obviously don't), just use a .deb installer on Ubuntu: https://launchpad.net/~elementary-os/+archive/daily/+files/syslinux-themes-elementary-isis_2-0%7E4%7Esaucy1_amd64.deb 2) This is required by the elementary os install script: sudo apt-get install dctrl-tools dpkg-dev genisoimage gfxboot-theme-ubuntu live-build squashfs-tools syslinux zsync 3) The script uses this to determine what files to download (obviously don't do both, amd64 is for 64bit and i386 is for 32 bit) (you'll want to put this in .bashrc or somewhere else for it to be permanent, not 100% anyone will ever need this again though): export ARCH=amd64 export ARCH=i386 4) From the previous question/answer thread: sudo apt-get install bzr bzr branch lp:elementaryos cd elementaryos sudo congrego.sh On my machine I didn't specify $ARCH so I got 90% of the way through a 970 M .iso file for i386 before I realised -_-. Currently running through the amd64 installation. As an aside: # load config source etc/congrego.conf if [[ ""$ARCH"" == ""all"" ]]; then $(dirname ""$0"")/bin/download.sh i386 $(dirname ""$0"")/bin/download.sh amd64 $(dirname ""$0"")/bin/build.sh i386 $(dirname ""$0"")/bin/build.sh amd64 if [[ ""$SOURCEFORGE"" != """" ]]; then $(dirname ""$0"")/bin/sourceforge.sh i386 $(dirname ""$0"")/bin/sourceforge.sh amd64 fi else $(dirname ""$0"")/bin/download.sh ""$ARCH"" $(dirname ""$0"")/bin/build.sh ""$ARCH"" $(dirname ""$0"")/bin/sourceforge.sh ""$ARCH"" fi It is a bit presumptuous that users would have that environment variable set. Unless I am reading it wrong, it seems like it will download iso's for i386 AND amd64 and then build both of them, which sounds like a bad idea. I'm noob at bash script though so it could be fine for all I know. Just in case this is irrelevant to your machine: Linux mikeydesknix 3.11.0-19-generic #33-Ubuntu SMP Tue Mar 11 18:48:34 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux [ mikey ][ 02:22:59 ]$lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 13.10 Release: 13.10 Codename: saucy -- Build Errors: [2014-05-01 03:31:40] lb_chroot_hooks P: Begin executing hooks... ERROR:root:DebFileApplication import Traceback (most recent call last): File ""/usr/share/software-center/softwarecenter/db/__init__.py"", line 4, in <module> from debfile import DebFileApplication, DebFileOpenError File ""/usr/share/software-center/softwarecenter/db/debfile.py"", line 25, in <module> from softwarecenter.db.application import Application, AppDetails File ""/usr/share/software-center/softwarecenter/db/application.py"", line 28, in <module> import softwarecenter.distro File ""/usr/share/software-center/softwarecenter/distro/__init__.py"", line 199, in <module> distro_instance = _get_distro() File ""/usr/share/software-center/softwarecenter/distro/__init__.py"", line 174, in _get_distro module = __import__(distro_module_name, globals(), locals(), [], -1) ImportError: No module named ""elementary os"" Traceback (most recent call last): File ""/usr/sbin/update-apt-xapian-index"", line 101, in <module> if not indexer.setupIndexing(force=opts.force, system=opts.pkgfile is None): File ""/usr/lib/python2.7/dist-packages/axi/indexer.py"", line 471, in setupIndexing self.plugins = Plugins(progress=self.progress, system=system) File ""/usr/lib/python2.7/dist-packages/axi/indexer.py"", line 94, in __init__ addon = Addon(fullname, **kw) File ""/usr/lib/python2.7/dist-packages/axi/indexer.py"", line 49, in __init__ self.module = imp.load_source(""axi.plugin_"" + self.name, fname) File ""/usr/share/apt-xapian-index/plugins/software_center.py"", line 13, in <module> from softwarecenter.db.update import ( File ""/usr/share/software-center/softwarecenter/db/update.py"", line 33, in <module> from softwarecenter.backend.scagent import SoftwareCenterAgent File ""/usr/share/software-center/softwarecenter/backend/scagent.py"", line 28, in <module> from softwarecenter.distro import get_distro, get_current_arch File ""/usr/share/software-center/softwarecenter/distro/__init__.py"", line 199, in <module> distro_instance = _get_distro() File ""/usr/share/software-center/softwarecenter/distro/__init__.py"", line 174, in _get_distro module = __import__(distro_module_name, globals(), locals(), [], -1) ImportError: No module named ""elementary os"" E: chroot/root/lb_chroot_hooks/002-update-apt-xapian-index.chroot failed (exit non-zero). You should check for errors. P: Begin unmounting filesystems... P: Saving caches... Reading package lists... Building dependency tree... Reading state information... md5sum: binary.hybrid.iso: No such file or directory ",mikeyjk,https://askubuntu.com/users/193732,http://askubuntu.com/questions/457673/cant-install-pantheon-desktop-environment,TECHNOLOGY,askubuntu.com 555,RDP File transfer is really slow. Any way to speed it up?,"The host is running Windows XP Prof SP3 and the client is running Windows 7 Ultimate SP1 x64. So ... I connect to the remote machine with a 15mbps of ADSL. Which ... I guess, got enough downstream. (~1.3 MB/s). The host machine got a 35mbps of upload. Which is again, fast enough to pump the data with max speed. All I get is like ~320-400 kbps transfer speed. That is really slow. Is there a way to speed it up? ",Shiki,https://superuser.com/users/16001,"There is a TechNet thread that describes a similar issue to the one you described. The best answer marked by Nicholas Li from Microsoft suggests you to consider trying RichCopy. As noted, this is not considered to be a fix for the problem but you might be able to achieve better throughput. Also, more information on Remote Desktop Protocol as well as its design and input capabilities over network connections for Windows-based applications can be found here. It may be helpful to read so as to understand the RDP architecture and features more concisely. ",Winoutreach5,https://superuser.com/users/118221,http://superuser.com/questions/389314,TECHNOLOGY,superuser.com 1883,Next & Previous (Pagination in this case) Not Appearing,"I am using a custom page template for my portfolio. The code is calling the correct number of posts per page but for some reason the pagination links won't show up :-S My query <?php $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 2)); ?> <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> <?php $custom = get_post_custom($post->ID); $screenshot_url = $custom[""screenshot_url""][0]; $website_url = $custom[""website_url""][0]; ?> The entire markup <?php /* Template Name: Portfolio */ ?> <?php get_header(); ?> <div id=""full_container""> <div id=""portfolio_content""> <div id=""portfolio_wrap""> <div id=""content""> <?php $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 2)); ?> <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> <?php $custom = get_post_custom($post->ID); $screenshot_url = $custom[""screenshot_url""][0]; $website_url = $custom[""website_url""][0]; ?> <a href=""<?php the_permalink() ?>""> <span class=""img""> <?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'thmb-portfolio' ); } ?> <span class=""under""> <!-- Excerpt title --> <span class=""title""><?php the_title(); ?></span> <!-- Excerpt description --> <span class=""desc""> <?php my_excerpt('short'); ?> </span> </span> </span> </a> <?php endwhile; ?> <!-- Next/Previous Posts --> <?php if (function_exists(""pagination"")) { pagination($additional_loop->max_num_pages); } ?> </div> </div> </div> </div> </div> <?php get_footer(); ?> ",AndrettiMilas,https://wordpress.stackexchange.com/users/5205,"I don't see the variable $additional_loop being set anywhere in your code. If you're comfortable with WP-Pagenavi, install it and modify your code as follows: <?php //You need to handle the 'paged' query var for pagination! $paged = (get_query_var('paged'))?get_query_var('paged'):1; $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 2, 'paged' => $paged)); ?> Replace the following: <!-- Next/Previous Posts --> <?php if (function_exists(""pagination"")) { pagination($additional_loop->max_num_pages); } ?> With: <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?> <div class=""navigation""> <div class=""alignleft""><?php next_posts_link('Previous entries') ?></div> <div class=""alignright""><?php previous_posts_link('Next entries') ?></div> </div> <?php } ?> Hope this helps! ",Rutwick Gangurde,https://wordpress.stackexchange.com/users/4740,http://wordpress.stackexchange.com/questions/30616/next-previous-pagination-in-this-case-not-appearing,TECHNOLOGY,wordpress.stackexchange.com 6772,Is there a document class optimized for small screens (i.e. phone screens),"I happen to read more documents on my (android) phone, including scientific papers from the arXiv (where the TeX source is available). Obviously, such a narrow screen is not well suited to read papers made with the usual \documentclasses . What is the best way to compile a LaTeX document in order to read it easily on a small screen (smart phone or e-book reader) ? ",Frédéric Grosshans,https://tex.stackexchange.com/users/1913,"you can specify your own paper size: \documentclass{article} \usepackage{geometry} \geometry{papersize={<width>,<height>},margin=5mm} ... ",Herbert,https://tex.stackexchange.com/users/2478,http://tex.stackexchange.com/questions/14420/is-there-a-document-class-optimized-for-small-screens-i-e-phone-screens,TECHNOLOGY,tex.stackexchange.com 5986,What is the correct way to ensure unique entries in a temporal database design?,"I'm having trouble with the design of a temporal database. I need to know how to make sure I have only one active record for any given timeframe for a store. I have read this answer, but I'm afraid I can't wrap my head around how the trigger would work. Particularly, how I would work that trigger into my existing one that prevents updates to records, and inserts a new record instead. My real problem is that I do not know how to prevent a Store from having more than one effective date when the finished date is null. (i.e. prevent 2 active records for a store). This is what I have, but it allows me to insert a new record for a store with a different effective date. Table Definition: /****** Object: Table [PCR].[Z_STORE_TEAM] Script Date: 05/09/2014 13:05:57 ******/ IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[Z_STORE_TEAM]') AND type in (N'U')) DROP TABLE [Z_STORE_TEAM] GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[Z_STORE_TEAM]') AND type in (N'U')) BEGIN CREATE TABLE [Z_STORE_TEAM]( [STORENUM] [int] NOT NULL, [TEAM] [varchar](10) NULL, [EFFECTIVE] [date] NOT NULL, [FINISHED] [date] NULL, PRIMARY KEY CLUSTERED ( [STORENUM] ASC, [EFFECTIVE] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] END GO Sample Data: INSERT [Z_STORE_TEAM] ([STORENUM], [TEAM], [EFFECTIVE], [FINISHED]) VALUES (1, N'1', CAST(0x01380B00 AS Date), CAST(0x81380B00 AS Date)) INSERT [Z_STORE_TEAM] ([STORENUM], [TEAM], [EFFECTIVE], [FINISHED]) VALUES (1, N'2', CAST(0x81380B00 AS Date), NULL) INSERT [Z_STORE_TEAM] ([STORENUM], [TEAM], [EFFECTIVE], [FINISHED]) VALUES (2, N'1', CAST(0x01380B00 AS Date), NULL) INSERT [Z_STORE_TEAM] ([STORENUM], [TEAM], [EFFECTIVE], [FINISHED]) VALUES (2, N'2', CAST(0x20380B00 AS Date), NULL) Instead of Update Trigger: CREATE TRIGGER [tr_ZStoreTeam_update] ON [Z_STORE_TEAM] INSTEAD OF UPDATE AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Insert statements for trigger here INSERT INTO PCR.Z_STORE_TEAM(STORENUM,TEAM,EFFECTIVE) SELECT I.STORENUM,I.TEAM,GETDATE() AS EFFECTIVE FROM inserted I INNER JOIN PCR.Z_STORE_TEAM ST ON I.STORENUM = ST.STORENUM UPDATE ST SET FINISHED = GETDATE() FROM PCR.Z_STORE_TEAM ST INNER JOIN inserted I ON ST.STORENUM = I.STORENUM AND ST.EFFECTIVE = I.EFFECTIVE END GO ",RubberDuck,https://dba.stackexchange.com/users/37401,"The safest way to do this is to enforce your business rules using the built-in referential integrity constraints, as Alexander Kuznetsov describes in his article, ""Storing intervals of time with no overlaps"". Applying the techniques listed there to your sample table results in the following script: CREATE TABLE [Z_STORE_TEAM]( [STORENUM] [int] NOT NULL, [TEAM] [varchar](10) NULL, [EFFECTIVE] [date] NOT NULL, [FINISHED] [date] NULL, PRIMARY KEY CLUSTERED ( [STORENUM] ASC, [EFFECTIVE] ASC ) ) ON [PRIMARY]; INSERT [Z_STORE_TEAM] ([STORENUM], [TEAM], [EFFECTIVE], [FINISHED]) VALUES (1, N'1', CAST(0x01380B00 AS Date), CAST(0x81380B00 AS Date)), (1, N'2', CAST(0x81380B00 AS Date), NULL), (2, N'1', CAST(0x01380B00 AS Date), NULL); Modifications: -- New column to hold the previous finish date ALTER TABLE dbo.Z_STORE_TEAM ADD PreviousFinished date NULL; GO -- Populate the previous finish date UPDATE This SET PreviousFinished = Previous.FINISHED FROM dbo.Z_STORE_TEAM AS This CROSS APPLY ( SELECT TOP (1) Previous.FINISHED FROM dbo.Z_STORE_TEAM AS Previous WHERE Previous.STORENUM = This.STORENUM AND Previous.FINISHED <= This.EFFECTIVE ORDER BY Previous.FINISHED DESC ) AS Previous; GO ALTER TABLE dbo.Z_STORE_TEAM ADD CONSTRAINT UQ_STORENUM_PreviousFinished UNIQUE (STORENUM, PreviousFinished); GO ALTER TABLE dbo.Z_STORE_TEAM ADD CONSTRAINT CK_PreviousFinished_NotAfter_Effective CHECK (PreviousFinished = EFFECTIVE); GO ALTER TABLE dbo.Z_STORE_TEAM ADD CONSTRAINT UQ_STORENUM_FINISHED UNIQUE (STORENUM, FINISHED); GO ALTER TABLE dbo.Z_STORE_TEAM ADD CONSTRAINT FK_STORENUM_PreviousFinished FOREIGN KEY (STORENUM, PreviousFinished) REFERENCES dbo.Z_STORE_TEAM (STORENUM, FINISHED); GO ALTER TABLE dbo.Z_STORE_TEAM ADD CONSTRAINT CK_EFFECTIVE_Before_FINISHED CHECK (EFFECTIVE < FINISHED); An attempt to insert the fourth row of sample data now fails with an error message: INSERT [Z_STORE_TEAM] ([STORENUM], [TEAM], [EFFECTIVE], [FINISHED]) VALUES (2, N'2', '20140201', NULL); Please read Alex's article to understand how these constraints ensure your table data will always be valid. Having a set of constraints enforce your data integrity means no trigger code is required. ",Paul White,https://dba.stackexchange.com/users/1192,http://dba.stackexchange.com/questions/64862/what-is-the-correct-way-to-ensure-unique-entries-in-a-temporal-database-design,TECHNOLOGY,dba.stackexchange.com 601,"What is a ""strictly positive distribution""?","I am reading Judea Pearl's ""Causality"" (second edition 2009) and in section 1.1.5 Conditional Independence and Graphoids, he states: The following is a (partial) list of properties satisfied by the conditional independence relation (X_||_Y | Z). Symmetry: (X_||_ Y | Z) ==> (Y_||_X | Z). Decomposition: (X_||_ YW | Z) ==> (X_||_Y | Z). Weak union: (X_||_ YW | Z) ==> (X_||_Y | ZW). Contraction: (X_||_ Y | Z) & (X_||_ W | ZY) ==> (X_||_ YW | Z). Intersection: (X_||_ W | ZY) & (X_||_ Y | ZW) (X_||_ YW | Z). (Intersection is valid in strictly positive probability distributions.) (formula (1.28) given earlier in the publicatiob: [(X_||_ Y | Z) iff P(X | Y,Z ) = P(X | Z) ) But what is an ""strictly positive distribution"" in general terms, and what distinguishes a ""strictly positive distribution"" form a distribution that is not strictly positive? ",Willemien,https://stats.stackexchange.com/users/43180,"A strictly positive distribution $D_{sp}$ has values $D_{sp}(x)>0$ for all $x$. This is different from a non-negative distribution $D_{nn}$ where $D_{nn}(x) \geq 0$. ",usεr11852,https://stats.stackexchange.com/users/11852,http://stats.stackexchange.com/questions/92686/what-is-a-strictly-positive-distribution,SCIENCE,stats.stackexchange.com 1193,Does Raspberry Pi 2 support RTOS?,"did somone have the knowdlege is new Raspberry Pi 2 is compatibile with Xenomai RTOS? In old version (Raspberry 1) that was a path which make berry to work with Xenomai. I was started reading about second version about possibility to port old application written for Raspberry 1 with Xenomai to v.2. ",five555,https://raspberrypi.stackexchange.com/users/27448,"Looks to me like Xenomai is meant to be source built. So you should be able to do this. Someone evidently has precompiled binaries for the regular pi. The only issue with this will be the kernel: the old armv6 userland will work on the pi 2, but you still need a different kernel for it. But while armv6 code will run on the pi 2, as noted here (see ""How much faster is it?""), if you want to realize the full potential of the new cores, you need stuff that was compiled for armv7 (which will not run on the old pi). You probably want to cross-compile, since the pi 2 is still really slow compared to a normal desktop. Fortunately, ready made x86 -> armv7 tool chains are much easier to find than armv6 ones. If the instructions on the Xenomai site aren't enough, here's a decent looking guide to building a Xenomai system with a raspbian userspace. Note again though that this means using slower armv6 user land binaries (there is no armv7 raspbian currently, just the armv6 one with an armv7 kernel) -- however it might provide a simple starting point for you to get a kernel running, and then you can tackle building the userland properly as a second stage. ",goldilocks,https://raspberrypi.stackexchange.com/users/5538,http://raspberrypi.stackexchange.com/questions/28093/does-raspberry-pi-2-support-rtos,TECHNOLOGY,raspberrypi.stackexchange.com 4991,"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? ",user6615,https://boardgames.stackexchange.com/users/6615,"No. There must be a transition. As per the English definition, ""to become untapped"" is ""to begin to be untapped"". In fact, the ability you mentioned won't even try to untap it. It's impossible untap a permanent that's already untapped. That's why you can't activate an ability with the untap symbol ({Q}) in its cost if the source of the ability is already untapped. Similarly, it's impossible to tap a permanent that's already tapped. That's why you can't activate an ability with the tap symbol ({T}) in its cost if the source of the ability is already tapped. This wouldn't stop you from casting a spell that would try to do these impossible actions. The spell will simply do as much as possible, and skip over the impossible instruction. e.g. Gerrad's Command on an untapped creature would effectively become ""Target creature gets +3/+3 until end of turn."", and Crippling Chill on tapped creature would effectively become ""Target creature doesn't untap during its controller's next untap step."" ",ikegami,https://boardgames.stackexchange.com/users/2880,http://boardgames.stackexchange.com/questions/14225/can-an-untapped-creature-become-untapped,CULTURE,boardgames.stackexchange.com 5931,"Does a Summoned Creature have a ""start of turn?""","Many effects apply at the start of a creature's turn; however, summoned creatures don't take turns and only perform actions when their summoner expends an action. Thus, is a summoned creature affected by things that apply their effects at the start of a turn? For example, if a summoned creature is within an aura or zone that deals damage at the start of a creature's turn, does the summoned creature ever take that damage? ",Soulrift,https://rpg.stackexchange.com/users/3645,"The answer to this is actually different depending on who summons the creature. I'll answer for each case. PC summons In this case the start of the Summons's turn would be the beginning of the PCs turn. You can consider this as a separate creature in the initiative order if you'd like, but ultimately it should be that he beginning of the summons' turn is also the beginning of the PC's turn (same with end of turn stuff). It doesn't have actions and should share your initiative value (as it shares your action pool essentially) NPC summons The power will specify where the summon acts, however because it has actions of it's own it should get a discrete turn so effects that happen on x-part of turn should happen during the summons's turn. Usually this turn happens at the same place in the initiative order as the summoner, but not always (again, power/encounter should specify). ",wax eagle,https://rpg.stackexchange.com/users/1084,http://rpg.stackexchange.com/questions/14232/does-a-summoned-creature-have-a-start-of-turn,CULTURE,rpg.stackexchange.com 655,Online broker available in Europe - to buy index funds or ETF with small investments,"So i am trying to start investing periodically some small amounts. I am particularly interested in index funds or ETF. I would like to be able buy, track, sell them, and etc online. There are a lot of online brokers like : TD Ameritrade, etrade and etc. , but i cant seem to find the one that would allow to register fro Europe citizen, like from Denmark. (all the top ones require USA citizenship or etc). Is there any like that at all ? If not - what other options there are to make such investments ? ",XFaktor,https://money.stackexchange.com/users/17734,"You should try Nordnet. I think they should have a monthly saving plan on ETFs over there too. ",kliq,https://money.stackexchange.com/users/17811,http://money.stackexchange.com/questions/33724/online-broker-available-in-europe-to-buy-index-funds-or-etf-with-small-investm,LIFE_ARTS,money.stackexchange.com 4329,"Getting rid of ""Tethering Detected"" popup on Android ICS 4.0?","I just got a Samsung Galaxy S3 that runs Android ICS 4.0.8. When I connect the Galaxy S3 to my Mac laptop and use PDAnet to tether, I often get this popup on the Galaxy S3 screen: Tethering via PDAnet works great, but the popup can get annoying. I can close the popup, but it comes back a few seconds later. How can I get rid of this popup permanently? ",solvingPuzzles,https://android.stackexchange.com/users/25730,"This to me looks like something your provider has added in to stop you getting free tethering on your data plan. If you are rooted (which I assume you are as you are using a tethering app), then you can attempt to freeze the app that is responsible for this, using an app freezer such as App Quarantine ROOT. If it isn't an app, then it may be part of the ROM directly, in which case you would have to install a custom ROM such as CyanogenMod. You should look at forums such as XDA-Developers to find a ROM for your device. Using a custom ROM will definitely remove the message. ",Liam W,https://android.stackexchange.com/users/11209,http://android.stackexchange.com/questions/36313/getting-rid-of-tethering-detected-popup-on-android-ics-4-0,TECHNOLOGY,android.stackexchange.com 4898,Java 8 -- How do I calculate (milli)seconds from now using xsd:duration,"I feel like this question has been asked in one way or another, but I'm still not confident of my result. I have an xsd:duration which will give me a desired expiration described in years, months, days, and seconds. I can collect the integer values of these parts with, for example, duration.getYears() or duration.getMonths(). Because my chosen db is Cassandra, I want to exploit the TTL option, which will automatically expire an inserted row after a specified number of seconds. The critical part is getting from xsd:duration to an integer/long value of seconds which respects the Gregorian calendar (where 1 month from now is not simply 30.41 days, but 31). At the moment, I'm using the following code: LocalDateTime then = LocalDateTime.now().plusYears(duration.getYears()).plusMonths(duration.getMonths()).plusDays(duration.getDays()).plusHours(duration.getHours()).plusMinutes(duration.getMinutes()).plusSeconds(duration.getSeconds()); long ttlMillis = then.toInstant(ZoneOffset.UTC).toEpochMilli() - Instant.now().toEpochMilli(); Is there a quicker/cleaner way to do this? I'm also not sure if I should worry about large durations... My particular use cases wouldn't call for anything larger that 2 years. ",blackstrype,https://stackoverflow.com/users/404750,"Informational note for all: You are talking about javax.xml.datatype.Duration, not java.time.Duration. Your questions: a) Is there a quicker way to do this (using Java-8)? Hardly. The designers of JSR-310-team responsible for the new date- and time library in Java-8 have not cared much about the bridge to the existing XML-classes in JDK. So there is no direct way to convert from xml-duration to any kind of JSR-310-duration. Keep also in mind that the JSR-310-classes Period (with state consisting of years, months and days) and Duration (with state consisting of seconds and nanoseconds) are not really designed for representing an xml-duration (which has more units as seen in your code). So I doubt if we might see a well-defined bridge between JSR-310 and XML in the future (maybe only on millisecond base?). The sign handling is also completely different in JSR-310 and XML. So be cautious if you have negative sign in xml-duration. b) Is there a cleaner way to do this (using Java-8)? Yes, a little bit. One thing to consider is: I would use the clock as time source for the actual instant only once and not twice as you have done it. Example for this (very) minor improvement: Instant now = Instant.now(); LocalDateTime start = now.atOffset(ZoneOffset.UTC).toLocalDateTime(); LocalDateTime end = start.plusYears(duration.getYears()) .plusMonths(duration.getMonths()) .plusDays(duration.getDays()) .plusHours(duration.getHours()) .plusMinutes(duration.getMinutes()) .plusSeconds(duration.getSeconds()); long deltaInMillis = end.toInstant(ZoneOffset.UTC).toEpochMilli() - now.toEpochMilli(); Second thing to consider: The xml-duration class is designed for interoperation with java.util.Date. So you also have this short alternative: Date start = new Date(); long deltaInMillis = duration.getTimeInMillis(start); This alternative is not only much shorter, but is probably also more precise because it takes into account the millisecond part. According to the documentation you should only worry about the correctness if you have duration items in long range (excessing the range of int). Another topic is the relationship to any hidden timezone calculation. I have not seen any hint in the documentation, so this is maybe the only item which can make you worry (either local timezone? or UTC? - not tested). c) Why worry about large durations? Even if your duration is larger than let's say some centuries possibly crossing the validity limits of historic gregorian calendar, you should keep in mind that xml-duration only uses the proleptic gregorian calendar, not the historical one. And LocalDateTime uses the same proleptic gregorian calendar, too. If such a large duration is related to any real data is another good question however. ",Meno Hochschild,https://stackoverflow.com/users/2491410,http://stackoverflow.com/questions/26040592/java-8-how-do-i-calculate-milliseconds-from-now-using-xsdduration,STACKOVERFLOW,stackoverflow.com 4587,Is there a way to query Magento Database for part OR all of an unserialized string?,"I would like to know how to query a column for all or part of a string. I have created a module which uses data additional_information column from the Sales_Flat_Order_Payment table which I have been able to unserialize and display in a grid. However, when serching/filtering this column the user has to enter the full value which can be time consuming so I would like to filter using ANY value. At the moment my filter is setup using strlen but I would like to know if there is a better way for me to do it please? protected function _paymentFilter($collection, $column) { case ""additional_information_column"": { $this->getCollection()->getSelect()->where( ""sfop.additional_information like ?"" , '%column"";s:'.strlen($value).':""%'.$value.'%'); break; } } Any ideas are much appreciated... ",user1704524,https://magento.stackexchange.com/users/2157,"Unfortunately, no, you can't do this any better/efficiently than your current solution. The algorithm used to serialize a variable in PHP is proprietary to PHP. MySQL (or the other RDMS) know nothing about it, so there's no query tools other than a raw string LIKE that work with the fields. In theory it would be possible (via object listeners) to save the serialized data into join tables, and then alter your grid collections to pull the data you want from that join table — but this approach is complicated, fraught with problems and would require testing/iterations to work out potential bugs. ",Alan Storm,https://magento.stackexchange.com/users/4,http://magento.stackexchange.com/questions/12696/is-there-a-way-to-query-magento-database-for-part-or-all-of-an-unserialized-stri,TECHNOLOGY,magento.stackexchange.com 8051,Visual Studio keeps changing resx files,"I'm working on a VB.Net project and using SVN. I noticed that every time I open my main form, Visual studio slightly modifies my .resx file, which means that I keep having to re-commit it, which is quite annoying. Has anybody experienced such problems? A diff file demonstrating the problem can be seen at http://synchronicity.svn.sourceforge.net/viewvc/synchronicity/trunk/Create%20Synchronicity/MainForm.resx?r1=272&r2=359&pathrev=359 Thanks, CFP. ",Clément,https://stackoverflow.com/users/695591,"Bit late, but this sounds like a problem I raised with Microsoft around Image Lists:https://connect.microsoft.com/VisualStudio/feedback/details/428868/png-files-corrupted-in-an-imagelist-when-opening-and-closing-a-form ",LaughingJohn,https://stackoverflow.com/users/3295396,http://stackoverflow.com/questions/2682682/visual-studio-keeps-changing-resx-files,STACKOVERFLOW,stackoverflow.com 3128,Why did Voldemort assume that no-one knew about Room of Hidden Things?,"Voldemort hid one of his Horcruxes inside Hogwarts. It seemed to be relying on security through obscurity as far as protecting it. But as we know, it ended up not being so secure because it wasn't so obscure - Harry Potter knew about the Room of Hidden Things. My question is, the way Rowling describes this hints at the fact that Riddle had an assumption that very few people would ever stumble upon that room. *WHY??? First, let's show Harry's theory on what Voldemort was thinking, how and why: Here's Harry understanding Voldemort's thinking in HP7 once he figured out where the Diadem was (bold emphasis mine): Tom Riddle, who confided in no one and operated alone, might have been arrogant enough to assume that he, and only he, had penetrated the deepest mysteries of Hogwarts Castle. Of course, Dumbledore and Flitwick, those model pupils, had never set foot in that particular place, but he, Harry, had strayed off the beaten track in his time at school – here at least was a secret area he and Voldemort knew, that Dumbledore had never discovered – ...and later on, with Harry explains the location to Ron/Hermione: “He hid it exactly where I had my old Potions book, where everyone’s been hiding stuff for centuries. He thought he was the only one to find it. Come on.” “And he never realized anyone could get in?” said Ron, his voice echoing in the silence. “He thought he was the only one,” said Harry. . Yet, from available evidence, that seems to be a completely wrong assumption, even at Voldemort's time. Let's examine that last quote again, with emphasis on other info available: “He hid it exactly where I had my old Potions book, where everyone’s been hiding stuff for centuries.” ... ... “And he never realized anyone could get in?” said Ron, his voice echoing in the silence. “He thought he was the only one,” said Harry. “Too bad for him I’ve had to hide stuff in my time... this way,” he added. “I think it’s down here... “ They sped off up adjacent aisles; Harry could hear the others’ footsteps echoing through the towering piles of junk, of bottles, hats, crates, chairs, books, weapons, broomsticks, bats... . OK, so if there's a truckload (or train-load, by the description) of stuff in that room, isn't the only reasonable conclusion: ""the room is a fairly popular destination with plenty of people who've found their way there in the past, and therefore, likely, plenty who will in the future""? Doesn't matter what your arrogance level is, the evidence seems to point to only one conclusion - it's quite fine as a place to temporarily bury your dirt so teachers won't tag you for your misdeeds, but this is NOT the place to hide something that you want permanently safe! So why did Voldemort make such a moronic mistake? ",DVK-on-Ahch-To,https://scifi.stackexchange.com/users/976,"I think Voldemort's arrogance has to be included in the equation. Voldemort truly believed that he was the only person to discover the Room of Hidden Things/RoR/CaGR, whether that seems logical or not. After escaping Gringotts and jumping off the dragon into the lake, Harry finds himself inside Voldemort's head, able to read Voldemort's thoughts about the Horcruxes: [Voldemort] As for the school: he alone knew where in Hogwarts he had stowed the Horcrux, because he alone had plumbed the deepest secrets of that place ... And Hogwarts ... but he knew that his Horcrux there was safe, it would be impossible for Potter to enter Hogsmeade without detection, let alone the school. Nevertheless, it would be prudent to alert Snape to the fact that the boy might try to re-enter the castle ... Deathly Hallows - Page 444 - British Hardcover Harry says, ""He thinks the Hogwarts one is safest, because Snape’s there, because it’ll be so hard not to be seen getting in, I think he’ll check that one last, but he could still be there within hours –' I also think Voldemort was emotionally compelled to hide at least one Horcrux in Hogwarts. Hogwarts -- not unlike for Harry -- was the only place Tom Riddle/Voldemort ever considered a home. Given his propensity for attachment to things (Hogwarts, Founders' items, the snake Nagini) rather than people, it makes sense that 1) he would want to hide a Horcrux in the place that he considered home and 2) due to his emotional attachment to Hogwarts, he could have very well thought that the castle itself claimed him as its ultimate master. If so, then of course no one else would have discovered the Room of Hidden Things, because Hogwarts belonged to Voldemort (in his mind) and Voldemort alone. This represents a twisted sense of entitlement, the inability to see others as equals (seeing people as unskilled in achieving the high level of magical power that he himself had), and unable to imagine that any wizard other than himself could possibly discover or work out the secrets contained within the castle. So, to answer the question, the reason Voldemort made such a moronic mistake in leaving the diadem Horcrux essentially in plain view is because his thinking is distorted and skewed -- for he recognises no other as an intellectual equal or someone to learn from (he already believes he knows it all -- and is full of logic and thinking errors.) Once again, Voldemort underestimates that which he does not value, and there is so much that he does not value that his perception of the world is myopic, imbalanced, and not reflective of reality. ",Slytherincess,https://scifi.stackexchange.com/users/3500,http://scifi.stackexchange.com/questions/8734/why-did-voldemort-assume-that-no-one-knew-about-room-of-hidden-things,LIFE_ARTS,scifi.stackexchange.com 8131,How do you import members from another system to Wordpress and update passwords so they'll work?,"Our current system ( not using Wordpress ) has 1000s of users that we need to port over to Wordpress. The problem we're running into is that the passwords can't stay the same. In our current system the passwords are saved with: md5( md5( $password ) . USER_SALT ); // USER_SALT is a defined constant Not the best obviously, but not the worst... We need to make these password hashes that we currently have work in WP as well. Is there a way we can run all new passwords through this setup first and then through WPs own hashing? I know you can hook into the functions like: function my_hash_password($password){ return md5( md5( $password ) . USER_SALT ); } add_action('wp_hash_password', 'my_hash_password' ); For some reason that's not fully working either. Surely somebody else has already gone through this before. Thanks. EDIT !!!! So far there is some confusion. I am NOT asking no un-hash the hashed password that we have. What I am saying is that with our current system the passwords look like: Password: password Hash function: md5( md5( $password ) . USER_SALT ); Output: d372f9c033e9c358b111ff265e080d3a I want to 'maybe' be able to take the hash above and feed it to the native WP password hasher so that: d372f9c033e9c358b111ff265e080d3a becomes... $P$BdrwxndTzgTVHUozGpQ9TEMYd6mpTw0 after it goes through their function. Then when a user logs in we send their plain text password back through our function and then through WPs to get a match. UPDATE !!! So following the advice from rarst below I've done this: function my_check_password($password, $hash, $user_id = '') { global $wp_hasher; if ( $hash == md5( md5( $password ) . USER_SALT ) ){ if ( $user_id ) { $check = true; wp_set_password($password, $user_id); $hash = wp_hash_password($password); } return apply_filters( 'check_password', $check, $password, $hash, $user_id ); } // If the hash is still md5... elseif ( strlen($hash) <= 32 ) { $check = hash_equals( $hash, md5( $password ) ); if ( $check && $user_id ) { // Rehash using new hash. wp_set_password($password, $user_id); $hash = wp_hash_password($password); } return apply_filters( 'check_password', $check, $password, $hash, $user_id ); } // If the stored hash is longer than an MD5, presume the // new style phpass portable hash. if ( empty($wp_hasher) ) { require_once( ABSPATH . WPINC . '/class-phpass.php'); // By default, use the portable hash from phpass $wp_hasher = new PasswordHash(8, true); } $check = $wp_hasher->CheckPassword($password, $hash); /** This filter is documented in wp-includes/pluggable.php */ return apply_filters( 'check_password', $check, $password, $hash, $user_id ); } add_action('wp_check_password', 'my_check_password' ); But this is still not working. What am I missing? ",Tomas,https://wordpress.stackexchange.com/users/77093,"You couldn't have a more perfect solution, since this is precisely what WordPress core itself has to handle. See, in early years WP used just one pass MD5 for passwords. Then they went to better hashing, but obviously it should have kept working with old hashes. Now if you take a look at wp_check_password(), what it is doing (at the moment user attempts to log in) is following: Checks if hash looks ""old"" If so verifies it in ""old"" mode If so updates hash to ""new"" one (using password, which is available at this moment in runtime) Otherwise verifies in ""new"" mode You should simply follow precise same logic! Hook into check_password or override wp_check_password() altogether (it's so called pluggable function). Then implement same check & upgrade logic for your hashes. ",Rarst,https://wordpress.stackexchange.com/users/847,http://wordpress.stackexchange.com/questions/196272/how-do-you-import-members-from-another-system-to-wordpress-and-update-passwords,TECHNOLOGY,wordpress.stackexchange.com 196,RenderTarget2D behavior in XNA,"I've been dabbling with XNA for a couple of days now. This chunk of code doesn't work as I expect. The goal is to render sprites individually and composite them on another rendertarget. P = RenderTarget2D(with RenderTargetUsage.PreserveContents) D = RenderTarget2D(with RenderTargetUsage.DiscardContents) for all sprites: { graphicsDevice.SetRenderTarget(D); <draw sprite i> graphicsDevice.SetRenderTarget(P); <Draw D> } graphicsDevice.SetRenderTarget(null); <Draw P> The result I get is - only the last sprite is visible. I'm sure I'm missing some piece of information about RenderTarget2D. Any hints on what that might be? ",Utkarsh Sinha,https://gamedev.stackexchange.com/users/3533,"Why do you need to set rendertargets so many times? Why not just: graphicsDevice.SetRenderTarget(D); graphicsDevice.Clear(Color.Transparent); for all sprites: { <draw sprite i> } graphicsDevice.SetRenderTarget(P); <Draw D> ",Habba,https://gamedev.stackexchange.com/users/15035,http://gamedev.stackexchange.com/questions/26606/rendertarget2d-behavior-in-xna,TECHNOLOGY,gamedev.stackexchange.com 168,Why is the potential function defined differently in physics and calculus?,"I am very familiar with the concept of a potential function, and potential energy, from calculus-based physics. For instance, if we have the familiar force field $\mathbf{F} = -mg \,\mathbf{j}$, then a potential function is given by $U = mgy + C$. (Since potential energy is relative, we have an infinite number of potential functions.) Notice that the gradient of the potential function is the negative of the force field: $$\nabla U = \nabla(mgy + C) = mg \,\mathbf{j} = -\mathbf{F}.$$ That was perfectly fine with me. But now in vector calculus, I am reading that the potential function $f$ of a vector function $\mathbf{F}$ is such that $\nabla f = \mathbf{F}$. A negative sign appears to have been lost when migrating from physics to calculus. It seems confusing to call $f$ a ""potential function"", since it cannot be interpreted as potential energy in the real world. So why is the calculus nomenclature as it is (i.e., why not call this something else and then say the potential function is the negative of it)? ",Radon Rosborough,https://math.stackexchange.com/users/160658,"After reading further on in my calculus textbook, I found that they later defined the potential energy as the negative of the potential function. So it appears that the reasoning presented in my question was correct, but that some sources simply use a slightly different definition for ""potential function"" – not because it corresponds to potential energy, but because a convenient name is needed for it. Wikipedia says that the gradient of the potential is the negative of the vector field, but that ""In some cases, mathematicians may use a positive sign in front of the gradient to define the potential."" ",Radon Rosborough,https://math.stackexchange.com/users/160658,http://math.stackexchange.com/questions/1335576/why-is-the-potential-function-defined-differently-in-physics-and-calculus,SCIENCE,math.stackexchange.com 4349,Simple way to delete users account?,"Is there a simple way or code to delete the account from a user? I want to delete the username, email address, first_name, last_name and the profile-data. I do have two apps Thanks! ",craphunter,https://stackoverflow.com/users/496401,"Can You Explain What kind of application you Use? If you use some kind of database with your application then simply run delete query with some specific condition ",S K,https://stackoverflow.com/users/371665,http://stackoverflow.com/questions/4837591/simple-way-to-delete-users-account,STACKOVERFLOW,stackoverflow.com 4406,No sound in Ubuntu except at log in,"I installed Ubuntu 12.04 a month ago and am using it till now. I failed to notice that all this time there was no sound at all while running Ubuntu, even while playing a game in Wine. The weird thing is that only the startup sound comes when I log in (Indian/African drum tone), then comes the utter silence. I tested both Digital Output (S/PDIF) and the speakers in the sound settings but can hear nothing. Any help? ",Mohd Arafat Hossain,https://askubuntu.com/users/58164,"You do not need to install a new kernel. You can install only another version of ALSA. You can try this https://code.launchpad.net/~ubuntu-audio-dev/+archive/alsa-daily/+packages daily build repositary of ALSA. ",Shaneo1,https://askubuntu.com/users/38407,http://askubuntu.com/questions/132577/no-sound-in-ubuntu-except-at-log-in,TECHNOLOGY,askubuntu.com 3964,php scripts run only after renaming,"That's really strange :So after i upload a folder with php files on another service,and try to execute them from a browser,i get 500 error.If i open a file in a text editor,save it with different name like file1.php,then erase the original,and rename the file1.php to the previous name,it works. ",a44,https://serverfault.com/users/75084,"The sequence ""upload, fail, edit, save, rename, succeed"" tells me that it's likely a line-ending issue. Try running: dos2unix original-uploaded-file to see if that fixes the problem. ",Dennis Williamson,https://serverfault.com/users/1293,http://serverfault.com/questions/249358,TECHNOLOGY,serverfault.com 2410,How to mount a ham?,"I bought a Serrano ham on sale. It's the whole pig's leg, and it comes with a kind of a stand. However, the stand was delivered in pieces like IKEA furniture, but unlike IKEA, it has no manual explaining what goes where. I'm especially puzzled about the large ring and the small trapez-without-base shaped pieces. Once must go up to hold the ankle, the other one down to hold the haunch. But which goes where, and how do I fasten the ham to the metal? Do I have to screw the metal screws through the bone? The picture shows all parts delivered, only the inbus key is not in the frame. I put the trapezoid part onto the lower hole and started fastening it with a pointy screw; it's quite a long screw (7-8cm). ",rumtscho,https://cooking.stackexchange.com/users/4638,"This should help, it's not precisely exact, but you can probably figure it out from here. ",Jolenealaska,https://cooking.stackexchange.com/users/20183,http://cooking.stackexchange.com/questions/53944/how-to-mount-a-ham,LIFE_ARTS,cooking.stackexchange.com 758,how to display a message box for a user in Java,"I want to display a message box to show some message in Java, and the box should have three buttons that the user can press such that the program can get value when user presses the button. ",MagicConch,https://stackoverflow.com/users/1957202,"I think this is what you are looking for //Custom button text Object[] options = {""Yes, please"", ""No, thanks"", ""No eggs, no ham!""}; int n = JOptionPane.showOptionDialog(frame, ""Would you like some green eggs to go "" + ""with that ham?"", ""A Silly Question"", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[2]); Please refer to oracle documentation here ",Bhushan,https://stackoverflow.com/users/1551233,http://stackoverflow.com/questions/14209908/how-to-display-a-message-box-for-a-user-in-java,STACKOVERFLOW,stackoverflow.com 9524,Can I substitute a stainless steel pot for the traditional iron dutch oven?,"I have very limited options in my kitchen, and while the dutch oven is the preferred method for getting an 'oven spring' while baking sourdough, I do not have a cast iron pot to do it. IF stainless steel is a good substitute, should I consider extra precautions? ",erasmortg,https://cooking.stackexchange.com/users/23068,"i have not tested this myself but I do have a thought. I would tend to think that something a little less conductive would yield better results than a stainless steel stock pot. Cast Iron, Terracotta, earthenwear and other pots typically used for this are decent insulators, they take much longer to heat up. Just a stainless steel pot would probably transmit the heat too quickly resulting in and uneven baking of your bread. ",Rhapsody,https://cooking.stackexchange.com/users/33025,http://cooking.stackexchange.com/questions/47833/can-i-substitute-a-stainless-steel-pot-for-the-traditional-iron-dutch-oven,LIFE_ARTS,cooking.stackexchange.com 3670,Finding out which version PHP a remote server is running,"I can't imagine this is possible but maybe there's some novel way. I'm developing an app which will require a few php files to be deployed and run on the clients' webservers. I'm not particularly interested in targeting clients who are still running pre version 5 versions of PHP. So is there any way one can tell which version of PHP a remote webserver has running? ",jontyc,https://serverfault.com/users/77339,"In fiddler, go to the compose tab and type in the web address and send a GET request. Then when the response pops up in the left window, double click on it. On the right side it'll showt he request and response details. In the response details (bottom right), click the RAW or HEADERS tab and take a look at the headers. The server info will be next to the Server: header ",Sinaesthetic,https://serverfault.com/users/168961,http://serverfault.com/questions/268096,TECHNOLOGY,serverfault.com 4009,Roots of this third degree polynomial,"I've got the following polynomial $$ x^3-6x^2-2x+40 $$ and I want to find its roots. The only option I see at the moment is to compute all the divisors of $40$ and their inverse, and manually check if it's result is $0$. This works, because $4$ is a zero and now we can divide the polynomial by the factor $x-4$, resulting in a second degree polynomial (which is easier to solve). I was wondering if there's any other method/idea to manually find the roots of this polynomial? ",ABC,https://math.stackexchange.com/users/91270,"For polynomial of degree $3$ you can use the following procedure. Assume that you guessed the solution $x_1=4$ (indeed $4^3-6\cdot 4^2-2\cdot 4+40 = 64 -96-8+40 =0)$. You can use Horner's method to get the polynomial $p(x)=p_2x^2+p_1x+p_0$ such that $(x-4)\cdot p(x) = x^3-6x^2-2x+40$. You want to do that because $p(x)$ will be a polynomial of degree $2$ and it is easy (see here ) to find the solutions of such polynomial. In your case you have (with Horner's method) $$\begin{array}{|c|c|c|c|c|}\hline&1&-6&-2&40\\\hline 4&0&1\cdot 4=4&-2\cdot 4=-8&-10\cdot 4=-40\\\hline&0+1=\color{blue}{\underbrace{1}_{:=p_2}}&-6+4=\color{blue}{\underbrace{-2}_{:=p_1}}&-2-8=\color{blue}{\underbrace{-10}_{:=p_0}}&40-40=\color{red}0\\\hline\end{array}$$ So your polynomial becomes $p(x) = \color{blue}1\cdot x^2\color{blue}{-2}\cdot x\color{blue}{-10}= x^2-2x-10$. The remainder, as you can see, is $\color{red}0.$ The solutions to this polynomial are $$x_{2,3}=\dfrac{2\pm2\sqrt{11}}{2}=1\pm11$$ The solutions are therefore $x_{1,2,3}=4,1+\sqrt{11},1-\sqrt{11}$. ",Bman72,https://math.stackexchange.com/users/119527,http://math.stackexchange.com/questions/962303/roots-of-this-third-degree-polynomial,SCIENCE,math.stackexchange.com 215,What are the uses for a roasting pan? Do I really need a roasting pan?,"We registered for a roasting pan and it has been sitting around taking up a lot of space. Do I really need this or is this a ""one-tasker"" as Alton Brown would say? I understand that the roasting rack allows the juices to drip down. I've had lots of success roasting chickens just in a baking pan with 2"" high sides. ",milesmeow,https://cooking.stackexchange.com/users/2125,"I use my roasting pan (either with or without a rack) at least once a week to roast vegetables - either for salads, for sides, or (for instance with pumpkin for soup) to get a slightly different and more concentrated flavour before blending the veges. I find the vegetables cook more evenly in a roasting pan than a baking pan - perhaps the higher sides help to create a kind of microclimate around the veges?? Not sure about that one. When making roast vege salads, you can take the pan straight out of the oven and take advantage of the high sides to mix your other ingredients in (pasta, greens, dressing etc) then serve from there if no one is looking at your serving dish! I also use it as a water bath when cooking souffles, puddings etc. ",KimbaF,https://cooking.stackexchange.com/users/2939,http://cooking.stackexchange.com/questions/8608/what-are-the-uses-for-a-roasting-pan-do-i-really-need-a-roasting-pan,LIFE_ARTS,cooking.stackexchange.com 7499,"How can I learn how to lay out an ""evidence scene""?","I feel like I'm particularly bad at any kind of scene where I want to drop clues. I'm hesitant to use the term ""crime scene"" because it's not always being investigated by ""police"", and some of these times there isn't any kind of typical evidence. I'm not even 100% sure that my problem is just the scene, but rather creating enough evidence to begin with. Other aspects I struggle with is witnesses - both witnesses with knowledge, and how to reveal it. Having useless witnesses for flavor, etc. I keep feeling that in general I give too little in these scenes, and everything I give is important. Since I suspect this is a rather broad problem, I'd like to know if there are any Role Playing resources (sections of books, site, etc) that are specifically geared at teaching this portion of RPG storytelling? I'm currently playing in the ""new"" World of Darkness 2.0, but I want answers on this not tied to the game system's rules. ",xenoterracide,https://rpg.stackexchange.com/users/1015,"""Just the facts"" just isn't enough Plan more flavor and context into your scenes, and your story. WoD games often lend themselves to strong thematic overtones, so don't skimp. Small side stories, or a growing tapestry of NPCs can both add a feeling of depth to the play experience. As you write later scene, call back to those ""useless"" or ""flavor"" elements from earlier. These threads don't support the factual investigation story, but they support the emotional investment the players should develop. Recurring NPCs, even if they are unimportant people, are characters the player can start to get attached to, or develop other feelings towards like pity, anger, or curiosity. Less ""important"" people can also illustrate the human impact of what the antagonist(s) and PCs are doing in the world. Add enough grit and detail to create a solid emotional journey, and the story will feel more meaty. More facts don't hurt, either That said, writing a good story/mystery can be ten times harder for most of us than telling it back during play. I've fallen into the trap of carefully coming up with some scheme for the players to learn about, thinking it was great because I spent so long on it and put so much effort into it. Then, they quickly gobbled it up and were ready for more... that I didn't have! Try just adding more facets to the story and clue details to found. ",Jessa,https://rpg.stackexchange.com/users/17690,http://rpg.stackexchange.com/questions/50671/how-can-i-learn-how-to-lay-out-an-evidence-scene,CULTURE,rpg.stackexchange.com 9148,How can I improve this DB query? it takes too much time,"The query is this: $today = $date->getTimestamp(); SELECT t.*, u.screen_name, u.profile_image_url FROM table AS t LEFT JOIN users AS u ON t.user_id=u.id_str WHERE UNIX_TIMESTAMP(t.created_at) > {$today} ORDER BY id DESC LIMIT 12; ",Mariano Argañaraz,https://dba.stackexchange.com/users/15525,"Even though you didn't post table definitions in your question so I can't tell for sure what is missed, the following indexes will be beneficial : Index on table (user_id, created_at) Index on users(id_str) or even users(id_str,screen_name,profile_image_url) I guess you already have an index on table(id) UPDATE Change WHERE : from WHERE UNIX_TIMESTAMP(t.created_at) > {$today} to WHERE t.created_at > FROM_UNIXTIME({$today}), this way optimizer will use index that includes create_at column more efficiently. ",a1ex07,https://dba.stackexchange.com/users/2232,http://dba.stackexchange.com/questions/29070/how-can-i-improve-this-db-query-it-takes-too-much-time,TECHNOLOGY,dba.stackexchange.com 4093,Oatmeal & Lactose Intolerance,"I work as a kitchen aide in an assisted living community. I assist the cooks in some aspects of kitchen prep (mostly non-cooking), but occasionally I help in the actual cooking of food. For breakfast, oatmeal is served every morning. The residents enjoy the creaminess of the oatmeal when milk is added, but for those who are lactose intolerant I cannot take that risk. So what alternatives to milk can I use to create a creamier oatmeal? ",user15605,https://cooking.stackexchange.com/users/15605,"You can try some hydrocolloid thickeners like xanthan gum or guar gum. These generally are used in small amounts and dispersed in a cold liquid. These will help the oatmeal seem ""creamier"". (FWIW, Quaker Oatmeal's non-dairy flavored oatmeals include guar gum for this very reason.) ",Eli Lansey,https://cooking.stackexchange.com/users/6610,http://cooking.stackexchange.com/questions/30685/oatmeal-lactose-intolerance,LIFE_ARTS,cooking.stackexchange.com 9452,Is wikipedia a valid source to use on MSE?,"Generally in my answers I like to add sources to, in some sense, back up what I claim in said answer. I often use wikipedia, but recently have seen a few comments saying ""don't trust wikipedia entirely for advanced mathematics"". I personally haven't seen any fallacies from wikipedia, but then again I'm not exactly in high level math (the math I'm studying right now I can't exactly find on wikipedia ;)). The general question here is as in the title: Is wikipedia a valid source to use on MSE? Recently (meaning today) I have been using wolfram pages as my backup. I do not believe the general public can edit that so I feel it may be safer. Is there some sort of regulation for this? ",DanZimm,https://meta.math.stackexchange.com/users/37872,"I use Wikipedia links frequently for reference definitions of terms and occasionally named theorems, and only sparingly for authority or proofs of the truth of propositions (although I do often link to other sources for such material). It occasionally happens that someone finds a mathematical claim in a Wikipedia article doubtful enough to pose a Question here about it. In this way MSE can act as a backstop/truth-checker on Wikipedia, and I think this is a natural advantage of the Creative Commons licensing used by both sites. ",hardmath,https://meta.math.stackexchange.com/users/3111,http://meta.math.stackexchange.com/questions/13794/is-wikipedia-a-valid-source-to-use-on-mse,SCIENCE,meta.math.stackexchange.com 3317,"Explain ""you can have functions that change other functions""","I was reading through Eloquent JavaScript, when I came across this in chapter 5. : you can have functions that create new functions. function greaterThan(n) { return function(m) { return m > n; }; } var greaterThan10 = greaterThan(10); And you can have functions that change other functions. function noisy(f) { return function(arg) { console.log(""calling with"", arg); var val = f(arg); console.log(""called with"", arg, ""- got"", val); return val; }; } noisy(Boolean)(0); //->calling with 0 //->called with 0 - got false My questions are: How are the above two examples different? How does noisy change Boolean? ",kchak,https://stackoverflow.com/users/3384193,"The difference is that the argument to noisy is meant to be another function, rather than a ""plain"" value like a number. So, yes, it creates a new anonymous function just like greaterThan does, but it's a wrapper around an existing function that modifies its behavior. In this case, the wrapper just logs some messages before and after calling the original function f. But you could do other things, like modifying its arguments or its return value. For example, you can implement partial function application, which lets you provide some of the arguments for a function call at one point in the program, and ""remember"" those arguments in a new function that takes just the remaining arguments later. ",Wyzard,https://stackoverflow.com/users/226975,http://stackoverflow.com/questions/31622584/explain-you-can-have-functions-that-change-other-functions,STACKOVERFLOW,stackoverflow.com 5105,"Is it safe to disable cache flushing on a SSD with ""power loss protection""?","I have an Intel 320 SSD which is supposedly able to flush its cache during a power loss. From Storage Review: Rarely seen in a consumer SSD, Intel uses an array of capacitors to make sure data gets saved to the drive in the event of an unsafe shutdown as the result of power loss. From Intel: The Intel SSD 320 Series contains hardware- and firmware-based power-loss data protection features. The SSD includes a power-fail detection circuit, which sends a signal to the ASIC controller in the SSD indicating there is an imminent drop in power level. Triggered by this, SSD firmware disconnects the input power from the SSD. The SSD then relies on its on-board power-loss protection capacitance to provide enough energy for the SSD firmware to move data from the transfer buffer and other temporary buffers to the NAND. Does it mean I can safely turn off ""Windows write-cache buffer flushing""? My primary motivation is to improve performance, although I'm aware that this might not make a big change for desktop workload. ",netvope,https://superuser.com/users/25113,"If you have to ask? Then it's not safe for you, and you should trust the defaults that your top-brand-name OS and SSD have been designed for. I haven't read the documentation for this Windows option, but I know Linux has equivalent options. I would draw your attention to the ext4 filesystem and the ""barrier"" option, which is enabled by default. Barriers ensure the consistency of the FS on power-failure by enforcing ordering between certain writes. At least when it was first implemented, this involved forcing a flush of the write cache on the hard drive. Only if the system as a whole is protected by a trusted UPS (i.e. a battery), and you trust the OS not to crash, then I believe it is safe to disable barriers on Linux. [I am not a professional. I am not your professional. Trust me at your peril]. I suspect the Windows option is designed for the same scenario. But IMO the second criteria pushes this into the realms of carefully administered servers. That said, the exact level of risk depends on the filesystem. ext4 without barriers is much worse than ext3 (which didn't enable barriers by default). So if your version of Windows is more like ext3 in this respect, you could expect to find anecdotes of people running PCs with this option disabled for many years, and not noticing any problems. ",sourcejedi,https://superuser.com/users/110495,http://superuser.com/questions/437845,TECHNOLOGY,superuser.com 8936,Electric current of inductor,"I have a homework problem that was solved by our instructor: ""Calculate the electric current of the inductor at \$t=0^+\$."" He calculated \$1/30\$ but the answer sheet was says \$-1/30\$. Which of them is correct? Our instructor's work: ",Michle Jordan,https://electronics.stackexchange.com/users/53796,"I would say that both answers are wrong. Imagine if the inductor were omitted from the circuit and any source of voltage or current were applied (via the 3 ohm series resistor) to what is basically a balanced bridge. What would be the voltage at the junction of the two 1 ohm resistors - it would be the same voltage as at the junction of the two 3 ohm resistors - net voltage across the two points (where the inductor was connected) is always zero. So, now replace the inductor and ask yourself what the net voltage across the inductor will be - it'll still be zero and never, ever will any current flow thru it. ",Andy aka,https://electronics.stackexchange.com/users/20218,http://electronics.stackexchange.com/questions/140212/electric-current-of-inductor,TECHNOLOGY,electronics.stackexchange.com 6323,how can I create data table component by Polymer,"How can I make a data table component by using polymer, This data table component have feature like datatables.net , ng-grid, ng-table does. Thanks ",nvcken,https://stackoverflow.com/users/2082948,"It might be good to start from an example like aha-table. It has several good examples of how to use polymer's expressions to do something dynamic like a datagrid. Other examples may be found on CustomElements.io. ",ahenager,https://stackoverflow.com/users/3794448,http://stackoverflow.com/questions/24501456/how-can-i-create-data-table-component-by-polymer,STACKOVERFLOW,stackoverflow.com 9498,Is my interval training routine effective for mountain bike training?,"During these winter months I am currently attending the gym 3 times a week. On each of the days I start my training on an exercise bike with the following: 5 minute warm up 30 minutes, 1 minute hard, 1 minute recovery 5 minute warm down I am using a specific interval training setting on the bike. I preset the training to level 15, which is a high resistance and as much as I can take. Hard is a cadence of between 80-90rpm high resistance. Recovery is a cadence of 60prm and the resistance backs off considerably, I imagine to approximately level 7. My heart rate towards the end of the session reaches 170–190bpm, and I am working flat-out. I turn 30 in March, am 5' 8"" and weigh approx 168lbs. Does this training routine seem sensible for building strength and speed on the mountain? Should I be changing up the training with other types of bike training? It is also worth noting that after the interval training I perform free weight strength training too. ",DigiKev,https://bicycles.stackexchange.com/users/3323,"I think there are several issues with your approach for improving power on bike: doing the same workout stresses the same aerobic pathway, since there are several ways your body can burn fuel it is worth exercising all of them. This means doing intervals of different length with different rest periods. Example: 3x(12+6) min on and off. The on part is similar to what you can do for 1 hour and the off part is half of that. Another example: 3x(3+3) min on and off where the on part is what you can do for 5 minutes, off part is half of that. the intervals do not seem to be anaerobic, because of the short recovery period( anaerobic intervals need longer recovery periods ). They are either Vo2Max intervals or Threshold. If they are Vo2Max I think the workout is too hard, usually accumulating 6 to 9 minutes at Vo2Max in a training session is too much, if they are threshold I don't think the approach is very good, better go with a longer interval period since threshold power can be usually sustained by riders for 30 to 60 minutes. if you want to endure in long events/rides you need to do longer sessions to have the endurance heart rate on an indoor trainer seems to be artificially high for me, I think it is because of the poor ventilation. Also power on the trainer is much lower then going outside, so pacing with heart rate on an indoor trainer seems to be a bad idea at least this is my experience. Suppose your 170bpm is upper tempo power, on an indoor trainer that might be actually upper endurance because of the artificial high heart rate. for effective mountain biking you also need riding skills, these are not developed on a trainer. I would try to look at the requirements of your specific events and target those, also try to do longer sessions on the trail to build the endurance needed to complete this events. An alternate way is to get a generic mountain biking endurance plan and build on that, it won't be perfect but I think is much superior over what you have now. Also, try to ride outside if possible, the workouts are better and you will enjoy the training much more. ",Bogdan Petrica,https://bicycles.stackexchange.com/users/7327,http://bicycles.stackexchange.com/questions/7801/is-my-interval-training-routine-effective-for-mountain-bike-training,CULTURE,bicycles.stackexchange.com 6590,How often will my Comcast IP address change?,"I had a Linux/Apache server in my house, a domain name hosted by 1and1 which points to my Comcast public IP (testing only, I know I am not allowed to host a site), and a D-Link router which forwards port 80 to the Linux server. Everything was working perfect. I then bought a new Linksys router, and things stopped working. Upon troubleshooting, I found that my home IP no longer matched the IP set in 1and1. Furthermore, the IP set in 1and1 is located hundreds of miles away. Is this normal? How often will the IP change? Is there anything I can do to prevent? ",user1032531,https://superuser.com/users/234013,"If you don't purchase a static IP from your ISP, your ISP has no obligation to keep permanent the one it leases to you via DHCP. So you should always treat your IP changing as a possibility regardless of what you or others have observed. Your IP changing is normal if you do not have a static IP from your ISP. There are ""dynamic DNS"" services - Dyn (formerly Dyndns) and No-IP being two of them - that will let you create an account, obtain a DNS hostname, and then run an ""update client"" somewhere on your internal network. The update client will periodically check your external IP and report changes to the service. So then this DNS will resolve to your public IP. Dyn used to be free, No-IP still is AFAIK (this may have changed). You'll still need to make sure NAT is set up correctly if you want external requests to reach a specific system inside your network. You also cannot use this DNS to reach hosts from inside to inside your network unless you run your own DNS server and resolve LAN-local names yourself. ",LawrenceC,https://superuser.com/users/51705,http://superuser.com/questions/663241,TECHNOLOGY,superuser.com 3096,Warp 10 Barrier?,"I just watched S7E25 ""All Good Things ..."" of Star Trek: The Next Generation which I believe is the final episode of the series. In this episode, Captain Beverly Picard tells the crew to pilot her medical ship into the Neutral Zone at Warp 13. In a separate episode of ST: Voyager (actual episode unknown to me), the characters Tom Paris and Harry Kim talk about not being able to break the Warp 10 barrier for some reason. This is toward the end of the series. Is there any explanation in the Star Trek Universe which explains this seeming difference? This especially confuses me because ST:V (1995-2001) started the year after ST:TNG ended (1987-1994). I would think it would be produced with these story lines in mind. Is there any explanation for this? ",Pᴀᴜʟsᴛᴇʀ2,https://movies.stackexchange.com/users/5391,"This has been answered in some detail on SFF. The answer references the Memory-Alpha wiki for All Good Things … where the following is noted: It is clear that there is no more warp 10 limit in the future. This limit was set in ""Force of Nature"". In addition, ships in the future timeline are able to go above Warp 13. This would appear to contradict ""Threshold"", where it is stated that Warp 10 is the theoretical limit. It is, however, possible that the warp scale was recalibrated in this future. In other words, the limit is exactly the same. It's just the labels on the scale that (might) have been changed. ",coleopterist,https://movies.stackexchange.com/users/3650,http://movies.stackexchange.com/questions/14418/warp-10-barrier,LIFE_ARTS,movies.stackexchange.com 2282,can´t save new field in magento(1.9) customer registration checkout form,"I followed the instructions to add a new field in customer registration from add new field in magento(1.9) customer registration, works perfect! I need help to add this field to customer registration on checkout page also. I added this to my module xml (ea_dni is the name of my module): <checkout_onepage_index> <reference name=""checkout.onepage.billing""> <action method=""setTemplate""> <template>ea_dni/billing.phtml</template> </action> </reference> </checkout_onepage_index> And I added the field in billing.phtml <li> <label for=""eadni""><?php echo $this->__('DNI') ?></label> <div class=""input-box""> <input type=""text"" name=""eadni"" id=""eadni"" value=""<?php echo $this->htmlEscape($this->getCustomer()->getDNI()) ?>"" title=""<?php echo $this->__('DNI') ?>"" class=""input-text"" /> </div> </li> So, I see the new field in checkout registration form, but this field is not saving to the database! This is my install-1.0.0.php <?php $this->addAttribute('customer', 'eadni', array( 'type' => 'varchar', 'label' => 'DNI', 'input' => 'text', 'position' => 120, 'required' => false,//or true 'is_system' => 0, )); $attribute = Mage::getSingleton('eav/config')->getAttribute('customer', 'eadni'); $attribute->setData('used_in_forms', array( 'adminhtml_customer', 'checkout_register', 'customer_account_create', 'customer_account_edit', )); $attribute->setData('is_user_defined', 0); $attribute->save(); Can you help me? What am I missing? Here is my app/code/local/EA/DNI/config.xml <?xml version=""1.0""?> <config> <modules> <EA_DNI> <version>1.0.0</version> </EA_DNI> </modules> <global> <helpers> <ea_dni> <class>EA_DNI_Helper</class> </ea_dni> </helpers> <resources> <ea_dni_setup> <setup> <module>EA_DNI</module> <class>Mage_Customer_Model_Resource_Setup</class> </setup> </ea_dni_setup> </resources> </global> <frontend> <layout> <updates> <ea_dni> <file>ea_dni.xml</file> </ea_dni> </updates> </layout> <translate> <modules> <EA_DNI> <files> <default>EA_DNI.csv</default> </files> </EA_DNI> </modules> </translate> </frontend> </config> ",elismoran,https://magento.stackexchange.com/users/27241,"Seems to be a similar issue. You can see my suggested solution here: Custom Attribute Not saved in Checkout Register Form - Magento ",Johny,https://magento.stackexchange.com/users/27369,http://magento.stackexchange.com/questions/71579/can%C2%B4t-save-new-field-in-magento1-9-customer-registration-checkout-form,TECHNOLOGY,magento.stackexchange.com 5686,"In a C# ASP.NET view, how can I wrap numbers after a comma?","At the moment I have something that looks a little like this @string.Format(""{0:#,###,###.##}"", ""9999999999"") which will display the value as: 9,999,999,999 However sometimes I have only a small DIV to display this large number. So I want to wrap the number after the commas. I did try this @string.Format(""{0:#,###,###.##}"", @lot.MinDecrement).replace("","", "",< wbr>"") I just tried to see if it would but a break in the word, but this doesn't work and actually puts in the string. Does anyone know how I can simply make the text wrap if it needs to, after a comma? Thanks ",Ben,https://stackoverflow.com/users/1942580,"You can wrap the content of a DIV with CSS, like so: div{ word-wrap: break-word; } Here is a working example (resize the output pane) If you want it to wrap after each comma, then you can add spaces to the value (which may be what you was trying to do, like so: @String.Format(""{0:#,###,###.##}"", ""9999999999"").Replace("","", "", ""); Here is an example using this result ",musefan,https://stackoverflow.com/users/838807,http://stackoverflow.com/questions/16232621/in-a-c-sharp-asp-net-view-how-can-i-wrap-numbers-after-a-comma,STACKOVERFLOW,stackoverflow.com 6217,"""discuss certain matter"" is there any mistake in this sentence?"," Find the mistake .. : We said we were discussing certain matter then. so what about this answer: We said we were discussing a certain matter then. do you think the question is wrong and there's no mistakes in the sentence? and what about the answer? ",user37421,https://ell.stackexchange.com/users/3962,"We said we were discussing (a) certain matter then. The sentence with/without the indefinite article ""a"" before the word ""matter"" is grammatically correct, depending on the sense the word matter is used. ""Matter"" is used both as a countable noun and uncountable noun. When you use it as a countable noun to refer to a situation or subject someone needs to deal with, you should use ""a"" before it. On the other hand, when you use ""matter"" as an uncountable noun in the sense of substance, material, it doesn't need ""a"" before it such as we discussed certain printing matter. ",Khan,https://ell.stackexchange.com/users/9259,http://ell.stackexchange.com/questions/55556/discuss-certain-matter-is-there-any-mistake-in-this-sentence,CULTURE,ell.stackexchange.com 9477,"Does it take brute force to find a pair of plaintext and ciphertext that each follow a certain condition, given an AES encryption key?","Suppose that I have an AES key $K$, and I'm instructed to find a plaintext such that the first 32 bits of the plaintext are some string of bits $S_1$, and the last 32 bits of the ciphertext once the plaintext has been encrypted with $K$ are another string of bits $S_2$. Is this difficult? Is there a known attack against this that's faster than just fixing one of the $S$'s and brute-force searching for a text with the other $S$? ",Joe Z.,https://crypto.stackexchange.com/users/4572,"Well, it's moderately difficult; you couldn't use that as a security assumption; however, it would be too difficult to expect someone to solve during an active protocol. There's no nonobvious trick to it; the two methods at your disposal would be: Select random plaintexts with the first 32 bits as $S_1$; encrypt them with key $K$, and check to see if the last 32 bits of the ciphertext happen to be $S_2$ Select random ciphertexts with the last 32 bits as $S_2$; decrypt them with key $K$, and check to see if the first 32 bits of the plaintext happen to be $S_1$ Either approach will take an expected $2^{32}$ random trials before success; at 1 $\mu$sec per AES operation (quite conservative; modern CPUs typically can do several times as fast as that), we're looking at perhaps an hour or two. Perhaps you were hoping there was some clever way to take advantage of the partly known plaintext/ciphertext; it doesn't work out. For example, you might be hoping to translate the AES cipher into a large series of boolean operations (with the known key, and known 32 bits of plaintext and ciphertexts), and solve the resulting set of equations. However, AES has a fairly quick 'avalanche'; very quickly (within two rounds), all the internal bits will depend on all the unknown bits in subtle ways; the resulting set of equations will not have an easier solution than just trying various combinations of the 96 bits on one side (which is effectively what the straight-forward solutions do) ",poncho,https://crypto.stackexchange.com/users/452,http://crypto.stackexchange.com/questions/6062/does-it-take-brute-force-to-find-a-pair-of-plaintext-and-ciphertext-that-each-fo,TECHNOLOGY,crypto.stackexchange.com 2749,Is there a way I can share the 3.42 GB download of Windows 8.1 from Windows Store?,"Windows 8.1 is out, and I would like to know if it is possible to share the Windows 8.1 download upgrade between different computers so that I don't have to download it over and over again? This might be helpful for people who are on a metered connection. Store is downloading 3.42 GB of data so it must be stored somewhere. Is there a way I can copy it to my other computers and start the setup so that I don't have to download it over and over again on each computer I own? ",LoneWOLFs,https://superuser.com/users/85063,"I did the update earlier today though and it seems that there is a folder C:\$Windows.~BT that got created and downloaded. You might TRY to take and copy that folder to another 8 machine and see if running the setup file will work for you. If it does...awesome... However if that doesn't work, Unless it changes later, currently you can get to 8.1 via 3 methods: You can update each machine running 8 via the Windows Store You can use a VL download or Technet/MSDN download. You'll have to have an account though, and I'm pretty sure it won't update non VL 8 machines. You can buy a retail copy on Amazon or similar. According to the MS Blog on 8.1 they aren't planning an ISO / IT Pro standalone installer: http://blogs.windows.com/windows/b/bloggingwindows/archive/2013/10/17/windows-8-1-now-available.aspx We're not releasing the ISO images to folks who don't have MSDN and TechNet subscriptions. Best way for everyone else is to update through the Windows Store. - Brandon LeBlanc (MSFT) ",TheCleaner,https://superuser.com/users/16462,http://superuser.com/questions/661402,TECHNOLOGY,superuser.com 5984,What is temptation?,"Temptation, in the common secular sense, seems to indicate an attraction to something. Temptation The act of tempting The condition of being tempted. Something attractive, tempting or seductive; an inducement or enticement. Pressure applied to your thinking designed to create wrong emotions which will eventually lead to wrong actions. Tempting attractive, appealing, enticing seductive, alluring, inviting Tempt (transitive) To provoke someone to do wrong, especially by promising a reward; to entice. She tempted me to eat the apple. (transitive) To attract; to allure. Its glossy skin tempted me. (transitive) To provoke something; to court. It would be tempting fate. But, as with many secular concepts that overlap religious concepts, there are often explicit theological definitions which allow the terminology to fit into religious, dogmatic, and theological discussions with less ambiguity. In this case, is there any predominating Christian/theological definition? In particular, how is temptation defined or explained in such a manner that allows Christ to have been tempted? To clarify the problem, if Christ is to be attracted to some thing, there must be some part or aspect of Christ to which some thing appeals. More significantly, Christ, in order to be tempted, must desire that thing if we are to say He is attracted to it. And if Christ is to contain a part or aspect to which some evil may be a temptation, thus arousing a desire, there could be said to be a sinful nature or component in Christ -- a contradiction of His Godliness. To illustrate the problem, one might select magnetism (or any natural force) as a natural analogy. For the effect of magnetism (sin) to attract (tempt) a material (person), the material must contain, at least to some extent, a magnetic (sinful) component. Thus, if we say that Christ is tempted in this understanding, we say that He has a sinful component. How do we Christians, Catholics, or any denomination that has a well-established concept, define or explain temptation in a non-trivial manner without requiring Christ to have a sinful nature? ",svidgen,https://christianity.stackexchange.com/users/3410,"The following is sort of an answer to your question: the desert fathers (from the beginnings of monasticism) thought a lot about the beginning of sin. Sin has its origins in ""logismoi,"" thoughts in our mind floating hither and thither, often from whence we know not. ""Logismoi"" is usually translated as ""thoughts,"" though maybe in this usage it would be more suggestive to translate it as ""distractions"". Having logismoi is like walking the streets of Las Vegas, where promoters snap packets of prostitution flyers loudly across their hands and extend the flyers toward pedestrians. It is no sin to be assaulted by such advertising. One may (at one's own risk) enter into dialogue with the logismoi to see what holds them together and to see how to help your brother (and yourself) tear them apart when need be. Sin begins when one ""couples"" with logismoi, a condition described in depressing detail in our record of the ancestral sin: ... the woman saw that the tree was good for food, and that it was a delight to the eyes, and that the tree was to be desired to make one wise.... (Genesis 3:6) One might say sin begins when one seriously considers a wrong choice as an option. Our Lord spoke of this in His sermon on the mount: You have heard that it was said, ""You shall not commit adultery."" But I say to you that every one who looks at a woman lustfully has already committed adultery with her in his heart. (Matthew 5:27-28) I say this is sort of an answer because it doesn't address the use of the word ""temptation"" in English as such. But I hope it helps illuminate how sin begins. In particular, Christ was, presumably, assaulted by logismoi as much as, and probably worse than, anyone else in human history. But He never coupled with them, so He never sinned. E.g. when tempted in the desert, Christ made it clear with His curt replies to Satan how little He thought of Satan's advances. More terrifying to consider along these lines was His struggle in Gethsemane. Perhaps it's best for me not to speculate on what was going through His mind then. I think @ryan hit on the desert fathers' distinction. The logismoi are the ""presentation"" of temptations, and the coupling is the ""feeling"" of temptation. ",Robert Haraway,https://christianity.stackexchange.com/users/88,http://christianity.stackexchange.com/questions/14116/what-is-temptation,CULTURE,christianity.stackexchange.com 561,What does “the man who had ‘no room for Churchill’ in the White House” mean? Is it a set phrase or just a turn of words?,"http://frontpagemag.com. (April 16) reported that President ‘Obama snubbed Margaret Thatcher’s funeral’ by saying “Obama is not fit to lick Ronald Reagan's boot heels after walking behind his horse,” and went on sarcastically; ""The man who had no room for Churchill in the White House would certainly have no time to take a break from his umpteenth golf game to pay tribute to a woman who represents everything that he is working to destroy."" Is “have / had no room for X” in the White House a set phrase or an ad hock turn of words to mean “have no special attachment / reverence to a big name or specific person, or even country? ",Yoichi Oishi,https://english.stackexchange.com/users/3119,"No, it is not a set phrase. In 2009 the Obama white house apparently returned a bust of Winston Churchill that had been on loan since the September 11 attacks. The British government offered to let Obama keep it for another 4 years to which he seems to have replied ""thanks but no thanks"". So, saying that Obama had no room for Churchill in the White House is simply a reference to this story, not applicable to other presidents or deceased historical figures. ",terdon,https://english.stackexchange.com/users/25030,http://english.stackexchange.com/questions/116173/what-does-the-man-who-had-no-room-for-churchill-in-the-white-house-mean-is,CULTURE,english.stackexchange.com 3332,"Low beam headlights don't work, High beam headlights do","The vehicle is a 2003 Chevrolet Trailblazer. The low beams aren't working. High beams are. The fuse is perfectly fine (tested and swapped out). The bulbs are fine too. A mechanic told me it could be the ""body modulator"". I've never heard of this before. Could this be the problem? If so, how hard is it to change out for a shade tree mechanic? If not, what else could this be? ",surfer,https://mechanics.stackexchange.com/users/979,"There is a relay in the fuse box under the hood on the driver's side. On a 2004, it's #46 and labeled 'HDM Relay'. YMMV. You can swap it with a known good relay (same type from the box for something you know is working). #45 should be the same (on a 2004 at least) and should be the engine fan clutch. If the headlights work after the swap, swap them back and get a new relay (you don't want to have a non-operational fan). This is from a writeup at Sparky's Answers. Generally, start with the bulbs. Check the connectors with a multimeter and work your way back from there. You really need a wiring diagram. Based on some Youtube videos, it looks like there should be a 4 pin connector on the headlight module with 4 wires, Tan, Green, Black and Black. The blacks should be the grounds, tan should be low beam, green should be high beam. Each bulb also has a 2-wire connector you'll also need to check if the 4-wire connector checks out. I suspect there is a dimmer switch somewhere, probably on the steering column. Hopefully you can get at the connector to check it without removing the lower dash or dropping the steering column. If you know what wires go where, you can jumper the appropriate connectors to simulate a working switch set to low beam. ",Mark Johnson,https://mechanics.stackexchange.com/users/1321,http://mechanics.stackexchange.com/questions/1792/low-beam-headlights-dont-work-high-beam-headlights-do,CULTURE,mechanics.stackexchange.com 6427,How to 'select' menu items that also link to deeper items?,"Currently I'm working on a navigation that doesn't take up too much screen real-estate. I came up with a pseudo off-canvas navigation with stacked menus. A user can assign nodes to a product. This is the current state of the wireframe; user chose Add nodes. Now he want's to manually search for a specific node 1 (1. Browse Nodes in wireframe). The user now can select a node to add to product 2 or go 1 level deeper into the navigation 3. and 4.. If you click on a node-link the children off that node will slide-in and stack on top of the current menu. There is also a back option to parent (second wireframe). I deliberately chose checkboxes, links and button as elements because that's their purpose; I wireframed there functionality not a design-solution. Normally I like selecting text/label also checks a checkbox, but now the label is a link too. A user could a) select that node to add to product, Or b) select node to navigate to children of that node. I could argue if it makes sense that a node will act is a leaf and a branch. A don't have any real data about how customers assign nodes. I can't wait for this input. Currently functionality of the system is that a node could be a leaf and a branch. So asking real users is no option. Maybe in the future (months from now). How to convert this into an intuitive navigation? ",myradon,https://ux.stackexchange.com/users/41645,"Something like this; Hovering above nodes will reveal add-button. Clicking on the add-button will set node as 'checked'. Clicking on node-text or clicking on arrow will slide on 1 level deeper in the nav. EDIT: 'Done-button' functions to finishes the task 'add nodes' Or click outside the menu (eg in main-section) will hide menu. Good plan? ",myradon,https://ux.stackexchange.com/users/41645,http://ux.stackexchange.com/questions/64138/how-to-select-menu-items-that-also-link-to-deeper-items,TECHNOLOGY,ux.stackexchange.com 4374,How can I achieve ACID on multiple physical front-end servers,"I'm looking for a way to have several physical front-end servers with ACID data access. In a setup where several servers gets load-balanced using DNS-round robin, the problem is that whatever server you land on the data must be ACID. E.g. when sharding data you need to have the shard-mapping ACID across servers, right? How can I achieve this using open-source software? One solution is MySQL Cluster but Google or Facebook does not use this(?). Is there an alternative? ",Gustav,https://serverfault.com/users/105768,"I'm not sure if Percona's XtraDB Cluster meets a strict definition of ACID compliance (the XtraDB engine does) but it is a synchronous solution like MySQL Cluster that is suitable for web applications. Note that it is not production ready but development/progress is rapid so I'd check it out if I were you. You may want to touch base with the Percona folks about your business need. Hope this helps. ",HTTP500,https://serverfault.com/users/13993,http://serverfault.com/questions/370260,TECHNOLOGY,serverfault.com 5535,Problem with passing control to Preference activity,"i created application in that it will call preference from main activity based on menu option it is done using Explicit intent but it not working . when clicking the menu item calling activity public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); menu.add(0, Menu.FIRST+1, Menu.NONE, ""Refresh""); menu.add(0, Menu.FIRST+3, Menu.NONE, ""Set Preferences""); return true; } public boolean onOptionItemSelected(MenuItem item) { switch(item.getItemId()) { case Menu.FIRST+1: Intent intent =new Intent(this,userpreferences.class); startActivityForResult(intent,this.USER_PREFERENCES); return true; case Menu.FIRST+3: return true; } return false; } preference xml <?xml version=""1.0"" encoding=""utf-8""?> <PreferenceScreen xmlns:android=""http://schemas.android.com/apk/res/android""> <CheckBoxPreference android:key=""AUTO_UPDATE"" android:title=""update automatically"" android:summary=""update automatically"" android:defaultValue=""true"" /> <ListPreference android:key=""MINIMUM_MARK"" android:title=""minimum mark"" android:summary=""enter the minimum mark of the student"" android:defaultValue=""30"" android:entries = ""@array/minimumMarks"" android:entryValues=""@array/minimum_mark_values"" android:dialogTitle=""Check the minimum mark required"" /> </PreferenceScreen> Preference activity package com.xml.parse; import android.os.Bundle; import android.preference.PreferenceActivity; public class userpreferences extends PreferenceActivity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.preferences); } } some body plz tell me to do better or correct way Regards, Kariyachan ",DroidBot,https://stackoverflow.com/users/482604,"Do not use startActivityForResult() -- startActivity() is fine. Here is a sample project showing the use of an options menu item to open a PreferenceActivity. ",CommonsWare,https://stackoverflow.com/users/115145,http://stackoverflow.com/questions/4084433/problem-with-passing-control-to-preference-activity,STACKOVERFLOW,stackoverflow.com 229,Powershell script to find permissions for a specific user,"what am i doing wrong user.ps1 $user = ""sp2010\systemsacct"" $site = $gc | Get-SPSite sp2010 $site | Get-SPWeb -Limit All | Get-SPUserEffectivePermissions $user Out-GridView -Title ""Web Permissions for $user"" ",user17970,https://sharepoint.stackexchange.com/users/17970,"This script gives you a table of user only permission, and permission via group membership. $urlWeb = ""http://sp2010"" Get-SPUser -Web $urlWeb | select UserLogin, @{name=”Exlicit given roles”;expression={$_.Roles}}, @{name=”Roles given via groups”;expression={$_.Groups | %{$_.Roles}}},Groups | format-Table -auto Reference: How to get user permissions report by using Powershell ",Benny Skogberg,https://sharepoint.stackexchange.com/users/6382,http://sharepoint.stackexchange.com/questions/81100/powershell-script-to-find-permissions-for-a-specific-user,TECHNOLOGY,sharepoint.stackexchange.com 598,Wordpress and isotope filtering,"Im trying to use Isotope(http://isotope.metafizzy.co/) to filter my Wordpress posts, http://i44.tinypic.com/fco55k.jpg this is how my site looks like, i would like to filter posts depending on a post category so i need to add a class name to each post and then filter it using isotope <li><a href=""#"" data-filter=""*"">show all</a></li> <li><a href=""#"" data-filter="".design"">design</a></li> <li><a href=""#"" data-filter="".typo"">typography</a></li> those are the names of my categories, and then i would like to add class name of a post depending on a category he is in. <div id=""main""> <?php $args = array('orderby' => 'rand' ); $random = new WP_Query($args); ?> <?php if(have_posts()) : ?><?php while($random->have_posts()) : $random->the_post(); ?> <a href=""<?php the_permalink() ?>""> <div id=""img"" class=""<?php $category = get_the_category(); echo $category[0]->cat_name; ?>""> <?php the_post_thumbnail();?> <h1><?php the_title(); ?></h1> </div></a> and javascript im using <script type=""text/javascript""> jQuery(window).load(function(){ jQuery('#main').isotope({ masonry: { columnWidth: 20 }, }); $('#filters a').click(function(event){ var selector = $(this).attr('data-filter'); $('#main').isotope({ filter: selector }); return false; }); }); </script> ",dinosauuur,https://wordpress.stackexchange.com/users/13960,"Add the animationEngnine: 'jquery' - and the animation will be smoother. var mycontainer = jQuery('#projects'); mycontainer.isotope({ filter: '*', animationEngine: 'jquery', animationOptions: { duration: 350, easing: 'linear', queue: true } }); jQuery('#projects-filter a').click(function(){ var selector = jQuery(this).attr('data-filter'); mycontainer.isotope({ filter: selector, animationOptions: { duration: 350, easing: 'linear', queue: true, } }); return false; }); ",Justin Young,https://wordpress.stackexchange.com/users/27394,http://wordpress.stackexchange.com/questions/44963/wordpress-and-isotope-filtering,TECHNOLOGY,wordpress.stackexchange.com 3957,Why Didn't/Couldn't Kabuto Bring Orochimaru Back?,"Kabuto had Orochimaru's DNA and a sacrifice, so why did he not use the Edo Tesei? Or couldn't he have used Anko, like Sasuke did? ",TAAPSogeking,https://anime.stackexchange.com/users/2100,"Because Orochimaru was never dead. He was just sealed. Well, maybe ""sealed"" is not the right term. Every curse mark holds some a part of Orochimaru's chakra. And Sasuke reversed the cursed seal on Anko with the flesh from Kabuto to bring him back - This is from chapter 593. PS: Almost same thing happened when Sasuke fought Itachi. ",Bibhas,https://anime.stackexchange.com/users/2168,http://anime.stackexchange.com/questions/4955/why-didnt-couldnt-kabuto-bring-orochimaru-back,CULTURE,anime.stackexchange.com 6213,Can the Mage Wars Warlock be played without any Demon cards?,"As the subject states, I was wondering if the Mage Wars Core Set comes with enough Fire type cards to allow the Warlock Mage to build a spellbook with absolutely no Demon cards. Without seeing the cards, I will assume that most, if not all of the other Dark magic cards are OK, but I would ultimately prefer a pure Fire Magic spellbook. So as to preemptively answer the almost inevitable 'Why?', I will simply say that, as an orthodox Christian, my conscience doesn't allow me to play a game with such cards. I would prefer not to debate/explain this further, as I believe such a discussion is well beyond the scope of this site. ",DragonSlayer,https://boardgames.stackexchange.com/users/11553,"Google ""mage wars Warlock strategy"" one of the results will be a 4 minute youtube video of a Warlock tearing a beastmaster apart, winning the game in 9 rounds, without summoning a single creature, demons or otherwise. ",JSin,https://boardgames.stackexchange.com/users/13444,http://boardgames.stackexchange.com/questions/22585/can-the-mage-wars-warlock-be-played-without-any-demon-cards,CULTURE,boardgames.stackexchange.com 5453,Folder compare tool?,"I'm looking for a Windows GUI tool to compare the contents of two folders and show which files are different.... ",Brett,https://superuser.com/users/6595,"I'm a little bit shocked that Total Commanders folder compare ability wasn't mentioned so far. Total Commander Features in Total Commander 8.01 now include - Two file windows side by side - Multiple language and Unicode support - Enhanced search function - Compare files (now with editor) / synchronize directories ",nixda,https://superuser.com/users/50173,http://superuser.com/questions/381379,TECHNOLOGY,superuser.com 192,Undelete comment on a Facebook Page,"The new Facebook Page Manager app (in combination with my less than stellar thumb accuracy) has had me inadvertently deleting comments (when I've been trying to like them) left and right. Is there any way to undo this? If not, is there any way to tag a person who is a fan of the page and who commented on the post/picture but whose comment you deleted? I assume the answer is no since you cannot (acting as a page) tag someone in a reply who has not yet commented on a given post, but didn't know if anyone knew of any workarounds... ",batpigandme,https://webapps.stackexchange.com/users/36671,"No, there is no way to retrieve a deleted comment. Additionally, the rest of what you said is true, you will not be able to tag this person in the reply. ",phwd,https://webapps.stackexchange.com/users/40,http://webapps.stackexchange.com/questions/44226/undelete-comment-on-a-facebook-page,TECHNOLOGY,webapps.stackexchange.com 2157,CakePHP displayField usage,"can you help me how to use CakePHP's displayField directive, I can not figure out how to use it... so, in a model file, i have following code... <?php class Task extends AppModel { var $name = 'Task'; var $displayField = 'projectName'; //The Associations below have been created with all possible keys, those that are not needed can be removed var $belongsTo = array( 'User' => array( 'className' => 'User', 'foreignKey' => 'user_id', 'conditions' => '', 'fields' => '', 'order' => '' etc... how can i use this, to display fied projectName in select form field? thank you in advance!!! ",user198003,https://stackoverflow.com/users/198003,"So, you have Task belongsTo Project (FK: project_id). You want to make a project select box in tasks/add and tasks/edit views. The problem is that the projects table doesn't have a field called name or title so the select box is empty. You wouldn't have any problems if there was a name or a title field, right? Well, here's the solution, in the Project model add this: var $displayField = 'projectName'; http://book.cakephp.org/view/71/Model-Attributes So you were going in the right direction, just messed up the models a bit. I hope you understand it now ;] ",PawelMysior,https://stackoverflow.com/users/244751,http://stackoverflow.com/questions/2185835/cakephp-displayfield-usage,STACKOVERFLOW,stackoverflow.com 956,jQuery - Adding a hyphen inside string,"I am pulling the text from a select box's options. Now I pass this string value to an append() function, but I want to add a hyphen to the string, for calling an image name: HTML: <select> <option>Demo Cars</option> <option>New Cars</option> <option>Used Cars</option> <option>Other</option> </select> var p = 'http://myurl.com/images/'; $('select').eq(0).on('change',function(){ $('#productQuote').empty(); var j = $(this).children(':selected').val(); $('#productQuote').append('<img src=""'+ p + j + '.jpg' '"" />'); }); For example: If I choose the first select option, the string will be: ""Demo Cars"", and thus, j == ""Demo Cars"". But now I want to call its image, and my image names are not allowed to have spaces inside them. So, this begs the question, how do I add a hyphen between Demo and Cars? ",DextrousDave,https://stackoverflow.com/users/1140828,"Please refer http://jsfiddle.net/2dJAN/6/ <div class=""btn-post"">button text</div> <div id='test'> </div> $(document).ready(function(){ $('#test').html($('.btn-post').text().replace("" "", ""-"")); }); I hope this will helpful to you to achieve your request. ",vinothini,https://stackoverflow.com/users/792302,http://stackoverflow.com/questions/16278701/jquery-adding-a-hyphen-inside-string,STACKOVERFLOW,stackoverflow.com 1859,"Set your journey to the wellness.. ""set"" used as ""begin"" , goes right here?","Using 'set' as 'begin' or closely similar way. The sentence ""Set your journey to the wellness.."" is ok? Set goes right here? From definition, I want to use ""set"" for this purpose.. cause (someone or something) to start doing something. ""the incident set me thinking"" ",user57406,https://english.stackexchange.com/users/57406,"Which ""wellness"" is this? I suspect you might mean ""Begin your journey to wellness"", but can't be sure. Set does not have this meaning, but the idiom ""set out on"" is used specifically for journeys, so ""Set out on your journey to wellness"" works, though it focuses a bit more on the idea of a literal journey than a figurative one. I'd therefore advise against unless perhaps it was used with some visual imagery of journeys that would more strongly bring the imagery to mind. (Metaphors need to either be strong in the imagery or else quiet and let the figurative meaning dominate, ""set out on"" risks falling between the two). ",Jon Hanna,https://english.stackexchange.com/users/15770,http://english.stackexchange.com/questions/138933/set-your-journey-to-the-wellness-set-used-as-begin-goes-right-here,CULTURE,english.stackexchange.com 1743,"Learning how to be a good rhythm guitarist before becoming a lead guitarist, where to start?","I have recently been trying to hone in my improvisational skills. I'm stuck in the first position of the Am pentatonic box and can't move away from it. Whenever I try to move out of it, I randomize the next box that I go to, which most of the time leads to bad sounding improvisations. I have narrowed the problem down to it being me having a bad sense of rhythm. I think I've got technique as a rhythm guitarist, but in regards to musicality, I don't. I don't know which chords go together well, what goes after a chord, how minors, majors and 7ths are formed (don't know if this is important to be a good rhythm guitarist though), etc. ",reverb,https://music.stackexchange.com/users/6204,"I'm addressing only your first paragraph. Assuming you want to stay pentatonic for now, and know the box in A based around the 5th to 8th frets, this should help. The box below that has basically two notes per string, as the box you know. Each higher note on each string is the SAME note as the lower one in your known box.So you already know HALF of it !! Guess what - the next box up uses for its bottom notes the same ones as the TOP notes of your known box. Thus you already know HALF of that one !! So - in order to use all three boxes, you only need to replicate the pentatonic notes around frets 2/3 and frets 7/10. If you start the higher box on 6th string, 8th fret, and use the Am pent. notes, you'll hopefully realise that it's actually C maj. pent. you're playing. It happens to use EXACTLY the same 5 notes, so you can solo along regardless. ",Tim,https://music.stackexchange.com/users/2808,http://music.stackexchange.com/questions/10584/learning-how-to-be-a-good-rhythm-guitarist-before-becoming-a-lead-guitarist-whe,LIFE_ARTS,music.stackexchange.com 649,What creates this strange flare and how to prevent it?,"I shot at a concert for the first time. The pictures were pretty good for the capability of my equipment, but on some shots, the light has a very strange flare. It isn't the usual rays, but some soft, non-symmetric form which I find quite strange, and, on most shots, distracting. On this image, you can see it just above Gino's head and also behind his back, to the right of the mic stand. I am not sure if the slight blue lines on the left side of the picture (they form a triangle aimed at Chris's head, maybe not visible on all monitors) are part of the problem or if they come from a different light source. What makes them appear, and how do I avoid them? I shot with a D90 with a 18-200 lens, no filters or hoods attached. The settings were quite strained (iso 3200, often at max length and max aperture for the length. This specific picture is 1/125, f 5.3, 95 mm). ",rumtscho,https://photo.stackexchange.com/users/2099,"All cameras contain lenses which are actually comprised of several ""lens elements."" Lens flare is caused by non-image light which does not pass (refract) directly along its intended path, but instead reflects internally on lens elements any number of times (back and forth) before finally reaching the film or digital sensor A good lens hood can nearly eliminate flare caused by stray light from outside the angle of view. Ensure that this hood has a completely non-reflective inner surface, such as felt, and that there are no regions which have rubbed off. Although using a lens hood may appear to be a simple solution, in reality most lens hoods do not extend far enough to block all stray light. This is particularly problematic when using 35 mm lenses on a digital SLR camera with a ""crop factor,"" because these lens hoods were made for the greater angle of view. In addition, hoods for zoom lenses can only be designed to block all stray light at the widest focal length. Petal lens hoods often protect better than non-petal (round) types. This is because petal-style hoods take into account the aspect ratio of the camera's film or digital sensor, and so the angle of view is greater in one direction than the other.Placing a hand or piece of paper exterior to the side of the lens which is nearest the flare-inducing light source can also mimic the effect of a proper lens hood. Lens flare also depends on the lens used - fixed focal length (or prime) lenses are less susceptible to lens flare than zoom lenses. Other than having an inadequate lens hood at all focal lengths, more complicated zoom lenses often have to contain more lens elements. Zoom lenses therefore have more internal surfaces from which light can reflect. Source- http://www.cambridgeincolour.com/tutorials/lens-flare.htm ",Himanshu Punetha,https://photo.stackexchange.com/users/21157,http://photo.stackexchange.com/questions/14892/what-creates-this-strange-flare-and-how-to-prevent-it,LIFE_ARTS,photo.stackexchange.com 5004,cancel(getIntent().getExtras().getInt(“notificationID”)); what is the return...?,"cancel(getIntent().getExtras().getInt(“notificationID”)); why we use of dot operator in between these methods? as cancel(int) method takes only one integer parameter.it has 3 methods as parametr.....what exactly the code will do..? ",sanjay,https://stackoverflow.com/users/871340,"You should try going through the concepts of object oriented programming first. To answer your question, getIntent() returns an object of type intent. We call the getExtras() on the Intent object which returns an object of type Bundle. Then we call getInt() on the Bundle object to finally get the int we want to pass to the cancel() method. The statement is equivalent to : Intent i = getIntent(); Bundle b = i.getExtras(); int id = b.getInt(""notificationID""); cancel(id); If we don't need any of the intermediate objects, we can write the whole thing in a single line. Hope that helps. ",Arnab Chakraborty,https://stackoverflow.com/users/802799,http://stackoverflow.com/questions/6897701/cancelgetintent-getextras-getint-notificationid-what-is-the-return,STACKOVERFLOW,stackoverflow.com 4470,Need a software backup solution with specific features,"I'm going to be formatting my machine in the next couple of days. I finally got Windows 7 set up how I like it and decided on a suite of software that I will be installing after each format. Since I tested a bunch of programs and the Windows installation is full of Junk, a clean install is needed. After I reinstall Win7 along with all the other software, I want to make a Drive Image so I can at any time go back to that exact setup. In the past I used Clonezilla. I would have it backup the entire drive, compress it, and then transfer it to a network store. This process is a pain in the butt though. It also ends up taking up too much space since Clonezilla uses dd and dd does not care what filesystem you are using. It makes a copy of the drive sector by sector. It doesn't know where a file ends or free space begins. This is what I am looking for this time around... (I don't care if its Open Source or Commercial, although free alternatives are always nice). Does not include Unused Space in the drive image Backs up the MBR and any other absolutely necessary information so the system goes back to exactly the way it was when it was backed up. I don't want to be worried that I have to repair the MBR or deal with other booting issues. Can write the image to multiple DVDs AND to a network share. This means that it has to be able to split the backup. Does not need Windows to work. It has a bootable disc version of the program in case I can't get into Windows and need to restore the backup. Preferably makes the initial backup DVD (Disc 1) also the boot disc. So I can insert disc 1 into the computer, restart, and it will allow me to begin restoring the image to the drive. It would only ask for Disc 2 after it restored everything from the disc it booted from. Loads itself into RAM, does not need to have the disc in the drive to function. Supports NTFS (This should be pretty obvious). Allows me to view the image file in a file editor and make changes in case I want to add/remove anything. (I don't care if this is only possible on the single file Network Backup and I have to recreate the DVDs. The bootable version does not need this). I am going to be using this software only to image the drive. It will not be my daily/weekly/monthly backup solution. Therefore I don't want the imaging to force me into some backup schedule. If I have to force it to not make automatic backups after the initial image, I don't want it. Is reliable, you would use it, makes consistently good images. I guess that's it. Hopefully someone here knows of a program that does all this. I have been looking at various backup solutions and have not found something that I have really been happy with. ",Marcin,https://superuser.com/users/18080,"windows 7 has a backup tool that makes bootable cds, or will work with a readily available recovery boot disk iirc. Otherwise pretty much any decent imaging software, like macrium reflect free will do most of what you need, other than running in ram. ",Journeyman Geek,https://superuser.com/users/10165,http://superuser.com/questions/97209,TECHNOLOGY,superuser.com 8653,local AJAX-call to remote site works in Safari but not in other browsers,"I am maintaining a website that uses Javascript. The script uses jQuery and loads some content from the server at which the site is normally hosted. Just for convenience while maintaining the site, I run a local copy of the site on my iMac. This works perfectly fine when I use Safari. But Firefox, Opera and Chrome refuse to work. I guess it is because of cross-domain-policy. (I couldn't test this with IE, because IE has to run in a virtual machine on my iMac, so for this reason it is not possible to access any local files) Is there a setting within Firefox and the other browsers where I can tell the browser that it is ok to ajax-load files that are located on a remote server from a local html-page with a local javascript? In a nutshell: This my html-page: <!DOCTYPE html> <html> <head> <meta charset=""UTF-8""> <title>some title</title> <link rel=""stylesheet"" type=""text/css"" href=""../css/stylesheet.css""> <script src=""../js/jquery-2.1.3.min.js""></script> <script src=""../js/myScript.js""></script> </head> <body> <!-- some content with a div-container to receive the ajax-content --> </body> </html> This is myScript.js: var errorMsg = function (msg) { //insert the message into the html-page }; var JSONerror = function (jqXHR, textStatus, errorThrown ) { var msg = 'JSON-answer: '+jqXHR.responseText; msg += '<br>'+'JSON-Errorstatus: '+textStatus; if ($.type(errorThrown) === 'string') { msg += '<br>'+'Error: '+errorThrown; } errorMsg(msg); }; var JSONreceive = function (JSONobj, StatusString, jqXHR) { //insert the data in JSONobj into the html-page } var StartAJAX = function () { $.ajax({ url: 'http://my.domain.tld/cgi-bin/myPerlScript.pl', data: ""lastID="" + lastID + '&qkz=' + Math.random(), dataType: ""json"", success: JSONreceive, error: JSONerror }); }; There is also an event-listener, that listens for page-scroll and resize and checks some other constraints (like: is there already an ajax-call in progress?). This listener calls StartAJAX. When it calls StartAJAX on a local copy of my page (file:///User/...) within Safari, I get the Ajax-content perfectly fine inserted into my html-document. within the other browsers i get the error-message inserted into the html-page. It is: JSON-Answer: undefined JSON-Errorstatus: error Error: Why does it work in Safari but not in Firefox, Chrome and Opera? How can I make those browsers work? (I need to test it with all browsers, because all browsers render the same html-domument differently, but I don't want to upload all files to the server after every change just to test it.) EDIT: After reading some answers, I want to make something clear, that I obviously did not make clear enough: I am searching for settings in Webbrowsers I will NOT change the settings of my remote webserver (Apache) I will NOT manipulate any files on my remote machine (.htaccess) I will NOT set up a webserver on my local iMac I will NOT change the code of the AJAX-calls in my Javascript-files I will NOT change the code of the Perl-Scripts on my remote Server I can tell you why: I am just doing a short maintainance, and i am too lazy to upload every manipulated file to the remote machine after I edited it. The settings of the webserver are fine for actual operation. I don't want to change them (and maybe forget the changes before finishing my work). Same for the scripts: Those parts that some of you want to change work fine as they are now. There is no reason to touch the Ajax-Calls, because there is nothing wrong with them in the productive environment. All I want is that those stupid browsers Firefox, Opera and Chrome behave like Safari and process the Ajax-calls correctly. BTW: Please can anyone explain what is so risky to call data via Ajax from an other domain in Firefox, Opera or Chrome while it seems to be harmless doing the same thing in Safari? ",Hubert Schölnast,https://stackoverflow.com/users/1302716,"Due to the same origin policy you aren't normally able to request resources from a different domain. Try adding crossDomain: true to your AJAX request since you are trying to make a request to a different domain. $.ajax({ url: 'http://my.domain.tld/cgi-bin/myPerlScript.pl', crossDomain: true, data: ""lastID="" + lastID + '&qkz=' + Math.random(), dataType: ""json"", success: JSONreceive, error: JSONerror }); ",Michael Hamilton,https://stackoverflow.com/users/4597539,http://stackoverflow.com/questions/29947585/local-ajax-call-to-remote-site-works-in-safari-but-not-in-other-browsers,STACKOVERFLOW,stackoverflow.com 2129,The deceitful spirit sent by God," 1 Kings 22:19-28 19 Micaiah continued, “Therefore hear the word of the Lord: I saw the Lord sitting on his throne with all the multitudes of heaven standing around him on his right and on his left. 20 And the Lord said, ‘Who will entice Ahab into attacking Ramoth Gilead and going to his death there?’ “One suggested this, and another that. 21 Finally, a spirit came forward, stood before the Lord and said, ‘I will entice him.’ 22 “‘By what means?’ the Lord asked. “‘I will go out and be a deceiving spirit in the mouths of all his prophets,’ he said. “‘You will succeed in enticing him,’ said the Lord. ‘Go and do it.’ 23 “So now the Lord has put a deceiving spirit in the mouths of all these prophets of yours. The Lord has decreed disaster for you.” 24 Then Zedekiah son of Kenaanah went up and slapped Micaiah in the face. “Which way did the spirit from[a] the Lord go when he went from me to speak to you?” he asked. 25 Micaiah replied, “You will find out on the day you go to hide in an inner room.” 26 The king of Israel then ordered, “Take Micaiah and send him back to Amon the ruler of the city and to Joash the king’s son 27 and say, ‘This is what the king says: Put this fellow in prison and give him nothing but bread and water until I return safely.’” 28 Micaiah declared, “If you ever return safely, the Lord has not spoken through me.” Then he added, “Mark my words, all you people!” So God sends a spirit enticing Ahab in order to attack Ramoth Gilead. If I may dare ask, why does God feel the need to send a deceiving spirit? Would this not go against the Commandments God has given? And why was such a spirit even within the close proximity in the presence of the Lord in the first place? I wish to know how to reconciling this text with others. ",Phonics The Hedgehog,https://christianity.stackexchange.com/users/154,"The deceitful spirit sent by God. God wraps himself in darkness. Then Solomon said, ""The LORD has said that he would dwell in a dark cloud (1 Kings 8:12, 2 Chronicles 6:1) So God sends a spirit enticing Ahab in order to attack Ramoth Gilead. God has also sent Satan. The Lord said to Satan, “Very well, then, everything he has is in your power, but on the man himself do not lay a finger.” Then Satan went out from the presence of the Lord. (Job 1:12) If I may dare ask, why does God feel the need to send a deceiving spirit? Notice the deceiving spirit asked. (Ref: 1 Kings 22:21). You must also understand a spirit is a personality. So he has given the prophets a desire to lie. We are faced with temptations to prove to God that we are true. Would this not go against the Commandments God has given? No. And why was such a spirit even within the close proximity in the presence of the Lord in the first place? Notice God invited the answer. (Ref: 1 Kings 22:20) I wish to know how to reconciling this text with others. Hope the others are soon reconciled. ",Decrypted,https://christianity.stackexchange.com/users/9253,http://christianity.stackexchange.com/questions/26016/the-deceitful-spirit-sent-by-god,CULTURE,christianity.stackexchange.com 4819,PHP Fatal error: Call to undefined function plugin_basename,"I'm receiving this error: [27-Jun-2012 18:22:39 UTC] PHP Fatal error: Call to undefined function plugin_basename() in /XXXX/public_html/wp-content/plugins/price-update/price-update.php on line 68: //We set the plugin basename here, could manually set it, but this is for demonstration purposes $this->plugin_basename = plugin_basename(__FILE__); in this block of code: class PriceUpdate extends mtekk_admin { protected $version = '0.0.1'; protected $full_name = 'Price Update'; protected $short_name = 'Price Update'; protected $access_level = 'manage_options'; protected $identifier = 'pr_upate'; protected $unique_prefix = 'prud'; protected $plugin_basename = 'price-update/price-update.php'; protected $opt = array(); /** * __construct() * * Class default constructor */ function __construct() { //We set the plugin basename here, could manually set it, but this is for demonstration purposes $this->plugin_basename = plugin_basename(__FILE__); register_deactivation_hook(__FILE__, array($this, 'deactivate')); add_action($this->unique_prefix . '_cron_hook', array($this,'cron_handle')); //Register some of our custom taxonomies add_action('init', array($this, 'wp_init'), 0); add_action('wp_footer', array($this, 'footer')); //We're going to make sure we load the parent's constructor parent::__construct(); } However, its defined above: protected $plugin_basename = 'price-update/price-update.php'; any ideas? ",whatsthebigidea,https://wordpress.stackexchange.com/users/5605,"plugin_basename is a WordPress function that gets your plugins file name by simply passing it the directory. When you call $this->plugin_basename PHP is looking for a function plugin_basename defined within YOUR class. No function plugin_basename() in your class == PHP Fatal Error. If you simply want to define a variable that contains the plugins file name do this: var $plugin_filename = plugin_basename( __FILE__); ",Chris_O,https://wordpress.stackexchange.com/users/251,http://wordpress.stackexchange.com/questions/56730/php-fatal-error-call-to-undefined-function-plugin-basename,TECHNOLOGY,wordpress.stackexchange.com 2204,C#: Is it possible to have partial extension classes,"I am looking to create Extension classes that extend Entity Framework Entities in a different assembly to the EF Entities. I also want to code gen some additional/generic methods in an extension methods class (using T4), then have the ability to create a partial extension methods class with additional custom methods. Is this possible. ",Mark Redman,https://stackoverflow.com/users/45967,"Yes - i tried it and it worked. There is no such thing as an ""extension"" class - there are only extension methods which must be inside a ""static"" class. You can have static partial classes. UPDATE: Sorry I read your heading but not the text of your question. The answer is still yes, but why not just create new classes? I can't see how having a partial class really helps in this case. ",cbp,https://stackoverflow.com/users/21966,http://stackoverflow.com/questions/10811928/c-is-it-possible-to-have-partial-extension-classes,STACKOVERFLOW,stackoverflow.com 6513,Do I need csrf tokens after login?,"I'm building a simple todo list where the user will login (with csrf-token) and then be able to add items to the todo list. Would I need to add csrf_tokens to submissions using AJAX (todo list items) after the the user has already logged in? I'm using session based authentication. ",Saad,https://stackoverflow.com/users/353217,"Well I'd say yes you have to do it, look at this excerpt taken from owasp ( Open Web Application Security Project ) documentation: When targeting a normal user, a successful CSRF attack can compromise end-user data and their associated functions. If the targeted end user is an administrator account, a CSRF attack can compromise the entire Web application. The sites that are more likely to be attacked are community Websites (social networking, email) or sites that have high dollar value accounts associated with them (banks, stock brokerages, bill pay services). This attack can happen even if the user is logged into a Web site using strong encryption (HTTPS). Utilizing social engineering, an attacker will embed malicious HTML or JavaScript code into an email or Website to request a specific 'task url'. The task then executes with or without the user's knowledge, either directly or by utilizing a Cross-site Scripting flaw (ex: Samy MySpace Worm). ",jack.the.ripper,https://stackoverflow.com/users/690413,http://stackoverflow.com/questions/29016113/do-i-need-csrf-tokens-after-login,STACKOVERFLOW,stackoverflow.com 3241,Interpolated FIR filter,"I am confused about this Q&A : Interpolation by factor of 2 If my input signal $$ x[n]= x0,x1,x2,x3 $$ then according to the threads explaination my $v[n]$ will be $$ v[n]=x0,0,x1,0,x2,0,x3,0 $$ $x[n] \rightarrow$ zeropad $\rightarrow v[n]$ $v[n]\rightarrow$ LPF $\rightarrow y[m]$ My $y[m]$ is the output of LPF which removes aliases. So basically LPF transfer function is given as $$ y[m] = v[n]*h[n] $$ i,e. $y[m]=\displaystyle\sum_{n=0}^{\infty}h(m-n)v(n)$ So here $h[m]$ is my filter coefficients and $v[n]$ is my zero padded input signal... so, if I multiply zero with my filter coefficients, then my output will also be zero... If I send 10 input samples, after zero padding I will get 20 samples, out of which 10 will be zero.... So what is the use of getting zero as my output? Correct me if am wrong (I know I am wrong, but please give me some idea how zero padding & LPF is helping in this regard). For FIR filter: $y(n)=h(0)x(n)+h(1)x(n−1)+....+h(N−1)x(n−N+1)$, where $x(n)$ is the input signal, $y(n)$ is the output signal, $h(n)$ is the impulse response, and $N$ is the filter length. For simplicity, I am taking order $N=4$,and some random numbers (time) n --> [ 0 1 2 3] x[n]--> [ 2 4 6 8] h[n]--> [.1 .2 .3 .4] what is $y[2.5]$??? n-->[0 0.5 1 1.5 2 2.5 3 3.5] v[n]-->[2 0 4 0 6 0 8 0 ] (after zero padding) Lets calculate for $y[2.5]=h(0)x(2.5)+h(1)x(1.5)+h(2)x(0.5)+h(3)x(-0.5)$ so here $x(2.5)=x(1.5)=x(0.5)=0$ Please answer this to clear my confusion??? ",saggy,https://dsp.stackexchange.com/users/4411,"The interpolation lowpass filter computes a weighted sum of input samples, which results in the zero input samples being interpolated using the non-zero samples of the input signal. The $*$ sign is NOT multiplication but convolution! EDIT: I'm adding a simple example to clear things up a bit. Let's consider the impulse response $h = [0.5, 1, 0.5]$ and a zero-padded input signal $x=[1,0,3,0,5,0,3,0,1]$. The time index is denoted by $n$, and $n=0$ corresponds to the left-most values of $h$ and $x$. The output $y$ is the convolution of $(x*h)(n)$: $$y(0) = h(0)x(0) = 0.5\\ y(1) = h(0)x(1) + h(1)x(0) = 1\\ y(2) = h(0)x(2) + h(1)x(1) + h(2)x(0) = 2\\ y(3) = h(0)x(3) + h(1)x(2) + h(2)x(1) = 3\\ y(4) = h(0)x(4) + h(1)x(3) + h(2)x(2) = 4\\ y(5) = h(0)x(5) + h(1)x(4) + h(2)x(3) = 5\\\vdots$$ This impulse response obviously performs linear interpolation of the zero-padded input signal. ",Matt L.,https://dsp.stackexchange.com/users/4298,http://dsp.stackexchange.com/questions/8851/interpolated-fir-filter,TECHNOLOGY,dsp.stackexchange.com 8362,What are the advantages/disadvantages of the Rock Band 3 Keyboard?,"Vs. a normal midi keyboard and the Midi Pro adapter? In particular, The RB3 Keyboard is not a full-sized keyboard. If we do use a full-sized midi keyboard in Pro mode, can we/do we have to use the entire keyboard, as it's played in the actual song, or can we/do we have to stick to two octaves (like the RB3 Keyboard)? The RB3 Keyboard can also function as a five-button peripheral in non-Pro mode. Can we do the same with a normal midi keyboard? I've read that the RB3 keyboard has velocity-sensitive keys. Does RB3 take this into effect? Will I lose some functionality if my midi keyboard isn't velocity-sensitive? Does the expressions bar also add functionality? ",BlueRaja - Danny Pflughoeft,https://gaming.stackexchange.com/users/2578,"Note: this is from what I've picked up in ready dozens of reviews! All songs are designed to just be played with the right hand, however in Pro Mode, songs on Hard and Expert difficulty require you to use both octaves. This means that there's no use for you to have a full sized keyboard, as it would leave most of it unused. Pure speculation: If you can use a midi controller instead of the keyboard, you should be able to map certain keys to the five buttons. The velocity-sensitivity is probably intended to counter the fact that they're using very 'cheap' keys, which lack the natural resistance of a decent keyboard. My guess would be that you won't notice any difference in game. The lack of the expression bar is only a loss if you like using the whammy bar when playing it as a keytar, although you will lose the ability to gain extra Overdrive like you can with the whammy bar on a guitar. For the rest I don't really see a use case for it anyway. ",Ivo Flipse,https://gaming.stackexchange.com/users/10,http://gaming.stackexchange.com/questions/9771/what-are-the-advantages-disadvantages-of-the-rock-band-3-keyboard,CULTURE,gaming.stackexchange.com 1848,Question: Graph Theory and Trees,"In a group of 2n schoolchildren each one has at least n friends. On an outing, the teacher tells them to hold hands in pairs. Show that this can be done with each child holding a friend’s hand, and that if n > 1, the choice of friends can be made in at least two different ways. This was on a previous exam, and I have yet to receive the solutions for it. Can anyone help? ",Marblen,https://math.stackexchange.com/users/64488,"By a theorem of Ore (proof here), if every pair of non-adjacent vertices of a graph on $m$ vertices has degrees adding up to at least $m$, then the graph is Hamiltonian. This applies to the schoolchildren, with $m=2n$. So they can be ordered into a Hamiltonian cycle (a path will do), $c_1,c_2,\dots,c_{2n}$, where each $c_i$ is friends with $c_{i-1}$ and $c_{i+1}$. Now pair $c_1$ with $c_2$, $c_3$ with $c_4$, and so on. Dirac's Theorem, a special case of Ore's Theorem, is strong enough to solve this problem. A proof is here. EDIT: Dirac's Theorem states that if each of the $m$ vertices of a graph has degree at least $m/2$, then the graph is Hamiltonian. This is exactly the hypothesis satisfied by the schoolchild graph. ",Gerry Myerson,https://math.stackexchange.com/users/8269,http://math.stackexchange.com/questions/380474/question-graph-theory-and-trees,SCIENCE,math.stackexchange.com 400,Why does my switch need to be wired in this fashion?,"Today was my first foray into electronics since high school, in the form of some simple Raspberry Pi experiments. I managed to get a circuit working where a switch controlled an LED with a potentiometer to control the brightness of the LED. However, I am confused by the wiring of the switch. Firstly, here's a photo of my amazing work: NOTE: the black lead on the potentiometer is not connected to anything (hard to tell in the photo). Also, I realised afterwards that I could have just inserted the potentiometer into the breadboard rather than soldering wires to it. Noob mistake (one of many). Here's an attempt at a schematic (also probably wrong because I don't know what I'm doing): simulate this circuit – Schematic created using CircuitLab As you can see, I used a PiFace, which comes with the four switches located at the left and towards the bottom of the photo. It is the wiring of this switch that befuddles me. Since each switch has two terminals, I was expecting one terminal to act as an input and the other as an output. That is, I just feed my circuit through those two terminals and job done. But that didn't work. I managed to find this image online: This is what prompted me to guess the configuration below, which works. However, I don't understand why it works. Nor do I understand why there are two terminals for each switch if only one seems to be used. I suspect the clue is embedded within the text in the above image: The four switches, numbered S1 to S4 are connected in parallel to the first four (0-3) inputs However, I do not understand what this means. Perhaps a practical example of how I would use each terminal and an explanation of why the grounding is necessary would help my understanding. ",me--,https://electronics.stackexchange.com/users/35079,"For the grounding it's easy. Basically a switch can have not 2 but 3 state. Basically High when pressed Undefined when unpressed and not grounded Low when unpressed and ground simulate this circuit – Schematic created using CircuitLab Grounding it will allow you to make sure the output low, without that it's a short circuit. So basically you'll use a pull-up or pull-down resistor for that. They are connected in parallel means they are not connected one after each other but side to side. Example simulate this circuit So from what I read in your question, the switch sound like a ""master switch"" who can act on both of the 3 other switch. If pressed, it's like all the switch are pressed. But hard to tell without precise schematics. ",Emmanuel Istace,https://electronics.stackexchange.com/users/27489,http://electronics.stackexchange.com/questions/95405/why-does-my-switch-need-to-be-wired-in-this-fashion,TECHNOLOGY,electronics.stackexchange.com 2542,How TCP/IP server listens to several clients?,"I'm setting up a small tcp/ip connection using GSM/GPRS modems, I have a server PC which runs a server (listener) program, and have several (more than 100) modems located in different places, they send small packets of data to the server in specific periods. I have tested system with one client, but how can I test it with several clients? how will my server respond to several clients? Here is my server code: private TcpListener tcpListener; private Thread listenThread; public static TcpClient client; public Form1() { InitializeComponent(); this.tcpListener = new TcpListener(IPAddress.Any, 2020); this.listenThread = new Thread(new ThreadStart(ListenForClients)); this.listenThread.Start(); } private void ListenForClients() { this.tcpListener.Start(); while (true) { //blocks until a client has connected to the server client = this.tcpListener.AcceptTcpClient(); //create a thread to handle communication //with connected client Thread clientThread = new Thread(new ParameterizedThreadStart(HandleClientComm)); clientThread.Start(client); } } private void HandleClientComm(object client) { TcpClient tcpClient = (TcpClient)client; NetworkStream clientStream = tcpClient.GetStream(); //TcpClient client = new TcpClient(servername or ip , port); //IpEndPoint ipend = tcpClient.RemoteEndPoint; //Console.WriteLine(IPAddress.Parse(ipend.Address.ToString()); //label3.Text = IPAddress.Parse(((IPEndPoint)tcpClient.Client.RemoteEndPoint).Address.ToString()).ToString(); SetControlPropertyThreadSafe(label3, ""Text"", IPAddress.Parse(((IPEndPoint)tcpClient.Client.RemoteEndPoint).Address.ToString()).ToString()); byte[] message = new byte[4096]; int bytesRead; while (true) { bytesRead = 0; try { //blocks until a client sends a message bytesRead = clientStream.Read(message, 0, 4096); } catch { //a socket error has occured break; } if (bytesRead == 0) { //the client has disconnected from the server break; } //message has successfully been received ASCIIEncoding encoder = new ASCIIEncoding(); //System.Diagnostics.Debug.WriteLine(encoder.GetString(message, 0, bytesRead)); string received_text = encoder.GetString(message, 0, bytesRead).ToString(); SetControlPropertyThreadSafe(label1, ""Text"", received_text); if (received_text == ""cmdtim"") { SendData(DateTime.Now.ToString()); } } tcpClient.Close(); } As you see I've created a separate thread for listening clients, how can I listen to several clients? Should I create a thread for each client? I don't know how many clients will I have in each moment, will the server buffer data of other clients when it listens to a specific client? What is the best strategy for listening to several clients and also sending all of them data? ",Ali_dotNet,https://stackoverflow.com/users/833139,"Some advise: Remove: public static TcpClient client; Replace: client = this.tcpListener.AcceptTcpClient(); with TcpClient client = this.tcpListener.AcceptTcpClient(); ",Vladimir,https://stackoverflow.com/users/697887,http://stackoverflow.com/questions/7096586/how-tcp-ip-server-listens-to-several-clients,STACKOVERFLOW,stackoverflow.com 2339,Where to find ferry flights and empty leg flights?,"Based on this question Avoiding crew fatigue on empty leg flights I learned that there are ""empty leg"" flights or ""ferry flights"". These seem a good option but I would like to know more about them. Where are these announced? How can one travel this way? ",nsn,https://travel.stackexchange.com/users/3736,"Private Aircraft Others have answered for the commercial and chartered sectors, which is increasingly being strangled due to regulation. This answer will focus on the private sector. Where are these announced? The short answer is they are not announced, at least publicly like on a web site. Any kind of advertising or public communication kicks them into the charter or commercial spheres. When you know that a private pilot is planning to fly, you can ask if he wants to take you along. It's that simple. Meeting people and making personal contact replaces the internet. I think it's OK to exchange emails with somebody who already knows you and met you personally or through a club, but they are not going to warm up to somebody out of the blue. Also in terms of 'where are these announced', some discretion can be in order. If you go around identifying your contacts by name on your Facebook page, it may not be appreciated and you're likely to find your emails unanswered after that. If you know something is on a pilot's bucket list, like flying a Nanchang CJ-6 (a vintage two seater on many dream bucket lists), you can keep your eyes open for that kind of opportunity. Whatever gets you talking to pilots and in the air is key towards empty leg travel. Another example... In 2018, there will be a competition to fly around the world in Bristol Bulldogs. For people who live on the route and are aware that Bulldogs need to land for maintenance and fuel at the drop of a hat, there's an opportunity to offer some hospitality and a quick tour of your city. A really great calling card is the ability to speak different languages and to let people know you're happy to translate. I have also done pet-sitting, baby-sitting, driving, tour guiding, and cabin clean up/dish-washing. Having multiple passports also gives you a slight edge because you don't face visa issues. How can one travel this way? Some important things to point out about this... Timing. If you haven't done it before, it's not going to happen overnight unless you're very lucky. It takes a long time to get oriented and to establish yourself as an enthusiast. Flexibility. You don't always go exactly when you want and where you want. Instead, you go where the pilot is going and that may leave you with additional transportation to reach your destination - or even stranded for a while. For example, a flight into Heathrow or Gatwick would be extraordinarily rare; the general case is they are headed for a private airport like Cotswold or even as far out as Humberside. There are about 20 - 25 airports in the greater London area and home counties, but not every type of plane is cleared for their type of strip(s). On the plus side and if you are younger, being 'stranded' at some random field gives the opportunity to hang around the terminal and meet pilots who might be flying to some place else (note: I never went 'total gypsy' myself, but have spoken with people who managed to hop respectable distances over the course of say, a year; others have found that the demands of being flexible became unpleasant as they got older). Regulations. It's getting worse and worse. Airpooler is now moribund because of US regulations. BlackJet was supposed to have Uber's business model, but now appears to be offering very expensive pay-only arrangements to avoid being shut down. And the EU has jumped in with stricter interpretation of Regulation 965/2014, which is making some pilots reluctant to do anything at all unless they know you well. How to learn more about it? In comments, you wrote you're looking to know more about it... The best way to find out more is to join local aviation clubs and read aviation magazines oriented to private pilots. A simple Google search 'aviation clubs near London' returned two pages of results. I am in two for example. Source: Club event at Rochester Airport, Kent, fair use For aviation magazines, I can suggest ""Pilot Getaways"" (mostly US audience), ""Pilot Magazine (UK version)"" (UK general interest), ""Plane and Pilot"", (US, mixes private and business, more technical). Some other helpful entry points... You can attend events and festivals, like the annual one at Shobdon Field where anybody can go and enjoy the event while expressing enthusiasm for the sport. You can be a volunteer in Project Orbis, or raise donations in a challenge event. The Corporate Angel Network also takes in volunteers for data entry (with no direct path to flying) but leading to a wealth of knowledge about flight schedules, pilots, fractional owners, private car operators, airports, and all the rest. Check out newly converted or upgraded airports like Conington. Check out their engineering and repair facilities, what kinds of certifications they offer. Even Wifi and broadband. It's all useful knowledge. Finally, having some kit, like a Delorme Communicator or a Zulu class headset can be a tremendous help. Certainly the pilot will have his own, but it helps to establish you as a serious enthusiast who uses his own stuff. ",Gayot Fow,https://travel.stackexchange.com/users/1737,http://travel.stackexchange.com/questions/50197/where-to-find-ferry-flights-and-empty-leg-flights,CULTURE,travel.stackexchange.com 6707,Should an adverb go before or after a verb?,"For example: The word rarely turns up outside of those contexts. The word turns up rarely outside of those contexts. Which one is correct and why? ",Anderson Silva,https://english.stackexchange.com/users/1446,"Both correct, I don't think it's supposed to be limited here. Maybe the creative usage ""turns rarely up"" would also be used in some cases. ",dracularking,https://english.stackexchange.com/users/3981,http://english.stackexchange.com/questions/9702/should-an-adverb-go-before-or-after-a-verb,CULTURE,english.stackexchange.com 8816,Change Width of Object on Screen Resize,"How do I use Javascript to change the width of an object when the screen is resized to a smaller width? When the screen is resized back to the bigger size, I want the bigger object. ",AkashBhave,https://stackoverflow.com/users/4552814,"The best way to handle an object size in a responsive screen is through a relative size on css, like vihan1086 said. This could be made like this: <div style=""width: 75%"">My Content</div> This would make this element fill 75% of the screen, no matter the size of the screen. If you really want to do that in JS, you could do something like this with the help of jQuery $(window).resize(function() { var window_width = $(window).width(); if(window_width < 300) { $(""#myDiv"").width(100); } }); ",Michael Kuhinica,https://stackoverflow.com/users/317908,http://stackoverflow.com/questions/29503555/change-width-of-object-on-screen-resize,STACKOVERFLOW,stackoverflow.com 697,Java read pptx file,"Can someone help me how to read pptx file in java?i would prefer if this can be read with apache POI, i have been searched this tutorial but i can't find it.I've been successfully read the ppt file with this code : try { FileInputStream fis = new FileInputStream(file); fs = new POIFSFileSystem(fis); HSLFSlideShow show = new HSLFSlideShow(fs); SlideShow ss = new SlideShow(show); Slide[] slides=ss.getSlides(); for (int x = 0; x < slides.length; x++) { System.out.println(""Slide = "" + (x + 1) + "" :"" + slides[x].getTitle()); TextRun[] runs = slides[x].getTextRuns(); for (int i = 0; i < runs.length; i++) { TextRun run = runs[i]; if (run.getRunType() == TextHeaderAtom.TITLE_TYPE) { System.out.println(""Slide title "" + (i + 1) + "": "" + run.getText()); } else { System.out.println(""Slide text run "" + (i + 1) + "": "" + run.getRunType() + "" : "" + run.getText()); } } } } catch (IOException ioe) { ioe.printStackTrace(); } Can someone tell me what part of this code must be modified to read pptx file? ",user1290932,https://stackoverflow.com/users/1290932,"According to http://poi.apache.org/slideshow/index.html you need to use a separate set of classes to read OOXML .pptx files. There's example code in the cookbook: http://poi.apache.org/slideshow/xslf-cookbook.html ",Arne de Bruijn,https://stackoverflow.com/users/275998,http://stackoverflow.com/questions/10684526/java-read-pptx-file,STACKOVERFLOW,stackoverflow.com 1417,What is the Republic City Police Force (metalbender cops) insignia?,"What is the insignia worn by the metalbending cops? The one that looks like a gold geometric ant's head (with mandibles): Is it a spin on something from the previous series? ",Nick T,https://scifi.stackexchange.com/users/584,"If you look closely you see the shape resembles Toph's hair! That's all it is. ",Shrimpy,https://scifi.stackexchange.com/users/11116,http://scifi.stackexchange.com/questions/19173/what-is-the-republic-city-police-force-metalbender-cops-insignia,LIFE_ARTS,scifi.stackexchange.com 7523,Please help me in changing layout of all products page," can anyone tell me where can I change layout of this page i think this page is now having 3columns.phtml layout but I need 2columns-left.phtml layout please help me. ",Abdul,https://magento.stackexchange.com/users/16312,"To change the product page layout: From the Admin menu, select Catalog > Manage Products. Find the product in the list, and click to open the record. In the Product Information panel on the left, select Design. Then in the Design section, set Page Layout to a different column configuration. When complete, click the Save button. To change the category page layout: From the Admin menu, select Catalog > Manage Categories. In the Categories tree, select the category level you want to change. On the Custom Design tab, set Page Layout to “2 columns with right bar.” Click the Save Category button. ",JACK,https://magento.stackexchange.com/users/16443,http://magento.stackexchange.com/questions/44475/how-to-change-the-layout-of-the-all-products-page,TECHNOLOGY,magento.stackexchange.com 2380,How do they shoot long underwater scenes (especially the even longer stylistic ones)?,"How do they shoot the music videos where people are singing inside water? What confuses me if that is plain special effects is their clothes, they behave exactly how clothes behave in water. The motion of the cloth is slow, like it's supposed to be in a fluid, whereas the motion of the person is normal (or slow, but for stylistic reasons). I mean, it could be special effects, but that will really surprise me, because it will certainly take a lot of effort. Example ",Man,https://movies.stackexchange.com/users/4982,"It really depends on the film, but the best example I can think of is the James Cameron's The Abyss, and I suspect they did the same thing in the music video you mentioned. As detailed in this Time article about the film, there is a large tank of water for the scene to be filmed in, with all the crew using oxygen tanks. In between cuts, support divers with a spare oxygen tank will then swim up to the cast and give it to them. In the case of The Abyss, there was also an underwater oxygen refilling station so they didn't have to surface every time their Oxygen tank was empty (which would be once an hour), but in shorter and/or cheaper projects they would just swim up to the surface to do so. Though in the music video, the angle of the light source seems to indicate that she isn't very deep underwater and could probably reach the surface with a single kick. ",Crow T Robot,https://movies.stackexchange.com/users/9682,http://movies.stackexchange.com/questions/23668/how-do-they-shoot-long-underwater-scenes-especially-the-even-longer-stylistic-o,LIFE_ARTS,movies.stackexchange.com 3601,How to fix a Macbook Pro trackpad where the mouse pointer is randomly moving?,"The trackpad on my Macbook Pro just started acting oddly. It's randomly clicking (which might cause me to switch programs), right-clicking and even once my screen even showed the swiping animation as if I was trying to switch to a different desktop. Part of me fears that this is some sort of joke hacking attempt (I know of a USB device you plug into someones computer and it randomly moves their mouse and types on their keyboard), but there is nothing plugged into my machine and I just turned off the Wi-Fi and watched as this web page tried to close, the mouse right clicked twice, highlighted a word and clicked ""Paste and Match Style"" in the Chrome right-click menu. Also as I've been typing (with my Wi-Fi turned off) the mouse has randomly been clicking inside this question and changing where I am typing. I just plugged in a USB mouse which seems to work fine but the trackpad is now nearly useless. I can't even move the mouse cursor more than a few centimeters with it. Is this a common issue? EDIT I think it is dying actually. I can now click but not move at all with the trackpad, while a regular mouse works fine. EDIT 2 And now it seems to be working again. I turned on the option for ""Ignore Trackpad when Mouse is plugged in"" under Universal Access. I cleaned the trackpad with rubbing alcohol, I whined and complained for a few minutes to my dog, turned off the ""Ignore Trackpad"" setting, unplugged the USB mouse, and the Trackpad appears to be working mostly normally. If I run my finger across it at the top or bottom portion of the mouse, it works, but there is a line horizontally across it (almost exactly where a physical trackpad button would end on the old trackpads) that is ""dead"". The mouse stops moving, or moves sluggishly when hitting that spot and that ""spot"" goes across the whole trackpad. ",James P. Wright,https://apple.stackexchange.com/users/4049,"I've heard dust and dirt inside the MB/MBP can cause the trackpad to act very weird. I'm having issues with my mouse now and am thinking of taking apart my MBP and blowing it out with a compressor. ",Big Paul,https://apple.stackexchange.com/users/40313,http://apple.stackexchange.com/questions/62146/how-to-fix-a-macbook-pro-trackpad-where-the-mouse-pointer-is-randomly-moving,TECHNOLOGY,apple.stackexchange.com 4520,Who counters Jayce top lane besides Yorick?,"I'm aware that Yorick and Cho'Gath are both good counters for Jayce (in Top Lane) but who else might be a good matchup and why? ",Eddie,https://gaming.stackexchange.com/users/29370,"Malphite can win this lane consistently. ",SubSalac,https://gaming.stackexchange.com/users/29319,http://gaming.stackexchange.com/questions/77029/who-counters-jayce-top-lane-besides-yorick,CULTURE,gaming.stackexchange.com 4699,How to get angle bewteen two vectors in range -1 to 1 without using arc cosine?,"Given two normalized vectors in 3d space, how can I get a value from $-1$ to $1$ based on their angle without using arc cosine? With use of arc cosine, I think this would give me the correct result. But since arc cosine is a computational expensive function in computer programming, I need to avoid it. $$\frac{cos^{-1}(a * b)}{180^°}-1$$ It is acceptable that the solution doesn't return the same values as the formula above. It's just important that the output depends (not necessarily linear) on the angle and is in the range from $-1$ to $1$. ",danijar,https://math.stackexchange.com/users/67338,"You can consider the cross product of the vectors and take the arcsin of the magnitude of that cross product. Specifically, for the case of 2D vectors $\vec{a}$ and $\vec{b}$, we have $$\sin{\theta} = \frac{a_x\, b_y - a_y\,b_x}{\sqrt{a_x^2+a_y^2}\sqrt{b_x^2+b_y^2}}$$ ",Ron Gordon,https://math.stackexchange.com/users/53268,http://math.stackexchange.com/questions/344922/how-to-get-angle-bewteen-two-vectors-in-range-1-to-1-without-using-arc-cosine,SCIENCE,math.stackexchange.com 8468,Conflicting information about the running kernel version in FreeBSD,"I asked a related question about uname before and now want to ask from another angle, because the following simple yet obvious conflicting outputs may mean there is something many people did not think of (me included). I'm running FreeBSD 9 RELEASE; please see the following commands: # sysctl kern.bootfile kern.bootfile: /boot/kernel/kernel # strings /boot/kernel/kernel |grep RELEASE|grep 9 @(#)FreeBSD 9.2-RELEASE-p7 #0: Tue Jun 3 11:05:13 UTC 2014 FreeBSD 9.2-RELEASE-p7 #0: Tue Jun 3 11:05:13 UTC 2014 9.2-RELEASE-p7 The above kernel file suggests the running kernel is 9.2-RELEASE-p7. But... # dmesg Copyright (c) 1992-2012 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012 ... # uname -a FreeBSD localhost.localdomain 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 So dmesg and uname says it's 9.1-RELEASE. I also did an extensive find / -type f -exec grep -l ""9.1-RELEASE"" {} \;, but I found no possible kernel file that contains 9.1-RELEASE. What could lead to the above conflict, and what kernel am I actually running? Please note I run RELEASE and ran freebsd-update to do a binary update, so no compiled kernel is involved. And I have rebooted multiple times after freebsd-update. And the system is not in jail, etc., just the only system on that computer. ",John,https://serverfault.com/users/74283,"You have probably upgraded the system from 9.1 to 9.2 but failed to reboot it. You might also have simply booted a previous kernel, but given the output you've shown, this seems much less likely. One other possibility comes to mind, that the system is actually inside a jail, running on a 9.1 system, so that while the jail is upgraded to 9.2, the host system is still running 9.1. ",Michael Hampton,https://serverfault.com/users/126632,http://serverfault.com/questions/602231,TECHNOLOGY,serverfault.com 7338,How to read NTFS drives in Linux (RHEL 6)?,"My system is on dual boot. I have installed both RHEL 6 and win7 in it. I use RHEL mostly and I want to use my windows' NTFS drive in RHEL. How can I do it? Tell me the procedure. ",Chankey Pathak,https://unix.stackexchange.com/users/2063,"Install the fuse ntfs-3g package (if not available download it, remember your OS type 64-bit or 32-bit) You must be logged in as root for the below command to work : # yum install ntfs-3g if yum is not configured install it by using rpm command. Entering the below commands would help you determine the name of an NTFS partition : # fdisk -l /dev/sda # fdisk -l /dev/sdb It is essential to load the fuse driver. The below command should help you do that : # modprobe fuse Now using the below command you must build a mount point: # mkdir /mnt/ntfs The following command would help you with mounting the ntfs partition : # mount -t ntfs-3g /dev/sda1 /mnt/ntfs This is a temporary mounting only, if you reboot your pc the mount point will be lost. To mount it permanently, you need to edit the /etc/fstab configuration file. # vim /etc/fstab in the file ex: # device name mount point fs-type options /dev/sda6 /mnt/ntfs ntfs-3g auto 0 0 clear explanation for each column: device name - your partition name ex: /dev/sda6 mount point - where u mount u r partition ex: /mnt/ntfs fs-type - your file system type ex: ntfs-3g (if u give ntfs, may be it is not work) option - Ex:auto (if not work give it is defaults) last two columns same as 0 0 Hope it will work. ",user29706,https://unix.stackexchange.com/users/29706,http://unix.stackexchange.com/questions/16893/how-to-read-ntfs-drives-in-linux-rhel-6,TECHNOLOGY,unix.stackexchange.com 1935,Effective game mechanics for handling conflicts with spirits,"A very effective set piece can be conflict with the spirit world. A nice example of the kind of thing I am thinking of is from the 1982 Conan film, where the wizard opens a gateway to the spirit world to get demons to revive Conan, and where Valeria fights incorporeal demons to save Conan (YouTube, from 6:45 into the clip to the end & onto next clip). RQ3 had nice mechanics for dealing with these situations, with shamans who can take characters to the other side through their fetch, spirit combat to handle attacks by hostile spirits, using magic points as an orthogonal measure of strength to hit points. AD&D was pretty lousy for this kind of thing back in the day: its distinction between combat involving the incorporeal attribute or in the ethereal and astral realms didn't really work for setting up situations. But newer D&Ds seem to have better resources, though I've not seen this in action. What good game mechanics are there for handling conflicts with spirits? Postscript The kind of thing game mechanics need, I think, to sustain interest in spirits and spirit combat are: Spirits are immaterial and that means you have to do different sorts of things to influence them. E.g., if the best way to deal with an ancient ghost is to chop it up with an axe, that'll spil that atmosphere a bit; Likewise, spirits are potentially powerful adversaries. Not very high-powered spells that can get rid of most spirits with a 65% chance of success detract from interest; Characters can be experts in spirits, and it is good if the nature of those experts draws on resonant real-world and fictional atmospheric devices such as shamans, ancestor worship, fetches, and the like. It's also good if characters regularly need the services of these figures. ",Alticamelus,https://rpg.stackexchange.com/users/973,"The Dresden Files The fate-powered Dresden Files RPG has very good rules for summoning, containing, and controlling spirits / faeries / ghosts / demons. Each of those three tasks - summoning, containing, and controlling - is dealt with in sufficient detail to be flavorful, but like most of the dresden-files rules, you can skip the boring parts. Is your wizard calling a minor friendly, like Toot-Toot? You can probably get away with a single roll. Pulling up something from the wrong side of the Nevernever? A big bad Thing that would pick his teeth with your athame if it weren't for that pesky summoning circle? Oh, and is that a pack of howling ghouls hammering at your door while you chat with this critter? Then you're in for all the rolls and attention that such a dramatic, possibly climactic moment deserves. Sorcerer Ron Edwards' Sorcerer is all about summoning, binding, and interacting with demons. I have never played it, but I hope to remedy that soon! ",gomad,https://rpg.stackexchange.com/users/696,http://rpg.stackexchange.com/questions/8106/effective-game-mechanics-for-handling-conflicts-with-spirits,CULTURE,rpg.stackexchange.com 2423,m-element random sample being equally likely ...(CLRS 5.3-7)?,"I am trying to understand the following solution to CLRS 5.3-7: http://clrs.skanev.com/05/03/07.html Question description is on the page. I understood the part where m-element subset is constructed out of m-1 element subset when the m-element subset includes the last element n. But why does the probability of randomly choosing m-1 elements from a set of n-1 elements differs in the case when we don't include the last element? Doesn't the invariant state that we choose m-1 elements at random from n-1 elements? ",Azfar Hussain,https://cs.stackexchange.com/users/19747,"Here is the recursive algorithm for selecting a random set $S \in \binom{[n]}{m}$ (the set of all $m$-subsets of $[n] = \{1,\ldots,n\}$): If $m = 0$, return the empty set. Generate a random set $S \in \binom{[n-1]}{m-1}$ recursively. Let $i \in [n]$ be chosen uniformly at random. If $i \notin S$, return $S \cup \{i\}$. If $i \in S$, return $S \cup \{n\}$. To show that this works, we prove that the probability to get any set in $\binom{[n]}{m}$ is exactly $1/\binom{n}{m}$, by induction on $n$. This is clear when $m = 0$, so assume $m > 0$. Let $S \in \binom{n}{m}$ be given. We consider two cases: $n \notin S$ and $n \in S$. Case 1, $n \notin S$. For each $i \in S$, the probability that the recursive step generates $S \setminus \{i\}$ is $1/\binom{n-1}{m-1}$, and so in that case $S$ is produced with probability $1/n$. In total, the probability is $$ \frac{m}{n} \frac{1}{\binom{n-1}{m-1}} = \frac{1}{\binom{n}{m}}. $$ Case 2, $n \in S$. In that case, the recursive step must generate $S \setminus \{n\}$, and then $S$ is produced with probability $m/n$ (since we either hit $n$ or any element in $S \setminus \{n\}$), obtaining the same expression as above. ",Yuval Filmus,https://cs.stackexchange.com/users/683,http://cs.stackexchange.com/questions/28074/m-element-random-sample-being-equally-likely-clrs-5-3-7,SCIENCE,cs.stackexchange.com 1769,Possible to remove p tags from a table cell in Wygwam,"I have a problem that occasionally a <p> tag is being added to a table cell, usually when someone pastes something into it. Is there a way to remove that <p> and just have the cell be an empty <td> or <th>, ideally without editing the source? Is there an option that could be added through the advanced settings? ",since1976,https://expressionengine.stackexchange.com/users/53,"If the reason is appearance, you can remove any margin/padding formatting with css, like: table p {padding:0; margin:0} Or you can add specific classes to the styling menu of wygwam for tables, for a more fine grained control over styling tables. ",GDmac,https://expressionengine.stackexchange.com/users/155,http://expressionengine.stackexchange.com/questions/4852/possible-to-remove-p-tags-from-a-table-cell-in-wygwam,TECHNOLOGY,expressionengine.stackexchange.com 9079,How to wipe RAM on shutdown (prevent Cold Boot Attacks)?,"My system is encrypted using Full Disk Encryption, i.e. everything except /boot is encrypted using dmcrypt/luks. I am concerned about Cold Boot Attacks. Prior work: https://tails.boum.org/contribute/design/memory_erasure/ http://tails.boum.org/forum/Ram_Wipe_Script/ http://dee.su/liberte-security http://forum.dee.su/topic/stand-alone-implementation-of-your-ram-wipe-scripts Can you please provide instructions on how to wipe the RAM once Ubuntu is shutdown/restarted? Thanks for your efforts! ",proper,https://askubuntu.com/users/71850,"Take a look at this thread http://ubuntuforums.org/showthread.php?t=1500936 If you still want to do it then: Look for secure-delete in Synaptic The Secure-Delete package comes with four commands: srm - Secure remove; used for deleting files or directories currently on your hard disk; smem - Secure memory wiper; used to wipe traces of data from your computer's memory (RAM); sfill - Secure free space wiper; used to wipe all traces of data from the free space on your disk; sswap - Secure swap wiper; used to wipe all traces of data from your swap partition. Source: http://ubuntuforums.org/showthread.php?t=1008111 And to make it run when you want: To execute a script upon rebooting Ubuntu Put your script in /etc/rc0.d Make it executable (sudo chmod +x myscript) Note: The scripts in this directory are executed in alphabetical order The name of your script must begin with K99 to run at the right time. To execute a script at shutdown Put your script in /etc/rc6.d Make it executable (sudo chmod +x myscript) Note: The scripts in this directory are executed in alphabetical order The name of your script must begin with K99 to run at the right time. Source: http://en.kioskea.net/faq/3348-ubuntu-executing-a-script-at-startup-and-shutdown If you do not know how to make a script: Make a text file in an easy to find directory: Code: #!/bin/bash COMMAND1 COMMAND2 COMMAND3` Use the shebang line that I have given. Replace COMMAND1 and etc with the command you would like the script to run. Save the text file and then you have to make it executable. For this I will assume that the the file is called ""test.sh"". To make it executable: chmod 775 test.sh Then you can run the script: ./test.sh Source: http://ubuntuforums.org/showthread.php?t=928839 Hope this helps, Leinardo ",Leinardo Smith,https://askubuntu.com/users/67570,http://askubuntu.com/questions/153245/how-to-wipe-ram-on-shutdown-prevent-cold-boot-attacks,TECHNOLOGY,askubuntu.com 5135,How can I find out which server OS a particular site is running?,"Is there a way to check which server OS a particular site is running. For example from linux command line. Maybe via telnet? But all I can get from ""telnet www.google.com http"" is: Trying 209.85.173.104... Connected to www.l.google.com. Escape character is '^]'. Can somebody dwell on the subject if possible at all? ",ervv,https://serverfault.com/users/115509,"Ask Netcraft: What's that site running? http://uptime.netcraft.com/up/graph?site=google.com returns ""server: gws"" (ie Google Web Server). ",Chris S,https://serverfault.com/users/33417,http://serverfault.com/questions/373917,TECHNOLOGY,serverfault.com 2529,iOS fetching from managed object context before saved,"If I add entities to a moc and I execute a fetch request on that moc before its document gets a chance to save, will my fetch contain the newly added entities? (I'm unsure how to test this out because of the auto-save feature) ",user1529956,https://stackoverflow.com/users/1529956,"I guess you're using UIDocument when you say 'auto-saving'. If you aren't, then there is no 'auto-saving' (except when using Apple template code and the app delegate saves before termination). When you create the fetch request, you can choose whether it should include unsaved items using the includesPendingChanges property. It defaults to YES so by default you will see unsaved items in the results. ",Wain,https://stackoverflow.com/users/1988185,http://stackoverflow.com/questions/17054254/ios-fetching-from-managed-object-context-before-saved,STACKOVERFLOW,stackoverflow.com 644,Why choose an 80-200mm over an 18-200mm lens?,"Being a beginner, I can't see why I must choose an 80-200 over an 18-200. Are there scenarios where an 80-200 would be preferable over an 18-200? I will be buying a D7000 soon and am looking at these: AF Zoom-NIKKOR 80-200mm f/2.8D ED AF-S DX NIKKOR 18-200mm f/3.5-5.6G ED VR II but similar considerations would apply to other brands as well. ",Ygam,https://photo.stackexchange.com/users/2362,"As a really, really broad generalization, it's easier to make a high-quality zoom lens with a smaller zoom range, rather than a larger one. Although it's really tempting to look for one zoom that'll cover your entire range of shooting (Tamron's 18-270 comes to mind), these lenses tend to be fairly ill-behaved over portions of their range (at least), and suffer from softness and complex distortions that aren't easily fixed in post-processing. The two lenses you indicate are really fairly different; the 80-200 is a fast lens (f/2.8), while the 18-200 is quite a bit slower. You'd be giving up a lot of optical performance to get that extra range, which is why most people end up covering this range with two lenses, more or less. ",D. Lambert,https://photo.stackexchange.com/users/269,http://photo.stackexchange.com/questions/11247/why-choose-an-80-200mm-over-an-18-200mm-lens,LIFE_ARTS,photo.stackexchange.com 1188,Why would you use the __LINE__ macro in C++,"I am trying to figure out how people use the __LINE__ macro at work. How do you guys use it? ",Scott J,https://stackoverflow.com/users/209201,"You can use __LINE__, along with __FILE__, to report where problems occur in the source code. Consider, for example, the assert() macro - this wording from the C99 standard, but C++ is similar, except it does not mention __func__: When it is executed, if expression (which shall have a scalar type) is false (that is, compares equal to 0), the assert macro writes information about the particular call that failed (including the text of the argument, the name of the source file, the source line number, and the name of the enclosing function — the latter are respectively the values of the preprocessing macros __FILE__ and __LINE__ and of the identifier __func__) on the standard error stream in an implementation-defined format. #define assert(x) (void)(((x)==0)?_Assert(#x,__FILE__,__LINE__,__func__):0) ",Jonathan Leffler,https://stackoverflow.com/users/15168,http://stackoverflow.com/questions/1719281/why-would-you-use-the-line-macro-in-c,STACKOVERFLOW,stackoverflow.com 4988,"Usage of ""might"" and ""would"" to indicate doubt","Do the sentences She might be only 28, but Jodie Whittaker.... and My parents would have walked along the Barrow wrongly suggest doubt, or are they normal usage? Are there names for these constructions? Taken from Irish Times . I googled ""would have spent their time"". Many cases were counterfactuals (""... otherwise they would have spent their time...”) But plenty simply describe past events, as the in the usage sited above. I couldn't detect a regional bias. As an Irish-English speaker this usage is unremarkable for example I might say This is the exact spot where Caesar would have crossed the Rubicon I think the intention is to evoke the event rather than just record it. ",cindi,https://english.stackexchange.com/users/122,"Brian Hooper: I had a look via Google for more information on this point, but, try as I might, I couldn't find anything. I remember reading an article on the difference between ""Launching the lifeboat may have saved lives"" and ""Launching the lifeboat might have saved lives"" but I can't remember where so that doesn't help much as a reference. Nohat: I would say may/might + perfective (have) has a different meaning than the “concession” meaning here. “Launching the lifeboat may have saved lives” implies the lifeboat was launched, whereas “… might have saved lives” implies it wasn’t launched. ============== I'm not completely sure of how things operate here at Stack Exchange. I'm not trying to step on anyone's toes, nor am I trying to be mean or snide. I don't know if this is the ""proper"" manner of addressing this. It seems to me that Comments is meant for just that, a short comment. This, to my mind, requires much more discussion, [and I hope it doesn't end here. Is there not a venue for advanced discussion?], hence more needed space so I've opted for a Your Answer. And I believe my comments are directed to answering the question. With respect, there's no way we can make the assumption that there is a ""rule"" that will describe for all situations/scenarios that launching or not launching a lifeboat [or similar situation] may or may not or might or might not have saved lives or told or implied to us whether or not a lifeboat was launched. There are scenarios where both 'may' and 'might' are used with their normal epistemic [level of certainty] meanings to speculate on past time events just as they are used to speculate on future or present condition events. Let me create a scenario. This is a time before ship to shore radios, radar, etc. were available. A ferry is about to leave port. A person on the dock remarks, ""That boat might sink"". That is based on their personal feeling according to whatever facts, feelings, superstitions that person holds that has influenced their choice of 'might'. A worker who has been involved in maintaining the ferry says, ""I warned my superiors. That ferry may sink"". The owner says, ""That ferry will never sink"" [Where have we heard that before?] A foreman says in a suicide note, ""I have to address this, ... to set the record straight. We did our best but the owners wanted to save money. That ferry probably will go down on this trip."" Other people, for whatever personal reasons they have, even a premonition, could choose, ""The ferry will almost certainly sink"" / ""The ferry may well/might well sink"". The wide variation, which ranges from zero percent chance [owner] to say, a old time ""terrorist"" who has made some effort to sink the boat, conjecturing ""That ferry will go down"", does not mean that anyone of them is right before the boat leaves port. That's what modals allow us to do, speculate on events, conjecture, and it doesn't matter if the event is past, present or future. There is a terrible storm, the ferry is overdue. Those same people, probably now joined by countless others, all weigh in with their OPINIONS because, they have nothing else to go on. Remember, this is a time before radios, radar, etc. 1)The ferry went down. 2) The ferry must have sunk. 3) The ferry probably/likely sank. 4) The ferry may have gone down. 5) The ferry might have gone down. 6) The ferry didn't sink. Again, at this point, with the available information, all are opinions, even 1) and 6), though one of them will, maybe, probably never, eventually be confirmed as fact. But look at the modal perfect examples for that's the point I'm trying to get across. Sometimes, 'might' just means what it most often normally means, ""there's a tiny to small chance that X will occur/is occurring/has occurred"". The ferry, I'm sad to report, [this is my scenario] went down. The people of that time only know this because no trace was ever found of the boat, the people or the things on the boat. No lifeboats were ever launched. There is now rampant speculation among the population on whether a or some lifeboats would have saved lives. 1) Lifeboats would have saved lives. 2) Lifeboats almost certainly would have saved lives. [Note that 'must have saved lives', epistemically equal to 'almost certainly would have saved lives' isn't possible here] 3) Lifeboats probably/likely would have saved lives. [Note that 'should have saved lives', is strange here even though 'should' is epistemically equal to 'probably/likely'.] 4) Lifeboats may have saved lives. 5) Lifeboats might have saved lives. 6) Lifeboats wouldn't have saved lives. But all these are still simply personal opinions, not statements of fact. Look at the 'may have' and 'might have' parts. There's no implication in the 'might have saved lives' opinion that lifeboats were launched. There's a fact that dismisses any such implication. No lifeboats were launched. Certainly, there are situations where 'might' and 'may are used to effect a meaning other that their basic epistemic/level of certainty meanings. I noted this with respect to 'might' in my previous post. We know that there are meanings for 'may' and for 'might' that are sometimes used to make a concession and sometimes, to angrily suggest [sometimes using understatement] that something should have been done. For this scenario, ""You might have [at the very least] sent out one search boat!"" What nohat stated was true, but it's not true for all situations, not even for most; I'd say that its true for a small portion of 'might have + PP' situations. I'm sorry that this is so long, but if you'll bear with me. I've read often this idea presented by nohat. It is similar in nature to the thought used to prohibit ""If S was"" as a counterfactual use. Somebody, sometime, noticed that ""If S was"" can hold the meaning of ""allowing that that is true, ... "", so they errantly made a determination that that excluded the counterfactual 'was' use in ""If I was you, ... "". Language is exceedingly complex and these kinds of expansive notions aren't helpful to come to an understanding of language. They have no affect on native speakers, save for the fact that the myths continue to be spread, but they have a gigantic affect on ESL/EFLs, both in terms of comprehension and production. Another of these expansive notions is the idea that 'would' is subjunctive. It is not! There are only a few examples of the subjunctive left in English and 'would' is not one of them. 'would' can be, and is often used in subjunctive uses to express subjunctive/contrary to fact ideas, but so are a lot of other modals. 'would' also hold the meaning of 100% true, ""that would be Bill""; ""He would, ten years later, be elected president"". The original question, which I'm now pointedly getting to, [how does one illustrate a degree of embarrassment?] My parents would have walked along the Barrow likely, in my opinion, shows this same meaning of 'would', ie. 100% true. I may be wrong for this particular instance but that doesn't negate the fact that that is how 'would' is often used. Cindi noted: I think the intention is to evoke the event rather than just record it. Cindi and I disagree. She has an opinion on how 'would' is being used here that differs from my opinion. She may well be right. The speaker could be using 'would have' in the same sense as 'must have', which would express some degree of doubt. The mistaken notion that 'would' is always subjunctive/shows doubt cause these kinds of misunderstanding. I suspect that the person who asked the original question is a native speaker - I could be wrong here too but nevertheless, the answers, I feel, illustrate just how strong this notion is set even in the conscious ideas of native speakers. It's interesting to note, please do, that this notion doesn't exist in our personal natural grammars because we all use this idea of 'would' as 100% true in so many instances, without it twigging whatever conscious prescriptions we hold. ",Dan,https://english.stackexchange.com/users/2015,http://english.stackexchange.com/questions/3541/usage-of-might-and-would-to-indicate-doubt,CULTURE,english.stackexchange.com 1260,"Can I delete my fork of a BitBucket repository, after the owner has accepted and merged my pull request?","I created a fork of a public repository on BitBucket, with the sole purpose of committing a pull request that fixed some bug. The pull request was accepted and merged. Now, I want to delete the repository, that has outlived its purpose. If I do that, will the changes be lost? There is already a question about this same issue, but for GitHub. Apparently, on GitHub you can delete the repository before the request has been even merged, as it gets automatically saved in the target repository. I guess that on BitBucket, things will be similar, but I wanted to be sure. ",user8792354,https://stackoverflow.com/users/3497081,"I'm not sure if you could do it before it's merged, but you certainly should be able to afterwards. ",Peter O'Callaghan,https://stackoverflow.com/users/401446,http://stackoverflow.com/questions/22857212/can-i-delete-my-fork-of-a-bitbucket-repository-after-the-owner-has-accepted-and,STACKOVERFLOW,stackoverflow.com 6197,Should users be forced to go through a walkthrough?,"We've found that our users have almost universally benefited from actually going through our walkthrough. Obviously, we have some more ux work to do on our service. But, based on this information, we decided to force users through the short walkthrough in the interim. Somewhat unsurprisingly, people have protested a bit :) So, what do you think, is it ok to force users through a brief walkthrough when you know it will benefit them in the end? Edit We are going to add some mixpanel hooks to find out if users are leaving when presented with a walkthrough they can't exit out of. ",jscheel,https://ux.stackexchange.com/users/22949,"Force users to start an optional walkthrough. To me, it seems most important to give users the option to opt out of the walkthrough. Some little no thanks button to exit the walkthrough should suffice. The users that are annoyed by the walkthrough are most often those, that know the service and feel like they will not profit from it - so the percentage of ""helpless"" users actually going through the walkthrough and profiting from it will remain high, while the negative feedback from ""versed"" users already somewhat familiar with your product will go down as they can opt out. Additionally, I think @MJJ has a point in his answer saying that eventually it also comes down to decreasing the need for a walkthrough that your users will profit from the most. Furthermore, @yisela's answer also gives an example of how a less intrusive walkthrough with just little tooltips can also improve the tutorial acceptance. ",kontur,https://ux.stackexchange.com/users/21973,http://ux.stackexchange.com/questions/33126/should-users-be-forced-to-go-through-a-walkthrough,TECHNOLOGY,ux.stackexchange.com 7752,Does using a Power-attack while sneaking increase your chances of being detected?,"According to the Skyrim Wiki, ""daggers are silent, meaning that enemies are not alerted to your dagger swings, even missed ones."" However, there is generally a sound (grunt or guttural throat noise) to go along with a power attack animation. Is this noise just for effect (like the passive spell-in-hand glow) or is the sound audible by potential victims/enemies? ",Bravo840,https://gaming.stackexchange.com/users/3046,"I think the power attack is just as silent as a normal swing, the grunt/yell is purely for effect. I went up behind an enemy and whiffed a bunch of power attacks on purpose and he had no reaction whatsoever, then I finished him off with a power attack and a nearby patrolling enemy didn't react. I have to add an addendum to this: Power attacks can sometimes push your character forward a little bit on the swing, and this can cause you to be detected before the attack connects, making you lose the sneak attack bonus. Make sure you are standing far back enough for this to not happen. ",l I,https://gaming.stackexchange.com/users/3917,http://gaming.stackexchange.com/questions/40532/does-using-a-power-attack-while-sneaking-increase-your-chances-of-being-detected,CULTURE,gaming.stackexchange.com 1040,Best way to migrate text field to taxonomy reference field,"I want to migrate a text field to taxonomy reference field( the Tags one). I've 1200 nodes having a field ""Organization name"". Those creating the content are making mistakes like misspelled company names. I'm using the company name in the views to find all related nodes. This will help those entering can simply choose the company names or if someone has entered IBM for International Business Machines then I can merge those terms when using taxonomy reference field. Should I go and create a vocabulary, add all existing values as terms in vocabulary then programmatically assign the text field values to the taxonomy reference field? Then delete the text field and change references in the views etc. ",AgA,https://drupal.stackexchange.com/users/2113,"I would: Go thorough all values, grouping them by their Levenshtein distance from each other. For all set of similar names, I would choose canonical one, and put them in taxonomy as a term. Using Computed Field or VBO I would choose the Levenshtein closest term for each node. Details of implementation would need a bit of polishing, but that's my general approach. Apparently you can use Views Bulk Operations both to create taxonomy terms and to set field's value on node. ",Mołot,https://drupal.stackexchange.com/users/16495,http://drupal.stackexchange.com/questions/76784/best-way-to-migrate-text-field-to-taxonomy-reference-field,TECHNOLOGY,drupal.stackexchange.com 9281,OCR software for handwritten notes,"I am looking for a way to recognize handwriting of scanned notes (in PDF format). It doesn't have to be perfect, and it doesn't have to free, but before paying I would like to try it (even with just a single page). It doesn't necessarily have to be a native Mac OS X application. I would be OK with an online application, or a Unix application to install or compile. In other words, anything that works somewhat decently would be OK. I am also not necessarily looking for a perfect result. Even transforming my notes into a searchable PDF with just some of the text recognized would be better than nothing. ",Matteo,https://apple.stackexchange.com/users/10888,"I realize that you are looking for a Mac OS application, but for the benefit of readers drawn to this topic by the search for handwriting recognition, I'd like to mention MyScript Memo and Notes Plus on iOS. They share a handwriting recognition engine that seems to work very well in my hands. MyScript memo has a free version that anyone with an iOS device can try. (I also see that you are looking to recognize handwritten notes scanned from paper, which these apps will not do. They recognize handwritten notes written directly on the iOS device.) ",Ash,https://apple.stackexchange.com/users/19022,http://apple.stackexchange.com/questions/48807/ocr-software-for-handwritten-notes,TECHNOLOGY,apple.stackexchange.com 2332,Why won't osm2po setup table correctly?,"OK, I have no idea what's going on. I'm using a Mac and successfully installed pgRouting. I used osm2po on some data, which created a sql file. I imported the sql file into a pgRouting database and all is well, except the fact I only took into account routes for cars. After Carsten helped me with configuring osm2po.config, I ran osm2po again that ran as expected. From the terminal, I run the command: psql -U [username] -d [dbname] -q -f ""/Users/John/Desktop/osm2po-4.6.9/wmCar/wmCar/wmCar_2po_4pgr.sql I was expecting it to be successful like last time, as to my knowledge the conditions are the same. However I get the error: psql:/Users/John/Desktop/osm2po-4.6.9/wmCar/wmCar_2po_4pgr.sql:101739: ERROR: INSERT has more expressions than target columns LINE 2: ..., -2.0046492, 52.5307149, -2.0026647, 52.5310823, >'010200002... With pgAdmin I look at the empty table that was created, and compared to the first sql file I imported, the new table was missing a column. That being geom_way. I find this odd as I haven't changed anything. I threw osm2po folder to the trash, and unzipped a new osm2po folder. To test whether it was going to work, I ran osm2po on the original pbf file with the original osm2po.config settings and tried to import that into the same pgRouting database. The error appeared again. For some reason, the last column, geom_way, isn't being added to the table. Would anyone know why it's started doing this? ",John Bale,https://gis.stackexchange.com/users/14826,"Just a guess. Did you use an uppercase letter in osm2po prefix name? It looks like yes - try to rename prefix/table name from ""wmCar_2po_4pgr"" to ""wmcar_2po_4pgr"". It helped me in similar situation - error while loading osm2po routing sql-script into PostgreSQL ",Andrew,https://gis.stackexchange.com/users/15838,http://gis.stackexchange.com/questions/49951/why-wont-osm2po-setup-table-correctly,TECHNOLOGY,gis.stackexchange.com 4920,"SQL agent job, why is the job history showing that a step is still running even though the job has completed","I have a sql agent job that runs Powershell as its first step (there are 3 steps in total). I have set this step to have 2 retries, with a 3 minute retry interval. When I look into the job history, the step_1 states that it is still running, and also that it has completed. It has done this for every time that it has run (at least the last year). Am I missing something from my powershell? Or is this something to do with sql agent itself? Details of querying the sysjobhistory table (Pipe seperated): Step_name|step_id|run_date|run_time|run_duration|run_status (Job outcome)|0|2014/02/12|01:20:00|5|Succeded Record volume space to file|1|2014/02/12|01:20:00|2|In Progress Record volume space to file|1|2014/02/12|01:20:00|2|Succeded Load Volume Space|2|2014/02/12|01:20:02|1|Succeded Record database data file space|3|2014/02/12|01:20:03|2|Succeded Step 1 runs the following Powershell: gwmi win32_volume | select name, capacity, freespace | Export-Csv c:\temp.tmp ",Jake,https://dba.stackexchange.com/users/36309,"On the Hey Scripting Guy! blog at Technet, Chad Miller reports that if you run a Windows Powershell command as a SQL Agent job, and there are no syntax errors yet, the command produces an error (for example, attempting to get operating system information from an unavailable server). The SQL Server Agent job will report success. Check tip #10 in the post for instructions on how to implement error handling with different options so that you can, for instance, have SQL Agent continue on error or halt the Agent job. The reported ""succeeded"" may not in fact have succeeded. 10-tips-for-the-sql-server-powershell-scripter ",huckleseed,https://dba.stackexchange.com/users/38334,http://dba.stackexchange.com/questions/65089/sql-agent-job-why-is-the-job-history-showing-that-a-step-is-still-running-even,TECHNOLOGY,dba.stackexchange.com 9311,Sum of vlookup values on multiple sheets,"Have 12 excel Sheets in a workbook for each month Jan-Dec. Each sheet contains Names and leaves marked for that month in the same row and sum value for each category of leave at the end of the table. I need to summarize these individual sheets value by looking for each person's Name in all sheets. how can I achieve this in excel.... I tried sum of vlookup from all sheet, it throws error or no result. ",roman_bull,https://superuser.com/users/77999,"It may be simpler using SUMIF here because SUMIF won't give an error if the person isn't found on any particular sheet (although all sheets need to exist), so if you have sheets ""jan"" through to ""dec"" try this formula for the 12 month total =SUM(SUMIF(INDIRECT({""jan"";""feb"";""mar"";""apr"";""may"";""jun"";""jul"";""aug"";""sep"";""oct"";""nov"";""dec""}&""!B8:B110""),B8,INDIRECT({""jan"";""feb"";""mar"";""apr"";""may"";""jun"";""jul"";""aug"";""sep"";""oct"";""nov"";""dec""}&""!AL8:AL110""))) You can shorten that by using a named range, e.g. Sheetlist ={""jan"";""feb"";""mar"";""apr"";""may"";""jun"";""jul"";""aug"";""sep"";""oct"";""nov"";""dec""} then formula becomes =SUMPRODUCT(SUMIF(INDIRECT(Sheetlist&""!B8:B110""),B8,INDIRECT(Sheetlist&""!AL8:AL110""))) ",barry houdini,https://superuser.com/users/111645,http://superuser.com/questions/526957,TECHNOLOGY,superuser.com 6858,problem unscheduling reports,"I have a user that is unable to see the ""unschedule report"" button in the edit report screen. However I am, as Sys Admin, able to see the button and use. I have checked their profile setting and they have the ""Schedule Reports"" option. Should this not enable them to unschedule the reports as well? ",Bartley,https://salesforce.stackexchange.com/users/2892,"The Permission required to unschedule reports is “Modify All Data” reference : https://help.salesforce.com/HTViewHelpDoc?id=reports_schedule_delete.htm&language=en_US and there's a related idea to enabled unschedule option for non administrators without the need to Modify All Data permission Idea : https://success.salesforce.com/ideaView?id=08730000000BpiV ",Vamsi Krishna,https://salesforce.stackexchange.com/users/3038,http://salesforce.stackexchange.com/questions/45394/problem-unscheduling-reports,TECHNOLOGY,salesforce.stackexchange.com 9481,How to turn off Twitter's Suggestions for you / Who(m) to follow?,"I am looking for a method/option to remove the new Twitter's suggestions feature. Assuming it works in a similar fashion to Facebook ... if I keep hiding users ... will it eventually go away ? ",phwd,https://webapps.stackexchange.com/users/40,"If you're using Firefox, a custom CSS for twitter.com to hide <div id=""recommended_users""> should work. Updated: Or just use this script: http://userscripts.org/scripts/review/83086 ",ale,https://webapps.stackexchange.com/users/354,http://webapps.stackexchange.com/questions/5516/how-to-turn-off-twitters-suggestions-for-you-whom-to-follow,TECHNOLOGY,webapps.stackexchange.com 5094,Is the Mechromancer's Little Big Trouble tree worthwhile in UVHM (72 level cap)?,"So far, the tree seems rather underwhelming, especially the low-tier skills like Myelin, More Pep, Strength of 5 gorillas, etc. Evil Enchantress apparently doesn't affect shock, fire and acid direct damage; it only buffs the status effects which is pretty pointless when slagging an enemy does 3X damage. Shock storm doesn't sound useful as most enemies won't be bunched up enough. On the other hand, the damage buffs from Wires Don't Talk and Interspersed Outburst look very useful. Make it Sparkle also apparently gives Deathtrap massive additional damage of up to 3X. Is it worthwhile to spec into this tree just for the end-tier perks? ",Twilight Sparkle,https://gaming.stackexchange.com/users/54882,"With good shock weapons and a Class Mod that boosts Shock damage you can deal insane damage. With a good Zapper class mod and 5 ranks in Wires Don't Talk you're dealing over 50% more damage with Shock, and Electrical Burn means it does a bit of extra damage to Flesh enemies. The shock boosts also stack very well with Anarchy's effects; I survive quite well with 3 of 4 weapons being shock, due to the elemental damage boost there's rarely a reason to change weapons, especially with teammates about. And shock based badasses are pretty rare compared to fire and corrosive ones. Really the only significant limiting factor to the skill tree is you need at least decent shock weapons to make it work. Personally I use a shock Maliwan sniper rifle, a shock Dahl e-tech SMG (Dahl burst fire is immune to Anarchy's accuracy reduction by the way) and a shock Moxxie's Slow Hand. Shock storm, One Two Boom and shock and auugh look cool but aren't as useful, and Strength of Five Gorillas isn't either as I usually don't use Death Trap that often (he gets in the way in co op). The entire tree is just there for Wires Don't Talk + Zapper class mod though. Maxing out the whole tree isn't as necessary, though Interspersed Outburst can be quite useful to slag enemies without having to use a slag weapon (no switching weapons is very nice), and Make it Sparkle also makes Deathtrap relatively useful since he can get situationally relevant elements in addition to the 3x straight-up damage boost. ",Ben Brocka,https://gaming.stackexchange.com/users/11920,http://gaming.stackexchange.com/questions/149664/is-the-mechromancers-little-big-trouble-tree-worthwhile-in-uvhm-72-level-cap,CULTURE,gaming.stackexchange.com 2450,How to display JSON returned (from external REST API) in a Block? [my code attempt inside],"I am trying to display the data from a REST API (URL: 'http://api.kivaws.org/v1/loans/38239/lenders.json') to display in a block. Below is my code. It is not working, any hint on why will be sincerely appreciated. /** * Implements hook_block_info(). */ function restapiexample_block_info() { // This example comes from node.module. $blocks['kiva'] = array( 'info' => t('Kiva Test Block'), 'cache' => DRUPAL_NO_CACHE ); return $blocks; } /** * Implements hook_block_view(). */ function restapiexample_block_view($delta = '') { // This example is adapted from node.module. $block = array(); switch ($delta) { case 'kiva': $block['subject'] = t('Kiva Example'); $block['content'] = array( '#theme' => 'page', '#markup' => kiva_list_loans(), break; } return $block; } function kiva_list_loans() { $request = drupal_http_request('http://api.kivaws.org/v1/loans/38239/lenders.json'); return drupal_json_decode($request->data); } You can try the URL, good JSON data is being returned. Error I receive is several instances of the following text in the $messages area: ""Warning: Cannot use a scalar value as an array in drupal_render() (line 5859 of /home/drupalpro/websites/example7.dev/includes/common.inc)"" UPDATE 1: With help from comments/answer below, I made some progress. from my function ""kiva_list_loans()"", I am able to see the response in my $page array. I changed the '#theme' in my ""$block['content']"" in hook_block_view to 'page' - but still I only see the word ""Array"". How to get this to render? ",drupalmav,https://drupal.stackexchange.com/users/8178,"$block['content'] should be an array, like in the example for hook_block_view: $block['content'] = array( '#theme' => 'feed_icon', '#url' => 'rss.xml', '#title' => t('Syndicate'), ); For more examples, see Examples for Developers project, block_example module. If you are putting array there, it must be a renderable array. If it's not, then either: Implode it into string. With nested arrays, it can get a bit complicated. Put it as an element in $block['content'] array, and set $block['content']['#theme'] element to something that can theme it. More complicated, but also more versatile and cleaner solution. ",Mołot,https://drupal.stackexchange.com/users/16495,http://drupal.stackexchange.com/questions/95651/how-to-display-json-returned-from-external-rest-api-in-a-block-my-code-attem,TECHNOLOGY,drupal.stackexchange.com 916,"If $a$ is a quadratic residue of odd prime $p$, then is it the case that $a^{-1}$ is also a quadratic residue?","If $a$ is a quadratic residue of odd prime $p$, then is it the case that $a^{-1}$ is also a quadratic residue ? I notice quadratic residues of odd prime $13$ : $$1^2\equiv 12^2\equiv 1\\2^2\equiv 11^2\equiv 4\\3^2\equiv 10^2\equiv 9\\4^2\equiv 9^2\equiv 3\\5^2\equiv 8^2\equiv 12\\6^2\equiv 7^2\equiv 10$$ $4^{-1}=10\\9^{-1}=3\\1^{-1}=1\\12^{-1}=12$ Is this true always ? How to go about proving ? thanks! ",rsadhvika,https://math.stackexchange.com/users/170818,"Maps like $\,x\mapsto x^{-1}$ that are multiplicative $\,h(ab) = h(a)h(b)$ preserve squares $\,h(a^2)= (h(a))^2$ ",Number,https://math.stackexchange.com/users/242,http://math.stackexchange.com/questions/1168075/if-a-is-a-quadratic-residue-of-odd-prime-p-then-is-it-the-case-that-a-1,SCIENCE,math.stackexchange.com 7754,Rails undefined method `model_name' for NilClass:Class When trying to render simple_form in a view,"I've searched through the questions and couldn't find an answer that would work for me and I'm new to Rails and am stuck. I'm trying to render a simple_form I use to post statuses into a view for user profiles. But every time I load the profile page I get the following error: undefined method `model_name' for NilClass:Class Extracted source (around line #1): 1: <%= simple_form_for(@status) do |f| %> I don't know why because it renders fine in two other views I have, only difference they are located in the same folder as the form. The profile is not. This is what I used to render the form: <%= render partial: ""statuses/form"", locals: { status: @status} %> and here's what my controller looks like: class StatusesController < ApplicationController before_filter :authenticate_member!, only: [:new, :create, :edit, :update] # GET /statuses # GET /statuses.json def index @statuses = Status.all respond_to do |format| format.html # index.html.erb format.json { render json: @statuses } end end # GET /statuses/1 # GET /statuses/1.json def show @status = Status.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render json: @status } end end # GET /statuses/new # GET /statuses/new.json def new @status = Status.new respond_to do |format| format.html # new.html.erb format.json { render json: @status } end end # GET /statuses/1/edit def edit @status = Status.find(params[:id]) end # POST /statuses # POST /statuses.json def create @status = current_member.statuses.new(params[:status]) respond_to do |format| if @status.save format.html { redirect_to @status, notice: 'Status was successfully created.' } format.json { render json: @status, status: :created, location: @status } else format.html { render action: ""new"" } format.json { render json: @status.errors, status: :unprocessable_entity } end end end # PUT /statuses/1 # PUT /statuses/1.json def update @status = current_member.statuses.find(params[:id]) if params[:status] && params[:status].has_key?(:user_id) params[:status].delete(:user_id) end respond_to do |format| if @status.update_attributes(params[:status]) format.html { redirect_to @status, notice: 'Status was successfully updated.' } format.json { head :no_content } else format.html { render action: ""edit"" } format.json { render json: @status.errors, status: :unprocessable_entity } end end end # DELETE /statuses/1 # DELETE /statuses/1.json def destroy @status = Status.find(params[:id]) @status.destroy respond_to do |format| format.html { redirect_to statuses_url } format.json { head :no_content } end end end What am I missing here? ",iamdhunt,https://stackoverflow.com/users/2800782,"The local variable in the partial will be status, not @status. ",meagar,https://stackoverflow.com/users/229044,http://stackoverflow.com/questions/18926522/rails-undefined-method-model-name-for-nilclassclass-when-trying-to-render-sim,STACKOVERFLOW,stackoverflow.com 2084,Are comments considered a form of documentation?,"When I am writing small scripts for myself, I stack my code high with comments (sometimes I comment more than I code). A lot of people I talk to say that I should be documenting these scripts, even though they are personal, so that if I ever do sell them, I would be ready. But aren't comments a form of documentation? Wouldn't this: $foo = ""bar""; # this is a comment print $foo; # this prints ""bar"" be considered documentation, especially if a developer is using my code? Or is documentation considered to be outside of the code itself? ",Dynamic,https://programmers.stackexchange.com/users/34364,"They are a form of documentation, but remember that documentation is in the eye of the beholder.... For some, self documenting code is enough. But that assumes a level of technical detail as the customer. We should be careful thinking that this is enough, because our ego may tell us ""It is obvious what this code is doing"" but time can prove otherwise. It also assumes you know in advance the skills of the reader. For those looking at source code but with less technical expertise, comments could be ok. But that assumes someone is looking at the source code. If you're technical, but lacking the time to read all the source code, a technical manual could be what's required. An if the user lacks technical skills, but just needs to know what is happening, user documentation is what's needed. So the real question is who is your customer? If you are, then self documenting code or comments is enough. If it's for someone else, you might want to broaden how you document. ",MathAttack,https://programmers.stackexchange.com/users/46338,http://programmers.stackexchange.com/questions/148471/are-comments-considered-a-form-of-documentation,TECHNOLOGY,programmers.stackexchange.com 3001,$browser.$$checkUrlChange is undefined in a jasmine test,"I have the following test: it('should maintain a bind between the data at the $scope to the data at the ingredientsService', function(){ $scope.addFilters('val1', $scope.customFiltersData, 'filter1'); $scope.$digest(); expect($scope.customFiltersData).toEqual(ingredientsService.filters()); }); I get the following error: TypeError: undefined is not a function at Scope.$digest (/home/oleg/dev/vita-webapp-new/bower_components/angular/angular.js:12502:17) at null.<anonymous> (/home/oleg/dev/vita-webapp-new/test/spec/controllers/customfilters.js:92:20) When debugging I saw that $browser.$$checkUrlChange on line 12502 of angular.js is indeed undefined. As a temporary solution, I changed the invocation on line 1250 to $browser.$$checkUrlChange && $browser.$$checkUrlChange() But I cannot help to wonder whether this monkey-patch can hurt me in some other way. Any clue on how to solve this properly is much appreciated. In case I do not get my answers I might consider opening a bug at the Angular repo on GitHub. ",Oleg Belousov,https://stackoverflow.com/users/1922258,"You have a mismatch in the version of angular and angular-mock . See here: jasmine test fails with undefined is not a function(evaluating $browser.$$checkUrlChange()) ",user1831230,https://stackoverflow.com/users/1831230,http://stackoverflow.com/questions/25917099/browser-checkurlchange-is-undefined-in-a-jasmine-test,STACKOVERFLOW,stackoverflow.com 9042,Place a figure at the beginning/end of a specific page,"So I'm putting together a paper using LaTeX and I know that I want to place a specific figure at the bottom of page 1, another figure at the top of page 2, etc, and let the text just wrap around the figures. However, I find that if I try something like \begin{figure}[b], it places the image not at the end of the current page, but rather at the end of the entire document. Is there no way to just say, ""this figure goes at the bottom of the first page""? ",Paul,https://tex.stackexchange.com/users/19104,"[!b] probably works if the figure fits The ! tells latex to ignore numeric constraints. As you didn't supply an example I'm having to guess but maybe your class is inhibiting floats on the first page (the standard classes only inhibit top floats) ! would over-rule this. Also of course make sure that the figure appears early enough in the source. ",David Carlisle,https://tex.stackexchange.com/users/1090,http://tex.stackexchange.com/questions/75923/place-a-figure-at-the-beginning-end-of-a-specific-page,TECHNOLOGY,tex.stackexchange.com 3225,Why isn't jQuery selector returning an object instead of an element?,"Please help me understand why the following jquery select is returning an element rather than the expected object. Thanks. <div class=""partner-tab partner-tab-opaque remove4"" id=""tab-5""> <a href=""#""> <img class=""blink"" src=""../skin/images/logo_endicia.png""> </a> </div> code $(""<a href=\""#\"" />"") .on(""click"", { ""partnerId"": pid }, function (e) { return showPartnerSettings(e); }) .appendTo(""#footer #tab-"" + pid); // $(""<a href=\""#\"" />"")[ < a href = ​""#"" > ​ < /a> ] Error: Uncaught TypeError: Object[object Object] has no method 'on' Here's the whole function: $(document).ready(function () { showPartnerTabs = function (flashUSPS) { $.post(""<?=$this->baseUrl('partner/ajaxgetactive')?>"", {}, function (data) { var partner = data.partners; //alert((data.partners).length); /* $(""#footer .partner-tab"").remove();*/ var remove = 1; var doc = $(document); for (var id in data.partners) { if (partner[id].toggle_value == ""on"") { remove++; logo = partner[id].logo_file; var pid = parseInt(id) + 1; $(""<div class=\""partner-tab partner-tab-opaque remove"" + remove + ""\"" id=\""tab-"" + pid + ""\"" />"") .appendTo(""#footer""); $(""<a href=\""#\"" />"") .on(""click"", { ""partnerId"": pid }, function (e) { return showPartnerSettings(e); }) .appendTo(""#footer #tab-"" + pid); var logochck = ""tab-"" + pid; //alert(logochck); if (flashUSPS && logochck == 'tab-5') { $(""<img class='blink' src='../skin/images/"" + logo + ""' />"") .appendTo(""#footer #tab-"" + pid + "" a""); } else { $(""<img src='../skin/images/"" + logo + ""' />"") .appendTo(""#footer #tab-"" + pid + "" a""); } //$(""</div>"").appendTo(""#footer""); } /* else { $(""<div class=\""partner-tab partner-tab-opaque remove"" + remove + ""\"" id=\""tab-"" + pid + ""\"" />"") .appendTo(""#footer""); $(""<a href=\""#\"" />"") .on(""click"", { ""partnerId"": pid }, function(e){ return showPartnerSettings(e); }) .appendTo(""#footer #tab-"" + pid); $(""<img src='../skin/images/"" + logo + ""' />"") .appendTo(""#footer #tab-"" + pid + "" a""); //$(""</div>"").appendTo(""#footer""); } */ } //alert($("".remove2"").length); if ($("".remove2"").length > 1) { $($("".remove2"")[0]).remove(); $($("".remove3"")[0]).remove(); $($("".remove4"")[0]).remove(); } }, ""json""); } $("".Partnerconnection ul li .controls .toggle-switch"").on(""click"", null, function () { $(this).showPartnerTabs(); }); showPartnerTabs(<?=$flash?>); }); As I mentioned in a comment, this function worked fine until I changed the function declaration from '$.fn.showPartnerTabs()...' to 'showPartnerTabs()...'. Does this help? ",Chris Barnhill,https://stackoverflow.com/users/2362247,"Because $(""<a href=\""#\"" />"") is NOT a selector You are creating a new anchor element Other than that, your code seems to be correct. See jsFiddle Update Unfortunately, I am unable to reproduce the error Uncaught TypeError: Object[object Object] has no method 'on' But if you have changed $.fn.showPartnerTabs() to showPartnerTabs(), the this line $(this).showPartnerTabs(); will throw this error Object [object Object] has no method 'showPartnerTabs' Please make sure the following is true $ is actually jQuery and not any other library i.e. console.log($(""<a href=\""#\"" />"") instanceof $) prints true or console.log($==jQuery) prints true You are using jQuery 1.7+ because earlier versions have no support for .on ",Obi-Wan Spock,https://stackoverflow.com/users/499773,http://stackoverflow.com/questions/18257499/why-isnt-jquery-selector-returning-an-object-instead-of-an-element,STACKOVERFLOW,stackoverflow.com 9126,Tomcat uses BASIC auth instead of FORM auth,"I've run into a very weird problem with Tomcat: My Webapp running on Tomcat 6 works just fine with BASIC auth. However I would like to switch to FORM based auth. But when I change my web.xml from: <login-config> <auth-method>BASIC</auth-method> <realm-name>my realm</realm-name> </login-config> to this here <login-config> <auth-method>FORM</auth-method> <form-login-config> <form-login-page>/login.html</form-login-page> <form-error-page>/loginfail.html</form-error-page> </form-login-config> <realm-name>my realm</realm-name> </login-config> Tomcat still uses BASIC auth. Both login files exist. There are no errors in catalina.err/out. Leaving out the realm element makes the browser show ""Authentication required"" instead of the realm name (still uses BASIC) Are there any conditions under which FORM based auth is not being used? ",Meriadox,https://stackoverflow.com/users/2867589,"It seems that reloading the webapp was not enough in my case. After restarting tomcat by FORM Authentication is being used. ADD: FORM authentication is using a different digest algorithm than BASIC/DIGEST. Hence my old user auth database is not reusable. But this is a different topic. :) ",Meriadox,https://stackoverflow.com/users/2867589,http://stackoverflow.com/questions/19299469/tomcat-uses-basic-auth-instead-of-form-auth,STACKOVERFLOW,stackoverflow.com 9026,Nikon D3100 Won't Take Photo -- says light is too low,"I've had my Nikon D3100 camera for about 3 years. I recently accidentally reset my shooting options. Since I've done that, I'm having a hard time getting the camera to focus and take photos in lower light. I can hear it (and see it) hunting to focus, but the bottom right flashes the image suggesting I use the flash and it won't let me take a picture. I've ensured that it's set to AF-C, but I'm still not able to force the photo to be taken. This happens with multiple lenses, including my prime which is fairly decent in low light. Often the exposure information on the screen shows me that I am close to perfect exposure (and sometimes just a bit underexposed). What's going on? Is there something wrong with the camera? What other settings can I check? Some other tidbits, I have it set to Manual, and I'm able to take the photos if I manually focus--but that doesn't work for me since my eyesight isn't great. ",Ashley,https://photo.stackexchange.com/users/25458,"I had this problem in Low light with the AF Assist Light still coming on. What I found was that using the Live View is completely different to focusing while keeping Live view off. I just stopped using Live view and the problem was immediately solved. Of course the AF Assiste light was working in my case for both scenarios. ",Chris,https://photo.stackexchange.com/users/41280,http://photo.stackexchange.com/questions/46979/nikon-d3100-wont-take-photo-says-light-is-too-low,LIFE_ARTS,photo.stackexchange.com 5435,Using regular expressions to find img tags without an alt attribute,"I am going through a large website (1600+ pages) to make it pass Priority 1 W3C WAI. As a result, things like image tags need to have alt attributes. What would be the regular expression for finding img tags without alt attributes? If possible, with a wee explanation so I can use to find other issues. I am in an office with Visual Web Developer 2008. The Edit >> Find dialogue can use regular expressions. ",awrigley,https://stackoverflow.com/users/271087,"This is really tricky, because regular expressions are mostly about matching something that is there. With look-around trickery, you can do things like 'find A that is not preceded/followed by B', etc. But I think the most pragmatic solution for you wouldn't be that. My proposal relies a little bit on your existing code not doing too crazy things, and you might have to fine-tune it, but I think it's a good shot, if you really want to use a RegEx-search for your problem. So what I suggest would be to find all img tags, that can (but don't need to) have all valid attributes for an img-element. Whether that is an approach you can work with is for you to decide. Proposal: /<img\s*((src|align|border|height|hspace|ismap|longdesc|usemap|vspace|width|class|dir|lang|style|title|id)=""[^""]""\s*)*\s*\/?>/ The current limitations are: It expects your attribute values to be delimited by double quotes, It doesn't take into account possible inline on*Event attributes, It doesn't find img elements with 'illegal' attributes. ",Thomas,https://stackoverflow.com/users/461647,http://stackoverflow.com/questions/4031948/using-regular-expressions-to-find-img-tags-without-an-alt-attribute,STACKOVERFLOW,stackoverflow.com 1107,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? ",nichochar,https://ux.stackexchange.com/users/41518,"So in the dark, you'll know which is which without looking at it. ",Chairman Meow,https://ux.stackexchange.com/users/42354,http://ux.stackexchange.com/questions/54999/why-are-the-two-buttons-on-the-apple-tv-remote-shaped-differently-menu-play-p,TECHNOLOGY,ux.stackexchange.com 3590,Can the update manager download only a single package at a time?,"I need the update manager to only download a single package at a time and not try to download multiple packages at once. My slow internet cannot handle multiple connections; slows the download to a crawl and some packages will reset themselves halfway through when they time-out. EDIT When using apt-get update multiple repositories get checked: When using apt-get upgrade multiple packages are downloaded: ",SaultDon,https://askubuntu.com/users/22554,"You have two options here. 1- Use the Queue-Mode configuration option. The default, ""host"", creates one outgoing connection for each host. If you set it to ""access"" it will create one connection per URI type (which I understand to mean, one for http, one for ftp, and so on - since most connections are http, this means it'll access each server sequentially). One way to do this that will also apply to update-manager is to: echo 'Acquire::Queue-Mode ""access"";' >/etc/apt/apt.conf.d/75download if you want to try it with apt-get once to see if it helps: apt-get -o Acquire::Queue-mode=access update 2- Use the Acquire::http::Dl-Limit option, this is similarly to reduce the bandwidth used to something your connection can handle (and as per the manpage, ""this option implicit deactivates the download from multiple servers at the same time""). echo 'Acquire::http::Dl-Limit ""70"";' >/etc/apt/apt.conf.d/75download or apt-get -o Acquire::http::Dl-Limit=70 update ",roadmr,https://askubuntu.com/users/30589,http://askubuntu.com/questions/88731/can-the-update-manager-download-only-a-single-package-at-a-time,TECHNOLOGY,askubuntu.com 7701,What is the current state of research in quantum gravity?,"I was browsing through this and was wondering what progress in quantum gravity research has taken place since the (preprint) publication. If anyone can provide some helpful feedback I would be greatly appreciative. ",UGPhysics,https://physics.stackexchange.com/users/5219,"A few developments since 2001: There is the new field of loop quantum cosmology, which shows some promising signs of being able to actually calculate things that might conceivably be testable by observation. The LHC hasn't found any evidence of supersymmetry, which may reduce the appeal of string theory. There have been some high-precision tests of dispersion of the vacuum: http://arxiv.org/abs/0908.1832 . The results have been negative. This was at one time though to be a potential test of LQG, but now it looks like LQG doesn't yet make any definite prediction. LQG has been reformulated in the last 10 years, so if you're going to try to learn it, you want to learn it from more recent references. A presentation of the new LQG is given in Rovelli, 2011, ""Zakopane lectures on loop gravity,"" http://arxiv.org/abs/1102.3660 . In 2004 there was an internet debate between Smolin and Susskind on Smolin's claim that ""the Anthropic Principle ... cannot yield any falsifiable predictions, and therefore cannot be a part of science:"" http://www.edge.org/3rd_culture/smolin_susskind04/smolin_susskind.html ",Ben Crowell,https://physics.stackexchange.com/users/4552,http://physics.stackexchange.com/questions/62105/what-is-the-current-state-of-research-in-quantum-gravity,SCIENCE,physics.stackexchange.com 8670,"Heathrow Customs - ""Arrivals from the EU"" exit","At Heathrow, after collecting your baggage, there are three exits. Green - nothing to declare Red - something to declare (not sure of text) Blue - arrivals from the EU What is the blue one for? Is it if you have something to declare, and have come from an EU country? I saw no signage to tell me when I was there last week. ",VictorySaber,https://travel.stackexchange.com/users/11354,"You're referring to the three customs exits at Heathrow Airport: (photo: Diane Phillips) Blue is for arrivals from the EU with nothing to declare. People who can use this queue will see a green stripe around their luggage tag. Yes, this is slightly confusing. Green is for arrivals outside the EU with nothing to declare. These are based on the country where your air journey originated. Red is for arrivals from anywhere who need to make a customs declaration. Taken from Heathrow Airport: UK Customs processes at Heathrow The UK has significantly different procedures for admitting people from the EU and from outside the EU. Since Heathrow has the largest amount of international air traffic of any airport in the world, it's important to not make people wait any longer than necessary. Separating them here helps keep the queues moving faster. ",Michael Hampton,https://travel.stackexchange.com/users/3221,http://travel.stackexchange.com/questions/30251/heathrow-customs-arrivals-from-the-eu-exit,CULTURE,travel.stackexchange.com 2265,Sharepoint 2010. Add custom background and frame for content editor webpart,"I need to create custom webpart with complex (few divs, or other html elements) background and borders. How can i use default sharepoint content editor and just add predefined background and frame!? Thanks. ",Evgeny,https://stackoverflow.com/users/508330,"You tagged your question with Sharepoint 2007 and 2010, the content editors are different though. This answer is for SP2010: You can just add CSS to a custom CSS file. background-image for .ms-rte-layoutzone-inner-editable will do the image trick. If you want to add a ""frame"" as in border, you can add border attributes to .ms-rte-layoutzone-outer and make it e.g. red. An example for a background image: .ms-rte-layoutzone-inner-editable { border-image: url(/PublishingImages/Mylogo.gif); } But please do your users a favor and don't include anything blinking or distracting to the content editor's background - if you wanna go for some very light grey or something like that it's OK. For MOSS2007 you need to check the specific styles you can override. ",Dennis G,https://stackoverflow.com/users/266453,http://stackoverflow.com/questions/7500376/sharepoint-2010-add-custom-background-and-frame-for-content-editor-webpart,STACKOVERFLOW,stackoverflow.com 3131,Find router on network,"I've just bought a Belkin N+ Wireless Router. When I plug it directly into my computer I can navigate to its setup page at 192.168.2.1 - however, when I plug it into a random part of the network it still functions as a wireless hub but I can't get to its setup page at 192.168.2.1 Now I'm guessing that the main router has given it an IP. How can I find out what that is? I've looked on the web page for the main router and listed all IP's that are connected to it and tried to access each one but that didn't work. ",Guy,https://superuser.com/users/3248,"You likely have the router plugged in to the main router via the WAN Port as shown here: The router is expecting another network device to be transmitting data through that port such as a modem, rather than a computer to be requesting it's administration page from that interface. One of the IPs you see in your main router's administration page is probably assigned to the router, and you'll be able to ping it, but it simply isn't configured to respond with the admin interface from that port. You need to have a device connected to a LAN port or connected via wireless to bring up that interface. Some routers I've worked with may allow configuration via the WAN port, but most do not. ",John T,https://superuser.com/users/1931,http://superuser.com/questions/87212,TECHNOLOGY,superuser.com 332,"Superlatives with ""the""","What is the rule regarding using the with superlatives? For example: John is the fastest among his friends. John is fastest among his friends. Both appear to be correct. I have seen both formats in a variety of places. ",BVDL,https://english.stackexchange.com/users/10006,"Both are indeed correct. An article is only necessary in the superlative (or comparative) if the adjective is attributive (i.e. is in the same phrase as the noun it is describing). Consider the following examples: Example #1: John is the fastest boy. *John is fastest boy. Example #2 John is the fastest among his friends. John is fastest among his friends. As is shown in the examples above, omitting the in #1 causes it to become ungrammatical, as the superlative fastest is in the same phrase as its noun boy. In #2, however, the may be freely omitted as it is not attributive. Some English superlatives, however, use the adverb most, which can cause some amount of confusion. Consider the following examples: Mary is the most beautiful. Mary is most beautiful. Mary is a most beautiful woman. All three of these examples are grammatical and show the overlap of an adverbial intensification with the superlative. With the definite article the, it can only be a superlative, but with the indefinite article a it can only be interpreted adverbially (i.e. essentially the same as ""very beautiful""). Both of these forms, however, allow omission of the article, and so the meaning of #2 is left ambiguous. Note that there is a third form which is related to the superlative known as the elative. While it is not a separate inflection, it can be shown to exist in constructions such as the following: It is with the greatest pleasure [...] This sentence is generally understood not to mean with a pleasure greater than any other, but rather something more akin to with extreme pleasure. ",rintaun,https://english.stackexchange.com/users/9999,http://english.stackexchange.com/questions/30272/superlatives-with-the,CULTURE,english.stackexchange.com 8582,Vector fields whose divergence are proper maps,"Let $X$ be a polynomial vector field of degree $2$ on $\mathbb{R}^{2}$. Does there exist a nonvanishing smooth function $g$ such that $Div(gX)$ is a proper map?Or at least the zero locus of $Div(gX)=0$ is a compact set? Can we find this $g$ an algebraic map or at least in the form $e^{P(x,y)}$ where $P$ is a polynomial? Is there a uniform upper bound $PDH(n)$ for the number of limit cycles of a those polynomial vector field of degree $n$ for which the divergence is proper or at least $Div=0$ is a compact curve. For $n=3$, two what extent thses vector field are classified in term of their coefficients ",Ali Taghavi,https://mathoverflow.net/users/36688,"Since $\mathbb R^2$ has one end and $\mathbb R^1$ has two ends, a proper map $\mathbb R^2 \to \mathbb R^1$ must send the end of $\mathbb R^2$ to one of the two ends of $\mathbb R^1$ - that is, $f(x,y)$ is either a large positive number of a large negative number when $(x,y)$ is large. But we can force $\nabla \cdot gX$ to oscillate arbitrarily many times. Choose a vector field like $ \sin(x^2+y^2)( xdx + ydy)$. Then the integral of the divergence over a disc is the integral of the vector field dot the normal vector over a circle, which switches sign periodically in the radius of the function, so the divergence must switch sign arbitrarily often, so it can't be proper. Moreover because it switches sign with arbitrarily large radius, the set where it is 0 cannot be compact. ",Will Sawin,https://mathoverflow.net/users/18060,http://mathoverflow.net/questions/190862,SCIENCE,mathoverflow.net 2220,Printers Available in India That Work With Ubuntu 12.04,"can anyone come up with multifunction laser printers available in India that work with Ubuntu 12.04? I'm asking because on most websites, I can't seem to find the models which are available on Indian markets/shopping websites. I know that sometimes that does happen, because new models replace old ones at a delayed schedule here. ",Abhishek Chakrabarti,https://askubuntu.com/users/87432,"I would ask this on an Ubuntu site that is related to India. As an example: http://ubuntuforums.org/forumdisplay.php?f=389 You are guaranteed to find people from India there with specific local knowledge. Also likely to be able of use: IRC: #ubuntu-in @ irc.freenode.net Mailing List: https://lists.ubuntu.com/mailman/listinfo/ubuntu-in But I agree with user68186 in comment: HP has always worked for me. ",Rinzwind,https://askubuntu.com/users/15811,http://askubuntu.com/questions/220958/printers-available-in-india-that-work-with-ubuntu-12-04,TECHNOLOGY,askubuntu.com 659,Around the Clock,"I want to produce with Mathematica something like this Or this 12 hours should be arranged in a pleasing (""rotated"") style around / within a rectangle. I don't ask for the hands - depending on numerical input - but only for a Graphics to begin with. ""Have you tried anything ?"" ""Sure, but with non-presentable results."" ",eldo,https://mathematica.stackexchange.com/users/14254,"For a constant angular speed watch, if you want some specific figures being placed at the corners, you have to adjust the aspect ratio of the dial rectangle. A Graphics to begin with: Manipulate[ { Dashed, GrayLevel[.7], InfiniteLine[{0, 0}, Through[{Cos, Sin}[π/6 #]]], Dashing[{}], Black, Thick, InfiniteLine[{0, 0}, Through[{Cos, Sin}[π/12 + π/6 #]]] } & /@ Range[0, 5] // Graphics[{#, EdgeForm[{Black, Thick}], FaceForm[White], Rectangle[##] & @@ (1/ 2 {{-1, 1}, (Tan[π/6] + ε) {-1, 1}}) }, PlotRange -> {{-1, 1}, (Tan[π/6] + ε) {-1, 1}}, Frame -> True, FrameStyle -> Thick, FrameTicks -> None] &, {{ε, 0}, -0.5, 10}] With a proper grid, you can then use the transformation method from other answers to fill in good-looking figures. ",Silvia,https://mathematica.stackexchange.com/users/17,http://mathematica.stackexchange.com/questions/60728/around-the-clock,TECHNOLOGY,mathematica.stackexchange.com 2093,What does it mean to interpret the Bible literally?,"Here are some common definitions from a dictionary for ‘literal’: Being in accordance with, conforming to, or upholding the exact or primary meaning of a word or words. Word for word; verbatim: a literal translation. Avoiding exaggeration, metaphor, or embellishment; factual; prosaic: a literal description; a literal mind. So what does it mean then to ‘take the Bible literally?’ Which definition are we referring to when we say ‘I take the Bible literally?’ ",Mike,https://christianity.stackexchange.com/users/1743,"The easiest example is that of Creation, the very first part of the Bible presented as historical fact. Some believe that the Creation story is more of a myth or legend, and never really happened. Some, on the other hand, will say that the word ""days"" used there doesn't mean ""days"", but rather refers to spans of thousands or millions of years, during which time the earth was actually evolving, not being created as the Bible says. A literal interpreter, on the other hand, will take the story at face value, believing that in seven days (that is, periods of 24 hours), God made the earth and all that is in it. They won't believe that he used some sped-up evolution. They will interpret ""created"" to mean that out of nothing, God made something just by speaking it in to being. That is a literal interpretation. That is just one example. There are many stories and historical events mentioned throughout the Bible that can be interpreted as being allegories or myths or legends, not fact. A literal interpreter, however, will always take the words of the Bible at face value. ",D. Strout,https://christianity.stackexchange.com/users/1829,http://christianity.stackexchange.com/questions/8344/what-does-it-mean-to-interpret-the-bible-literally,CULTURE,christianity.stackexchange.com 3072,Modifying Local Within Function Changes Global Passed to Function in Python,"I am trying to understand why the global copy of an object passed to a function is modified by the function. I understand that if I assign an object mylist to a second variable name, it does not make a copy and modifying the second object changes the first because they are one in the same. For example: mylist = [] s = mylist s.append(2) print(mylist) [2] However, I did not think this occurred within a function unless made explicit with global varname. As this answer puts it, ""If you want to simply access a global variable you just use its name. However to change its value you need to use the global keyword."" This is how the function mult below behaves (though I am not modifying x but assigning a new value to it). However, when I pass a global variable to either app or noreturn, in both instances the global variable is modified by the function without a declaration that I want to modify the global variable with a global keyword. import pandas as pd def mult(x): x = x * x return x def app(mylist): mylist.append(4) return mylist def noreturn(df): df['indexcol'] = list(df.index) df = pd.DataFrame({""A"": [10,20,30,40,50], ""B"": [20, 30, 10, 40, 50], ""C"": [32, 234, 23, 23, 42523]}) print(df) A B C 0 10 20 32 1 20 30 234 2 30 10 23 3 40 40 23 4 50 50 42523 noreturn(df) print(df) A B C indexcol 0 10 20 32 0 1 20 30 234 1 2 30 10 23 2 3 40 40 23 3 4 50 50 42523 4 x = 3 mylist = [] y = mult(x) newlist = app(mylist) print(x, y) (3, 9) print(mylist, newlist) ([4], [4]) If I want a function that does not modify global variables do I need to use copy.deepcopy on every variable passed to the function? ",Michael,https://stackoverflow.com/users/2327821,"Your quote says: If you want to simply access a global variable you just use its name. However to change its value you need to use the global keyword. I would modify that to: If you want to simply access the object a global variable refers to, you just use its name. However to change what object it refers to, you need to use the global keyword. Accessing a global object can include changing things about the object (such as appending a new object to an existing global list). However, if your function tried to do: def app(mylist): mylist = mylist + [4] return mylist which attempts to change the global mylist reference (by creating a new object and assigning the result to mylist), then you would need to use the global keyword. ",Greg Hewgill,https://stackoverflow.com/users/893,http://stackoverflow.com/questions/25434512/modifying-local-within-function-changes-global-passed-to-function-in-python,STACKOVERFLOW,stackoverflow.com 9059,Populate column with number of substrings in another column,"I have two tables ""A"" and ""B"". Table ""A"" has two columns ""Body"" and ""Number."" The column ""Number"" is empty, the purpose is to populate it. Table A: Body / Number ABABCDEF / IJKLMNOP / QRSTUVWKYZ / Table ""B"" only has one column: Table B: Values AB CD QR Here is what I am looking for as a result: ABABCDEF / 3 IJKLMNOP / 0 QRSTUVWKYZ / 1 In other words, I want to create a query that looks up, for each string in the ""Body"" column, how many times the substrings in the ""Values"" column appear. How would you advise me to do that? ",user1029296,https://stackoverflow.com/users/1029296,"You want an update query: update A set cnt = (select sum((length(a.body) - length(replace(a.body, b.value, '')) / length(b.value)) from b ) This uses a little trick for counting the number of occurrence of b.value in a given string. It replaces each occurrence with an empty string and counts the difference in length of the strings. This is divided by the length of the string being replaced. If you just wanted the number of matches (so the first value would be ""2"" instead of ""3""): update A set cnt = (select count(*) from b where a.body like concat('%', b.value, '%') ) ",Gordon Linoff,https://stackoverflow.com/users/1144035,http://stackoverflow.com/questions/16672046/populate-column-with-number-of-substrings-in-another-column,STACKOVERFLOW,stackoverflow.com 4530,windows audio running but no notification bar icon,"Windows 7 64bit, VIA audio chipset I just updated some of my drivers using IObit Driver Booster (which is a recognized software developer group), but since the update, I noticed no audio icon on my notification bar I check the windows audio services and all are enabled and running, but the notification bar icon says the service is not running... any thoughts or suggestions, yes I can revert to previous drivers but that is a last resort ",user2699451,https://superuser.com/users/266172,"Start / Control Panel / Notification Area Icons: Select ""Turn system items on of off"" Make sure ""Volume"" is set to ""On"" ",DavidPostill,https://superuser.com/users/337631,http://superuser.com/questions/803727,TECHNOLOGY,superuser.com 6191,Why is age 3 the age at which a girl is able to have intercourse?,"In msh210's answer to this question of mine, he stated that: women...who physically could be [intimate with men], which is those who had reached their third birthday. In comments, he mentioned that: age three is the age at which a girl is halachically considered to be physically able to have intercourse. Could you explain why and where this comes from? Keep in mind I am not Jewish, so if it specific to some non-OT writings, please explain those as well. ",SSumner,https://judaism.stackexchange.com/users/2616,"OK. The reason is that according to halacha a hymen will regrow if ruptured before the age of three.1 For this reason, it is considered as if no sexual act has occurred as far as the girl's halachic status is concerned, to the extent that her status as a virgin has not changed. Hence, she (for example) is entitled to a minimum kesuba of 200 zuz, just as any other virgin is.2 There are people who like to use misunderstandings, misinterpretations, and even misrepresentations of these and related laws as a means to vilify Jews and Judaism. I'm not going to address that here, though there are rebuttals available. 1: This is mentioned throughout the Talmud, see for example Niddah 45a 2: Rambam Hilchos Ishus 11:3 h/t DoubleAA for corrections. ",HodofHod,https://judaism.stackexchange.com/users/883,http://judaism.stackexchange.com/questions/27691/why-is-age-3-the-age-at-which-a-girl-is-able-to-have-intercourse,CULTURE,judaism.stackexchange.com 8478,What does the Customer is_active flag do?,"During a discussion today I was informed that the Customer is_active flag doesn't actually do anything. This is a unique flag, like the customer email address, in that it's not an EAV attribute. Instead, it is a column in the customer_entity table. I tried setting the flag to 0 for a test customer, but am still able to login. All other functionality seems to work normally. Is this flag provided as a convenience to developers? Is it intended for some future purpose? What, if anything, does is_active do? Edit: Here's a related stack overflow: http://stackoverflow.com/questions/3617832/disable-customer-in-magento ",Ryre,https://magento.stackexchange.com/users/107,"This is a legacy field, derived from Mage_Eav and present as far back as v0.7.14800 (and perhaps earlier). As such, it by far predates the earliest version of EE. Whether the value of this field is used or not is a matter of implementation (such as it is for the catalog_category entity). I base this assertion on the fact that the Mage_Eav module does not provide any use of it as a base behavior for EAV entities. ",benmarks,https://magento.stackexchange.com/users/5,http://magento.stackexchange.com/questions/1069/what-does-the-customer-is-active-flag-do,TECHNOLOGY,magento.stackexchange.com 178,How was the sword of Gryffindor pulled from the hat a second time?,"Spoilers follow, and this is from the books (not the movies)... In The Chamber of Secrets: Harry retrieves Goderic Gryffindor's sword from the sorting hat during the confrontation with the basilisk. After this Dumbledore keeps hold of the sword in a glass case in his office. Then in The Deathly Hallows: Harry and Ron do a deal with Griphook to return Gryffindor's sword to the goblins after they have retrieved Hufflepuff's cup, planning to partially double cross him by holding on to it until all the horcruxes have been destroyed. However Griphook double crosses them first, and keeps hold of the sword. Then, in the battle at the end of the book: Voldemort puts the sorting hat on Neville Longbottom's head and sets him on fire. Instead of burning Neville pulls Gryffindor's sword out of the sorting hat and beheads Nagini, destroying Voldemort's last horcrux. However, if the sword could always be pulled out of the hat by someone sufficiently heroic then why the need to: Create a copy of the sword to fool Bellatrix Lestrange into thinking she had the real one in Gringott's vault? Why forge a copy and risk Snape placing it in the lake if it could always have been pulled from the sorting hat, regardless of where it was or how it was protected? How was Gryffindor's sword pulled from the hat the second time? Surely it was beyond the reach of accio or any other charms once returned to its goblin creators? ",Keith,https://scifi.stackexchange.com/users/2154,"In Chamber of Secrets, page 320, chapter 17: A gleaming silver sword had APPEARED inside the hat... Also in CoS, page 334, chapter 18: ""Only a true Gryffindor could have PULLED that out of the hat, Harry"" (Dumbledore to Harry) In Deathly Hallows, page 689, chapter 23: ""Now, Severus, the sword! Do not forget that it must be taken under conditions of NEED and VALOR..."" (The emphasis is mine) The short answer is that the magic of the sword and the hat worked together to provide the sword to Neville. It appeared to him since Neville fulfilled all the qualities necessary for the sword to appear in the Sorting Hat: true Gryffindor: Sorting Hat put Neville in the house need: Neville needed to kill Nagini valor: definition of valor is ""strength of mind or spirit that enables a person to encounter danger with firmness"" (Merriam-Webster.com) and I think Neville demonstrated that numerous times ",Treborcram,https://scifi.stackexchange.com/users/8757,http://scifi.stackexchange.com/questions/34005/how-was-the-sword-of-gryffindor-pulled-from-the-hat-a-second-time,LIFE_ARTS,scifi.stackexchange.com 5013,What is the maximum character limit for a multi-select picklist?,"What is the maximum length of the string of values that a multi-select picklist can return? If the picklist items can be up to 40 characters and users can select 100 of them, that implies that you could get 4100 character returned if the semi-colons are the only extra characters added. I'd love to find the actual documentation that provides the spec. ",AlwaysThinkin,https://salesforce.stackexchange.com/users/761,"The actual byte length of the field remains at 4099 because they don't need a semicolon to delimit the last value. Interestingly the picklist values are enumerated and those keys are used for comparisons internally. Eg Sunday;Monday;Tuesday get written away under the covers as something like 0AAK0AAL0AAM, so I wouldn't read too much into the field length ;) ",bigassforce,https://salesforce.stackexchange.com/users/320,http://salesforce.stackexchange.com/questions/27315/what-is-the-maximum-character-limit-for-a-multi-select-picklist,TECHNOLOGY,salesforce.stackexchange.com 4272,"Do Americans pronounce ""Ellen"" and ""Alan"" in the same way?","Do Americans pronounce ""Ellen"" and ""Alan"" in the same way? I am especially concerned with the first vowel. EDIT: Here is a quote that may be a case in point: Being a Brit also, the names ""Ellen"" and ""Alan"" tend to sound the same when spoken with an American tongue. It was just unfortunate that the child was very tom boyish and had an ambiguous sounding name Context: discussion on why they chose a boy-looking girl for the movie ""Fatal Attraction"" Link: http://www.imdb.com/title/tt0093010/board/thread/186160978?d=186229310&p=1#186229310 ",brilliant,https://english.stackexchange.com/users/2270,"Americans don't pronounce them exactly the same. However, some American dialects change the pronunciation of /æ/ before /l/ in a way that I believe makes it sound more like /ɛ/ to foreigners. In fact, in a few New Zealand and Australian dialects, these vowels become identical before /l/; see salary-celery merger; this merger would indeed also merge Allen and Ellen, but I don't believe it has happened in any American dialects. UPDATE: the OP was asking why some Brits heard ""Allen"" when the actors in Fatal Attraction were saying ""Ellen"". I believe the pronunciation of /ɛl/ is nearly the same in the U.S. and the U.K., but if you're listening to an unfamiliar dialect, you rely more on context, and my guess is that the people watching got the name wrong because they were relying more on context and the girl playing Ellen looked somewhat like a boy. ",Peter Shor ,https://english.stackexchange.com/users/5754,http://english.stackexchange.com/questions/64225/do-americans-pronounce-ellen-and-alan-in-the-same-way,CULTURE,english.stackexchange.com 4205,Making sure that you have comprehended a concept,"Hi, I have a question that I've been thinking about for a long time. How can you assure yourself that you've fully comprehended a concept or the true meaning of a theorem in mathematics? I mean how can you realize that you totally get the concept and it's time to move on to the next pages of the book you're reading? Thanks in advance for your responses. ",Axiom,https://mathoverflow.net/users/3124,"I think I understand a theorem if I can reconstruct the hypotheses remembering only the conclusion. Likewise, I think I understand a theory if the axioms all seem reasonable and obvious. However, you can't really get this on a first reading. I usually allow myself to proceed if the proof of the theorem catches my interest enough to read the details, or seems too trivial to bother with. If I don't think I could do it but don't care to learn, then I obviously don't appreciate enough of what I have been reading to seriously try reading more. Perhaps the ultimate test is if you can use said theorem for something. ",Ryan Reich,https://mathoverflow.net/users/6545,http://mathoverflow.net/questions/26950,SCIENCE,mathoverflow.net 2003,Difference between Pantone FORMULA GUIDE and DESIGNER FIELD GUIDE?,"I need to buy a new Pantone color swatch. I need one that says which percentage of Pantone colors are needed to create another Pantone colors (read: formula guide). Now, I read that newer color swatches pages are very thin, I'd like to have heavy cardboard pages, like in old guides. Maybe the DESIGNER FIELD guide has heavier pages? I don't really understand the difference between the two guides. ",Magnetic_dud,https://graphicdesign.stackexchange.com/users/3419,"From what I understand, the only real difference in Pantone's ""Field Guide"" is the tear out chips. If you need chips to attach with client proofs or whatever and you don't want to buy a separate chip book, go with the Field Guide. Personally, I never use chips any more. I just stick with the standard fan books. If for some reason I need a sample of the ink, I ask the printer for a draw down on the actual paper and use that in client discussions. ",plainclothes,https://graphicdesign.stackexchange.com/users/4216,http://graphicdesign.stackexchange.com/questions/13324/difference-between-pantone-formula-guide-and-designer-field-guide,LIFE_ARTS,graphicdesign.stackexchange.com 3358,What does mathematics have to do with programming?,"I just started a diploma in software development. Right now we're starting out with basic Java and such (so right from the bottom you might say) - which is fine, I have no programming experience apart from knowing how to do ""Hello World"" in Java. I keep hearing that mathematics is pertinent to coding, but how is it so? What general examples would show how mathematics and programming go together, or are reliant on one another? I apologize of my question is vague, I'm barely starting to get a rough idea of the kind of world I'm stepping into as a code monkey student... ",Rory,https://programmers.stackexchange.com/users/48536,"I would personally say, it depends upon the level of programming that is involved. The data models and the correlations between those, the programming algorithms involved. For eg: to write a program that outputs ""Hello World"", i see no requirement for familiarizing someone with Higher Mathematics. The level of Mathematical involvement would depend upon the level of complexity of the problem that needs to be solved programaticaly. ",Aubede,https://programmers.stackexchange.com/users/48770,http://programmers.stackexchange.com/questions/136987/what-does-mathematics-have-to-do-with-programming,TECHNOLOGY,programmers.stackexchange.com 2086,"What's the meaning of ""guest spot"" in ""We have a guest spot on the Tonight Show""?","I think that ""solo spot"" has the same meaning, but I don't know the meaning either. ",Dragon Buster,https://english.stackexchange.com/users/37612,"A person who is set to appear on a talk show makes a ""guest spot"". See this example: Matt Damon makes first official guest spot on 'Jimmy Kimmel Live'. ",tylerharms,https://english.stackexchange.com/users/30784,http://english.stackexchange.com/questions/106694/whats-the-meaning-of-guest-spot-in-we-have-a-guest-spot-on-the-tonight-show,CULTURE,english.stackexchange.com 2812,Change of basis in non-linear Schrodinger equation,"At the mean-field level, the dynamics of a polariton condensate can be described by a type of nonlinear Schrodinger equation (Gross-Pitaevskii-type), for a classical (complex-number) wavefunction $\psi_{LP}$. Its form in momentum space reads: \begin{multline} i \frac{d}{dt}\psi_{LP}(k) =\left[\epsilon(k) -i\frac{\gamma(k)}{2}\right] \psi_{LP}(k) +F_{p}(k)\,\, e^{-i\omega_{p}t} \\ + \sum_{q_1,q_2} g_{k,q_1,q_2}\, \psi^{\star}_{LP}(q_1+q_2-k) \, \psi_{LP}(q_1)\, \psi_{LP}(q_2). \end{multline} The function $\epsilon(k)$ is the dispersion of the particles (polaritons). The polaritons are a non-equilibrium system, due to their finite lifetime (damping rate $\gamma$). Therefore, they need continuous pumping with amplitude $F_p$ at energy $\omega_p$. Finally, there exists a momentum-dependent nonlinear interaction $g_{k,q_1,q_2}$ that depends of the so-called Hopfield coefficients $X$ (simple functions of momentum) as: \begin{equation} g_{k,q_1,q_2}=g\, X^{\star}(k)\, X^{\star}(q_1+q_2-k)\, X(q_1)\, X(q_2) \end{equation} How can one transform the equation for $\psi$ to real-space? ",Andrei,https://physics.stackexchange.com/users/24609,"The linear terms it seems you can handle. As piece of general advice, the meaning of these terms are always clearly if integrate over the momentum coordinates of each of the fields, using delta functions to preserve the value. So the non-linear term would be $$\sum_{q_1,q_2,q_3} g(q_1,q_2,q_3) \psi(q_1)^*\psi(q_2)\psi(q_3)\delta(-q_1+q_2+q_3 -k)$$ Maybe you can also see this way that the structure is determined by momentum conservation/translation invariance. Now when I integrate this by $\int\!dk\,e^{ikr}$, the $k$ integral is resolved trivially and I'm left with fourier transforms over the $q$s. Since Fourier transforms take multiplication to convolution, you can calculate that we get $$\int dr_{123}\,\tilde{g}(r-r_1,r-r_2,r-r_3)\tilde{\psi}^*\!(r_1)\tilde{\psi}(r_2)\tilde{\psi}(r_3)$$ Which is more or less the most general third order nonlinear term you can write. In your case you can also reduce this further by using the real space transforms of $X$, either by plugging in directly to the first equation I wrote, or by calculating $\tilde{g}$ and plugging into the second. ",BebopButUnsteady,https://physics.stackexchange.com/users/3970,http://physics.stackexchange.com/questions/64946/change-of-basis-in-non-linear-schrodinger-equation,SCIENCE,physics.stackexchange.com 6144,what does to oneself mean in some sentence?,"I just found a part sentence saying ""Attractive and affectionate to oneself""? Does that mean your attractive to yourself? ",thenewbie,https://ell.stackexchange.com/users/5213,"It probably means that you are narcissistic or conceited narcissistic (adj) - Characteristic of those having an inflated idea of their own importance. conceited (adj) - Characteristic of false pride; having an exaggerated sense of self-importance If you found this in some horoscope, as it happens most of the times, that's fine. It shows the character of the people with that zodiac sign in general. Don't take too much pain. It should not be a heartfelt comment. ",Maulik V,https://ell.stackexchange.com/users/3187,http://ell.stackexchange.com/questions/19564/what-does-to-oneself-mean-in-some-sentence,CULTURE,ell.stackexchange.com 4883,How can I superimpose LaTeX / TeX output over a PDF file?,"I have a form as a PDF file. I would like to use LaTeX/TeX to overlay my text over the form, and send the output to either a print or another PDF file. Is this possible? How would I go about it? ",chernevik,https://tex.stackexchange.com/users/4754,"You can use TikZ to place the form as image at the center of an otherwise empty page and then draw on it. This is similar to the suggested pdfpages solution but avoid passing around the tikzpictures, which isn't really necessary. See also Drawing on an image with TikZ and Is there the easiest way to toggle (show/hide) navigational grids in TikZ? for related code. You could even add real PDF form fields to it. See Creating fillable PDFs for how it can be done. \documentclass[letterpaper]{article}% ensure identical page size \usepackage{tikz} \pagestyle{empty} \begin{document} % Page 1 \begin{tikzpicture}[remember picture,overlay] \node at (current page.center) {\includegraphics[page=1]{form}}; \begin{scope}[shift={(current page.south west)},every node/.style={anchor=base west}] % Grid to help find the positions (remove in final version) \draw [help lines] (0,0) grid (current page.north east); \draw [help lines,thick] (0,0) grid [step=5cm] (current page.north east); % \node at (2cm,9.75cm) {John Doe}; \node at (13cm,9.75cm) {\today}; \end{scope} \end{tikzpicture} \clearpage % Page 2 \begin{tikzpicture}[remember picture,overlay] \node at (current page.center) {\includegraphics[page=2]{form}}; \begin{scope}[shift={(current page.south west)},every node/.style={anchor=base west}] % Grid to help find the positions (remove in final version) \draw [help lines] (0,0) grid (current page.north east); \draw [help lines,thick] (0,0) grid [step=5cm] (current page.north east); % %\node at (2.5cm,10.75cm) {John Doe}; \end{scope} \end{tikzpicture} \clearpage \end{document} This example used the IEEE copyright form. Just download it and rename it to form.pdf. The second page actually does not include any fillable form fields, but I found it important to show how to handle multiple pages. ",Martin Scharrer,https://tex.stackexchange.com/users/2975,http://tex.stackexchange.com/questions/15314/how-can-i-superimpose-latex-tex-output-over-a-pdf-file,TECHNOLOGY,tex.stackexchange.com 5106,Dried apricots smell of alcohol?,"I recently opened a container of store-bought dried apricots and they smell vaguely of fermentation/alcohol. I've never noticed this before. They taste fine, but should I be concerned? Do they need to be used soon? Worst-case, would I end up sick, or just tipsy? ",mskfisher,https://cooking.stackexchange.com/users/1129,"I've had apricots that smell vaguely like alcohol before, especially the ones that are not completely desiccated but are still plump and only dried to about half or so of their original volume. I've never had problems eating them and haven't had them go bad. ",Erik P.,https://cooking.stackexchange.com/users/1163,http://cooking.stackexchange.com/questions/8388/dried-apricots-smell-of-alcohol,LIFE_ARTS,cooking.stackexchange.com 6072,Quicklook is broken in Lion,"[Turns out this is known bug #9536151] I have a strange issue with Quicklook in Lion. This is on a clean install and happens with more than one user. It also isn't fixed if I clean out the Quicklook cache in /var/folders I have to push the spacebar twice to get Quicklook to work properly. The first time the usual Quicklook 'window' appears but it is blank: Push the spacebar again and the image appears. If I restart the Finder the problem goes away briefly. It's driving me nuts. ",Gazzer,https://apple.stackexchange.com/users/9876,"Some people recommended deleting your ~Library/Preferences/com.apple.finder.plist file to fix it. I wasn't able to simply delete the file to fix the problem. I had to go into my back up account and make a copy of the file from ~/Library/Preferences/com.apple.finder.plist and then move it into my user account. I'm sure you could do the same thing with your Guest user account, too. For me, the problem was caused by making the text in QuickLook copyable. I noticed when I turned on defaults write -g QLEnableTextSelection -bool true that the blank Quicklook bug was coming up as talked about in this thread. When I turned it off, (defaults write -g QLEnableTextSelection -bool false) the problem went away. ",Brandon,https://apple.stackexchange.com/users/90208,http://apple.stackexchange.com/questions/33448/quicklook-is-broken-in-lion,TECHNOLOGY,apple.stackexchange.com 9209,Mark: outstanding (as in: not yet known),"I’m updating my tabular CV for an application and I’d like to include my master thesis even though it’s not yet finished (soon!) and marked. So I’d like to write that the mark is still outstanding but I fear that if I simply write Master thesis: ‹topic› Supervisor: ‹supervisor› Mark: outstanding this could be misconstrued to mean that the result is in, and that it’s outstanding (as in: spectacular). What can I say here instead? It should be as salient as possible, single word preferred. I specifically want to avoid writing half a sentence. ",Konrad Rudolph,https://english.stackexchange.com/users/1637,"I agree, using outstanding here is quite ambiguous. I would use Awaiting mark or Pending mark - they are both clear and direct. (You can alternatively substitute mark with grade.) ",Noldorin,https://english.stackexchange.com/users/184,http://english.stackexchange.com/questions/9077/mark-outstanding-as-in-not-yet-known,CULTURE,english.stackexchange.com 8574,Vixion IRUX Tablet battery will not charge,"I bought this tablet recently in Tenerife. Can find no information about the manufacturer. Now the battery will not charge through the mains adapter. It did charge at first. However, I have found it does charge through USB connection to my PC. When it charged previously a light at the connector would be red. When it was not charging it would be green. It is red while USB connected. Also it tells me now that it is charging, but if I remove the USB connection it stops charging. It has a screen showing battery condition in the form of a graph. I could see the graph of battery % decreasing gradually. A few days ago there was a sudden drop as if some App had used a lot of power. I decided to remove all Apps and did a factory reset. This made no difference regarding the failure to charge. I have tried shutting down completely (hold the off button for a while and it asks if I want to power off) This made no difference. Any advice please? Edit #1: Thanks ce4 for your response. The charger is stated to be 5v and when I check it with a voltmeter, it shows 5.2v. Also I have tried pushing the plug into the tablet to varying amounts and makes no difference. Another point maybe I didn't make clear is that when I connect with USB only, the light does not come on but the device tells me it is charging. But when I connect the power supply as well, the light comes on red as if indicating charging. But when I remove the USB leaving the power supply connected, the light goes back to green and is not charging from the power supply. Despite apparently charging on USB, the percentage of battery left charged has not yet increased from 10%. I understand that USB cannot deliver high current. It appears you are right - something wrong with the charger - maybe it is not the correct one for this model - I guess it needs to be able to deliver power at a higher current level? ",Andrew,https://android.stackexchange.com/users/26925,"Today I was able to load the battery to 100% after the PC was totally crashed due to low voltage. With a charger and a USB 5V/500 mA output (Carrera accessories for a helicopter) this has worked normally. Through the USB connection to another PC, I had reached only 50%. The representation of the charge and discharge in the diagram is now understandable and I can use the PC to normal. When using the main charging port with the same charger, burns the green light on the tablet and the battery will not charge. ",Peter Schwiezke,https://android.stackexchange.com/users/27633,http://android.stackexchange.com/questions/37842/vixion-irux-tablet-battery-will-not-charge,TECHNOLOGY,android.stackexchange.com 5036,Is the intersection of two star-shaped sets star-shaped?,"Is the intersection of two star-shaped sets star-shaped? I don't think so but can't think of an example. ",user24883,https://math.stackexchange.com/users/24883,"HINT: A star-shaped set is connected. A $+$ sign is star-shaped. Find a way to position two of them so that the intersection is a two-point set. ",Brian M. Scott,https://math.stackexchange.com/users/12042,http://math.stackexchange.com/questions/200152/is-the-intersection-of-two-star-shaped-sets-star-shaped,SCIENCE,math.stackexchange.com 9399,most basic laser diode driver?,"Is a simple LM317-based laser diode driver safe for powering a laser diode? https://www.youtube.com/watch?v=iuMngik0GR8 (the diagram is at 1:37) I've been told the the proprietary drivers offer some extra protection from very short spikes (on power up and shutdown) in the current which laser diodes are very sensitive to and might be damaged from. But isn't the LM317 regulator taking care of that itself already? I've been told this from people who actually sell commercial laser diodes so I'm thinking they might be showing some bias. ",Leo Ervin,https://electronics.stackexchange.com/users/75978,"The main issue with the circuit you've shared is transients. Some linear regulator circuits will tend to overshoot on turn-on, or allow input transients to pass through to the load. Here's the ripple rejection curve for TI's LM317: You can see that the LM317 will do very little to protect the laser from transients with characteristic times below about 1 us. And an ESD event can easily have a pulse width as short as 1 ns. And many laser diodes are quite sensitive to over-voltage and over-current. They may also respond very quickly to transients compared to other devices that you might connect to an LM317. A good laser driver circuit should have ESD protection, transient protection, and a slow-start behavior. These things are more important if you are driving a low-cost CD laser, or a high-speed telecommunications laser than if you are driving a high-power material processing laser. They may also be less important today than they were 20 years ago due to improvements in the robustness and reliability of newer laser designs. ",The Photon,https://electronics.stackexchange.com/users/6334,http://electronics.stackexchange.com/questions/169383/most-basic-laser-diode-driver,SCIENCE,electronics.stackexchange.com 5426,"Omnifaces validateMultiple component only takes UIInput values, any workaround for considering UIOutput too?","So, I have an Address to validate and it has 4 input fields and 4 output fields, basically the 4 output fields are city,state,county and municipality. There are not editable, so they will be populated by zipCode lookup only. But when I validate , I need to pass in all the values, the lookup values too. <o:validateMultiple> only takes in Input Component values, so I tried to make them h:inputText too and then disabled=true since they aren't editable, but looks like <o:validateMultiple> ignores values of disabled input components as well. So, any alternatives? Initially I did it bu embedding all the ids with respective bindings using f:attributes on the first inputText component and used JSF validator to grab getAttributes and validated that way, which worked OK, but since validateMultiple reduces lot of that, I wanted to use this , but looks like it is not straight forward. Something like this could have helped : <o:validateMultiple id=""myId"" components=""foo bar baz"" validator=""#{bean.validateValues}"" /> <h:message for=""myId"" /> <h:inputText id=""foo"" /> <h:inputText id=""bar"" /> <h:inputText id=""baz"" /> public boolean validateValues(FacesContext context, List<UIComponent> components, List<Object> values) { // ... } Any help is appreciated! Thanks! ",PavanSandeep,https://stackoverflow.com/users/2030797,"Use <h:inputHidden> if you need hidden inputs. ",BalusC,https://stackoverflow.com/users/157882,http://stackoverflow.com/questions/21741805/omnifaces-validatemultiple-component-only-takes-uiinput-values-any-workaround-f,STACKOVERFLOW,stackoverflow.com 1714,What maintains quark spin alignments in baryons?,"What maintains quark spin alignments in baryons? The $uud$ proton and $udd$ neutron are both spin 1/2, implying that two of their spin 1/2 quarks are always parallel and the other is always opposed. In contrast, the $\Delta^+$ particle (which like the proton is $uud$) and the $\Delta^0$ particle (which like the neutron is $udd$) are both spin 3/2, implying presumably that the same principle keeps their internal quark spins all parallel. What principle keeps trios of quarks aligned or anti-aligned in such specific ways? ",Terry Bollinger,https://physics.stackexchange.com/users/7670,"The question is ""what maintains the orientation"". What maintains it is simply the angular momentum conservation. If the total angular momentum has $J^2=j(j+1)\hbar^2$ for $j=1/2$ or $j=3/2$, it obviously can't change because the whole vector $\vec J$ (including its length) is conserved. An up-spin may not spontaneously change to a down-spin and there is no value in between. The quantum mechanical problem for the bound state of quarks has, much like similar problems for atoms, some solutions with various values of the spin. Just like in atomic physics, the symmetry or antisymmetry of the orbital part of the wave function is correlated with the wave function for the spins, and therefore with the total spin, in various ways to guarantee that the overall wave function is antisymmetric. Some of these solutions have $j=1/2$, others have $j=3/2$. There are no other values of spins one may get by combining three $j=1/2$ spins. ",Luboš Motl,https://physics.stackexchange.com/users/1236,http://physics.stackexchange.com/questions/45361/what-maintains-quark-spin-alignments-in-baryons,SCIENCE,physics.stackexchange.com 2422,"Is there a way to deform a model and then have the mesh stay that way, even without an armature?","I want to 3D print several pawns. I need them to be in different poses, but be the same general character. I can achieve this by re-meshing the posed object with another object, but I would like a less time consuming way. How do I pose a mesh using an armature, then have the mesh stay that way, even without the armature which needs to be deleted for my print? preferably this would create a new mesh that I could print as my pawn(s). ",Scalia,https://blender.stackexchange.com/users/6385,"Yes, you can apply the armature modifier. This will fix the mesh into it's pose, so you probably want to do this on a duplicate of the model. ",gandalf3,https://blender.stackexchange.com/users/599,http://blender.stackexchange.com/questions/18495/is-there-a-way-to-deform-a-model-and-then-have-the-mesh-stay-that-way-even-with,TECHNOLOGY,blender.stackexchange.com 677,PHP and MySQL calendar issue,"I'm writing trying to build a calendar right from scratch. I'm using the function written by David Walsh (see link) and it's great. He does a query for each day's cell. But, I'm afraid that when the script's gonna have to run 30 queries in each render, it's gonna be sloooow. So, I was trying to think in another logic, for example, make a big query from X date to Y date at the begining of the script and then, at each day, check if that particular day has an event in the previous query. But I have no idea of how to do this... So, if anyone can help, please shout! Thanks. ",fedeisas,https://stackoverflow.com/users/227927,"Instead of /* keep going with days.... */ for($list_day = 1; $list_day <= $days_in_month; $list_day++): $calendar.= '<td class=""calendar-day"">'; /* add in the day number */ $calendar.= '<div class=""day-number"">'.$list_day.'</div>'; /** QUERY THE DATABASE FOR AN ENTRY FOR THIS DAY !! IF MATCHES FOUND, PRINT THEM !! **/ $calendar.= str_repeat('<p>&nbsp;</p>',2); $calendar.= '</td>'; if($running_day == 6): $calendar.= '</tr>'; if(($day_counter+1) != $days_in_month): $calendar.= '<tr class=""calendar-row"">'; endif; $running_day = -1; $days_in_this_week = 0; endif; $days_in_this_week++; $running_day++; $day_counter++; endfor; do /** QUERY THE DATABASE FOR AN ENTRY FOR THE PERIOD !! IF MATCHES FOUND, STORE THEM !! **/ $entries = getEntriesFromDB($month,$year); /* keep going with days.... */ for($list_day = 1; $list_day <= $days_in_month; $list_day++): $calendar.= '<td class=""calendar-day"">'; /* add in the day number */ $calendar.= '<div class=""day-number"">'.$list_day.'</div>'; if ($entries[$list_day]): /** ADD THE ENTRIES FOR THE DAY!! **/ endif; $calendar.= str_repeat('<p>&nbsp;</p>',2); $calendar.= '</td>'; if($running_day == 6): $calendar.= '</tr>'; if(($day_counter+1) != $days_in_month): $calendar.= '<tr class=""calendar-row"">'; endif; $running_day = -1; $days_in_this_week = 0; endif; $days_in_this_week++; $running_day++; $day_counter++; endfor; More seriously, in the first case you'd have a query like SELECT date,event from entries where date = $date and now you'd have SELECT date,event from entries where date between $date_minus_one_month and $date Then store the results in an associative array, indexed by days. ",Vinko Vrsalovic,https://stackoverflow.com/users/5190,http://stackoverflow.com/questions/1873340/php-and-mysql-calendar-issue,STACKOVERFLOW,stackoverflow.com 9335,"Word for the opposite of ""hypochondriasis""","Is there a word for the opposite condition of hypochondriasis? For example, someone who denies being sick when they clearly are? I would just say that they are ""in denial"". Is there any other adequate word? I thought about the obvious 'hyperchondria' but it doesn't seem to be used anywhere and doesn't look suitable as—from checking the origin of the word—just replacing 'hypo' by 'hyper' wouldn't fit well: 1555–65; < Late Latin < Greek, neuter plural of hypochóndrios pertaining to the upper abdomen (supposed seat of melancholy), equivalent to hypo- hypo- + chóndr ( os ) ensiform cartilage + -ios adj. suffix ",Renan,https://english.stackexchange.com/users/31820,"You could perhaps make up a new word based on the term prosopagnosia, which refers to the neurogenic inability to recognize people's faces. The term would be pathagnosia, the inability to recognize sickness. However, this inability would in principle apply equally to others' illnesses, so that a sufferer of pathagnosia would be just as bad a doctor as a patient. ",H Stephen Straight,https://english.stackexchange.com/users/12967,http://english.stackexchange.com/questions/93344/word-for-the-opposite-of-hypochondriasis,CULTURE,english.stackexchange.com 5839,How can I better protect my LAN from Internet Hackers,"My computer is connected to my Netgear router which is also the switch for my network, this in turn is connected to my cable modem which is just a bridging device. My router is blocking scans and fragmentation attacks but I believe its processor and RAM is getting hammered doing so because my LAN speed is very slow both wired and wireless and on multiple machines. Would adding a hardware firewall between my ISP bridge and my Router help or is there a better solution to dealing with these attacks? ",Ninja2k,https://security.stackexchange.com/users/24769,"Placing a second firewall in front of your current one would offload some of the processing of scans/probes/attacks and free up CPU cycles on your Netgear router/switch/AP. Just get another Netgear and configure the two devices to talk to each other. BUT, I do not have high hopes that this will accomplish what you seek. It is unlikely that your Netgear is so overwhelmed that it cannot properly handle legitimate traffic. Look to see what the actual problem might be. Too many machines communicating at once? Line noise/interference? Infected machines sending bot traffic? Set up Wireshark on one of your wired machines and on a wireless machine and see what is going on on the line. ",schroeder,https://security.stackexchange.com/users/6253,http://security.stackexchange.com/questions/36569/how-can-i-better-protect-my-lan-from-internet-hackers,TECHNOLOGY,security.stackexchange.com 8465,Standard small header size,"Currently, I'm using standard headers with a pitch of 2.54mm (0.1""). These are quite big on my boards. Are there any surface mount standard headers, say in 0.05""? ",Thomas O,https://electronics.stackexchange.com/users/1225,"Samtec has a pretty wide range of small headers. 0.050"" pitch is a standard size. They probably go smaller as well. A few examples: male headers surface mount sockets ",pingswept,https://electronics.stackexchange.com/users/712,http://electronics.stackexchange.com/questions/6817/standard-small-header-size,TECHNOLOGY,electronics.stackexchange.com 5392,"How do you create the vertical endless scrolling view in HTC WorldClock.apk, when setting the alarm?","In the WorldClock.apk of a HTC Sense Android phone, when a user wants to set the alarm, the user would see a black pop-up showing three vertical dials (value pickers, value selectors, etc). Those three vertical dials all can scroll up/down and cycle through the valid values. One is for hours, one is for minutes, and one is for AM or PM. There are no button, other than Done and Cancel. The vertical scrolling sliders is the one thing I'm looking for in the Android SDK Reference, and is the one I wanted to create. What are the vertical scrolling dials (number picker, sliding thing) called? What name? What class should I use to create it in Java? Is there anything else like it? Note, it is not for Windows Phone. It's an Android phone with the HTC Sense app, WorldClock.apk. Also note that I'm trying to obtain a picture of the Alarm Clock sliders on my HTC phone. But it's really hard when no one else has a digital camera for me to borrow. ",tom_mai78101,https://stackoverflow.com/users/1016891,"I suppose what you want is a wheel like this: http://code.google.com/p/android-wheel/ I have use it in my project, really help. ",David Guo,https://stackoverflow.com/users/467005,http://stackoverflow.com/questions/7925669/how-do-you-create-the-vertical-endless-scrolling-view-in-htc-worldclock-apk-whe,STACKOVERFLOW,stackoverflow.com 175,Access control Service and Azure Websites Could not load System.IdentityModel.Services,"I've created an ASP.NET MVC 4 app using visual studio 2012 RC on Windows 8 release preview. I downloaded and installed the WIF toolkit and used the ""Identity and Access"" option in the solution menu to add my Access Control Service metadata endpoint. Tested locally and all is well. When I deployed to my free azure website however I get the yellow screen saying ""Could not load file or assembly 'System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified."" These assemblies aren't referenced in the project, so I added them, sent to output to the bin folder and redeployed. I then got a message about the assembly probably being tampered with. Does anyone know how to overcome this? EDIT Adding local causes this error Could not load file or assembly 'System.IdentityModel.Services' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045) In the web config the module is deinfed as <system.webServer> <validation validateIntegratedModeConfiguration=""false"" /> <modules> <add name=""WSFederationAuthenticationModule"" type=""System.IdentityModel.Services.WSFederationAuthenticationModule, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"" preCondition=""managedHandler"" /> <add name=""SessionAuthenticationModule"" type=""System.IdentityModel.Services.SessionAuthenticationModule, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"" preCondition=""managedHandler"" /> </modules> </system.webServer> Thanks ",Dylan,https://stackoverflow.com/users/246970,"System.identityModel.Services is a .NET Framework 4.5 namespace with no .NET Framework 4.0 version. .NET Framework 4.5 is not supported on Windows Azure Web Sites. ",Neil Mackenzie,https://stackoverflow.com/users/1191223,http://stackoverflow.com/questions/11595684/access-control-service-and-azure-websites-could-not-load-system-identitymodel-se,STACKOVERFLOW,stackoverflow.com 4696,Etiquette for posting civil and informative comments,"Sometimes I leave a comment like ""Stack Overflow is not your personal research assistant,"" but am accused of being rude. How can I craft a comment that is seen as civil to the community and instructive to the OP? What tone should I strike in comments? What are some examples of bad comments and their better replacements? ",Robert Harvey,https://meta.stackexchange.com/users/102937,"Assume that the person you are replying to is not intentionally clueless/lazy. Answer them the way you'd want someone to answer you if you accidentally posted something that sounded clueless/lazy (even though you know you're not like that IRL). Assume the best of them, not the worst. Civillity = respect + benefit of doubt So you don't have to get florid, just refrain from answering as though the OP is annoying you on purpose. ",spongefile,https://meta.stackexchange.com/users/169889,http://meta.stackexchange.com/questions/138173/etiquette-for-posting-civil-and-informative-comments,TECHNOLOGY,meta.stackexchange.com 41,"Relationship between user story, feature, and epic?","As someone whose still new to agile, I'm not sure I completely understand the relationship or difference between a user story, feature, and epic. According to this question, a feature is a collection of stories. One of the answers suggest that a feature is actually an epic. So are features and epics considered the same thing, which is basically a collection of related user stories? Our project manager insists that there's a hierarchical structure: Epic -> Features -> User stories ... basically all user stories must fall within this structure. Therefore all user stories must fall under an umbrella feature and all features must fall under an epic. To me, that sounds awkward. Can someone please clarify how user stories, features, and epics are related? Or is there an article that clearly outlines the differences? ",nivlam,https://programmers.stackexchange.com/users/45,"I caution you against applying too rigid a hierarchy to these terms. We tried to do that in my previous job. Twice. Both attempts were different and both times we found we had unnecessarily limited ourselves. The only constant was the definition of a User Story. From a planning perspective, a story is the basic building block of a project. The larger terms (epic, feature, etc.) are effectively just tags. Tags are an easy way to allow a story to exist as part of multiple Epics and multiple Features at the same time. It's not worth the mental effort to be more strict than that. Tags work for Stack Exchange and they can work for you too. ",Kristo,https://programmers.stackexchange.com/users/1111,http://programmers.stackexchange.com/questions/182158/relationship-between-user-story-feature-and-epic,TECHNOLOGY,programmers.stackexchange.com 6335,Adding slides to previous section - Beamer,"My presentation is consisted of 4 consecutive slides. I want to divide them in 2 sections. My code: \documentclass{beamer} \mode<presentation> {\usetheme{Frankfurt} \usecolortheme{lily} \usefonttheme{professionalfonts}} \usepackage[english]{babel} \beamertemplatenavigationsymbolsempty \setbeamerfont{page number in head/foot}{size=\tiny} \setbeamertemplate{footline}[frame number] \begin{document} \section{Numerical examples} \begin{frame} Example 1 \end{frame} \section{Results} \begin{frame} Results 1 \end{frame} \section{Numerical examples} \begin{frame} Example 2 \end{frame} \section{Results} \begin{frame} Results 2 \end{frame} \end{document} I have something like this: Because they have the same names, I would like to achieve the following results: How can I add slide to the previous section? ",LiN,https://tex.stackexchange.com/users/59937,"USe only two \section command and also the possibility of a title for the frame: \documentclass{beamer} \usetheme{Frankfurt} \usecolortheme{lily} \usefonttheme{professionalfonts} \usepackage[english]{babel} \beamertemplatenavigationsymbolsempty \setbeamerfont{page number in head/foot}{size=\tiny} setbeamertemplate{footline}[frame number] \begin{document} \section{Numerical examples} \begin{frame} Example 1 \end{frame} \begin{frame}{Results} Results 1 \end{frame} \section{Numerical examples} \begin{frame} Example 2 \end{frame} \begin{frame}{Results} Results 2 \end{frame} \end{document} ",Herbert,https://tex.stackexchange.com/users/2478,http://tex.stackexchange.com/questions/194003/adding-slides-to-previous-section-beamer,TECHNOLOGY,tex.stackexchange.com 1899,strtotime calculates wrong when moving over to linux (webhost) from windows (localhost),"I've some problem with make a simple PHP function to work on my webspace meanwhile it works like expected at my localhost server. The problem is the following calculation: echo $Formated = date(""Ymd"",strtotime(""last day of next month"")); This script dosen't seem to work b/c i simply gets the default date 19691231 instead of the correct one 20110630 when running it on my server. I use windows (XAMP) as my localhost server so i guess there must be some form of problem that lies within the two platforms way of handling it? ",Alexander,https://stackoverflow.com/users/741779,"strtotime is notoriously problematic going cross-version, so I'd recommend a vast simplification. You can use the 't' character in the date format to represent the last day of the month, then reduce your strtotime call to simply return some timestamp for the next month. echo $Formated = date(""Ymt"", strtotime(""next month"")); ",Jeff Parker,https://stackoverflow.com/users/623436,http://stackoverflow.com/questions/6136713/strtotime-calculates-wrong-when-moving-over-to-linux-webhost-from-windows-loc,STACKOVERFLOW,stackoverflow.com 9145,Clustering algorithm and distance function for sets,"I am willing to run a clustering algorithm on data records consisting in sets each one representing the features enabled at a certain time. Is there any clustering algorithm you would recommend me to try out? In my first tests I'm experimenting with K-means, but maybe there is something more suitable. Is there any distance function that works well with sets? I guess that there is something better than the Euclidean distance but I don't have may clue on how the better metric could look like. ",mariosangiorgio,https://stats.stackexchange.com/users/10841,"I would start with distances such as proposed by James Li. They are sometimes known as fingerprint distances. Then, in my experience, it can be a good idea to use graph clustering, although this may depend on the number of features that you have. If this is large and dimensionality is thus large, and if 'set intersection' models data proximity well, then graph clustering is in my opinion the best approach. If the number of features is limited, graph clustering can still work well, but one should also consider the option of comparing feature vectors directly and use an algorithm such as OPTICS - perhaps you have already done that. ",micans,https://stats.stackexchange.com/users/4495,http://stats.stackexchange.com/questions/38064/clustering-algorithm-and-distance-function-for-sets,SCIENCE,stats.stackexchange.com 2546,Replacing the thermocouple for a multimeter?,"I bought a no-name but decent multimeter, and it came with a thermocouple. Let's say I broke it in some way. Can I just replace it with any other thermocouple, or is each thermocouple calibrated for one specific model of a multimeter? I have been looking at thermocouples, eg on eBay, e.g. this one. They write some specs but they don't write which multimeter it fits with? So does any thermocouple fit with any multimeter (or digital thermometer)? ",Mads Skjern,https://electronics.stackexchange.com/users/35827,"There are a few different types of thermocouples. In general you can replace a thermocouple with the same type, but you can't with different a different type because the calibration constants will be different. ",helloworld922,https://electronics.stackexchange.com/users/10658,http://electronics.stackexchange.com/questions/132748/replacing-the-thermocouple-for-a-multimeter,TECHNOLOGY,electronics.stackexchange.com 7151,MySQL does not work fine with UTF-8,"I added this rows to my-default file, restarted server, recreated schema, table and data in the tables, but my cyrillic data still looks like '????'. Now I have a new user and such config, but utf8 still does not work. [mysqld] init-connect=SET NAMES utf8 character-set-server=utf8 character-sets-dir=/usr/share/mysql/charsets default-character-set=utf8 [mysql] character-sets-dir=/usr/share/mysql/charsets default-character-set=utf8 [mysqladmin] character-sets-dir=/usr/share/mysql/charsets default-character-set=utf8 [mysqlcheck] character-sets-dir=/usr/share/mysql/charsets default-character-set=utf8 [mysqldump] character-sets-dir=/usr/share/mysql/charsets default-character-set=utf8 [mysqlimport] character-sets-dir=/usr/share/mysql/charsets default-character-set=utf8 [mysqlshow] character-sets-dir=/usr/share/mysql/charsets default-character-set=utf8 #end ",Arthur Kharkivskiy,https://stackoverflow.com/users/2279856,"This will probably do the trick. You need to perform a small query directly before you do INSERT or UPDATE. In my db-class it looks like this, which is to be adapted to your needs. $charset needs to be ""utf8"" $db->query('SET CHARACTER SET ""' . $charset . '"";'); $result = $db->query($query); I call the function like this $result = $ddlab->db->db($sql,'utf8'); Good luck ! ",ddlab,https://stackoverflow.com/users/1150871,http://stackoverflow.com/questions/29193551/mysql-does-not-work-fine-with-utf-8,STACKOVERFLOW,stackoverflow.com 1187,Parsing Ids from a string to create detail objects,"I am building a Flow that takes a user through a wizard to create a custom contract object with detail objects that represent the products on that contract (stored as a junction object). An issue I ran into is that Flow has a known limitation where if you use a Dynamic Choice (i.e. creating a dynamic set of checkboxes to choose Products from based on records from the Product object) it can only store the choices as a long semicolon delimited string in a variable; it cannot create detail objects based on your dynamic selection (even using a loop). To get around this, I want the flow to just create the parent Contract, then I want an after insert Apex trigger to parse the field where the long string of semicolon separated Product Ids are stored. The trigger would need to take the string and find each Id to store in a List. Once I had the List made from the text field I could insert the Product detail records to the parent Contract. I am very new to Apex, mostly just a point and click admin here. I am struggling with how to use RIGHT and LEFT to loop through the string field. trigger AddProductstoSOW on PS_Contract__c (after insert) { for(PS_Contract__c c:Trigger.new){ List<Id> ProductsToInsert = new List<Id>; integer n = LEN(c.Initial_Services_Products__c); for(p=15,p<n,p+17){ //How to iterate through Initial_Products_Selected__c? thisId = LEFT(p); Id product = Id.valueOf(thisId); ProductsToInsert.add(product); } } insert ProductsToInsert; } Any help is very appreciated. ",Tyler Whitesides,https://salesforce.stackexchange.com/users/16691,"Thank you for the assistance. I was able to resolve the issue. Though with .split() you also seem to need an upper limit parameter. Took a little struggling to figure this out but here it is: trigger AddProductstoSOW on PS_Contract__c (after insert) { try{ for(PS_Contract__c c : Trigger.new){ List<String> strProductIds = c.Initial_Services_Selected__c.split('; ', 1000); System.debug(strProductIds); List<SOW_Task__c> tasks = new List<SOW_Task__c>(); for(String i : strProductIds){ SOW_Task__c s = new SOW_Task__c(); s.PS_ServiceNo__c = i; s.PS_Contract__c = c.Id; tasks.add(s); } insert tasks; } } catch(DmlException e) { System.debug('An unexpected error has occurred: ' + e.getMessage()); } } ",Tyler Whitesides,https://salesforce.stackexchange.com/users/16691,http://salesforce.stackexchange.com/questions/66539/parsing-ids-from-a-string-to-create-detail-objects,TECHNOLOGY,salesforce.stackexchange.com 2087,"Origin and meaning of ""The eagle flies at midnight"""," The eagle flies at midnight. What's the origin and meaning of this idiom? ",Anderson Silva,https://english.stackexchange.com/users/1446,"It's one of the stereotypical spy code phrases used in bad and/or spoof movies. I've seen it credited to Top Secret, but not having seen that movie, I can't vouch for the assertion. I've also seen it as ""the rooster crows at midnight"", or ""the eagle flies at noon"". Alas, my Google-fu is not up to finding a definitive source. ",Marthaª,https://english.stackexchange.com/users/1547,http://english.stackexchange.com/questions/5305/origin-and-meaning-of-the-eagle-flies-at-midnight,CULTURE,english.stackexchange.com 911,$\theta$ term of anomaly related with topological insulators,"I am reading Ludwig's paper ""Electromagnetic and gravitational responses and anomalies in topological insulators and superconductors"", and in this paper, although I am clear how they get the descent equation which introduced the relationship between anomaly and the existence of topological insultor, I am confused about the theta-term they mentioned on section VA5, they said that the integral of anomaly polynomial $\Omega_{2n+2}$ corresponds to the $\theta$ term. Could anyone help and explain to me what is this theta-term referring to and where can I find information about it? ",huyichen,https://physics.stackexchange.com/users/2397,"The $\theta$-term is also known as the axion term and it's simply the $F\wedge F$ term known to particle physicists. In a more condensed-matter-friendly language, $$\Delta {\mathcal L} = \theta\left( \frac{e^2}{2\pi h} \right) \vec B \cdot \vec E $$ I don't know the optimum starting point but you may begin with http://arxiv.org/abs/1001.3179 and its followups and references. More generally, the $\theta$-term means the integral of the anomaly polynomial. Note that the anomaly polynomial is a nice gauge-invariant expression - but in higher dimensions. The actual anomaly in the original spacetime is related to it by several operations. ",Luboš Motl,https://physics.stackexchange.com/users/1236,http://physics.stackexchange.com/questions/8484/theta-term-of-anomaly-related-with-topological-insulators,SCIENCE,physics.stackexchange.com 8277,"Is there words that mean ""meet the criteria""?","I'm making a comic strip and looking for a funny word in the theme of hair, maybe something that means ""make it meet the criteria"". It is hard for me to explain, as my first language isn't English. don't be shy of asking questions about my question :P ",james,https://english.stackexchange.com/users/77278,"You could use ""comply"", which means ""meet specified standards."" For a similar word in theme of hair, how about adhere? Adhere or rather ""adhere to"" is a synonym of comply. ",Calypto,https://english.stackexchange.com/users/77085,http://english.stackexchange.com/questions/172891/is-there-words-that-mean-meet-the-criteria,CULTURE,english.stackexchange.com 4859,Does General Onimaru's Clockwork Soldier prevent retreats?,"General Onimaru's Clockwork Soldier ability prevents players from moving backwards. Does it also prevent retreating from a dashing strike? If a player is forced to retreat past the Clockwork Soldier, does the Clockwork Soldier keep advancing and if so, is the player now prevented from moving past it in the opposite direction? ",Spig,https://boardgames.stackexchange.com/users/2074,"Yes, movement is treated the same regardless of how the pawn is moved. David Sirlin answered this question here: Q: Onimaru's Clockwork soldier state that the opponent cannot move behind the token. Does it also prevents any retreat? Because the way I see it, your opponent has a ""wall"" that moves toward him 2 case per turn, but the wording of the card implies something else. A: The movement rules are the same across the whole game. By ""movement,"" that means ""the rules for changing the position of your pawn for any reason, when it would reach an obstacle"" are the same across the whole game. It doesn't matter if the ""movement"" is a move, push, dashing strike, retreat, etc. It doesn't matter if the obstacle is a player pawn, the edge of the board, or a clockwork soldier. In all cases, you go as far as you can, then stop when you reach the obstacle. ",user1873,https://boardgames.stackexchange.com/users/1873,http://boardgames.stackexchange.com/questions/8647/does-general-onimarus-clockwork-soldier-prevent-retreats,CULTURE,boardgames.stackexchange.com 9049,Weird jquery 302 error in Firebug,"I am posting data to servlet using jquery .post() method. The data is being posted and servlet is able to catch the data. But in my firebug I see 302 once the post request is done. Also I am redirecting the user to success page in my servlet. But the redirect is not happening!! Should'nt I be getting 200 on the post request? And why is a simple response.sendRedirect(""success.jsp"") not happening? When I click on the response tab I can see the success.jsp html tags. Please throw light on what is happening? How do I correct it? ",enthusiastic,https://stackoverflow.com/users/584003,"That is not wierd. because you have called sendRedirect method in the server, server send back the response with 302 for informing the client browser to redirect to another url (which is also sent in the response header). You can use forward method instead of redirect method if you want to do the redirection from the server side. ",Manjula Weerasinge,https://stackoverflow.com/users/201986,http://stackoverflow.com/questions/8613350/weird-jquery-302-error-in-firebug,STACKOVERFLOW,stackoverflow.com 5789,How To Manually Redirect URLs To a New Blog,"I'm building my new blog on Tumblr, I've already got all my old WordPress posts and migrated them to their new home. The problem is that the Tumblr permalinks are different from the WordPress ones (the post title part), so I want to know how I can manually redirect URLs like: http://dreamintech.net/2012/3/post-title-something-test To: http://nathancampos.me/post/1920418430/post-title-here Is there any way I can do this without having to use regex to insert the post-title part on the new URL, because I want to make this all manually. PS: I don't care about the time it will take ",Nathan Campos,https://serverfault.com/users/12889,"You could just make a map of the from and to URLs in your httpd.conf file like so; <VirtualHost *:80> ServerName dreamintech.net ServerAlias www.dreamintech.net .... # map relative URLs under dreamintech.net to the # remote URL with a 302 redirect Redirect permanent /2012/3/post-title-something-test http://nathancampos.me/post/1920418430/post-title-here Redirect permanent /2012/3/post-title-something-2 http://nathancampos.me/post/1920418430/post-title-2 Redirect permanent /2012/3/post-title-something-3 http://nathancampos.me/post/1920418430/post-title-3 </VirtualHost> ",Tom H,https://serverfault.com/users/47650,http://serverfault.com/questions/392947,TECHNOLOGY,serverfault.com 3387,How can I make my iPad apps retina in Xcode 5 iOS7,"Not long ago I started learning Objective-C with an interest of developing apps. I have just started my first app and I have no clue how to make my app retina. I made the design in photoshop and exported it as a png @ 2,048 x 1,536 but however the size of my storyboard is only 1,024 x 768. I have read somewhere on the internet that you need two story boards but I am not sure how to link everything together. I would really appreciate it if someone could help me. ",user2989426,https://stackoverflow.com/users/2989426,"What is Retina Display @1X is a resolution (or rather, a process) in which many designers still design apps. Why? Because (and as many would have to agree) designing at such is much more tangible. I find it hard to explain why it’s so, but all I can say is that the content feels much more 1 on 1, it feels right so to speak, and the design is much more flexible to deal with, because of our “low” resolution computer displays that we’re designing them on. Though that doesn’t mean we all like designing @1X. I’ve seen many others who build wonderful, beautiful apps designing at both processes (the other would have to be @2X — resolution of that of the Retina Display) and some say it feels much more comfortable for them having to have their content match perfectly without having to scale things up and tweak things around on the display. More Dtails 2x-the-retina-dilemma How identify the retina display #define IS_RETINA_DISPLAY ([[UIScreen mainScreen] respondsToSelector:@selector(displayLinkWithTarget:selector:)] && ([UIScreen mainScreen].scale == 2.0)) if(IS_RETINA_DISPLAY) { // RETINA_DISPLAY }else{ // NON_RETINA_DISPLAY } Now, that the iPad has been released, I’m sure you are all scrambling for ideas on how to snag a piece of the market in the imminent gold rush. some of below links is going to help you on your journey with a series of iPad tutorials to come. ipad-programming-tutorial-hello-world How-To-Develop-iPad-Apps ",codercat,https://stackoverflow.com/users/1650785,http://stackoverflow.com/questions/21129482/how-can-i-make-my-ipad-apps-retina-in-xcode-5-ios7,STACKOVERFLOW,stackoverflow.com 8839,Quasi-isometric embeddings of the mapping class group into the Teichmuller space,"Does there exist a quasi-isometric embedding $$MCG(S) \to (\mathrm{Teich}(S), d)$$ for $d$ any ""known"" distance on the Teichmuller space (i.e. Teichmuller, Weil-Petersson, Thurston...) ? ",yanglee,https://mathoverflow.net/users/41219,"A result of Behrstock and Minsky (cf. Hamenstadt too) implies that the rank of mapping class groups is the maximal rank of abelian subgroups, which is $3g+p-3$ for a connected hyperbolic surface of genus $g$ with $p$ boundary components. The rank of Teichmuller space with respect to the Weil-Petersson metric they show is $\lfloor \frac{3g+p-2}{2}\rfloor < 3g-3+p$, so there is no q.i. embedding of the mapping class group to Teichmuller space with the Weil-Petersson metric. On the other hand, Eskin-Masur-Rafi show that the rank of the Teichmuller metric is equal to that of the mapping class group. They point out that the orbit of a point under the mapping class group is not a quasi-isometric embedding. But this leaves open whether there might be a non-equivariant q.i. embedding. ",Ian Agol,https://mathoverflow.net/users/1345,http://mathoverflow.net/questions/144701,SCIENCE,mathoverflow.net 7028,Different water temperature in different faucets,"I have my bathrooms remodeled and the temperature of the water is different in one bathroom than the other. Even within the same bathroom, the bathtub is cooler than the water coming out of the sink. Why could this be? Thank you very much ",Samuel,https://diy.stackexchange.com/users/34176,"Bathtub and shower valves have (and are required to have) anti-scald features which limit the temperature. Depending on the valve that may be somewhat adjustable - check the owners manual for it (look up on the web if you don't have one.) I believe the reasoning is that a small child or invalid would not be able to get out of the tub, while it's assumed that they could pull their hands away from a sink. It is in response to actual burn incidents. ",Ecnerwal,https://diy.stackexchange.com/users/18078,http://diy.stackexchange.com/questions/61244/different-water-temperature-in-different-faucets,LIFE_ARTS,diy.stackexchange.com 6288,What is a good click through rate (CTR),"I'm new to adwords and I'm trying to figure out what a good click through rate on my ads would be. Does anyone have any guidelines? ",Paul Sheldrake,https://webmasters.stackexchange.com/users/962,"The numbers quoted below seem about right for campaigns which I've run (I'd add that the most abysmal CTR I've seen was 10k:1 for a banner ad on a site which ran multiple banner ads - it ran for three months, had millions of views, and resulted in three conversions, all of which canceled within their first month). Low conversion rate 1:500. Ordinary 1:100 Good 1:5 Unbelievable 1:1 Low CTR: 0.5% Ordinary: 2.5% Good: 10% Outstanding: 60% Source: What is the typical CTR and conversion ranges? ",danlefree,https://webmasters.stackexchange.com/users/1064,http://webmasters.stackexchange.com/questions/9791/what-is-a-good-click-through-rate-ctr,TECHNOLOGY,webmasters.stackexchange.com 8999,Maximum absolute value of polynomial coefficients,"Suppose we have a polynomial in integer coefficients $$p = p_0 + p_1 x + p_2 x^2 + \ldots + p_n x^n, p_k \in \mathbb{Z}$$ Now define $M(p)$ as the maximum absolute value of the coefficients of $p$, i.e. $$M(p) = \max \{|p_k| \: |\: 0 \leq k \leq n\}$$ Is it true that for any polynomial factor $q$ of $p$, $M(q) \leq M(p)$? I'm not sure whether this is obvious and I'm just missing something, or whether my train of thought is just completely off... ",Sp3000,https://math.stackexchange.com/users/12272,"No. There is a famous example of a factor of $x^{105}-1$ \begin{align} \Phi_{105}(x) = & \; x^{48} + x^{47} + x^{46} - x^{43} - x^{42} - 2 x^{41} - x^{40} - x^{39} + x^{36} + x^{35} + x^{34} \\ & {} + x^{33} + x^{32} + x^{31} - x^{28} - x^{26} - x^{24} - x^{22} - x^{20} + x^{17} + x^{16} + x^{15} \\ & {} + x^{14} + x^{13} + x^{12} - x^9 - x^8 - 2 x^7 - x^6 - x^5 + x^2 + x + 1 \end{align} See cyclotomic polynomials Also $x^4+1=(x^2+1)^2-2x^2$ has the factorisation $(x^2+\sqrt 2 x + 1)(x^2-\sqrt 2 x +1)$ which isn't integral, but does suggest that lower degree counterexamples may exist. ",Mark Bennet,https://math.stackexchange.com/users/2906,http://math.stackexchange.com/questions/993224/maximum-absolute-value-of-polynomial-coefficients,SCIENCE,math.stackexchange.com 9467,Java read pptx file,"Can someone help me how to read pptx file in java?i would prefer if this can be read with apache POI, i have been searched this tutorial but i can't find it.I've been successfully read the ppt file with this code : try { FileInputStream fis = new FileInputStream(file); fs = new POIFSFileSystem(fis); HSLFSlideShow show = new HSLFSlideShow(fs); SlideShow ss = new SlideShow(show); Slide[] slides=ss.getSlides(); for (int x = 0; x < slides.length; x++) { System.out.println(""Slide = "" + (x + 1) + "" :"" + slides[x].getTitle()); TextRun[] runs = slides[x].getTextRuns(); for (int i = 0; i < runs.length; i++) { TextRun run = runs[i]; if (run.getRunType() == TextHeaderAtom.TITLE_TYPE) { System.out.println(""Slide title "" + (i + 1) + "": "" + run.getText()); } else { System.out.println(""Slide text run "" + (i + 1) + "": "" + run.getRunType() + "" : "" + run.getText()); } } } } catch (IOException ioe) { ioe.printStackTrace(); } Can someone tell me what part of this code must be modified to read pptx file? ",user1290932,https://stackoverflow.com/users/1290932,"According to apache poi release notes, version 3.8 can be used to read PPTX. You have to check out the documentation though. ",kostas,https://stackoverflow.com/users/831317,http://stackoverflow.com/questions/10684526/java-read-pptx-file,STACKOVERFLOW,stackoverflow.com 5548,Why do objects fall at the same acceleration?,"I read these two posts and now I am more confused. Do heavier objects fall faster? Don't heavier objects actually fall faster because they exert their own gravity? I was going to ask: if mass is an objects tendency to resist acceleration then why do two objects of different masses fall to the Earth at the same acceleration? Then I read those posts and it seems that even though it is very small, the more massive object falls faster. Okay I understand, both objects attract each other. If two cars of different masses collide doesn't the car with less mass accelerate more even though both cars received the same Force. Then that implies you need more force to accelerate a large mass than to accelerate a small mass. Because that is how I see it, the Moon attracts the Earth with the same Force as the Earth attracts the Moon but the Earth accelerates less due to its larger mass. So then how is mass an object's tendency to resist acceleration? I am aware of $F_1 = F_2 = GMm/r^2$. So should we not really be able to see the difference in acceleration when dropping a massive object? ",CharlieK,https://physics.stackexchange.com/users/43959," Mass is an object's tendency to resist acceleration. This applies when both masses you're testing are subjected to identical forces. From Newton's Law of Gravity, $$F = G \frac{M \cdot m}{r^2}$$ It is fairly obvious that the force the Earth exerts on a heavy body is more that what it exerts on a light body, so you can not compare the accelerations by comparing just the masses in this case. Newton's second law gives $$a = \frac{F}{m} = G \frac{M}{r^2}$$ For two bodies an equal distance away from the Earth's center of mass, you can see that the acceleration for both bodies is indeed, the same and independent of the body mass. Of course, this assumes there is no drag on the falling body, and that the only appreciable force is that due to Newton's Law. To summarize: There is no difference in the acceleration of two objects of identical shape but different masses. The difference you observe between a feather and a golf ball, for example, is not because of gravity - it's because of the shape and the air resistance the body encounters. Clarification This answer assumes you're in an inertial reference frame (attached to the center of mass of the falling object and the Earth), and that ""falling"" means the motion of the object towards this center of mass. If you consider falling to mean the motion of the object relative to the Earth, then, because the force exerted on the Earth by a heavier body is more, the Earth will accelerate towards the center of mass ever so slightly, and therefore the object will fall ever so slightly faster. ",Pranav Hosangadi,https://physics.stackexchange.com/users/11484,http://physics.stackexchange.com/questions/106938/why-do-objects-fall-at-the-same-acceleration,SCIENCE,physics.stackexchange.com 7300,Moving user perspective in Blender with Python,"How can I move the user perspective in Blender with Python? I did some research, but I wasn't able, to find anything. For clarification: I want to move the user camera in the 3D view. I want to achieve the same effect as the user pressing his middle mouse button and moving the mouse. ",Fabian Parzefall,https://blender.stackexchange.com/users/1665,"You can use bpy.ops.view3d.view_pan() to do the same as Ctrl+Numpad #, e.g.: for area in bpy.context.screen.areas: if area.type == 'VIEW_3D': override = {'area': area, 'region': area.regions[-1]} bpy.ops.view3d.view_pan(override, type='PANRIGHT') The amount of the panning can't be controlled. If you manipulate the view_matrix (or view_location etc.) directly, there's a lot more control. But you will have to calculate the proper matrices and vectors, and if something went wrong, you may end up with strange view or navigation reaction: r3d = C.screen.areas[2].spaces[0].region_3d # region_3d of 3D View r3d.view_matrix.col[3][1:4] # translation part of the view matrix Have a look at the FPS Fly addon to see what can be done and how: http://www.ewocprojects.be/fpsfly.html AFAIK viewport navigation is a bit weird after use, as the addon might manipulate the wrong property to fly around. The C-implementation will be different. ",CoDEmanX,https://blender.stackexchange.com/users/1363,http://blender.stackexchange.com/questions/5035/moving-user-perspective-in-blender-with-python,TECHNOLOGY,blender.stackexchange.com 7258,Is ZIP archive capable of storing permissions?,"I am using Maven Assembly plugin to bundle my application along with configuration/settings files. It allows to specify persmissions to be stored along with files, which is quite convenient. Still I never found a confirmation, that ZIP archive is capable of storing UNIX permissions. Is it? (please, post some proof if you answer either yes or no). ",user1065145,https://serverfault.com/users/149491,"Yes, Create you deployment. Transfer it to another machine. Deploy the application. Compare the permissions on the reference machine with the lab machine. Profit! ",Iain,https://serverfault.com/users/9517,http://serverfault.com/questions/585817,TECHNOLOGY,serverfault.com 2516,Dealing with digital circuits and their associated switching speed?,"When designing a digital one-minute counting circuit I came across a difficult problem. Basically, I designed the circuit to drive the (normally HIGH) clock of the 10s slot low if the 1s slot's current state was 9 (actually, just if the first and last bits are HIGH -> 1001) The devices I am using are positive edge, so when the 1s slot returns to zero the condition is no longer satisfied - therefore the clock returns to a HIGH state and increments the 10s slot. The problem is that I was getting double clock problems(7->8 transition and the designed clock mechanism). It turns out that there was just enough delay in the switching between 7 -> 8 (0111 -> 1000) that the first/last bit HIGH condition is satisfied: i.e., some combination occurs in the transition period to register a logical HIGH at the output 1001 1011 1101 1111 The temporary solution to the problem I came up with was to actually keep the clock for the 10s slot LOW until the condition where the 1s slot equals 0 (0000) is satisfied(So, essentially clock WHEN we get to the state as opposed to before). However, this solution requires too many gates (a 4-input NOR minimum). My previous design was actually fed from another part in the design that is already present, so it didn't require any additional circuitry. Any ideas on a more efficient solution? The IC's used in this design are the 74LS47 (7Segment decoder) and the 74LS163 (4-bit binary counter). The pull-down resistor inclusion is a mechanism to set the counters to 00 and hold while the switch is closed. ",sherrellbc,https://electronics.stackexchange.com/users/26864,"If you're having problems with switching speed on a slow switching circuit, the simplest solution is to slow it down. I would suggest using your original idea, but add a series RC lowpass filter (series R, then shunt C to GND) right before the clock input pin with a time constant (R times C) on the order of a milisecond or so. This should filter out any very short runt pulses that are being generated. If that doesn't work, crank up the time constant to 10 ms or even 100 ms. Too high and there will be a noticable delay, though. ",alex.forencich,https://electronics.stackexchange.com/users/31018,http://electronics.stackexchange.com/questions/90996/dealing-with-digital-circuits-and-their-associated-switching-speed,SCIENCE,electronics.stackexchange.com 2919,What's the first physics textbook for undergraduate self-learner?,"I am kind of studying physics on my own now. I choose University Physics (13th Edition) for myself,is it fine? I am also studying Calculus using Thomas' textbook. http://www.amazon.com/University-Physics-13th-Edition-Young/dp/0321696891/ref=sr_1_1?ie=UTF8&qid=1352260382&sr=8-1&keywords=university+physics+13th+edition ",Ave Maleficum,https://physics.stackexchange.com/users/15659,"You can study ""Modern physics"" by Arthur Beiser. It is a very good book for undergraduate students. And also you can study the Feynmann Lecture series. ",Curious,https://physics.stackexchange.com/users/12502,http://physics.stackexchange.com/questions/43605/whats-the-first-physics-textbook-for-undergraduate-self-learner,SCIENCE,physics.stackexchange.com 9423,How to merge unversioned code into Git repository?,"So a friend worked on a bunch of code that he never versioned, and is handing it off to me. He initially gave me version A, even though he had a more recent version B available. I put A into a git repository (on say Team Foundation Service), and then made some commits, resulting in version C. Now he has put up version B in a git repository (on say Bitbucket). How can I compare versions C and B, and merge all diffs between (B,A) and (C,A) to get one final version D which has both his updates and mine? Keep in mind, the repos on Bitbucket and TFS (versions B and C respectively) have no common git commits, although they both come off the same base version A. I can see a couple of ways of doing this, not sure of the cons of each though: 1) Add Bitbucket version B as an upstream to my TFS version C, and fetch upstream/master, then do a git diff. 2) Copy the files from version B into the directory that holds version C, and then commit them as if I changed the files manually. 3) Something else entirely, like rebase. My understanding of git is very basic so please explain like I'm 5 (well, not really, but you know what I mean). Note: It is ok to have all changes made from A to B in one commit in the final repo history, but would be nice to preserve the individual commits between A and C. Also, from version A to version B, the friend has not maintained directory structure, he has moved all the contents to a sub-directory of the root. So if version A had file a.txt, version B has file TRUNK/a.txt. ",Neil,https://stackoverflow.com/users/181284,"Simply: checkout A make a new branch from A (from ""Git version control and Team Foundation Build"") copy B in it add and commit: (from ""Create, Connect, and Publish using Visual Studio with Git"") merge that branch in your main branch which represents C resolve conflicts: ",VonC,https://stackoverflow.com/users/6309,http://stackoverflow.com/questions/20013013/how-to-merge-unversioned-code-into-git-repository,STACKOVERFLOW,stackoverflow.com 8048,What is the best way to remove pet odor from concrete?,"The concrete floor in my garage had been home to a large dog for several years. There is a visible stain and strong smell in one area of the garage floor. The concrete does not appear to be sealed or painted. What is the best way to remove the odor? ",Kyle Renfro,https://diy.stackexchange.com/users/6911,"Let me save you some time. Forget the pet store products, just go to Home Depot or Lowe's and get yourself a can of primer/sealer, I think Kilz brand is the best. I had a really bad cat urine odor problem in my townhome many years ago (from previous owners). Like you, I went to the Internet and I tried a lot of suggestions I found there. NONE of those specialty pet odor removal products worked. They just temporarily covered up the smell and during hot weather it came back. Big waste of money and time. Finally someone suggested the Kilz brand primer/sealer and it worked. The smell never ever came back, and there was a clean ""new home"" smell. I used it on drywall but I'm sure they have stuff for concrete as well. ",DSO,https://diy.stackexchange.com/users/7077,http://diy.stackexchange.com/questions/15887/what-is-the-best-way-to-remove-pet-odor-from-concrete,LIFE_ARTS,diy.stackexchange.com 279,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"", according to the journal style documentation, and I need to tune some settings (like 'sort&compress', for example), but I do not know how to do that since I do not load the 'natbib' package directly. I know there is a command \biboptions{} in Elsevier LaTeX style which does exactly what I want. But as far as I understand, this command is specific to their style and does not belong to the natbib package itself, or am I wrong? P.S. I'm working with the Springer's 'SVJour3' document class currently. It is a widely used one, I believe. So, maybe someone can suggest me a way to sort the citations so that they do not look like [2,3,1] instead of [1-3] or at least [1,2,3] in the text? Thank you! ",v_2e,https://tex.stackexchange.com/users/16578,"I think I have found the answer as far as Elsevier articles are concerned (I am using elsarticle.cls). elsarticle-num.bst requires entries in the BibTeX database to be preceded with a \bibitem tag, e.g. \bibitem{ @article{Bridgman1914, author = {P. W. Bridgman}, title = {A complete collection of thermodynamic formulas}, journal = {Physical Review}, year = {1914}, volume = {3}, issue = {4}, pages = {273--281}, } } If this is done the references should appear sorted in the article. ",chrisroadmap,https://tex.stackexchange.com/users/32508,http://tex.stackexchange.com/questions/67782/set-natbib-options-after-loading-natbib-package,TECHNOLOGY,tex.stackexchange.com 8696,Was Erica Albright real?,"In the film The Social Network Mark breaks up with Erica Albright early on, this (through a series of steps) leads to him creating The Facebook. However in real life Mark is married to Priscilla Chan who he met at Jewish fraternity at Harvard University in 2003 (Facebook was founded in 2004). Does Erica Albright exist? If not why is she featured in the film and not Priscilla Chan? ",Liath,https://movies.stackexchange.com/users/574,"The EricaAlbright.com is a hoax web site. It is just someone trying to get attention on the Internet with a ""famous"" name. Erica Albright is a fictitious person created for the sake of drama, because movies need a romantic plot to make them more interesting to some audience. ",Sasha,https://movies.stackexchange.com/users/7945,http://movies.stackexchange.com/questions/13794/was-erica-albright-real,LIFE_ARTS,movies.stackexchange.com 7148,Which achievements are missable if sharing Skylanders between multiple profiles?,"Since purchasing Skylanders with my son and realizing you can't have different profiles on each character, I've also noticed some achievements are not unlocking depending on who first used the Skylander and who it is tied to. In short, all the Skylanders appears to be tied to my profile, but it's preventing some achievements from unlocking on my son's profile. They aren't just the achievements described with (primary profile), as most have unlocked for both of us while playing separately. So far I've noticed that the following achievements won't unlock once a Skylander is tied to someone: Fashion Stylist - Have your Skylander equip a hat for the first time. (primary profile) Hello!! Skylander - The first time you put your Skylander on the Portal of Power. (primary profile) What other achievements are tied to a Skylander unlocked by a specific person? ",Doozer Blake,https://gaming.stackexchange.com/users/4239,"In addition to the ones you mentioned, the following achievements may give you trouble.. I Love Shopping - Buy first Upgrade - if all of the Skylanders already have one+ upgrade Climb to the Top - Level Up to 10 - If all Skylanders are already at 10 True Portal Master - all other Achievements - obviously, if you can't get any of the others Note that you can reset a Skylander to level 1, or transfer it to someone else. Look under the Manage option in the Menu. ",APrough,https://gaming.stackexchange.com/users/18145,http://gaming.stackexchange.com/questions/49165/which-achievements-are-missable-if-sharing-skylanders-between-multiple-profiles,CULTURE,gaming.stackexchange.com 2755,Will a site URL with repeating keywords get penalized by search engines?,"I have an URL structure like the following: sitename.com/cellphone/nokia/galaxy-5678-nokia-cellphone-from-abc/ For more example: sitename.com/cellphone/motorolla/new-motorolla-gta800-cellphone-from-zxy/ The directory structure is like the cellphone is the main directory of the module and the words like Motorolla and Nokia are subdirectories which are categories and then comes the title of the cellphone. Here the word cellphone and Nokia in the first link and cellphone and Motorolla in the second link are repeated. Is it any kind of keyword stuffing? will it be penalized by Google? ",Jayapal Chandran,https://webmasters.stackexchange.com/users/2185,"It's important to note that there is no official number that is classed as keyword stuffing and every page/site is different. But in your example it's not a matter if its keyword stuffing or not. You should be making your URLs for your visitors and not the search engines. Your unnecessary repeating the words, words such as 'new' are stop words and you no need to repeat the manufacturer or cellphone since its mentioned before. sitename.com/cellphone/motorolla/new-motorolla-gta800-cellphone/ is exactly the same as: sitename.com/cellphone/motorolla/gta800/ Focus on Keywords and what the page is about. If its a review then you use: sitename.com/cellphone/motorolla/gta800-review/ If its about 10 reasons why the gta800 sucks then you use something like: sitename.com/cellphone/motorolla/10-reasons-why-not-to-buy-a-gta800/ Cater for your audience not the search engines. There is no need to repeat it more than once: it doesn't make it any more important. Google has many ways of establishing what the page is about, URL is just one indicator of many. As long as you have the main 'KEYWORD' or Keywords you want to rank then the rest don't matter. Use the title, H1 and meta description for more in depth information. Short URLs are preferred, not only because they have higher click rates but also they are better to link. ",Simon Hayter,https://webmasters.stackexchange.com/users/20604,http://webmasters.stackexchange.com/questions/46779/will-a-site-url-with-repeating-keywords-get-penalized-by-search-engines,TECHNOLOGY,webmasters.stackexchange.com 7241,What is the Gorel Hagra?,"What is it? How is it performed? May one perform it? And, if so, when may it be used? ",yydl,https://judaism.stackexchange.com/users/128,"The place to look for info on the Goral HaGra is the three volume HaGaon: R' Eliyahu MiVilna by Dov Eliach. Unfortunately for those who do not own it yet, it might be out of print. Here is a relevant article from Yated on the Goral that bases itself on R' Eliach's book. I just discovered a sefer called ""Goral HaGra"" that deals with this subject exclusively. I do not own it yet. ",Yahu,https://judaism.stackexchange.com/users/68,http://judaism.stackexchange.com/questions/1774/what-is-the-gorel-hagra,CULTURE,judaism.stackexchange.com 1646,How can I cut fudge smooth and uniform?,"I've recently taking up making fudge for family and friends. However, my cutting technique lacks a desirable smooth uniform piece. How can I cut equal smooth cuts? ",James,https://cooking.stackexchange.com/users/37194,"The first question is how fussy you want to be about uniformity. Many people are satisfied just using a long, thin knife to score the fudge in roughly straight lines. If you want professional-level uniformity in the size of pieces, you'll need to lay out a grid with a straightedge, measuring equal distances on all four sides, and then use the straightedge across the fudge to score it. (If you plan on doing this repeatedly, I'd recommend preparing a template on a piece of cardboard or something, so you don't need to measure equal spacing on the edges each time.) As for smooth cutting, there are standard recommendations: Score the grid onto the fudge with a sharp knife when just barely set but still warm. This will make the final cuts easier, as well as giving you guidelines to follow. Everyone has an opinion about the best implement to do the final cuts with. If the fudge is still slightly warm (but firm), a plastic knife may work best. If the fudge is cooler and harder, a thin smooth metal blade is often easiest (usually with no sawing motions; just pressing down). A long blade makes for quicker work. Some people like to use a bench knife pushed straight down; others use a pizza wheel or smooth pastry wheel. It all depends on your technique, as well as the consistency and temperature of the fudge. If you have difficulty cutting or if the fudge crumbles with the cuts, try warming the metal knife (or wheel or whatever) in hot water between cuts. Wipe the hot knife dry before cutting. Whatever you use, always wipe the cutting implement clean between cuts. Some people claim to use dental floss for cutting. While I've used that for cakes a few times, it seems overly fussy and difficult for fudge (but I've never tried it), though you might consider using it for fast scoring. ",Athanasius,https://cooking.stackexchange.com/users/15018,http://cooking.stackexchange.com/questions/59494/how-can-i-cut-fudge-smooth-and-uniform,LIFE_ARTS,cooking.stackexchange.com 5715,Why does Membership not show up in Mysite?,"We just upgraded to 2010. When I provision a new SharePoint site, it is now not populating in the SharePoint Site Lists on My Site. (Formerly Memberships in 2007). I have rerun the profile sync and spun around in my chair several times, but no look. Any Ideas? ",Bryan Smith,https://sharepoint.stackexchange.com/users/4416,"Just migrating doesn't actuall ensure that MySite is working. you have to go for the full run, and besides, configure the Membership provider properly. Btw: Did you enabled Claims on your Web Application?? ",Marius Constantinescu - MVP,https://sharepoint.stackexchange.com/users/5306,http://sharepoint.stackexchange.com/questions/17726/why-does-membership-not-show-up-in-mysite,TECHNOLOGY,sharepoint.stackexchange.com 3566,Check if page has breadcrumbs from template,"I want to add a CSS class to my body tag depending on whether the current page has a breadcrumb trail. So I would rather not add a new block, since I don't need any HTML output, but just a PHP array or boolean in my PHTML file. I tried $this->getLayout()->getBlock('breadcrumbs') without success, because the property of Mage_Page_Block_Html_Breadcrumbs which contains the trail (_crumbs) is protected. What is the best way to achieve my goal? ",Plankje,https://magento.stackexchange.com/users/7794,"Personally I would go with what Pronto mentioned about using rewriting the class but if you do not fancy a rewrite you can get the breadcrumb array from the block's cache key information. The cache key information contains as serialized base64 encoded version of the breadcrumbs array so the following code snippet will allow you to get the crumbs array and then you can do what you want with it. $breadcrumbs = Mage::app()->getLayout()->getBlock('breadcrumbs'); $cacheKeyInfo = $breadcrumbs->getCacheKeyInfo(); $breadcrumb = unserialize(base64_decode($cacheKeyInfo['crumbs'])); On pages with breadcrumbs this will be an array and on other pages this will be NULL. ",David Manners,https://magento.stackexchange.com/users/158,http://magento.stackexchange.com/questions/21416/check-if-page-has-breadcrumbs-from-template,TECHNOLOGY,magento.stackexchange.com 6241,How do I find a vacuum leak? I'd highly prefer not to use a carb cleaner spray,"The car is a 1998 Oldsmobile Intrigue with 3.8L V6 engine (3800 Series). I've been doing my research and due diligence, but please understand I'm very inexperienced with automobiles. I went to Autozone and the reading I got from the OBD II tool was a P0171 error code. A lean or rich condition on Bank 1. First, I don't know where Bank 1 is. I have a feeling it's a cracked intake-manifold, an intake-manifold gasket leak, or both. But let's assume I have no clue where the vacuum leak is coming from. And I don't want to use a carb cleaner -- I read that I could cause a fire and I don't think I'm experienced enough to use something like that. I'd prefer to err on the side of caution. I've seen on youtube a long-time mechanic who uses a cigar as a cheap alternative to a smoke test machine. But I'm not sure if something like that could be used if you have no idea where the leak is coming from. So I ask those who are far, far more experienced than me. What ares some methods I can use if I have a vacuum leak, but I literally don't have a clue where it could be? Thank you. ",user717236,https://mechanics.stackexchange.com/users/3296,"if you have an idle and stalling problem with a 3800 series 2, don't mess around with it. change the upper and lower intake manifold gaskets, and the upper plastic intake manifold plenum itself. and cross it off your list. that problem will drive you f-ing nuts. they can leak internally and defy all diagnostics. the lower intake manifold can leak vacuum by pulling from the lifter valley area, under the manifold, from the engine internally. IMPOSSIBLE to find with smoke, spray, etc. just change it. the gaskets are usually mush. ",gary,https://mechanics.stackexchange.com/users/11578,http://mechanics.stackexchange.com/questions/6359/how-do-i-find-a-vacuum-leak-id-highly-prefer-not-to-use-a-carb-cleaner-spray,SCIENCE,mechanics.stackexchange.com 9081,Scatterplots for subsets of multivariate data [Updated],"Update/Re-write There has been a lot of ambiguity over what i'm am trying to do with this question so I have decided to give it a full rewrite. I'm really sorry for the confusion. If you want to see the background please see the edit history. I hope things are clearer now.. I have some data made up into the following fashion: datac = { data1 = RandomReal[1, {7, 3}], data2 = RandomReal[1, {13, 3}], data3 = RandomReal[1, {19, 3}], data4 = RandomReal[1, {16, 3}], data5 = RandomReal[1, {5, 3}] }; data1 through data5 are subsets of a multivariate dataset with 3 independent variables. data1, for example, is composed of 7 individual data points (each with 3 variables). If I use the following function: Needs[""StatisticalPlots`""] pairwisecol[data_, col_] := PairwiseScatterPlot[data, PlotStyle -> col, DataTicks -> True, DataLabels -> {""x"", ""y"", ""z""}] I can create a combined plot comparing the various subsets. E.g. Show[{pairwisecol[data1, Red], pairwisecol[data2, Blue], pairwisecol[data3, Green], pairwisecol[data4, Purple], pairwisecol[data5, Orange]}] This curently has the major drawbacks that each subset has to be defined and have a colour explicitly assigned to it. Also, Show in this instance overlays all of the DataTicks etc, rather than just the elements from the first plot (as is normally the case with Show[{Plot1,Plot2}]). What I'm looking for is a way to use the whole (partitioned) dataset datac to generate such a plot/diagram. i.e. something like, Show[pairwisecol[#, Red] & /@ datac] but, with Red being replaced by a series of colours to represent each subset (like in the plot shown). ...Alternatively, starting with a 2-level list e.g. datap = RandomReal[1, {60, 3}]; and a definition of sublist partitions, parts = {7, 13, 19, 16, 5}; or partspos = {[[1;;7]], [[8;;20]], [[21;;39]], [[40;;55]], [[56;;60]]}; then defining a function something like: pairwiseP[data_, partlist_] := ... that would partition datap into appropriate sublists, create a series of PairwiseScatterPlot's (each with a different plot colour) and then combine them using Show. Note that this example has n = 3 independent variables. I am looking for a method that works for 1 < n < ~20. Can anyone suggest how to do this? ",geordie,https://mathematica.stackexchange.com/users/4626,"Problem with Ticks can be solved by fixing DataRange. I don't know what is the problem with color specification for You, I hope I have not missunderstood anything: Needs[""StatisticalPlots`""] datap = RandomReal[1, {60, 5}]; (*it works for any n*) parts = {12, 13, 12, 13, 5}; (* remember that Total@parts == Length@datap *) colors = {Red, Green, Orange, Blue, Black}; (*or some random, as You like*) data = Take[datap, {1, 0} + #] & /@ (Partition[Prepend[Accumulate@parts, 0], 2, 1]) Show[ PairwiseScatterPlot[data[[ #]], DataRanges -> {{0, 1}, {0, 1}}, DataTicks -> True, PlotStyle -> colors[[ #]], ImageSize -> 500 ] & /@ Range[Length@parts] ] I suspect datap can be splitted in simpler way but I have blockout now in my head. ",Kuba,https://mathematica.stackexchange.com/users/5478,http://mathematica.stackexchange.com/questions/26595/scatterplots-for-subsets-of-multivariate-data-updated,TECHNOLOGY,mathematica.stackexchange.com 2381,What does mathematics have to do with programming?,"I just started a diploma in software development. Right now we're starting out with basic Java and such (so right from the bottom you might say) - which is fine, I have no programming experience apart from knowing how to do ""Hello World"" in Java. I keep hearing that mathematics is pertinent to coding, but how is it so? What general examples would show how mathematics and programming go together, or are reliant on one another? I apologize of my question is vague, I'm barely starting to get a rough idea of the kind of world I'm stepping into as a code monkey student... ",Rory,https://programmers.stackexchange.com/users/48536,"It honestly depends on what sort of programming you're doing. If you're making light web apps with some logic, you probably don't need the more advanced math classes that many degrees require. If you're working with things that are a bit more processor heavy, than you're going to need more math. If you're doing work with any kind of scientific field, you'll really want to keep your calc references at hand. Another place where you'll need math is if you want to write games. The second you want to move diagonally, you'll need to start doing some careful calculations so that you don't end up with characters that accelerate if the move to a block to the NE. That said, you don't necessarily need to learn math, then learn programming. It's perfectly valid to learn programming, then pick up some advanced math. I started coding before I ever set foot inside a Calc or Trig class and did just fine. When I did start learning advanced math, I found that coding really helped me, as I could explore the topic more by changing variables in a quick script than I could with pen and paper. ",kcunning,https://programmers.stackexchange.com/users/48705,http://programmers.stackexchange.com/questions/136987/what-does-mathematics-have-to-do-with-programming,TECHNOLOGY,programmers.stackexchange.com 3930,Modifying a calculated column gives different errors,"I have site column with the following formula: [AmountLeftToPay]/([AmountAssigned]-[AmountReleased]) The problem is the division by zero, sometimes it shows on list items #DIV/0! So I wanted to do the following: =IF([AmountAssigned]-[AmountReleased]=0; 0; [AmountLeftToPay]/([AmountAssigned]-[AmountReleased])) And it shows me the same error in all lists where its used. is not supported. /apps/xx/xx/Lists/Budgets : The formula contains a syntax error or is not supported. If I change ; with commas, The formula contains a syntax error or is not supported. so I got no clue ",Luis Valencia,https://sharepoint.stackexchange.com/users/5032,"You have to write formula like =IF(ISERROR([Column1]/[Column2]),""NA"",[Column1]/[Column2]) Returns NA when the value is an error Hope it helps Regards, Dhaval ",Dhaval Kariya,https://sharepoint.stackexchange.com/users/13683,http://sharepoint.stackexchange.com/questions/59195/modifying-a-calculated-column-gives-different-errors,TECHNOLOGY,sharepoint.stackexchange.com 149,Refused visit a friend visa for Belgium,"I applied for a visa to visit a friend in Belgium last April 28, 2014 and I got the result recently (June 6, 2014) wherein it has been refused. Reasons were: The plan and the circumstances from the intend stay are insufficient. Resolve to leave country before end of visa couldn't be determined. No med-travel insurance. I'm a Filipino citizen and applied from Manila. My boyfriend is sponsoring me. We were confident that I should be able to get the visa, because we both know that we have completed and submitted all the requirements that are needed for the visa. I wanted to appeal the refusal of my visa. What are my options? I haven't yet received the official result of my refusal and will be going to the Belgium Embassy in Manila as per the schedule they have given me. What sort of letter can I do to assist my situation? ",sha,https://travel.stackexchange.com/users/16434,"It's common for embassies to get nervous when your reason is to visit family / spouse / significant other, as sometimes this is what overstayers do - find a way in, and then just don't leave. Therefore, your job is to assure them that: You're not overstaying You're just visiting your significant other You have money to cover your time there You have a return ticket booked You have valid medical insurance to cover your time there, so that you won't be a medical problem for their country To prove you're not trying to overstay and are just visiting, you simply print out your plane tickets showing your return. If you have evidence that you're working or studying at home, a letter from your employer showing you're returning to work at a given date will help, or your uni showing the upcoming courses you're involved in. You'll also need to print bank statements showing your current balance to show you've considered how to cover your time there. If you've only got say, $200 and are planning to stay at the best hotels when asked, it'll raise flags. They're just making sure you don't get into financial difficulty while there. Also make sure you get medical insurance, or show intent to get it (reserved funds) and print that out, showing that you're covered for the duration of the trip. Finally if you have an itinerary (are travelling while there) write it out, so that you can clearly show what your intended journey is, how much it might cost, and so on. A budget may even help! (Not normally required, but at this point, more documentation is good to help convince them). You said you were confident you'd completed all requirements, but the letter clearly indicates you're missing a few things, so hopefully with the above items covered your next application will go more smoothly, and you can enjoy a trip to Belgium! ",Mark Mayo,https://travel.stackexchange.com/users/101,http://travel.stackexchange.com/questions/30314/refused-visit-a-friend-visa-for-belgium,CULTURE,travel.stackexchange.com 1527,Applescript Delay not working since switch to Yosemite,"Ever since I upgraded to Yosemite, Applescripts that use delays have stopped working. How can I fix this? Here's the world's simplest Applescript, for the sake of an easy example: set volume output volume 0 delay 5 set volume output volume 20 delay 5 set volume output volume 0 delay 5 set volume output volume 20 delay 5 set volume output volume 0 delay 5 set volume output volume 20 delay 5 set volume output volume 0 That should take 30 seconds to complete. If I run it in Script Editor (formerly Applescript Editor) it takes 30 seconds to complete. But if I save this script as an app, when I launch the app, the delays are ignored and the app takes a fraction of a second to complete. How can I force Applescript to delay for a specified amount of time before moving on to the next step? Is this a Yosemite glitch? Is there a reliable workaround? ",2oh1,https://apple.stackexchange.com/users/50100,"@2oh1, you have the right basic idea in your answer, but here's a complete and correct answer: The only reasonable way to work around this is to invoke ""delay"" within a loop that ensures the desired duration elapses before continuing. The best way to do this is to override ""delay"" with a custom handler: on delay duration set endTime to (current date) + duration repeat while (current date) is less than endTime tell AppleScript to delay duration end repeat end delay This enables you to leave the rest of your script unchanged and you can use ""delay"" normally, e.g., delay 5 display alert ""I like cake!"" [NOTE: Normally, the custom handler would use ""continue delay duration"" to invoke the built-in ""delay"", but I found that, although this works within Script Editor, it returns an error when used within an applet (“Can’t continue delay. (-1708)”). I worked around that issue by directly telling AppleScript to handle the delay command instead of using ""continue"" to get there.] ",Chris Page,https://apple.stackexchange.com/users/6883,http://apple.stackexchange.com/questions/161749/applescript-delay-command-not-working-since-switch-to-yosemite,TECHNOLOGY,apple.stackexchange.com 3952,Is it possible to compress and obfuscate Javascript code on a fly?,"I came across this great online tool. It has options to compress and obfuscate JS. I am wondering if it is possible to do that on the site on the fly. I know it will slightly slow-down the client, but in my case it is acceptable. I am more concerned about proprietary code I use. I use PHP and jQuery mainly. ",santa,https://stackoverflow.com/users/434218,"Minify does compress and minify (but not obfuscate) on the fly. It will cache the result until the files change. There might be a way to obfuscate as well. ",Ryan Doherty,https://stackoverflow.com/users/956,http://stackoverflow.com/questions/6444249/is-it-possible-to-compress-and-obfuscate-javascript-code-on-a-fly,STACKOVERFLOW,stackoverflow.com 2704,Postgres multiple columns to json,"I am running postgresql 9.3.4. I have a table with 3 fields: id name addr --- ---- ---- 1 n1 ad1 2 n2 ad2 ... I need to move the data to a new table with fields like: id data --- ---- 1 {'name': 'n1', 'addr': 'ad1'} 2 {'name': 'n2', 'addr': 'ad2'} ... row_to_json is not the solution for me as SELECT t.id, row_to_json(t) as data FROM (select id, name, addr from myt) t adds id to the result as well. Is there a way to choose the fields I need (name & addr) in my data field? ",AliBZ,https://dba.stackexchange.com/users/932,"There is a better option with json_build_object() in Postgres 9.4+ SELECT id, json_build_object('name', name, 'addr', addr) AS data FROM myt; But there is also a simpler and faster way with row_to_json() in pg 9.3: SELECT id, row_to_json((SELECT d FROM (SELECT name, addr) d)) AS data FROM myt; SQL Fiddle. Cast to ::text is only for a sanitized display in the fiddle. Related answers: PostgreSQL : select columns inside json_agg Return as array of JSON objects in SQL (Postgres) Return total number of rows and selected (aggregated) data ",Erwin Brandstetter,https://dba.stackexchange.com/users/3684,http://dba.stackexchange.com/questions/90858/postgres-multiple-columns-to-json,TECHNOLOGY,dba.stackexchange.com 8381,What is the best way to calculate total yield on a stock portfolio?,"What is the best way to calculate the total yield of a stock portfolio? I started managing my own investments last year and it looks like I leaned towards dividend investing. I am wondering how I can calculate the total yield of a portfolio. Is there a simple (less accurate) formula for estimating? Anyone know any online tools to do this? ",leeman24,https://money.stackexchange.com/users/30440,"The simplest was is to just divide your total dividends for the year by your starting capital for that year. For example, if you start with $100000 in capital and earn $5000 in dividends during the year your dividend yield for that year would be 5%. Even if you haven't fully invested your total capital during the year it is still available to be invested and the total should be used for the calculation. Once the year has ended you will have a new balance for you capital, which is the value you should use in the following year. An alternative to this calculation is to use your average capital for the year, add your starting and ending capital values and divide by 2. You may want to use this method if you trade often during the year instead of buying all your investments only at the start of the year. Also, another thing to consider is whether you include the dividends as additions to your capital or if you withdrawal dividends when they are paid for your own cashflow. If you reinvest your dividends, then they should be included as part of your capital. ",Victor,https://money.stackexchange.com/users/5466,http://money.stackexchange.com/questions/43504/what-is-the-best-way-to-calculate-total-yield-on-a-stock-portfolio,LIFE_ARTS,money.stackexchange.com 6021,Would Esther really have kept silent?,"In Esther 7:4 we read וְאִלּוּ לַעֲבָדִים וְלִשְׁפָחוֹת נִמְכַּרְנוּ, הֶחֱרַשְׁתִּי--כִּי אֵין הַצָּר שֹׁוֶה, בְּנֵזֶק הַמֶּלֶךְ ... ... But if we had been sold for bondmen and bondwomen, I had held my peace, for the adversary is not worthy that the king be endamaged. Is this true? Had, in fact, the entire Jewish population been sold as slaves Esther would not have said a word about it? Is this simply hyperbole? How do we understand this? ",none,https://judaism.stackexchange.com/users/1255,"The Meam Loez says that she meant that Achashveirosh shouldn't kill the Jews, as he would thereby lose out. Had the Jews been sold as slaves, Achashveirosh could have always changed his mind later on (once realized how useful the Jews are). However, once they would be dead, he couldn't have done anything. ",Shmuel Brin,https://judaism.stackexchange.com/users/732,http://judaism.stackexchange.com/questions/14737/would-esther-really-have-kept-silent,CULTURE,judaism.stackexchange.com 983,Making a C++ app scriptable,"I have several functions in my program that look like this: void foo(int x, int y) Now I want my program to take a string that looks like: foo(3, 5) And execute the corresponding function. What's the most straightforward way to implement this? When I say straightforward, I mean reasonably extensible and elegant, but it shouldn't take too long to code up. Edit: While using a real scripting language would of course solve my problem, I'd still like to know if there is a quick way to implement this in pure C++. ",drby,https://stackoverflow.com/users/52844,"If you only wish to call a function by literal name, you could use linker-specific functions. On POSIX-compliant operating systems (like Linux), you can use dlopen() and dlsym(). You simply parse the input string and figure out the function name and arguments. Then you can ask the linker to find the function by name using dlsym(). On Windows however, these functions aren't available (unless there's some POSIX environment around, like Cygwin). But you can use the Windows API. You can take a look here for details on these things: http://en.wikipedia.org/wiki/Dynamic_loading ",Eduard - Gabriel Munteanu,https://stackoverflow.com/users/59655,http://stackoverflow.com/questions/487416/making-a-c-app-scriptable,STACKOVERFLOW,stackoverflow.com 109,Who are the members of an early design of Luffy's crew?,"Browsing through One Piece wiki, there's a databook series called One Piece Green: Secret Pieces. I found a picture of Mugiwara Pirates early design. This is the picture. I can see Zorro, Luffy, Nami, Sanji, and maybe Usopp, Brook, and Chopper. But who is the other two on the left? Did Robin and Franky replace them? Is there any official information about this picture? ",Darjeeling,https://anime.stackexchange.com/users/2869,"I have no good references but: The mini character was supposed to be the shipwright and was replaced by Franky. The other one was meant to be a plant obsessed character who was replaced by Robin and largely incorporated into the post time skip Ussop. ",kaine,https://anime.stackexchange.com/users/3561,http://anime.stackexchange.com/questions/8631/who-are-the-members-of-an-early-design-of-luffys-crew,CULTURE,anime.stackexchange.com 9321,Upper bound for the norm of inverse Fourier tansform,"Recall Hausdorff-Young inequality: For any $f\in L^p(\mathbb{R}^n)$, we have $||\hat{f}||_q\le ||f||_p$, where $p$ and $q$ are conjugate exponents and $p\in[1,2]$. It seems to me that it follows that $||f||_q\le ||\check{f}||_p$ by Fourier inversion. My question is: Is there an inequality that we can use to bound the norm of $\check{f}$ by the norm of $f$? ",Tony B,https://math.stackexchange.com/users/16418,"Be more careful with the exponents of the $L^p$ spaces, in which $f$ and $\hat f$ belong. If $f\in L^1$, then $\hat f\in L^\infty$, and $\|\hat f\|_\infty\le\|f\|_1$. For a dense subset of $L^2$, the $\hat f$ is definable as an element of $L^2$, and $\|f\|_2=\|\hat f\|_2$, and the Fourier transformation is hence definable using a density argument in the whole $L^2$. Hausdorff-Young is an interpolation of the two inequalities. The inverse Fourier transform has almost identical definition, and thus satisfies the same inequalities, and it can only belong in $L^p$, $p\ge 2$. Note that the inversion, $\mathcal F^{-1}{\mathcal F}f=f$, holds in $L^2$. ",Yiorgos S. Smyrlis,https://math.stackexchange.com/users/57021,http://math.stackexchange.com/questions/618064/upper-bound-for-the-norm-of-inverse-fourier-tansform,SCIENCE,math.stackexchange.com 1410,How should I store leftover rice noodles?,"I seem to recall reading somewhere that you should store leftover cooked rice noodles in water. Is this right? I don't want them to bloat and become ruined. I also seem to recall reading somewhere you could revive stuck pasta by running it in (cold?) water. How should I store leftover cooked rice noodles to best preserve them for a day or two? UPDATE: I tried storing them in cold water, and that's definitely not the way to go; the rice noodles bloated to about double their original thickness. They taste fine, just not what I was looking to accomplish. ",Jeff Axelrod,https://cooking.stackexchange.com/users/2690,"From the point of view of someone who used to work in a Chinese restaurant, we used to prepare vermicelli which are really thin rice noodles by soaking the uncooked dry noodles in cold water for about 1 hour or until it is flexible. We then can store this soaked, but uncooked noodle covered with a plastic wrap in the refrigerator for several days. They don't need to be oiled. To cook it, we just submerge it in boiling water for about a minute and then prepare it however we need it. With the soak it takes practically no time to cook at all. Perhaps in the future you can follow this method and pre-soak your noodles. Then you can use however much noodles you need from that batch and save the rest for later. Plus it'll save on cooking time. ",Jay,https://cooking.stackexchange.com/users/8305,http://cooking.stackexchange.com/questions/32326/how-should-i-store-leftover-rice-noodles,LIFE_ARTS,cooking.stackexchange.com 9280,Reliable udp broadcast libraries?,"Are there any libraries which put a reliability layer on top of UDP broadcast? I need to broadcast large amounts of data to a large number of machines as quickly as possible, and generally it seems like such a problem must have already been solved many times over, but I wasn't able to find anything except for the Spread toolkit, which has a somewhat viral license (you have to mention it in all materials advertising the end product, which I'm not sure our customer will be willing to do). I was already going to write such a thing myself (because it would be extremely fun to do!) but decided to ask first. I looked also at UDT (http://udt.sourceforge.net) but it does not seem to provide a broadcast operation. PS I'm looking at something as lightweight as a library - no infrastructure changes. ",jkff,https://stackoverflow.com/users/278042,"Have a look around the IETF site for RFCs on Reliable Multicast. There is an entire working group on this. Several protocols have been developed for different purposes. Also have a look around Oracle/Sun for the Java Reliable Multicast Service project (JRMS). It was a research project of Sun, never supported, but it did contain Java bindings for the TRAM and LRMS protocols. ",EJP,https://stackoverflow.com/users/207421,http://stackoverflow.com/questions/4991659/reliable-udp-broadcast-libraries,STACKOVERFLOW,stackoverflow.com 7501,How to change port number in vino?,"How to change port number in vino ubuntu 11.10? Cannot find option to change from port 5900 on vino vnc 'remote desktop' window, nor can I find it via gconf-editor as was available in previous ubuntu version. Please help ",Matt Perry,https://askubuntu.com/users/29396,"On Ubuntu 14.10, gconf-editor was required. dconf-editor set a value, but it was not used, and displayed as 0 (5900) in gconf-editor. sudo apt-get install gconf-editor gconf-editor ",rickfoosusa,https://askubuntu.com/users/106250,http://askubuntu.com/questions/69965/how-to-change-port-number-in-vino,TECHNOLOGY,askubuntu.com 2486,Paradoxes without self-reference?,"Most paradoxes involves self-reference, the only exception known to me is Yablo's paradox, however it is still debated if it is really without self-reference. So, I was wondering, are there other known paradoxes that works without self-reference? ",Trapszan,https://math.stackexchange.com/users/91616,"A famous one was given by the Harvard logician WVO Quine (look up Quine's paradox for more information): ""Yields falsehood when preceded by its quotation"" yields falsehood when preceded by its quotation. When I first saw it I had to take a minute to parse what it was saying and why it wasn't self-referencing. ",josh,https://math.stackexchange.com/users/25488,http://math.stackexchange.com/questions/475849/paradoxes-without-self-reference,SCIENCE,math.stackexchange.com 8374,Which Windows 7 to install?,"I have 2GB of RAM on my laptop, which is the max. Should I install 32 bit version or 64 bit version? ",AngryHacker,https://superuser.com/users/2805,"For any PC with less than 3GB of RAM I would go for 32-bit Windows. If you plan on upgrading your RAM and you are sure you can get 64-bit drivers for all your hardware, go with 64-bit Windows. You probably won't find many Windows 7 drivers yet, but 64-bit Vista drivers should do fine. 32-bit software usually runs fine on 64-bit Windows 7 (and Vista). Since I started using Vista 64-bit (around the time it got released), I've only experienced problems two times and only one was a complete failure. An average user should not have any problems using 32-bit software when 64-bit is not available. ",Tor-Erik,https://superuser.com/users/4498,http://superuser.com/questions/17917,TECHNOLOGY,superuser.com 1392,Installing Theme for magento 1.9.0 pagayo,"Uploaded the files, saw it in design, put it as active today. Cleared the cache and it didn't show, then disable the cache and it still pointing to /default vs. pt003 ",Dan,https://magento.stackexchange.com/users/9621,"Go to System > Configuration > Design > Pacage and System > Configuration > Design > Package and change some configurations.like replave yourtheme from the image with the pt003. then save and clear cache and check frontend. ",Pradeep Sanku,https://magento.stackexchange.com/users/4556,http://magento.stackexchange.com/questions/25159/installing-theme-for-magento-1-9-0-pagayo,TECHNOLOGY,magento.stackexchange.com 1573,Why is CuSO4 used as electrolyte while purifying copper?,"During the electrolytic purification of copper, the electrolyte is taken as copper(II) sulphate ($\ce{CuSO_4}$). Is there any particular reason for this? Could another salt of copper, say $\ce{CuCl_2}$ work? I mean, I don't see any reason why it shouldn't. The only difference will be, that at the anode chlorine instead of oxygen will be evolved, which doesn't seem to be such a big thing. Why, then, is $\ce{CuSO_4}$ preferred? ",Gerard,https://chemistry.stackexchange.com/users/1888,"During copper electrorefining, impure $\ce{Cu}$ from the anode is oxidized and dissolved, while $\ce{Cu^2+}$ is reduced at the cathode, forming the deposit of refined copper. Because anodic impurities which are less noble than copper – most notably $\ce{Ni}$, $\ce{As}$ and $\ce{Sb}$ – also dissolve in the electrolyte, the cell voltage is kept in the range of 0.2-0.4 V to avoid co-deposition of these metals at the cathode. Copper dissolution is the main oxidation half-reaction at the anode, and the oxidation of anions from the electrolyte needs to be minimized, since it is an unwanted side reaction which reduces current efficiency of the process. In a $\ce{CuSO4}$ electrolyte, this would be oxidation of $\ce{OH-}$ (from water dissociation, so concentration will be low) to $\ce{O2}$, while in a $\ce{CuCl2}$ solution, $\ce{Cl-}$ will be oxidized to chlorine gas, which would present a greater hazard because of its toxicity. The electric conductivity of the electrolyte is another important factor, which varies with different copper salts and their concentrations. $\ce{CuCl2}$ and $\ce{CuSO4}$ are both readily soluble in water; however, the relative molar conductivities of these solutions will be different. In this study, a copper chloride electrolyte proved to be inferior to copper sulfate and copper nitrate in terms of deposit quality and stability of cell potential. ",Jannis Andreska,https://chemistry.stackexchange.com/users/5016,http://chemistry.stackexchange.com/questions/6778/why-is-cuso4-used-as-electrolyte-while-purifying-copper,SCIENCE,chemistry.stackexchange.com 3368,Client Object Model - How can I access a List using relativeServerUrl,"I am using the client object model and I want to access a List using the server relative Url. Folders can be accessed using the web.GetFolderByServerRelativeUrl but no such function exists for lists. The available API is web.Lists.GetByID and web.Lists.GetByTitle which I can't use (The list title is different from the listname/listpath) ",Ami Luttwak,https://sharepoint.stackexchange.com/users/9671,"Try this: public List GetListByRelativeUrl(String relativeUrl) { List existingList; Web web = context.Web; ListCollection lists = web.Lists; IEnumerable<List> existingLists = context.LoadQuery( lists.Where( list => list.RootFolder.ServerRelativeUrl == relativeUrl) ); context.ExecuteQuery(); existingList = existingLists.FirstOrDefault(); return existingList; } Each list has a root folder - you can find it by using the ServerRelativeUrl property. ",Roy Reznik,https://sharepoint.stackexchange.com/users/9010,http://sharepoint.stackexchange.com/questions/42332/client-object-model-how-can-i-access-a-list-using-relativeserverurl,TECHNOLOGY,sharepoint.stackexchange.com 1207,Silicone caulk for shower and tub?,"I am about to seal the gap between my tub and the wall tile with caulk (it was originally grout which cracked so I chiseled out what I could). I was planning to use silicone caulk (GE II), but a contractor suggested that pure silicone is not ideal since all caulk will eventually need to be removed and replaced and silicone is very difficult to remove. There's some logic to this, so I'm wondering - is he right? If so, what kind of caulk should I use? ",Jonathan,https://diy.stackexchange.com/users/25390,"That gap is to small. Push really hard with the float to completely fill it with grout, giving it one more shot; next time caulk it. Caulked tub surrounds are one of my pet peeves; I'm the one who gets to scrape that mess out. Whether grout or caulk, I like Some Guy's advice: prestress the tub by filling it with water as you work. ",Mazura,https://diy.stackexchange.com/users/23295,http://diy.stackexchange.com/questions/62566/silicone-caulk-for-shower-and-tub,LIFE_ARTS,diy.stackexchange.com 471,Is SourceSafe really safe?,"Having spent all morning trying to check something in - I now realise I've lost a couple of days worth of work. Its happened before - and is apparently common occurrence with SourceSafe. Can SourceSafe be used successfully, without problems, and if so, how? ",billy.bob,https://programmers.stackexchange.com/users/4630,"used it for years - it was the default solution, as it was already there. Had it bite me quite a few times, but inertia is difficult to overcome then i had to use it remotely over VPN, and even minor check-ins were like stuffing a brick through a pinhole. It was faster to manually find the files that changed, zip them up, email them, remote in to the source vault machine, unzip them, and check in the code from the source vault machine. Switched to Mercurial. I can clone the entire source code base across the VPN in under a minute. And I no longer fear branching. Never going back. ",Steven A. Lowe,https://programmers.stackexchange.com/users/906,http://programmers.stackexchange.com/questions/24910/is-sourcesafe-really-safe,TECHNOLOGY,programmers.stackexchange.com 5818,Does having a US drivers' license reduce car insurance versus a Dutch drivers' license in the US?,"I am currently studying in Buffalo, NY and have no need for a car. However, I may want to go on a road trip and the end of my stay on the west coast. Will it make insurance cheaper to get a driving licence here if I want to rent or buy a car for 4 weeks? I am in possession of a Dutch driving licence. Also, do they make a distinction between in-state and out-of-state licences when renting a car? ",Patrick,https://travel.stackexchange.com/users/7756,"The exact requirements vary from state to state, but in New York it appears that there is no requirement for you to get a NY Drivers License (as opposed to some other states where once you have been a resident for more than 3 months your home country drivers license is no longer valid). However on a J1 visa you can optionally get a local drivers license, as long as your visa length is greater than 1 year, AND you have at least 6 months of validity on the visa remaining. As far as whether it's worth doing this for the purpose of insurance, it depends on what type of insurance you are after. For rental car insurance, there is no difference in cost of the insurance depending on the type of license you have. If you are getting the insurance from the rental car company (CDP/LDW/etc) then they will not vary it depending on the type of license you have. If you are getting it via travel insurance or credit card insurance then again it will not vary based on your license - but be sure to read the fine print to make sure it's covered! If you are looking at buying a car, then it will make a difference, but be prepared for a shock either way. Many insurance companies will not offer you insurance if you do not have a US drivers license. I've been told there are some that will - especially for medium-term tourists - but expect to pay a lot for it. If you do have a US drivers license then you will be able to get coverage, but it will not be cheap. Every insurance company I've ever looked at will ask you how long you've been licensed in the US, and will penalize you heavily for anything below 18 months/3 years/5 years (depending on the company). Most will also ask how long you've held a license in another country, and may reduce the price slightly due to your overseas license - but it won't be by much. Plugging your details, along with those of the type of car you might consider buying, into some of the insurance companies websites will probably be very telling for you - both in terms of whether they will allow you to purchase coverage without a US license, and how much they will charge with only 1-2 months license history in the US. ",Doc,https://travel.stackexchange.com/users/984,http://travel.stackexchange.com/questions/21737/does-having-a-us-drivers-license-reduce-car-insurance-versus-a-dutch-drivers-l,CULTURE,travel.stackexchange.com 6344,What is meant by Engine Life Factor(ELF). Should I consider it while buying a vehicle? If so why is it not widely quoted?,"The term Engine life factor going by the name suggests that higher the value more is the life of the engine. If so why doesn't companies specify this as a part of their standard specifications? ",BraveNinja,https://mechanics.stackexchange.com/users/4192,"ELF or Engine Life Factor is a calculated number: ELF = 100,000/Max RPM x CR where: RPM = Revs per minute and CR = Compression ratio It is supposed to indicate the longevity of an engine by reducing the ""number"" by how fast the engine is able to run and what its numerical compression ratio. I see some major flaws in this thinking. First, it doesn't take into account how the engine is built. For instance, the difference between a turbo charged engine and a normally aspirated engine. In order to get the performance out of a purpose built turbo charged engine, you lower the compression ratio to allow the turbo to produce more boost with less fear of pre-detonation. This allows for great HP output with out the damaging affects of the dread ""knock"". Yet, a turbo charged engine will absorb a greater amount of abuse. You can usually bet the turbo engine would not last as long as a normally aspirated one. Second, this also does not take into account maintenance of an engine. An owner which takes care of a car's engine by utilizes premium filters and lubricants, performs all maintenance on-time, and doesn't abuse his vehicle can expect the engine to last an exceedingly longer time than someone who doesn't perform the same maintenance regime and abuses it. This major factor is nowhere factored into this equation (with no real way to do it either). (NOTE: I'm sure I could come up with more reasons, but think this is sufficient for showing my point.) Realistically, this is just an arbitrary number which might be assigned to an engine based on some very unrealistic factors which have nothing really to do with longevity. While having no proof, this is probably a ""real"" reason why manufacturers don't utilize this number. ",Pᴀᴜʟsᴛᴇʀ2,https://mechanics.stackexchange.com/users/4152,http://mechanics.stackexchange.com/questions/13224/what-is-meant-by-engine-life-factorelf-should-i-consider-it-while-buying-a-ve,CULTURE,mechanics.stackexchange.com 694,How to change port number in vino?,"How to change port number in vino ubuntu 11.10? Cannot find option to change from port 5900 on vino vnc 'remote desktop' window, nor can I find it via gconf-editor as was available in previous ubuntu version. Please help ",Matt Perry,https://askubuntu.com/users/29396,"There is a brainstorm idea that was closed because it was thought of as a bug report: http://brainstorm.ubuntu.com/idea/25109/ Here is another question regarding this and the second answer mentions how to do it but I recommend using iptables: Enable remote VNC from the commandline? UPDATE - As mentioned by the answer from Oli that would be the way to do it until the vino-preferences readds the option again. ",Luis Alvarado,https://askubuntu.com/users/7035,http://askubuntu.com/questions/69965/how-to-change-port-number-in-vino,TECHNOLOGY,askubuntu.com 730,Able to Access Elements with Index Greater than Array Length,"The following code seems to be running when it shouldn't. In this example: #include <iostream> using namespace std; int main() { char data[1]; cout<<""Enter data: ""; cin>>data; cout<<data[2]<<endl; } Entering a string with a length greater than 1 (e.g., ""Hello""), will produce output as if the array were large enough to hold it (e.g., ""l""). Should this not be throwing an error when it tried to store a value that was longer than the array or when it tried to retrieve a value with an index greater than the array length? ",mattsbox,https://stackoverflow.com/users/1450610,"It is not safe to be doing this. What it is doing is writing over the memory that happens to lie after the buffer. Afterwards, it is then reading it back out to you. This is only working because your cin and cout operations don't say: This is a pointer to one char, I will only write one char. Instead it says: enough space is allocated for me to write to. The cin and cout operations keep reading data until they hit the null terminator \0. To fix this, you can replace this with: std::string data; C++ will let you make big memory mistakes. Some 'rules' that will save you most of the time: 1:Don't use char[]. Instead use string. 2:Don't use pointers to pass or return argument. Pass by reference, return by value. 3:Don't use arrays (e.g. int[]). Use vectors. You still have to check your own bounds. With just those three you'll be writing some-what ""safe"" code and non-C-like code. ",Rhexis,https://stackoverflow.com/users/1215218,http://stackoverflow.com/questions/10992464/able-to-access-elements-with-index-greater-than-array-length,STACKOVERFLOW,stackoverflow.com 7460,Should we allow or avoid non-standard pronouns?,"This question brings up an important question: Do we want to allow or avoid the use of non-standard English such as the words zie and zir as non gender specific pronouns on this site? ",Flimzy,https://meta.christianity.stackexchange.com/users/20,"Considering we are accepting all comers as far as self claiming Christians, we might as well accept all comers as far as self proclaimed pronouns too. It is in the spirit of religious and lingual tolerance that we accept them. This tolerance is of course limited by the fact that this is an English site, these however, while not exactly English are an attempt at correcting an issue in the English language.. ",wax eagle,https://meta.christianity.stackexchange.com/users/49,http://meta.christianity.stackexchange.com/questions/514/should-we-allow-or-avoid-non-standard-pronouns,CULTURE,meta.christianity.stackexchange.com 4270,Networking Questions: Serialization and Frequent Small Packets or Fewer Large Packets,"I'm working with a socket server and I'm trying to decide how to update all of the clients. I'm currently sending few packets with entire objects serialized in JSON. In most cases this adds a lot of overheard in the form of unneeded data. This to me is a no brainer, get rid of the serialization and send only what is needed. Lets say I have four server-side AIs. Should I send all four of the AIs in one giant update, therefore serializing only the needed data or should I send each one in a separate update? ",seethru,https://gamedev.stackexchange.com/users/24156,"When you send small messages, you have to be aware of the protocol overhead: Imagine you are sending a 10 byte message. A TCP header is 24 bytes, an UDP header is 8 bytes. Assuming you use UDP, you have 18 bytes in total. But you also have the IP header, which is at least an additional 20 bytes in IPv4 or 40 bytes in IPv6. That's 38 bytes in total when you use IPv4. And then you also have the ethernet frame around all that, which is (usually) another 42 bytes. So you are at 80 bytes. That's 7 times as much protocol overhead as the data you were sending. As you see, sending small data messages is not very bandwidth-efficient because there is a fix-cost of 70 bytes of protocol overhead for each message. to visualize this better, seventy bytes is as much data as this string But delaying small messages just so you can send more at the same time is often not a good idea either, because this will make the game feel more laggy. There is no golden hammer solution to finding the ideal compromise for this. But all data which is available at the same time should be sent in one message instead of separating it into multiple. There is nothing to gain and a lot to lose by adding unnecessary fragmentation on the application level. (Image source: http://en.wikipedia.org/wiki/File:UDP_encapsulation.svg) ",Philipp,https://gamedev.stackexchange.com/users/21890,http://gamedev.stackexchange.com/questions/50878/networking-questions-serialization-and-frequent-small-packets-or-fewer-large-pa,TECHNOLOGY,gamedev.stackexchange.com 672,"Possessive-S/apostrophe in a list, including the first and second person","When adding possessive-S/apostrophe to a list, the rule is only the last person has the apostrophe if the item is shared, or everyone has one if they have the items each, e.g. John and Mary's houses = the houses that belong jointly to John and Mary. John's and Mary's houses = the houses that belong to John and Mary as individuals, at least one each. However, I am curious if the rules are slightly different when possessive pronouns are used for a single item. You and Mary's house OR your and Mary's house? I'm even more unclear when the first person is involved. Mary and my house OR Mary's and my house? Finally, when there are at least three people, including the first person, does the last named person have the possessive-S/apostrophe, or all/none of them? John, Mary and my house John, Mary's and my house John's, Mary's and my house I'd be very grateful to anyone able to clarify this, ideally with a some form of reference, as I can't find it anywhere. There have been several suggestions to use ""our"", yet if the text refers to a group of people, all of whom own co-own houses with some others within the group*, then the above style wording would be necessary, so my question stands. * eg I own a house with John and Mary, I co-own another with Peter and yet another with Philip and Sarah. ",ColinT,https://english.stackexchange.com/users/98225,"If there is one house it is clear in any form, but if there are several houses, as you point out, then it can be ambiguous. ""John, Mary, and my houses"" would be different than ""John's, Mary's, and my houses."" That being said, ""Our houses are all on Oak Street,"" tells us little about ownership. I get that you are not trying to avoid the rule, but to avoid ambiguity, which is the reason for rules, we need to provide additional information. ",Steve,https://english.stackexchange.com/users/99835,http://english.stackexchange.com/questions/209028/possessive-s-apostrophe-in-a-list-including-the-first-and-second-person,CULTURE,english.stackexchange.com 7866,Representation of negative integers,"Does ISO-Prolog have any prescriptions / recommendations regarding the representation of negative integers and operations on them? 2's complement, maybe? Asking as a programmer/user: Are there any assumptions I can safely make when performing bit-level operations on negative integers? ",repeat,https://stackoverflow.com/users/4609915,"Strictly speaking these are two different questions: Actual physical representation: this isn't visible at the Prolog level, and therefore the standard quite rightly has nothing to say about it. Note that many Prolog systems have two or more internal representations (e.g. two's complement fixed size and sign+magnitude bignums) but present a single integer type to the programmer. Results of bitwise operations: while the standard defines these operations, it leaves much of their behaviour implementation defined. This is a consequence of (a) not having a way to specify the width of a bit pattern, and (b) not committing to a specific mapping between negative numbers and bit patterns. This not only means that all bitwise operations on negative numbers are officially not portable, but also has the curious effect that the result of bitwise negation is totally implementation-defined (even for positive arguments): Y is \1 could legally give -2, 268435454, 2147483646, 9223372036854775806, etc. All you know is that negating twice returns the original number. In practice, fortunately, there seems to be a consensus towards ""The bitwise arithmetic operations behave as if operating on an unlimited length two's complement representation"". ",jschimpf,https://stackoverflow.com/users/2353967,http://stackoverflow.com/questions/30210801/representation-of-negative-integers,STACKOVERFLOW,stackoverflow.com 6089,Events management using SDL 2.0,"I wrote a simple SDL program using SDL 2.0. I have a little problem when I want to check the mouse wheel events. Actually, in the version 2.0 the flags SDL_BUTTON_WHEELDOWN and SDL_BUTTON_WHEELUP no longer exist. There is just the flags SDL_MOUSEWHEEL. The code below check correctly the' WHEELUP' and 'WHEELDOWN' events but with the same flag. while(!terminer) { while (SDL_PollEvent(&evenements)) { switch (evenements.type) { case SDL_QUIT: terminer = true; break; case SDL_KEYDOWN: switch (evenements.key.keysym.sym) { case SDLK_ESCAPE: terminer = true; break; } break; case SDL_MOUSEMOTION: std::cout << ""MOUSE : MOVE"" << std::endl; break; case SDL_MOUSEBUTTONUP: case SDL_MOUSEBUTTONDOWN: std::cout << ""MOUSE : BUTTON DOWN"" << std::endl; break; case SDL_MOUSEWHEEL: std::cout << ""MOUSE : WHEEL"" << std::endl; break; } } But I would like to handle separately the 'WHEELUP' and 'WHEELDOWN' events. I tried several others flags in my condition but without success. Does anyone can help me, please ? Thanks a lot in advance for your help. ",user1364743,https://gamedev.stackexchange.com/users/29352,"According to the SDL documentation: Movements to the left generate negative x values and to the right generate positive x values. Movements down (scroll backward) generate negative y values and up (scroll forward) generate positive y values. So in your case, you could modify the code as such: case SDL_MOUSEWHEEL: if(evenements.x < 0) { std::cout << ""MOUSE : WHEEL LEFT"" << std::endl; } else if(evenements.x > 0) { std::cout << ""MOUSE : WHEEL RIGHT"" << std::endl; } if(evenements.y < 0) { std::cout << ""MOUSE : WHEEL DOWN"" << std::endl; } else if(evenements.y > 0) { std::cout << ""MOUSE : WHEEL UP"" << std::endl; } break; ",Thebluefish,https://gamedev.stackexchange.com/users/39686,http://gamedev.stackexchange.com/questions/71551/events-management-using-sdl-2-0,TECHNOLOGY,gamedev.stackexchange.com 6620,Difficulties with re-using a variable,"here is a part of my code : class projet(object): def nameCouche(self): valLissage = float(ui.valLissage.displayText()) return (valLissage) valCouche = nameCouche() # asks for a positional argument but 'self' doesnt work def choixTraitement(self): ui.okLissage.clicked.connect(p.goLissage) def goLissage(self, valCouche): if ui.chkboxLissage.isChecked(): print(valCouche) # result is False os.system(r'""C:\Program Files\FME\fme.exe"" D:\Stelios\..... --MAX_NUM_POINTS {0}'.format(valCouche)) So I would like to use valCouche in goLissage method but it doesnt work. I thought that valCouche would have the argument of valLissage but instead it gives False as a value. I've tried different alternatives but still doesnt work. ",guy16,https://stackoverflow.com/users/4862605,"you have to define an initialization function: def__init__(self) defining valCouche as an instance attribute make it accessible on all the method so we have the following class projet(object): def __init__(self): self.valCouche = '' def nameCouche(self): self.valCouche = float(ui.valLissage.displayText()) @staticmethod #here there is no need for self so it is a method of class def choixTraitement(): ui.okLissage.clicked.connect(p.goLissage) def goLissage(self): if ui.chkboxLissage.isChecked(): print(self.valCouche) # result is False os.system(r'""C:\Program Files\FME\fme.exe"" D:\Stelios\..... --MAX_NUM_POINTS {0}'.format(self.valCouche)) ",Narcisse Doudieu Siewe,https://stackoverflow.com/users/3238855,http://stackoverflow.com/questions/30344855,STACKOVERFLOW,stackoverflow.com 6997,"Improper shutdown, now 3 flashes on boot","I had to do a hard power off on my Pi, as it had crashed. Now, when I turn it on, I get 3 flashes of the OK LED, which means either loader.bin or start.elf is not found. I have plugged the SD card into my Windows PC to browse the boot partition and neither of those files is present. Is there any way to repair the boot partition and allow the Pi to boot without losing any data on the card? I have important data that hasn't been backed up yet on the card. ",colincameron,https://raspberrypi.stackexchange.com/users/2908,"You could: Backup the card. Reflash the card with your OS, which would also fix the boot partition. Copy the files you want back to your card. ",Zéychin,https://raspberrypi.stackexchange.com/users/4025,http://raspberrypi.stackexchange.com/questions/4233/improper-shutdown-now-3-flashes-on-boot,TECHNOLOGY,raspberrypi.stackexchange.com 4989,What is done in a workshop? How does it differ from an academic conference?,"I have researched some, but I still don't know what is carried out in workshops. What activities are arranged? What are they difference from conferences? ",bryant1410,https://academia.stackexchange.com/users/14250,"In CS subfields related to HCI and related topics of communication between users and software, a workshop is almost the same as a conference, that is, there are speakers who give talks about their papers. However, the following differences can be observed: Organisational: A workshop lasts just one or half a day. A workshop is ""embedded"" into a conference; it doesn't take place on its own, but it takes place at the day before or after the main conference. Sometimes, conference registration includes workshop registration. The audience tends to be much smaller. This is partially because often, several workshops are scheduled at the same time, and partially, because not all conference guests attend any workshops (especially when the workshop needs to be registered and paid for separately). In any case, it is not untypical for smaller workshops to have just a handful of attendees, each of which will present something. Contents: There is less of an expectation of presenting fully finished work. Work in progress, or results based on a preliminary study, are usually accepted, if not explicitly invited. Likewise, remarks about future work can be a bit more central than in normal talks, as the workshop may prove as an opportunity to find collaborators who would like to help tackle the suggestions for future work. While conference sessions typically feature an opportunity for questions and answers on every single paper right after each talk, workshops sometimes schedule an additional (sometimes considerable in duration) wrap-up discussion that is supposed to provide some time for discussing everything that was presented during the workshop, identifying common issues and chances, and possibly developing ideas for further work together. ",O. R. Mapper,https://academia.stackexchange.com/users/14017,http://academia.stackexchange.com/questions/44296/what-is-done-in-a-workshop-how-does-it-differ-from-an-academic-conference,LIFE_ARTS,academia.stackexchange.com 902,Effects of nuclear explosions in space?,"In the Honor Harrington universe, ship-to-ship combat takes two forms: missiles and direct energy weapons. Missiles come in two forms - bomb-pumped lasers and contact nukes. Both use multi-megaton nuclear initiations to damage enemy ships. While this sort of event on a planetary surface will obviously have lasting effects, what long-term effects could be expected in a vacuum environment, aside from the destructive force associated with the explosions themselves, and the resulting EMP? Especially, would there be lingering (or spreading) radiation? ",Jeff,https://scifi.stackexchange.com/users/656,"Space is full of radiation. Its probably one of the greatest dangers we face in space exploration that we do not have a good solution for. In 1962 the US Detonated a nuke in space. The radiation from this is just background noise. While there are likely to be some highly radioactive particles as a result of the explosion these will disperse so quickly that there would be far greater damage from the explosion in any area where these would be of a concentration to be a concern. ",Chad,https://scifi.stackexchange.com/users/2131,http://scifi.stackexchange.com/questions/4089/effects-of-nuclear-explosions-in-space,LIFE_ARTS,scifi.stackexchange.com 3549,Weird crash using Restkit MainQueueManagedObjectContext - EXC_BAD_ACCESS,"Sometimes when I call saveToPersistent on the RestKit MainQueueManagedObjectContext I get the following error and the app crashes. CoreData: error: Serious application error. Exception was caught during Core Data change processing. This is usually a bug within an observer of NSManagedObjectContextObjectsDidChangeNotification. -[UIBarButtonItem controllerWillChangeContent:]: unrecognized selector sent to instance 0x21e70300 with userInfo (null) [UIBarButtonItem controllerWillChangeContent:]: unrecognized selector sent to instance 0x21e70300 with userInfo (null) It seems that there are some kind of threading problem. I save the context via a method like so: - (BOOL)saveMainContext { __block BOOL contextSaved = NO; [[[[CoreDataManager sharedInstance] objectStore] mainQueueManagedObjectContext] performBlockAndWait:^{ NSError *error = nil; if ([[[[CoreDataManager sharedInstance] objectStore] mainQueueManagedObjectContext] saveToPersistentStore:&error]) { contextSaved = YES; } }]; return contextSaved; } It crashes on the saveToPersistent method with EXC_BAD_ACCESS. How can I fix this and what could be the reason for my NSFetchresultscontroller calling a method on a UIBarButtonItem? ",7c9d6b001a87e497d6b96fbd4c6fdf,https://stackoverflow.com/users/1723514,"Your saveMainContext method should only be called from the main thread and should simply be implemented as: - (BOOL)saveMainContext { NSError *error = nil; if ([[[[CoreDataManager sharedInstance] objectStore] mainQueueManagedObjectContext] saveToPersistentStore:&error]) { contextSaved = YES; } else { NSLog(@""Save error: %@"", error); } return contextSaved; } Calling an instance of UIBarButtonItem suggests that you have a memory management issue in that something which is observing the context save is not removing itself before it is deallocated. Check all of your observers. ",Wain,https://stackoverflow.com/users/1988185,http://stackoverflow.com/questions/22744773/weird-crash-using-restkit-mainqueuemanagedobjectcontext-exc-bad-access,STACKOVERFLOW,stackoverflow.com 393,InstallHandler runs under a special ghost user. What rights does it have?,"When you install a managed package with a post-install script, Salesforce creates a special ghost user under which all of the post install activities occur. I think this is undocumented. Here are some details. This can be great from an audit point of view (you can see which package has 'touched' all the data). But can problematic in several examples: Certain objects are inaccessible by SOQL (I've found CronTrigger and ApexClass so far) Scheduled Jobs (and any code they call) will forever run under the post-install context, Batch Jobs execute as the post-install user and suffer the same issues above, I've tried querying the user by id in SOQL to no avail, and the debug log monitor don't record anything. How crippled is this special ghost user? Does he have a documented profile? Edit: I've emailed myself some post install context UserInfo return values. Interesting ones in bold: UserType: LicenseManager (Aha! Who knows what privileges he has!?) ProfileId: 00eF0000000XXXXAAA (viewing URL gives Insufficient Privileges!) UserName: 033g0000000XXXXAAA@00df0000000XXXXAAA (package-id@org-id) UserId: 005F0000003XXXXAAA (viewing URL gives Insufficient Privileges!) Email: noreply@salesforce.com DefaultCurrency: USD FirstName: null Language: en_US LastName: [managed package name] Locale: en_US Name: [managed package name] OrganizationId: [installing org id] OrganizationName: [installing company name] SessionId: null TimeZone: America/Los_Angeles UiTheme: Theme3 UiThemeDisplayed: Theme3 UserRoleId: null ",bigassforce,https://salesforce.stackexchange.com/users/320,"After trial and error investigation, it appears the InstallHandler can run with unlimited privileges given one special condition; the InstallHandler implementor must have without sharing annotation. Running without sharing allows the install user context to: view all data modify all data interrogate system data (like CronTrigger and ApexClass) The install user context cascades into any Batch Apex and Scheduled Apex jobs that are invoked as part of the post install script. If those classes are also annotated without sharing, it offers the capability of long-running ""super user"" processes. ",bigassforce,https://salesforce.stackexchange.com/users/320,http://salesforce.stackexchange.com/questions/32607/installhandler-runs-under-a-special-ghost-user-what-rights-does-it-have,TECHNOLOGY,salesforce.stackexchange.com 6762,Purification of Ethanol,"In Vogel's organic book, they have mentioned that in the Lund and Bjerrum method of purification of ethanol, magnesium is added, which forms ethanolate. But they said to activate the magnesium first by iodine. Why is the activation needed and how exactly does this activation process work in the activation of magnesium? ",Punarbasu Roy,https://chemistry.stackexchange.com/users/14874,"The refluxing of methanol or ethanol over magnesium is indeed the method of choice to dry these solvents. As far as the iodine is concerned, this is a classical trick, which is also used to initiate Grignard rections. Is is assumed that magnesium iodide is formed, which is soluble in the alkanols. As a result, a fresh, activated metal surface is left behind. This might even work, when the magnesium metal is covered with a very thin oxide layer. ",Klaus-Dieter Warzecha,https://chemistry.stackexchange.com/users/418,http://chemistry.stackexchange.com/questions/31824/purification-of-ethanol,SCIENCE,chemistry.stackexchange.com 580,Why is the pixel count of RAW images from the Panasonic LX5 slightly larger than the generated JPEGs?,"I'm new to working with RAW images, and I'm capturing simultaneous RAW+JPGs with my new Lumix LX5, and using Bibble to view/process the results. I'm very surprised that the RAW images taken at 24mm wide 16x9 seem to capture a different (and larger) sensor area compared to the JPGs. The RAW images seem to contain the equivalent of about 100 extra pixels on left and right sides, and a smaller number top and bottom. I say ""equivalent"", because the actual pixel counts of RAW and JPG are only slightly different, which implies some resizing must be going on...? JPG: 3968 x 2232 RAW: 3976 x 2238 I guess this small difference is because JPG images must be 16x16 multiples> The raw image displays noticeable vignetting in the extra pixels, and there's a fair bit of chromatic aberration. I can crop off the 'extra' pixels, but then my RAW image has fewer pixels in it than the JPG, which doesn't feel right. I'll try and add samples shortly. ",Roddy,https://photo.stackexchange.com/users/562,"Firstly there are a couple of general reasons raw and JPEG images differ in size, and raw differs from the actual number of pixels on the sensor: Whilst JPEG image dimensions don't have to be multiples of 16 (or 8 if not using chroma subsampling) it is more efficient to do so, as it allows you to rotate the images without re-encoding (lossless rotation). So that can account for a small image size difference, as you say. Even raw image sizes typically differ from the actual number of pixels as most sensors have strips masked pixels (that receive no light) down each side in order to detect banding issues with uneven amplification. Further, the size you see in your raw viewer will differ from the actual raw data as some image processing operations use a form of averaging which doesn't work at extreme edges (because there's no data beyond the image to use when averaging) so they get cropped off when the image is viewed/converted. Secondly the Panasonic Lumix LX3 and LX5 have a different sensor design to most cameras, which is partially responsible for the difference in coverage between raw and jpeg you are experiencing: The maximum 16:9 image size is actually wider than the maximum 4:3 image size. You would expect them to be the same width but different heights. This is because they've made the sensor a bit wider for 16:9, employing a non rectangular design and it's pushing the very edges of the lens image circle, this explains the vignetting and CA you observe with the raw. This diagram shows the irregular design: As John Cavan suggests, the JPEG image pipeline is doing some correction, including barrel distortion correction, given that 24mm equiv. is very wide for a compact, and the sensor is pushing to the very edge of the image circle. Barrel distortion correction makes straight lines straight again, but will cause the image edges to bend in response. In response to this the correcting transformation enlarges the image slightly and crops to get straight edges again. Can you see any differences in the appearance of straight lines between the raw and JPEG? It might be quite subtle but get revealed if you overlay them. ",Matt Grum,https://photo.stackexchange.com/users/1375,http://photo.stackexchange.com/questions/4242/why-is-the-pixel-count-of-raw-images-from-the-panasonic-lx5-slightly-larger-than,LIFE_ARTS,photo.stackexchange.com 6022,How to implement Many to many relationship for USERS TABLE in ruby on rails without using any extra table?,"I am a newbie to the Ruby on Rails but stuck at this interesting situation : I have three Models with me : User Company Project I want to relate them in the following way : Company has_many Users Users belong_to Company Implemented via company_id column in USERS table User.Company or Company.Users works fine. Project has_and_belongs_to_many Users Users has_and_belongs_to_many Project Implemented via has_and_belongs_to_many relation using in projetcs_users table Project.Users or User.Projects works fine. The real problem comes when I want them to join as following as well : Company belong_to Owners (:through => User) Owner has_one Company ---A company can have multiple owners but one user can own just one company. He can't be owner of multiple companies. ---A user may or may not be owner of a company but always belong to some company. ---A user cannot be part of two companies. Project has_one Project_manager (:through => User) Project_manager belongs_to Projects ---A Project can have just one Project_manager but one can be project manager of multiple projects. I am not able to figure out how the relationship should be defined in the Models. Also what should be the table structure for all three models. My objective is to achieve : Company.Owners It can be done by : @owner = User.find(Company.owner_id) Project.Project_manager It can be done by : @Project_manager = User.find(Project.project_manager_id) But don't want it that way to work !! Rest is working perfectly fine for me. ",Sahil Grover,https://stackoverflow.com/users/574472,"Here is the final output I am able to achieve : -----Models----- PROJECTS class Project < ActiveRecord::Base attr_accessible :name has_and_belongs_to_many :users belongs_to :project_manager, :class_name => ""User"" end USERS class User < ActiveRecord::Base attr_accessible :name, :project_id belongs_to :company belongs_to :owned_company, :class_name => ""Company"", :foreign_key => ""owner_id"" has_many :managed_projects, :class_name => ""Project"", :foreign_key => ""project_manager_id"" has_and_belongs_to_many :projects end COMPANIES class Company < ActiveRecord::Base attr_accessible :name has_many :users has_many :owners, :class_name => ""User"", :foreign_key => ""owner_id"" end -----Tables & Migrations----- PROJECTS class CreateProjects < ActiveRecord::Migration def change create_table :projects do |t| t.string :name t.integer :project_manager_id t.timestamps end end end USERS class CreateUsers < ActiveRecord::Migration def change create_table :users do |t| t.string :name t.integer :project_id t.integer :owner_id t.timestamps end end end COMPANIES class CreateCompanies < ActiveRecord::Migration def change create_table :companies do |t| t.string :name t.timestamps end end end Projects - Users - Join Table class CreateTableProjectsUsers < ActiveRecord::Migration def self.up create_table :projects_users,:id => false do |t| t.integer :project_id t.integer :user_id end end def self.down drop_table :projects_users end end ",Sahil Grover,https://stackoverflow.com/users/574472,http://stackoverflow.com/questions/12534127/how-to-implement-many-to-many-relationship-for-users-table-in-ruby-on-rails-with,STACKOVERFLOW,stackoverflow.com 1856,How to install the gedit markdown-preview plugin on 14.04?,"I've just installed the markdown preview plugin for gedit and I get the following error on the console when I try to activate it in the plugins tab: Traceback (most recent call last): File ""/home/aarold/.local/share/gedit/plugins/markdown-preview/init.py"", line 25, in import markdown ImportError: No module named 'markdown' (gedit:20735): libpeas-WARNING **: Error loading plugin 'markdown-preview Note that this is not the same question as the other one about gedit since its solution does not work for me. I've tried setting the Loader parameter in my /home/aarold/.local/share/gedit/plugins/markdown-preview.plugin file to python and python3 as well but none of them work. I tried reinstalling the plugin with all possible permutations of options and although it says install was succesful I always get this error. What could be the problem? I've checked the .py file and it seems that it cannot import markdown. Do I need to install some additional python modules? I've tried pip install markdown but although it Successfully installed markdown I still get the same error. ",Adam Arold,https://askubuntu.com/users/74752,"This plugin is written for Python 2, but since gedit 3.8, only Python 3 plugins are supported. So some small changes are required. Modify the installer (gedit-markdown.sh) to install the python3 markdown module: This is a patch that you can apply on the existing file (or you can just copy the full modified version available here): --- gedit-markdown_ori.sh 2014-05-14 16:14:58.386700310 +0200 +++ gedit-markdown.sh 2014-05-14 15:42:21.038783248 +0200 @@ -263,7 +263,9 @@ # Note: sous Archlinux, «/usr/bin/python» correspond à Python 3. On teste donc les # chemins pour Python 2 en premier. -if type -p python2.7 > /dev/null; then +if type -p python3 > /dev/null; then + binPython=$(type -p python3) +elif type -p python2.7 > /dev/null; then binPython=$(type -p python2.7) elif type -p python2.6 > /dev/null; then binPython=$(type -p python2.6) @@ -287,15 +289,15 @@ cheminPythonMarkdown=python-markdown/python2 cheminPythonSitePackages=$(""$binPython"" -m site --user-site) fi -# elif [[ ${versionPython:0:1} == 3 ]]; then -# compareVersions ""$versionPython"" ""3.1"" -# -# if [[ $? == 2 ]]; then -# bonneVersionPython=false -# else -# cheminPythonMarkdown=python-markdown/python3 -# cheminPythonSitePackages=$(""$binPython"" -m site --user-site) -# fi + elif [[ ${versionPython:0:1} == 3 ]]; then + compareVersions ""$versionPython"" ""3.1"" + + if [[ $? == 2 ]]; then + bonneVersionPython=false + else + cheminPythonMarkdown=python-markdown/python3 + cheminPythonSitePackages=$(""$binPython"" -m site --user-site) + fi else bonneVersionPython=false fi Run ./gedit-markdown.sh install You should see python 3.4 instead of 2.7: ############################################################ ## ## Installation of gedit-markdown ## ############################################################ ## First step: check dependencies - gedit: 3.10.4 - Python: 3.4 [...] Change the plugin loader to python3 Replace /home/aarold/.local/share/gedit/plugins/markdown-preview.plugin with: [Plugin] Loader=python3 Module=markdown-preview IAge=3 Name=Markdown Preview Name[fr]=Aperçu Markdown Description=Show the HTML version of the Markdown text you're editing Description[fr]=Affiche l'aperçu en HTML du document Markdown en cours d'édition Authors=Michele Campeotto <micampe@micampe.it>\nJean-Philippe Fleury <contact@jpfleury.net> Copyright=Copyright © 2005, 2006 Michele Campeotto\nCopyright © 2009, 2011-2012 Jean-Philippe Fleury Website=http://www.jpfleury.net/logiciels/gedit-markdown.php Convert /home/aarold/.local/share/gedit/plugins/markdown-preview/__init__.py to python3: Run: 2to3 -w /home/aarold/.local/share/gedit/plugins/markdown-preview/__init__.py Finally open this file and edit line 86 (remove the binary mode, ""wb"" -> ""w""): with open(confFile, ""w"") as confFile: Activate the plugin in Gedit as you did. ",Sylvain Pineau,https://askubuntu.com/users/32239,http://askubuntu.com/questions/465763/how-to-install-the-gedit-markdown-preview-plugin-on-14-04,TECHNOLOGY,askubuntu.com 4001,Can I check for a Custom Setting in an Angular ng-show directive?,"I'm working on an Angular project within Salesforce, I have a custom setting which determines whether or not certain elements on my page display or not, <apex:outputLink rendered=""{!isCustomSettingTurnedOn}""> </apex:outputLink> Is there any way to incorporate this custom setting into an ng-show directive? Something like this... (which doesn't work) <span class=""icon_target"" ng-show=""data.target && !isCustomSettingTurnedOn""></span> Any suggestions or advice would be greatly appreciated. Cheers. ",Daft,https://salesforce.stackexchange.com/users/3822,"You need to get the value into the scope that your view uses. The normal place to do that is in the controller JavaScript for the view, with the value being in the model that is already added to the scope or with the value being added separately. The value should come from an Angular service that abstracts away how the value is obtained from the server. My opinion is that falling back on Visualforce to grab a custom setting value in an Angular app is an anti-pattern. Only the Angular app index page should go through Visualforce processing with all other partial templates and JavaScript files being served via static resources. ",Keith C,https://salesforce.stackexchange.com/users/887,http://salesforce.stackexchange.com/questions/51105/can-i-check-for-a-custom-setting-in-an-angular-ng-show-directive,TECHNOLOGY,salesforce.stackexchange.com 6893,jQuery AJAX IE - skipped functions ajax,"$(""#multiselect"").hide(); $(""#multiselect_container"").append('<img id=""loader"" src=""/loader.gif"" />'); Above 2 functions inside the $(""#list"").click() block are being skipped for some reason in IE, not FF, Chrome $(""#list"").click(function() { var selection = $(this).val(); $(""#multiselect"").hide(); $(""#multiselect_container"").append('<img id=""loader"" src=""/loader.gif"" />'); $.ajax( { url: 'include/ajax.php?id='+selection, async: false, dataType: 'json', success: function (json) { $(""#loader"").remove(); $(""#multiselect"").show(); //parse json } });//json }); What's going on: There is a button #list and a container #multiselect_container which holds #multiselect which is a select box of it's container's size. When #list is clicked, the select box is hidden and the container beneath it is shown, with a loading bar. When the ajax call is finished the loading bar is removed and the select box is shown again. In Firefox this works perfectly fine. In IE it does not. Things that I have tried: $('#list').ajaxComplete(function() {}); in the success section Sleeping the php file for 3 seconds. Same results, except with a delay. Removing the ajax block, those 2 calls are made properly. caching is not the issue, ajax calls are being made ",lewicki,https://stackoverflow.com/users/255543,"You should change async: false to async: true. With async: false it would be normal behaviour for the display to not be updated until after the ajax call has completed. So that change might be enough to fix it. Otherwise read on... I've had a similar problem with IE before, where it just didn't want to update the display to show a ""loading"" type message while doing Ajax - even though the Ajax is asynchronous. It's not that the functions themselves are skipped, just that the display doesn't get updated until after the Ajax complete callback had executed too - and since the complete processing removes the ""loading"" message it's as if it never existed from the user's point of view. As with your code, my project worked fine in Firefox. It was a while ago, but if I remember rightly I got it to work in IE by introducing a short timeout on the Ajax call, something like this: $(""#list"").click(function() { var selection = $(this).val(); $(""#multiselect"").hide(); $(""#multiselect_container"").append('<img id=""loader"" src=""/loader.gif"" />'); setTimeout(function() { $.ajax( { url: 'include/ajax.php?id='+selection, async: true, // changed from false dataType: 'json', success: function (json) { $(""#loader"").remove(); $(""#multiselect"").show(); //parse json } });//json }, 5); }); ",nnnnnn,https://stackoverflow.com/users/615754,http://stackoverflow.com/questions/10646789/jquery-ajax-ie-skipped-functions-ajax,STACKOVERFLOW,stackoverflow.com 8701,Creating fake (test) data,"Is there a module or part of devel module that will auto populate (with fake data) a Content Type a create a dozen or so nodes? ",rgchi,https://drupal.stackexchange.com/users/5966,"If you installed the Devel module, there should be a submodule on the admin/modules page called Devel generate: Enable it, and you should have some new menu entries in admin/config/development for generating fake conent, menus, terms, users, and vocabularies. ",mpdonadio,https://drupal.stackexchange.com/users/835,http://drupal.stackexchange.com/questions/50952/creating-fake-test-data,TECHNOLOGY,drupal.stackexchange.com 6962,"Does store-bought Kombucha spoil? If so, how can I tell?","I recently bought Ginger Kombucha for the first time in a reputable health food store. I'd never heard of it, but my doctor feels the probiotics will help my chronic digestive problem. Because of the strong taste, I only drank a small amount each day. I did this by pouring some out, not by drinking from the bottle. On the fifth day, it smelled and tasted so much like alcohol I was afraid it was rancid. I took it back to the store for advice. One clerk told me it was supposed to smell like that, just to use it for seven days and discard any remainder. Another clerk said it can't spoil, and as long as I keep it refrigerated it will last indefinitely. Can someone with experience please help me? It's expensive, so I don't want to throw it away if I don't have to, however I don't want to poison myself or use something that's no longer effective. Thank you! ",Sue,https://cooking.stackexchange.com/users/27321,"When Kombucha gets old it turns to vinegar, then one can make salad dressing out of it. I have been brewing booch for while now and that has been the ultimate out come. I double ferment with ginger and home grown berries so when mine get old, i all ready have a vinegarette waiting for me. Hope that helped ",george,https://cooking.stackexchange.com/users/34589,http://cooking.stackexchange.com/questions/48914/does-store-bought-kombucha-spoil-if-so-how-can-i-tell,LIFE_ARTS,cooking.stackexchange.com 8847,generic helper to get ObjectResult that will match any given EntityObject,"trying to make a generic SQL Query via a method that will fetch data i was making this code public ObjectResult<theSelectedTableNameModel> getUsersRes(string sqlStr, string ColNameAsfilter, string FiltersValue,string OrderByFilter="""") { string SqlCmd = """"; string By = """"; if (OrderByFilter.isNotEmptyOrNull()) By = string.Concat("" ORDER BY "", OrderByFilter); SqlCmd = string.Format(""{0} WHERE {1}={2}{3}"", SqlStr, ColNameAsfilter, FiltersValue, By); return anEntityName.ExecuteStoreQuery<theSelectedTableNameModel>(SqlCmd); } i have copied my code and edited real names and other variables /parameters so i might have made a mistake, but the question is , how could i make it more generic than this ? this is a working approach that lets me specify the query of the sqlCommand i wanted it to fit any entity and any model/object/table how could it be done ? i guess there's a ready solution for this or the engeniring of EF not ment to be generic... i'm using asp.net 4.0 , and latest EF.. ",Avia Afer,https://stackoverflow.com/users/1930832,"why not consider passing in a collection of sql paramters in to the function call as a parameter. Once you do this, you can use any number of filters of multiple types public ObjectResult<theSelectedTableNameModel> GetEntityBySQLCommand(string sqlStr, SqlParameter[] filterParams, string OrderByFilter="""") { var commandTextToExecute = OrderByFilter.isNotEmptyOrNull() ? sqlStr : string.Format(“{0} Order By {1}”, sqlStr, OrderByFilter); return yourObjectContext.ExecuteStoreQuery<theSelectedTableNameModel>(commandTextToExecute, filterParams); } Your sqlStr should look something like the following “SELECT * FROM Customer WHERE CustId = @custID and LastActiveOn = @lastActiveDate”; custID and lastActiveDate should be passed in via the SqlParameter collection (filterParams) ",Chintana Meegamarachchi,https://stackoverflow.com/users/2011166,http://stackoverflow.com/questions/18523463/generic-helper-to-get-objectresultt-that-will-match-any-given-entityobject,STACKOVERFLOW,stackoverflow.com 3995,"Excel VBA App stops spontaneously with message ""Code execution has been halted""","From what I can see on the web, this is a fairly common complaint, but answers seem to be rarer. The problem is this: We have a number of Excel VBA apps which work perfectly on a number of users' machines. However on one machine they stop on certain lines of code. It is always the same lines, but those lines seem to have nothing in common with one another. If you press F5 (run) after the halt, the app continues, so it's almost like a break point has been added. We've tried selecting 'remove all breaks' from the menu and even adding a break and removing it again. We've had this issue with single apps before and we've 'bodged' it by cutting code out of modules, compiling and then pasting it back in etc. The problem now seems to relate to Excel itself rather than a single .xls, so we're a little unsure how to manage this. Any help would be gratefully received :) Thanks, Philip Whittington ",Phil Whittington,https://stackoverflow.com/users/223126,"One solution is here: The solution for this problem is to add the line of code “Application.EnableCancelKey = xlDisabled” in the first line of your macro.. This will fix the problem and you will be able to execute the macro successfully without getting the error message “Code execution has been interrupted”. But, after I inserted this line of code, I was not able to use Ctrl+Break any more. So it works but not greatly. ",Stan,https://stackoverflow.com/users/435476,http://stackoverflow.com/questions/2154699/excel-vba-app-stops-spontaneously-with-message-code-execution-has-been-halted,STACKOVERFLOW,stackoverflow.com 9320,"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 question. The SE Community Team seems to have a different opinion as Shog9 points out (emphasis mine): the results have been... Not great so far: a significantly smaller number of people are clicking through to randomly-selected questions than to the top questions, which hints that the algorithm may've been doing a better job of identifying general-interest questions across topics than some expected. Disclaimer: This should not be taken as a slight of the community team whatsoever, nor do I think this is some cause for revolt or a boxing match as the below prose may indicate. These are just poorly applied literary tools to emphasize the drastically different approaches to the same list between two groups. In the Red Corner, the Community Members The goal of the hot questions should be to drive up interest in the site. The hot questions should be a lure to encourage SE network users to contribute to other content, not just do a drive-by on the hot question. In the Blue Corner, the Community Team The goal of the hot questions should be to drive traffic to general-interest questions. After all, the Hot Network Questions used to be more accurately named as ""Popular Questions"". What is the Goal of Advertising Network Questions? Before discussing how to calculate hotness, or how the list should be ordered, we need to come to an agreement on what the heck we are actually trying to achieve. Once we know what we are looking to accomplish, we can find the best way to do that. The list of questions from a variety of sites is in a great location screen-wise, it is readily accessible and does get a lot of eyes on it. But as with any marketing, the goal isn't just to grab eyes, it's to grab the right eyes.* * I have nothing against left eyes. Most of my friends have left eyes too. And they are awesome. But in the context right eyes are not a geospatial thing, but rather in the 'correct' sense. So what are the right eyes? What type of people do we want to attract to our site? What would we determine as 'success'? How can we measure that success? Please do not limit yourself to the very narrowly scoped topic above. Think outside the box if you'd like. On every page across the network we have a nice piece of real estate for showing off the rest of the network. How can that space best be used if not on a list of questions picked by an arbitrary algorithm? ",jmac,https://meta.stackexchange.com/users/209637,"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 are made up of grammatical sentences. They seem to narrate reality as the OP sees it. Sometimes they even offer an opportunity for a really good answer, giving the OP a dose of much-needed reality. However, for every sensible answer offered by a person who has a clue, it seems like there are two or three from the orbit of Jupiter. Does this make them bad questions? Or does it just mean that a community that has taken on the job of TWP has a whole lot of work to do. These questions are the reality TV of Stack Exchange. Broadcasting them creates work for the community, because it attracts an extra crop of drive-by dweeb answers. So I don't think that Shog9's notion that these questions are the entire fault of the community for failing to police questions is, in fact, entirely fair. ",Rosinante,https://meta.stackexchange.com/users/138822,http://meta.stackexchange.com/questions/219922/what-is-the-goal-of-hot-network-questions,TECHNOLOGY,meta.stackexchange.com 5782,Why was this grammar & formatting edit rejected?,"About: http://stackoverflow.com/review/suggested-edits/1962857 Recently, I've been suggesting a lot of edits - to make the site better. Scrolling through the list of my suggestions, I saw that this was rejected: http://stackoverflow.com/review/suggested-edits/1962857 - mostly with the This edit is too minor; suggested edits should be substantive improvements addressing multiple issues in the post. reason. However, if you look at the edit, it is substantial. It clarifies the question, and provides grammar and formatting fixes. Any help? ",Undo,https://meta.stackexchange.com/users/215468,"Most likely because of the unneeded inline code blocks. Those do not always make things easier to read. When used excessively for things that are easily identifiable as code, such as UITableView, they actually make the post harder to read. Reserve its use for segments of code that belong together or for keywords that would otherwise not make sense in the context of the post without being identified as inline code. I, personally, would have skipped this one because I don't have any strong feelings one way or the other. Just a note: changing ""I am"" to ""I'm"" is really not edit-worthy. I don't know why you even made that change. ",animuson,https://meta.stackexchange.com/users/141525,http://meta.stackexchange.com/questions/177696/why-was-this-grammar-formatting-edit-rejected,TECHNOLOGY,meta.stackexchange.com 7170,Why is the 't' in Hash Table(Hashtable) in Java not capitalized,"Everything in Java seems to follow capitalization rules except for Hashtable. Hashtable<String, String> ht = new Hashtable<String, String>(); as opposed to ArrayList<String> a = new ArrayList<String>(); or HashMap<String,Integer> a = new HashMap<String,Integer>(); Why is this ? Is Hash Table read as just one word (Hashtable) ? ",Slartibartfast,https://stackoverflow.com/users/1081340,"Although this question has no technical value, I have to admit, I've asked myself this a couple of times :) My version is that unlike List (ArrayList), Set (HashSet) , Map (Tree/HashMap) table is not a data structure. Of course (its possibly known) that the Hashtable class was created before the collection framework (in java 1.0). So maybe at that point they didn't really thought about the same naming conventions. In general we better use collection framework from java 2+ :) ",Mark Bramnik,https://stackoverflow.com/users/605153,http://stackoverflow.com/questions/12506706/why-is-the-t-in-hash-tablehashtable-in-java-not-capitalized,STACKOVERFLOW,stackoverflow.com 2232,Why does George Mcfly employ Biff to wax his car after he had previously tried to rape his wife?,"In Back to the Future, Marty goes back to 1955 and devises a plan for his father George McFly to win over Lorraine in order to ensure Marty's survival. The plan involved Marty pretending to sexually assault Lorraine then George would step in and stop him. Biff meddles with Marty's plan, by kicking Marty out of the car and then he tries to rape Lorraine. George expecting to find Marty in the car, instead finds Biff and musters the courage to stop Biff and protect Lorraine. Near the end of the movie when Marty travels back to 1985 we see that Biff is outside of Marty's house waxing George's car. Why would George employ Biff to do this job? I can't imagine Lorraine would be too happy with the idea. ",jazzdawg,https://movies.stackexchange.com/users/219,"I haven't seen any director commentary, so I can't speak with full authority. However, I don't think they thought that hard about it. I think it is put in there for dramatic effect. The antagonist was defeated, and now instead of the big man on campus, he practically begs from George McFly for work. It is a triumph of the little guy over his oppressor. The movie is full of David vs Goliath moments, and that's when you know the underdog ultimately won. ",Merlyn Morgan-Graham,https://movies.stackexchange.com/users/223,http://movies.stackexchange.com/questions/333/why-does-george-mcfly-employ-biff-to-wax-his-car-after-he-had-previously-tried-t,LIFE_ARTS,movies.stackexchange.com 874,Eclipse C++ formatter puts new line before method identifiers,"I ran into a problem with the Eclipse formatter. It won't format my code correctly when declaring methods within a class declaration. It puts a new line after the method's return type. I already exported the style xml file and examined the settings in it, but none of the settings have any apparent connection to this problem, and the settings editor in Eclipse didn't show the same problem happening in it's sample code for method declarations. Here is an example bit of code for what I want to have happen: class MyClass { public: MyClass(); void myMethod(); }; However, this is what I get: class MyClass { public: MyClass(); void myMethod(); }; Again, in the styles editor, the code doesn't have this problem and looks just how I want it to, but in the actual code, the story is different. I'm using version 3.8.0. Any help is appreciated. Edit: I deleted those source files that were formatted incorrectly (after formatting the code several times to no avail) and replaced them with ""identical"" files with the same methods, same structure, etc. I formatted the code this time and it worked. This is probably a bug, but I'm leaving it up just in case anyone else encounters a similar problem or has a solution to avoiding this problem in the first place. ",Adam,https://stackoverflow.com/users/956216,"I hand edited two files under the main eclipse projects directory .metadata\.plugins\org.eclipse.core.runtime\.settings The two files: file 1: org.eclipse.cdt.core.prefs, change this line from ""insert"" to ""do not insert"" org.eclipse.cdt.core.formatter.insert_new_line_before_identifier_in_function_declaration=do not insert file 2: org.eclipse.cdt.ui.prefs, scan this file for ""insert_new_line_before_identifier_in_function_declaration"" and make a similar change from insert to do not insert next to it, should be obvious Note I seen this problem on indigo and juno, the fix described above was in juno. ",user1967159,https://stackoverflow.com/users/1967159,http://stackoverflow.com/questions/13893942/eclipse-c-formatter-puts-new-line-before-method-identifiers,STACKOVERFLOW,stackoverflow.com 3529,Would a meta-answer be a good idea?,"One of the stated goals of the site was the have one comprehensive answer to each question. I think we can definitively say that it hasn't worked out that way. I think the reason is reputation. If one person answer the question with 40% of the information that a comprehensive answer would contain, and another with another 40% with 20% scattered among three other answers. Who's answer will get edited with the combined information and get the further upvotes? It just doesn't happen. People don't want to edit questions and mess with someone else's reputation (quite rightly, IMO - how would you feel getting a downvote for something added to your answer that you didn't write?). One idea to get towards that goal would be to have a community answer on each question, with say a small reputation bump (2 points?) for participating in making it. To prevent reputation inflation, you can only get the 2 points from a given question one time, with a daily limit (say 10 points) for doing it on questions asked by others. Then when the question is seen for posterity, it will be the first answer. The issue is what to do with the accepted answer? One possibility is to only open the community answer once there is an accepted answer and pre-fill it with that answer. Does any of this make sense to anyone else? ",Yishai,https://meta.stackexchange.com/users/130225,"I think this would be useful in the case of questions such as those discussed in What's the rationale behind closing a useful question with 70K views?, where a question has been locked and/or closed because there are a huge number of answers. In many such cases, there are numerous duplicates or near-duplicates lurking in the undulating moebius strip of answer pages simply because people have eagerly added their contribution without taking the time to scan the 72 pre-existing answers to see if theirs is already there. So allowing moderators to establish a single 'meta-answer' for such question would provide a way to merge duplicate and similar answers into one comprehensive (and comprehensible) whole. The meta-answer would be ""sticky"", i.e. be presented first. It might be necessary to only show it to those with a certain privilege level, or to visibly indicate it as a draft (or both) until such time as it's considered representative of the general body of answers to the question. One problem I can see with this idea is that it would potentially involve a lot of tedious editing work. The amount of work needed could be reduced / made remotely practical by providing a way to mark answers as having been incorporated into the meta-answer; such a flag would presumably be disabled or visibly expired if a compiled answer was edited. I can't really think of anything that compilers could stand to gain from such work, since it would certainly have to be considered a CW-type undertaking. Maybe a ""maintainer"" or ""compiler"" badge for people who do a lot of such edits? ",intuited,https://meta.stackexchange.com/users/145298,http://meta.stackexchange.com/questions/27568/would-a-meta-answer-be-a-good-idea,TECHNOLOGY,meta.stackexchange.com 9638,php escape sequence not working,"I just want to echo out some text on the webpage display with a tab space before a word. I have the following codes in php: <?php echo ""\t\t hello!<br>""; echo ""\t\t"", ""hello!<br>""; echo ""\t\t"".""hello!<br>""; ?> I tried all sorts of combinations, but it just won't show the tab spacing before the word. OUTPUT: hello! hello! hello! I visited some links like: Newline escape sequence not working on php but I am not echoing it from a function. I just simply want to echo it out from a .php file. ",user3437460,https://stackoverflow.com/users/3437460,"Try This: <pre><?php echo ""\t\t hello!<br>""; echo ""\t\t"", ""hello!<br>""; echo ""\t\t"".""hello!<br>""; ?></pre> I would say you are probably viewing the generated page (html) rather than the page source. ",Nicholas Summers,https://stackoverflow.com/users/3511423,http://stackoverflow.com/questions/27111279/php-escape-sequence-not-working,STACKOVERFLOW,stackoverflow.com 2605,Is there a list of Mitzvot and their corresponding body parts?,"The Talmud (Makkot 23B)and the Zohar (1:170B - unverified English translation here) say that the 248 positive commandments correspond to the 248 limbs of the human body. (The Mishna (Ohalot 1:8) lists the 248 Halachic limbs). The Talmud also says that the 365 Negative commandments correspond to the days of the year. The Zohar adds that the 365 negative commandments also correspond to the 365 sinews in the human body (See Yonatan Ben Uziel Bereshit 1:27), and connects them to the days of the year. R' Chaim Vital, in Shaar HaKavanot (Shaar 1, Part 1) says that ""Each of the 248 spiritual limbs gets its nourishment from a particular mitzvah that corresponds to that limb. When a person fails to perform that particular mitzvah, the corresponding limb will lack its proper nourishment..."" (translation from here) Is there any source which tells us which limb (and/or sinew) each Mitzvah corresponds to? As an example, the Zohar referenced above (1:170B), connects Gid Hanasheh (sciatic nerve), one of the 365 sinews, to the prohibition of eating on Tisha B'av. ",Menachem,https://judaism.stackexchange.com/users/603,"There is a little known Chassidic text published in 1834 entitled Pri Yitzchak that details all 613 Mitzvot and the corresponding limbs for positive mitzvot and 365 Gidim for negative commandments. It has not been translated from the Hebrew. It is a very sophisticated work. He uses the list of halachic limbs listed in the Mishna, and uses the Rambam's list of the 613 Mitzvot. The Sefer was written by R' Yitzchak ben R' Tzvi Hersh, the Rav of the city of Shkod(?) and published by his son, Shabtai Sheptel, some years after his passing. The first 40 pages are available for free online, thanks to Otzar Hachachma (The other 20 are also available, but must be paid for). In the introduction, R' Yitzchak lays out the guidelines he used to develop this work. At the end of the introduction he says that while some of the Mitzvot and their corresponding limbs were found in various Sefarim, the majority of them were not. He decided which Mitzvot corresponded to which limbs, and as such, the list should not be considered definitive. The intent of the Sefer is to be used as a memory aid, increase the readers love and fear of G-d, and so the reader can realize how the soul of the Jewish people is connected to the whole Torah. ",david,https://judaism.stackexchange.com/users/1064,http://judaism.stackexchange.com/questions/10406/is-there-a-list-of-mitzvot-and-their-corresponding-body-parts,CULTURE,judaism.stackexchange.com 5281,1/4 to 1/8 jack problem,"I was planning to record months ago, with my electric guitar, and yesterday I got myself a guitar rig software and bought some 1/4 to 1/8 adapter jack so that I can plug in unto my laptop's mic hole. Whenever I plug my guitar cable to the 1/4 to 1/8 adapter then to the laptop I can't hear any sound (past the clicking sound you hear) but when I plug the cable almost halfway of the adapter's body (before the clicking sound) I can hear sound when I play and there's some loud buzzing sound involved. Any explanations as to why this is happening? ",user3736846,https://music.stackexchange.com/users/13524,"If you want to record better sounding guitar tracks, getting an audio interface is the way to go, as others have mentioned. You also want to think about shielding, interference, and turning off electrically noisy overhead lights. However, to say ""You can't just use an adapter to plug your guitar directly into your laptop"" isn't true. I do this without a problem on my computers, its just not going to give you ideal signal levels. The problem you might be seeing is that there is a mono-stereo mismatch between your mono guitar cable, your 1/4 to 1/8 inch adapter, and your input on the laptop. I have both mono and stereo 1/4 to 1/8 adapters and laptops with both mono and stereo input jacks. Depending on my configuration, the input signal is reduced by half because of the way I've hooked it up, i.e. the incorrect conversion of a mono signal results in half of it being lost. At least, this is the issue that comes to mind when I read your sentence, ""when I plug the cable almost halfway of the adapter's body ... I can hear sound when I play and there's some loud buzzing sound involved."" There are likely multiple issues at play here. ",foundling,https://music.stackexchange.com/users/15388,http://music.stackexchange.com/questions/25070/1-4-to-1-8-jack-problem,LIFE_ARTS,music.stackexchange.com 7670,Registration: Username and password or email and password,"During a registration process what would the reasons be for using: username/password or email/password combinations to register the user? Is it a case of identification once in the system (may be preferable to refer to a user by their username instead of their email) Simplicity - using email means the user dont have to create two memorable items? What other reasons are there for choosing either option? Is there a relationship between the type of service? ",Sheff,https://ux.stackexchange.com/users/4215,"For me personally it's about giving my complete details before I'm even a member. I'd rather just sign up with email/pw and then later figure out how I will fill out my profile, as me or a more obscurely titled me. Example: for Facebook I use my full name but on here I've abbreviated my last name. I think opting for email/pw will give you a higher influx of sign-ups because it requires less thinking. 90% of all apps/startups/sites I apply for are email/pw sign-ups, or social (fb/twitter) sign-ups. But that's just personal and not backed up by any study or anything... ",Martijn_M,https://ux.stackexchange.com/users/13783,http://ux.stackexchange.com/questions/20533/registration-username-and-password-or-email-and-password,TECHNOLOGY,ux.stackexchange.com 5393,Unity: Rolling a ball around a spherical planet with forces,"I'm trying to make a game in Unity where the player character is a ball (a sphere), and the game world is a planet (a very large sphere) that the ball can roll around on. The ball can be rolled in any direction, via the arrow keys. If the player holds the right arrow, the ball should roll smoothly to the right, all the way around the planet not leaving the ground, until it eventually reaches back to where it started. The camera follows the ball third person such that the ball always appears in the same position in the screen and the planet appears to be moving underneath it. My question is, how can I use rigidbody.AddForce() to roll the ball in the way described above? What I think I need to do is to take the vector I get from taking the input values on the horizontal and vertical axes: float moveX = Input.GetAxis (""Horizontal""); float moveY = Input.GetAxis (""Vertical""); Vector3 inputMovement = new Vector3 (moveX, 0.0f, moveY); And rotate it somehow, so that I'm applying that vector as force to the ball but in the direction that's tangential to the point on the planet that the ball is currently on, and then apply it as force to the ball's rigidbody. So if you're looking at the planet head on, and the ball is at 3 o'clock, pressing the right arrow key should apply the force directly downwards. Can anyone help me out here? I think it's probably really simple but I'm having trouble figuring it out exactly. ",Jessica,https://gamedev.stackexchange.com/users/48111,"Subtract the position of the ball from the origin of the planet, that will give you the directional vector that you want. You can calculate the magnitude of the force you need to apply using simple newtonian gravity. Newton Gravity Convert the direction into a unit vector, and multiply the magnitude of the force by the unit vector to create a force vector. ",Evan,https://gamedev.stackexchange.com/users/25170,http://gamedev.stackexchange.com/questions/77606/unity-rolling-a-ball-around-a-spherical-planet-with-forces,TECHNOLOGY,gamedev.stackexchange.com 3273,Should I always hibernate instead of shutting down?,"I'm using Windows XP and I hate the long start up time when I shut down and then turn on my laptop. However if I hibernate instead of shutting down it starts up much faster. Are there any harmful effects / disadvantages if I always hibernate whenever I'm done for the day instead of shutting down? ",Click Upvote,https://superuser.com/users/2641,"Under XP, the OS will slow down over time, and eventually get unstable, but that can take upwards of a week depending on how much you use your OS. Reboot every so often, there's no real harm in hibernating over short periods. In a laptop, most components should be built with hibernation in mind, and HDD space is cheap, so the hibernation file shouldn't be a big deal (If it is, it's 2010! Get an external HDD, 1.5TB is the best GB/$ right now, and they're pretty cheap!) In Vista/Win7, I can't honestly reccomend shutting down unless you have a good reason. ",Phoshi,https://superuser.com/users/6998,http://superuser.com/questions/108791,TECHNOLOGY,superuser.com 2735,Adding Data to Multiple Tables Using Single Query,"I want to add data to multiple tables using a single INSERT INTO query, can I do this? Please guide me and provide me syntax if this is possible. ",butt,https://dba.stackexchange.com/users/41629,"This is not possible. The INSERT statement takes a single destination object as per the syntax (BOL reference): [ WITH <common_table_expression> [ ,...n ] ] INSERT { [ TOP ( expression ) [ PERCENT ] ] [ INTO ] { <object> | rowset_function_limited [ WITH ( <Table_Hint_Limited> [ ...n ] ) ] } { [ ( column_list ) ] [ <OUTPUT Clause> ] { VALUES ( { DEFAULT | NULL | expression } [ ,...n ] ) [ ,...n ] | derived_table | execute_statement | <dml_table_source> | DEFAULT VALUES } } } [;] Take note of the <object> placeholder on the 6th line of the syntax snippet. Is there a particular reason why you want to insert into two tables in one statement? Perhaps you are looking for both inserts to either succeed or fail as one? In that case, you would be looking at explicit transactions: begin tran; insert into dbo.YourTable1 ... insert into dbo.YourTable2 ... commit tran; Besides code brevity and atomicity, I wouldn't see any other reason that you'd want to combine multiple destination tables into a single INSERT statement. ",Thomas Stringer,https://dba.stackexchange.com/users/2241,http://dba.stackexchange.com/questions/69006/adding-data-to-multiple-tables-using-single-query,TECHNOLOGY,dba.stackexchange.com 8689,What kind of gasoline additives will help maintain the engine efficiency/life?,"Aside from the traditional maintenance of oil changes, and keeping fluid levels correct - what else will help prolong the engine's life? I recall a few years back gasoline additives were the thing to go with - what's the best/recommended one currently? If any. Edit: I recall reading about each gasoline brand having their own set of additives at one point, where it was suggested to cycle between a few different brands every X amount of km/miles. The reason behind switching was so that the next brand would cleanup any sediments left by the previous brand. How likely is this in today's world? And better yet, how important is it? ",Jesse,https://mechanics.stackexchange.com/users/2890,"Today's gasoline is already loaded up with all the additives that one is likely to need on a regular basis. There really isn't anything you should be adding ""just because"". Certain additives can be helpful if problems crop up though. ",Brian Knoblauch,https://mechanics.stackexchange.com/users/644,http://mechanics.stackexchange.com/questions/5729/what-kind-of-gasoline-additives-will-help-maintain-the-engine-efficiency-life,SCIENCE,mechanics.stackexchange.com 4895,In what order are taxes applied,"Lets say we have a product that costs 100$ (net price). This product has 3 taxes that must be applied to it: 2 percentage taxes (e.g. 17% and 20%) and one fixed amount tax (e.g. +10$). My question is - what math is done in this case? Are the percentage taxes applied on the net price and summed or the first one is calculated and then the second one is done with the price we get after applying the first? When is the fixed amount tax applied? After the other two or the other two are done with net+fixed tax? ",karka91,https://money.stackexchange.com/users/6846,"In the US and indeed around the world, there are very few ""tax on taxes"" situations. These situations are generally called out where they exist and politicians are pressured to change them; it is generally considered onerous for a government to include an amount of taxes in calculating another tax, because the government is then taxing the money you're already paying them. This is why most U.S. State and local taxes (sales taxes, property taxes, etc) are deductible from your income when itemizing deductions (the alternate ""standard deduction"" is an ""average"" amount that a person/household would be able to deduct if they itemized all lower-level taxes they had paid). So, most taxes, especially sales taxes/duties/tariffs, are all levied on a ""pre-tax"" or ""subtotal"" amount. In your example, all three of those taxes would be calculated on the $100 ""subtotal"" amount, before any other tax is added, and then those amounts are added to the subtotal to produce the grand total (of $147 as Alex shows). ",KeithS,https://money.stackexchange.com/users/4637,http://money.stackexchange.com/questions/16200/in-what-order-are-taxes-applied,LIFE_ARTS,money.stackexchange.com 8963,Goalkeeper Jumping Algorithm?,"This may be a ""best way to"" question, so may be susceptible to opinion-based answers (which is ok for me). But I would also like if there are any tutorials , research papers , etc. I'm trying to make a 3D free kick game, and I want to decide on the Goalkeeper algorithm. Usually (and in my game) the shot is a function of direction , power and swerve. Maybe wind can be a factor too. So the shots trajectory is pre-deterministic, i.e., the point that intersects the goal (or out) plane is determined as soon as the shot fires. So what could be a good approach for the goalkeeper to jump (or walk) ? I have two approaches in mind : 1- determine the point, and jump to there. 2- when the ball is closer than a threshold distance, estimate the point by the ball's velocity vector, and jump to there. The problem with the first approach is, goalkeeper will always save the shot, which I want to prevent. So there should be some kind of randomness, or the goalkeeper's ability to jump and walk will be restricted. The problem with the second approach is, when there is a high amount of swerve, the goalkeeper will always fail to save the shot. So how could these approaches be better? Thanks for any help ! Edit: if you want to play the game, click here ",jeff,https://gamedev.stackexchange.com/users/32639,"The ways to handle this are different based on how you are assigning speed, swerve etc. I'm assuming you have a skill challenge to do that (""stop the moving needle in the right part of the gauge""-type thing or something similar). If so, then you want higher-swerve and higher-speed to equal higher-percentage chance of scoring. If they are just chosen values, then they shouldn't have such a direct effect, or the player will always choose them to be high. You could set a percentage of the time you want the goalkeeper to save (based on the speed and swerve), and simply pick a random number, if it's below that percentage, play the correct animation (diving the right way) for the save, if it's higher, play the wrong one and allow the score. This is simple, but also a little ""cheating""-like. You could set an amount of time for the goalie to read the direction the ball is going, and then start moving him in that direction, and constantly allow him to adjust for the swerve until the last X% of the time it takes the ball to arrive, at which point the goalie can dive for the ball if it's within a range of where he is (and outside ""move-to"" range). ""Better"" goalies (higher levels?) will read sooner, move faster, and dive later(and further). This is more complicated, but more flexible, and more simulation-like. ",Ryno,https://gamedev.stackexchange.com/users/30121,http://gamedev.stackexchange.com/questions/66769/goalkeeper-jumping-algorithm,TECHNOLOGY,gamedev.stackexchange.com 239,Disabled buttons while long running task,"My application has a toolbar and a lot of buttons on it. Some buttons start a long running processes(tasks). At this moment every task executes asynchronously to allow user to do something else while task is executing. Thereby I have a problem: user can click the same button many times to start others same tasks. I have decided to disable button before start task and enable it after finish. Other problem, I should to protect other buttons from pressing (some of these would be disabled after done current tasks). In general, I have to disable all buttons (toolbar) to be sure that user cannot do something dangerous with buttons at transient. My questions are: Could someone recommend way to distract users from flickering (disable/enable buttons) or how to involve them in process, how to made them filling that task is not so long? Maybe I should to execute tasks synchronously and disable all UI for time of execution? By the way: Delay can vary from 1 to 10 sec. About progress bar: it is a difficult to calculate current progress, and it causes some performance degradation (task can be done faster without any additional UI iterations from other threads). ",igor,https://ux.stackexchange.com/users/79,"A quick suggestion: can you make it a ""checkbox button"", having its ""Pressed""/""Checked"" state indicate that task is running. Then automatically ""un-press""/""un-check"" it when the task async finishes? ",Jeroen,https://ux.stackexchange.com/users/7242,http://ux.stackexchange.com/questions/10336/disabled-buttons-while-long-running-task,TECHNOLOGY,ux.stackexchange.com 6299,How to use MouseListener event,"I have a main class implements MouseListener and a TimerTask inside this class.How can i run this code inside MouseEnter event .I mean when mouse over the frame Timer task will exacute specified times (I am so sory for my english ) public class NewClass extends JPanel implements MouseListener { public NewClass() { JFrame frame=new JFrame(); addMouseListener(this); Timer t=new Timer(); TimerTask task=new TimerTask() { @Override public void run() { System.out.println(""heloo""); } }; t.schedule(task, 1000); } @Override public void mouseEntered(MouseEvent me) { } public static void main(String[]args){ JFrame frame=new JFrame(); frame.add(new NewClass()); frame.setSize(300,300); frame.setVisible(true); } } ",user2583511,https://stackoverflow.com/users/2583511,"Always use Swing Timer for GUI related tasks, as in javadoc mentioned: In general, we recommend using Swing timers rather than general-purpose timers for GUI-related tasks because Swing timers all share the same, pre-existing timer thread and the GUI-related task automatically executes on the event-dispatch thread. However, you might use a general-purpose timer if you don't plan on touching the GUI from the timer, or need to perform lengthy processing. After reading the tutorial you will understand what I did: import java.awt.event.*; import javax.swing.*; import java.awt.*; public class TimerDemo extends JFrame { private static final long serialVersionUID = 1L; private javax.swing.Timer timer; public TimerDemo() { super(""Panel Timer Demo""); //initialing swing timer timer = new javax.swing.Timer(100, getButtonAction()); JPanel p = new JPanel (); p.addMouseListener(new MouseAdapter(){ @Override public void mouseEntered(MouseEvent ev){ timer.start(); } @Override public void mouseExited(MouseEvent ev){ timer.stop(); } }); p.setBackground(Color.blue); getContentPane().add(p,BorderLayout.CENTER); setDefaultCloseOperation(3); setLocationRelativeTo(null); pack(); } private ActionListener getButtonAction() { ActionListener action = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { System.out.println(""Heloo""); } }; return action; } public static void main(String... args) { javax.swing.SwingUtilities.invokeLater(new Runnable() { @Override public void run() { new TimerDemo().setVisible(true); } }); } } ",Azad,https://stackoverflow.com/users/1735954,http://stackoverflow.com/questions/17655830/how-to-use-mouselistener-event,STACKOVERFLOW,stackoverflow.com 2118,Will paprika taste good in my soup?,"I've been making a soup that has an onion + garlic + carrot + celery + flour base, and then chunks of sweet potato and potato as well as barley added. I've been spicing it with salt, pepper, garlic powder, and basil. Now I want to substitute paprika for the basil. Would that ruin the soup? ",clueless,https://cooking.stackexchange.com/users/4853,"Paprika brings out the best in savory flavors. I'd go with something a little hotter to compliment the sweetness of the sweet potato - but not too hot, or you'll loose the regular spuds. ",RI Swamp Yankee,https://cooking.stackexchange.com/users/10218,http://cooking.stackexchange.com/questions/24063/will-paprika-taste-good-in-my-soup,LIFE_ARTS,cooking.stackexchange.com 8575,What is a word for somebody who lies to themselves,"I feel like the fact that people lie to themselves about things can tell you a lot about that person but I just can't put my finger on a single word that I'd use to describe them. In fact, not just describe them, but truly convey that they lie to themselves. Example of a person who lies to themself: ""I will do all my work tomorrow, I swear."" ",Petar,https://english.stackexchange.com/users/64497,"In psychology this is known as denial and it is generally thought of as unhealthy (though it is very common). Don't Even kNow I Am Lying. It is generally a lie of negation (""my drinking isn't a problem"") ",user69617,https://english.stackexchange.com/users/69617,http://english.stackexchange.com/questions/158869/what-is-a-word-for-somebody-who-lies-to-themselves,CULTURE,english.stackexchange.com 1916,How to synchronize actions like jump in multiplayer?,"I am a newbie game developer and I have been researching about multiplayer games. I observed that there's always some latency, the players always get updates from past actions. But there are techniques like dead reckoning to handle the latency. I can predict the movement and make movements smooth. But how would I make actions synchronize like jumping, stopped walking, etc. Suppose, client A was moving, he was at 100m at 10.2 time with 100m/sec velocity and sended this information. Client B would receive this information somewhat later, let it be 10.4. So at client B, I can use prediction and place client A at 120m. But what if, client made a jump at 110m at 10.3. I can't predict that and since I have been using prediction I can't show client A jump in past. I may deal with this problem by not sending jump action at all. But what if my game has some voids where players can fall and die. So, If I don't sync jump actions, other players will observe that one player was running then he falls in void and then again appear on the screen destroying the visual engagement. Jump is just an example, there might many scenarios where prediction can't work. So, How do deal with them. One such example can be Multiplayer Online battle arena games like Awesomenauts. ",Suyash Mohan,https://gamedev.stackexchange.com/users/29608,"Dead reckoning may not be the best idea in this case; you should do entity interpolation (effectively rendering the other players in the past, which always gives you real, valid positions). I've written about this with much more detail here. Whether or not seeing players slightly in the past is acceptable or not depends on the details of what you're trying to do. ",ggambett,https://gamedev.stackexchange.com/users/4082,http://gamedev.stackexchange.com/questions/59961/how-to-synchronize-actions-like-jump-in-multiplayer,TECHNOLOGY,gamedev.stackexchange.com 5154,Who should pursue a Ph.D degree?,"I am asking myself the question ""Should I do PhD or should I leave academia and go for an industrial career?"" My life-goal is being a professor. And I love to do research. PhD is surely a bite that not everyone can chew. But I wonder who can chew it? I never was good at tests and exams. My BSc. GPA was 2.84/4.00 but finished my MSc. with 3.50/4.00 However, currently I am working on a conference paper and I feel like even that is too much for me. It has been nearly 3 months and still, the paper draft is to be improved (not the wording but the content). I am surely a hard-worker but not always. Sometimes, I let go of my work and absorbed in other stuff (composing, amateur radio etc). If this period is too wide, I have to spend double effort to warm-up and remember where I left. I don't know how things work in PhD. It usually is 5-6 years. It is the one of two most-challenging milestones in academic career (the other is getting the title Assoc. Prof). Should I completely be a ""nerd"" and work on my thesis systematically (something I could never make in my entire life) or working periodically but with extra effort is still sufficient? So, here's my question: If I say ""I'm considering to do PhD"" and ask your advice, what would you ask me? What kind of skills/characteristics do you look for a potential academician? I know it is way too late for me to ask this kind of question, as a person who almost finished his master's degree. But better lose the saddle than the horse. ",padawan,https://academia.stackexchange.com/users/15949," So, here's my question: If I say ""I'm considering to do PhD"" and ask your advice, what would you ask me? What kind of skills/characteristics do you look for a potential academician? The first questions I would ask is: are you really interested in the subject? Can you imagine spending the next 5+ years thinking about pretty much nothing else? Why do you want to do a PhD in the first place? However, currently I am working on a conference paper and I feel like even that is too much for me. It has been nearly 3 months and still, the paper draft is to be improved (not the wording but the content). Now imagine the same thing but replace 3 month with 3 years. Sometimes, I let go of my work and absorbed in other stuff. This is also not very helpful for pursuing a PhD. I think in most fields (that might be different for some fields of science) getting a PhD is only for people who want to do research. Apart from that it is only a waste of time and money. So the question you should ask yourself is not: Am I able to get a PhD? But rather: Do I want to get a PhD? However, if you decided that you really want to give it a try: talk to someone from your university about it, maybe the supervisor of your thesis. Grades are not always a good indicator of the quality as a researcher. EDIT: My life-goal is being a professor. And I love to do research. That answers most of the questions. But I don't know if I'm capable of doing a Ph.D. No one here can answer this question. You should try to talk to a professor at your university, the supervisor of your Master's Thesis, or someone who is doing research you are interested in. However, do not let your grades disencourage you, I know many students who had pretty bad grades but are great as PhD students and many excellent students who struggle with their research. ",The Almighty Bob,https://academia.stackexchange.com/users/16086,http://academia.stackexchange.com/questions/23150/who-should-pursue-a-ph-d-degree,LIFE_ARTS,academia.stackexchange.com 1451,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) ",Atif Mohammed Ameenuddin,https://graphicdesign.stackexchange.com/users/100,"Your best bet would be to use the Save for Web & Devices... option. It's Photoshop's preferred method for exporting for web. That being said, the appearance of color on a website is always at the mercy of the user's screen calibration. ",Paulo,https://graphicdesign.stackexchange.com/users/192,http://graphicdesign.stackexchange.com/questions/160/how-to-export-png-to-be-compatible-with-all-browsers,LIFE_ARTS,graphicdesign.stackexchange.com 7308,Offline tiled map web app,"I'm not sure whether to post this here or on Stackoverflow, as it's sort of a crossover. Let me give it a try. In the proposed HTML5 standard, there's the option of storing web application data in a local cache using a cache manifest. I am looking to use this technique for an offline tiled web map application and did a quick prototype here based on a standard install of Geoserver. I just ripped the OpenLayers client page that is generated from one of the default layers and changed the <html> tag to <html xmlns=""http://www.w3.org/1999/xhtml"" manifest=""cache.manifest""> And created the file cache.manifest which simply reads CACHE MANIFEST http://lima.schaaltreinen.nl:8080/ Which should, in my limited understanding of the matter, locally cache everything that loads from that URL: all tiles and the OpenLayers JS. In fact, upon first call in Firefox, it does ask me to allow local storage, but when I hit refresh - either online or offline - the page croaks stating that the OpenLayers object is not defined. Looks like it hasn't loaded the OpenLayers JS. Anyone successfully did a functioning offline OpenLayers-based tiled web map app? Or hints on how to investigate this further? ",mvexel,https://gis.stackexchange.com/users/410,"One complexity that seems to show up in articles about this is that: Note that the MIME type of the manifest file is text/cache-manifest. And the examples all seem to list specific files to cache (but I may need to read further). ",Ian Turton,https://gis.stackexchange.com/users/79,http://gis.stackexchange.com/questions/3415/offline-tiled-map-web-app,TECHNOLOGY,gis.stackexchange.com 2970,How do I counter support Zyra?,"I main support, usually opting for poke supports such as Lulu and Sona or aggressive supports such as Blitzcrank and Leona. Since the various Regional Finals, however, I've begun to encounter support Zyras in my bot lane. This is a very difficult lane for me. I can't establish lane dominance, since Zyra just sits in her bush and puts seeds in mine. I've tried a rune page with flat MR for when I play against Zyra to counter some of her harass, but it doesn't help against her cc. How can I effectively counter a support Zyra? ",Schism,https://gaming.stackexchange.com/users/31508,"Look for best counters to Zyra her: http://www.picklol.net/zyra, so I would pick Lux against her. because of stun and harras! ",Henrik,https://gaming.stackexchange.com/users/41864,http://gaming.stackexchange.com/questions/88816/how-do-i-counter-support-zyra,CULTURE,gaming.stackexchange.com 2467,Why are straight lines sloping in render?,"Why are the walls in my architectural renders sloping and how do I fix this? ",jik bik,https://blender.stackexchange.com/users/7894,"The lens shift controls on the camera exist in Blender precisely to solve this problem. Photographers use tilt-shift lenses to do the same thing. Rather than rotating the camera upwards to the building, you can keep it pointing straight ahead, and increase the camera Y shift. This will preserve straight vertical lines. A good visualization of that is here: http://digitized-life.blogspot.com.es/2013/02/blender-26.html ",brecht,https://blender.stackexchange.com/users/242,http://blender.stackexchange.com/questions/18654/why-are-straight-lines-sloping-in-render,TECHNOLOGY,blender.stackexchange.com 6017,how to pass value from visual force page (InputField) to controller?,"I have created a Vf page from which i need to fetch the value of new owner and need to save the value in property defined in controller: Following is my vf page code: <apex:pageBlockSection> <apex:InputField label=""user"" value=""{!a.ownerid}""/> </apex:pageBlockSection> here a is object of opportunity Controller code: used one property to store the value: public string ownername {get;set;} Note: user will input the value through lookup field. Any suggestions on this? ",jack,https://salesforce.stackexchange.com/users/8706,"The inputfield will have a direct binding to the a.ownerid. This binding is two-directional, so that means two things: When the page loads, the input field will be filled with a.ownerid. The reverse is also true: the value of the input field will be saved to a.ownerid. If you had a commandButton with an action that is executed on the controller, the a.ownerid will by then have the value that the user entered on the Visualforce page before the user clicked the commandButton. Update your Visualforce code like so to include that commandButton <apex:pageBlockSection> <apex:InputField label=""user"" value=""{!a.ownerid}""/> <apex:commandButton action=""{!someAction}"" value=""Save""/> </apex:pageBlockSection> Now you can reference a.owernid anywhere in that someAction method on the controller, and use code like this to store it to owername: public PageReferene someAction() { ownername = a.ownerid; } ",Willem Mulder,https://salesforce.stackexchange.com/users/4989,http://salesforce.stackexchange.com/questions/38651/how-to-pass-value-from-visual-force-page-inputfield-to-controller,TECHNOLOGY,salesforce.stackexchange.com 9047,Windows Software to Mount Volume/Partition Image File,"Last night I had a BSOD a couple of minutes after moving a file. After a reboot, I found that the file was gone (it was deleted from the source partition and not present on the destination). I took an image of the source volume (ie from the Boot Sector to the last cluster of the partition). Then I wrote a program to extract the unused clusters from a disk and save them as files. Some of the free clusters on the original volume have now been overwritten so I need to use the image to do my final extraction. That means I need some software that can mount a volume/partition image, but all of the image mounting software I can find can only mount disk images (ie from the MBR—the master partition table—on). Does anyone know of (hopefully free) Windows software that can do this? I’ve already tried (without success): VirtualCloneDrive, DaemonTools, VirtualFloppyDrive (and probably a couple of others I can’t think of). They all either nag that the file is no good, or try to mount it, resulting in a disk that Windows complains has an unknown/corrupt filesystem. Thanks. ",Synetech,https://superuser.com/users/3279,"Try alcohol 120 and magicDisc ",Houston we have a problem,https://superuser.com/users/56585,http://superuser.com/questions/172184,TECHNOLOGY,superuser.com 7953,Combining two fields in SELECT statement,"In my table I have a field ""firstname"" and a field ""lastname"". I would like to select all records where firstname + space + lastname is a certain value. I've tried this: $sql = ""SELECT * FROM sam_users WHERE (user_firstname + ' ' + user_lastname LIKE ?)""; But this isn't working. With Google I've found something about using ||, but I don't really understand how I should use that operator. Note that I don't want to use an or-operator (what || is in many languages), but something to concatenate 2 fields (with a space between them) and using a LIKE on that. Thanks! ",Bv202,https://stackoverflow.com/users/618622,"With MySQL, you can use CONCAT: SELECT * FROM sam_users WHERE CONCAT(user_firstname, ' ', user_lastname) LIKE ? or CONCAT_WS (which ignores NULL values): SELECT * FROM sam_users WHERE CONCAT_WS(' ', user_firstname, user_lastname) LIKE ? However, MySQL won't be able to use any indices when performing this query. If the value of the pattern argument to LIKE begins with a wildcard, MySQL won't be able to use indices, so comparing to a generated value (instead of a column) won't make a difference. You can also set the MySQL server SQL mode to ""ANSI"" or ""PIPES_AS_CONCAT"" to use the || operator for string concatenation. SET @@sql_mode=CONCAT_WS(',', @@sql_mode, 'PIPES_AS_CONCAT'); SELECT * FROM sam_users WHERE (user_firstname || ' ' || user_lastname) LIKE ? This sets the SQL mode for the current session only. You'll need to set @@sql_mode each time you connect. If you wish to unset 'PIPES_AS_CONCAT' mode in a session: SET @@sql_mode=REPLACE(@@sql_mode, 'PIPES_AS_CONCAT', ''); MySQL appears to remove any extra commas in @@sql_mode, so you don't need to worry about them. Don't use SELECT *; select only the columns you need. ",outis,https://stackoverflow.com/users/90527,http://stackoverflow.com/questions/5291704/combining-two-fields-in-select-statement,STACKOVERFLOW,stackoverflow.com 8189,How to increase saturation or intensity of this printed pattern," The image on the left is what I see on my monitor ( CMYK Vector ) The image on the right was produced using flexography for a packaging design The image on the right is dull and murky and doesn't 'pop' as much as it should. I think the yellow is the issue. Is it a possibility that my printer is at fault? Could I ask them to increase the % of yellow? Would a matte or glossy finishing technique help? OR is the design itself the issue with too many gradients making it hard to accurately reproduce through print? ",Cool Brian,https://graphicdesign.stackexchange.com/users/30296,"What you see on your monitor is RGB. Yes, it's a CMYK file, and it's likely trying to compensate, but it's still using an RGB model. As such, what you see on screen is usually always more vibrant/saturated than what CMYK can produce. This is due to the reproducible colors being different in each color space: Using coated paper and/or applying a top-coat can certainly help your CMYK print look brighter, but ultimately, you are at the mercy of what CMYK can do. At this point, you need to talk to your printer and get their feedback. They may be able to tweak the file to accommodate. Alternatively, if it is yellow that is the issue, perhaps they can swap Y for a more vibrant Pantone Spot Yellow. ",DA01,https://graphicdesign.stackexchange.com/users/306,http://graphicdesign.stackexchange.com/questions/56417/how-to-increase-saturation-or-intensity-of-this-printed-pattern,LIFE_ARTS,graphicdesign.stackexchange.com 4459,Is the Hebrew vocabulary used in the Tanakh/(other recognized Hebrew books) the same as the what is considered Hebrew today?,"There are many Hebrew resources available in the mainstream world, i.e. Webster's, Google, etc. Is the Hebrew used in the Tanakh/(other recognized Hebrew books, i.e. the Mishna, Rambam, etc.) considered to have the same vocab (word definitions, not necessarily grammar etc.) as what is commonly referred to as Hebrew nowadays? It is my understanding that it is, i.e. any English-Hebrew dictionary could be consulted to translate the texts for an English speaker, but how could this be verified? Is there some sort of official Rabbinical concordance of Hebrew? ",jj2,https://judaism.stackexchange.com/users/11533,"No, Modern Hebrew, the contemporary spoken and written language, is not identical with Biblical Hebrew, the version[s] of the language in which Tanach was written. Hebrew, like all natural languages, has evolved over time from the times of Tanach until today, and on top of that, Modern Hebrew is the result of an intentional revival and modernization of the language, including a great deal of adaptations of words from other languages and re-appropriations of words that meant something slightly or drastically different in earlier forms of Hebrew. Some examples of re-appropriations: The word חשמל (chashmal), which means ""electricity"" in Modern Hebrew, refers to some esoteric property of angels in Tanach (Yechezkeil). A more subtle example is the word דג (dag). In Modern Hebrew, it refers to the same biological class of animals that the most common sense of the English word ""fish"" does: ""A cold-blooded vertebrate animal that lives in water, moving with the help of fins and breathing with gills."" However, there's no good reason to assume that when used in Tanach, for example - famously - in Yonah, the intent of the word accorded with contemporary biological taxonomy, so it could very well have meant ""whale"" or some other aquatic creature that we wouldn't call a ""fish."" I have heard people unaware of the difference between Modern and Biblical Hebrew assuming that commentators interpreting the Bible were expressing ignorance of the true meaning of ""fish"" when including ""whale"" in the possible interpretations of an instance of ""דג."" The verb ""גָּר,"" in Modern Hebrew, means, simply ""to dwell somewhere."" However, in Biblical Hebrew, it means specifically ""to sojourn through a strange land."" A reader who is familiar with the Modern sense of the word but unaware of this nunance in the Biblical sense could miss important meaning in the text, as in Ruth 1:1: ""‏... ‏וַיֵּלֶךְ אִישׁ מִבֵּ֧ית לֶ֣חֶם יְהוּדָה לָגוּר בִּשְׂדֵי מוֹאָב‏ ...‏"" - ""... And a certain man of Beth-lehem in Judah went to sojourn in the field of Moab ..."" If this verb is read as ""to dwell,"" then the reader misinterprets the subject's intended temporary evacuation as an intended permanent relocation.1 Thus, the dramatic change of intent hinted in the next verse's ""‏... ‏וַיִּֽהְיוּ־שָֽׁם"" - ""... and they continued there,"" is also lost. I don't know if any comprehensive dictionaries of Biblical Hebrew, consistent with Jewish tradition, exist. To be fully accurate, such a dictionary would have to deal explicitly with the fact that the same word can have different meanings in different contexts, depending on the time period the book came from as well as the actual context. Not the same as a dictionary, but one way to read Tanach in English translation, consistent with Jewish tradition, would be to use a complete Jewish translation of Tanach. One well-regarded trandition-adherent version is that of Judaica Press, which is available in convenient form online on Chabad's website. 1. This example is at the top of my mind thanks to R' Yitzchak Etshalom having pointed it out in an excellent lecture I was fortunate to recently attend. ",Isaac Moses,https://judaism.stackexchange.com/users/2,http://judaism.stackexchange.com/questions/59553/is-the-hebrew-vocabulary-used-in-the-tanakh-other-recognized-hebrew-books-the,CULTURE,judaism.stackexchange.com 8479,Using coalesce on an index column,"Does doing a COALESCE on an indexed columns in a WHERE clause e.g. WHERE COALESCE(table1.indexed_column, '9999-01-01') > table2.other_date_column affect indexing in a bad way? I think that it should but in this case how should I convert my where clause? ",Jim,https://dba.stackexchange.com/users/27756,"If you afraid that the condition will keep the optimizer from using an index on the columns, you are right, the use of functions in most DBMS has this effect. There are some exceptions to the rule but not in MySQL. If you want indexes to be considered (and possibly used), you have to conevrt the condition to one without functions applied to columns. Your condition, (if table2.other_date_column is not nullable), is equivalent to: ( table1.indexed_column > table2.other_date_column OR table1.indexed_column IS NULL ) ",ypercubeᵀᴹ,https://dba.stackexchange.com/users/993,http://dba.stackexchange.com/questions/52219/using-coalesce-on-an-index-column,TECHNOLOGY,dba.stackexchange.com 2133,Solving a two point boundary problem for a piecewise system of equations,"I'm trying to solve a two point boundary value problem with a piecewise system of equations like: dx[t_] := Piecewise[{{0, y[t] <= 0}, {x[t]^(3/4) - x[t], y[t] > 0}}] dy[t_] := Piecewise[{{0, y[t] <= 0}, {(1 - y[t])/x[t]^(1/4) + y[t], y[t] > 0}}] NDSolve[{x'[t] == dx[t], y'[t] == dy[t], x[0] == 1, y[10] == 2}, {x, y}, {t, 0, 10}] which produces the error NDSolve::bvdisc: NDSolve is not currently able to solve boundary value problems with discrete variables. I tried the answers here by entering funs = ParametricNDSolveValue[{x'[t] == dx[t], y'[t] == dy[t], x[0] == 1, y[10] == yt}, {x, y}, {t, 0, end}, yt] FindRoot[funs[yt][end], {yt, 2}] which yields the same error. Is there any way to solve this system? Thanks for the help. ",Mauricio,https://mathematica.stackexchange.com/users/19635,"Here is now the - hopefully - correct (numeric) solution of the original problem. To begin with, we define a time t0 such that y = 0 for 0<=t<=t0. Für x(t) we have x(t) = 1 for 0<=t<=t0, otherwise we have first to solve the equation sx = DSolve[x'[t] == x[t]^(3/4) - x[t] && x[0] == 1, x[t], t] We can ignore the error Messages. (* Out[701]= {{x[t] -> E^-t (-2 + E^(t/4))^4}, {x[t] -> E^-t ((-1 - I) + E^(t/4))^4}, {x[t] -> E^-t ((-1 + I) + E^(t/4))^4}} *) Taking the real-valued solution: x[t] /. sx[[1]] (* Out[700]= E^-t (-2 + E^(t/4))^4 *) Having caluclated that, we now define the complete function x[t,t0] x[t_, t0_] := E^(-t + t0) (-2 + E^((t - t0)/4))^4 /; t > t0 x[t_, t0_] := 1 /; 0 <= t <= t0 Plotting it (for t0 = 5) Plot[{x[t, 5]}, {t, 0, 30}, PlotRange -> {0, 1}] Now inserting x[t,t0] we can NDSolve for y(t). Here we have selected the parameter t0 by trial and error such that y[10]=2 t0 = 1.03214; ta = 0; te = 12; sn = NDSolve[{D[y[t], t] == 1 - y[t] (1/x[t, t0]^(1/4) - 1), y[t0] == 0}, y[t], {t, ta, te}][[1]]; {ta, te} = Head[(List @@ sn[[1]])[[2]]][[1, 1]]; yy[t_] = y[t] /. sn; Print[""y[10] = "", yy[10]]; Plot[{2, Evaluate[x[t, t0]], yy[t]}, {t, ta, te}, PlotRange -> {-1, 2.2}, PlotLabel -> ""Solution of the two-point boundary problem\nred curve = x(t), green curve \ = y(t)\nt0 = "" <> ToString[t0] <> ""\ty(10) = "" <> ToString[yy[10]]] y[10] = 2. Of course, y(t) must be set to zero below t=t0. This is trivial and not shown in the picture. This seems to be the only solution. For greater values of t0 the boundary value y(10) decreases, and for smaller it increases. Regards, Wolfgang ",Dr. Wolfgang Hintze,https://mathematica.stackexchange.com/users/16361,http://mathematica.stackexchange.com/questions/59205/solving-a-two-point-boundary-problem-for-a-piecewise-system-of-equations,TECHNOLOGY,mathematica.stackexchange.com 1184,"Without using dowels, how do I join 2x4s edge to edge to be 1.5"" x 7""?","I am trying to join a 2x4 supporting a workbench tabletop to another to make a backsplash of sorts. Any ideas how to do this without dowels? (No, I can't use 2x8) ",Jens Turner,https://diy.stackexchange.com/users/15656,"Strapping You could use some form of strapping on the back side. With this option, you can extend the strapping and use it to attach the whole bit to the workbench. Bored Holes You could bore holes on the edge of the top or bottom piece to about half the width of the board, then use screws to fasten the two boards together. You'll likely want to use a drill press to bore the holes. Glue Since it's not going to be structural, you could simply glue the two boards together using wood glue. Sliding Dovetail If you want to get real fancy, a sliding dovetail would work. Though with this joint, you'll loose a bit of overall height. ",Tester101,https://diy.stackexchange.com/users/33,http://diy.stackexchange.com/questions/32868/without-using-dowels-how-do-i-join-2x4s-edge-to-edge-to-be-1-5-x-7,LIFE_ARTS,diy.stackexchange.com 8107,Is there an analogue of the jordan normal form of an nilpotent linear transform of a polynomial ring?,"Is there an analogue of the Jordan Normal Form for an infinite dimensional vector space? In general I think the answer is no. It's been awhile since I studied it, but I'm pretty sure something would go wrong in distinguishing eigenvalues for an infinite dimensional space. Normally, for infinite dimensional vector spaces, you have some topology that allows you to define compact operators, et cetera, that are easier to study. But in my specific case I'm looking at an nilpotent linear map $D: F[X] \to F[X]$, where $F$ is a finite field. I'm actually trying to find the kernel of said map. I hope that a transformation to a suitably friendly basis would help (hence why I'm asking about jordan normal forms!). Is $F[x]$ close enough to finite that there might be something similar to the JNF that can help? Some motivation: For $f \in F_2[x]$ and $F_4 = F_2[\mu]/(\mu^2 + \mu + 1)$, the map is $Df = f(x + \mu) - f(x)$ (so actually $D: F_2[x] \to F_4[x]$, but clearly this can be thought of as an endomorphism). I'm trying to find the kernel of this map in $F_2$. Originally, I thought it would be spanned by elements like $x^{2^n} + x^{2^{n-2}}$, since $(x + \mu)^n$ would have a lot of non-zero terms when n isn't a power of 2. But after trying to prove that, I found several counterexamples (exempli gratia $x^{12} + x^9 + x^6 + x^3$). Additionally, if $\text{deg}f=n$, I have $n$ equations that the coefficients of $f$ must satisify for $f$ to be in the kernel, and I believe I can show that we can have polynomials of 8, 16, 32, et cetera, terms that aren't sums of something that has fewer terms and already is in the kernel, but that's quite a bit of work! So I've decided to try looking for a different basis for $F_2[x]$ that would get close to diagonalizing the matrix of $D$. But as @Mariano, pointed out, this may not be any easier... Edit before I provided and motivation, this question asked about idempotent maps and not nilpotent. But that was because I was being silly and got the terms ""idempotent"" and ""nilpotent"" confused. I didn't catch my mistake until @Mariano reminded me that an idempotent operator is a projection when he answered the idempotent question. The map $D$ is clearly not idempotent! ",mebassett,https://math.stackexchange.com/users/27165,"Let $f:V\to V$ be an idempotent endomorphism of any vector space over any field. Let $V_0=\ker f$ and $V_1=\{v\in V:f(v)=v\}$. Then it is immediate that $V_0\cap V_1=\{0\}$, and if $v\in V$, then $v=v_0+v_1$ with $v_0=v-f(v)$ and $v_1=f(v)$, so that $f(v_0)=f(v)-f(f(v))=0$ and $f(v_1)=f(f(v))=f(v)=v_1$, that is, $v_0\in V_0$ and $v_1\in V_1$. This shows that $V=V_0\oplus V_1$. It follows that every idempotent endomorphism of a vector space is diagonalizable, and that its only possible eigenvalues are zero and one. Finite dimensionality plays no role in this context. This information in no way helps you find the kernel of $f$, by the way... Finding the «friendly basis» you talk about (if by that we understand «basis which diagonalizes the map») is equivalent (if not actually harder!) to finding the kernel. ",Mariano Suárez-Álvarez,https://math.stackexchange.com/users/274,http://math.stackexchange.com/questions/121833/is-there-an-analogue-of-the-jordan-normal-form-of-an-nilpotent-linear-transform,SCIENCE,math.stackexchange.com 2049,Ball structuring element representation,"Regarding the ball structuring element mentioned here, how can we represent it as a matrix, the same as some structuring elements represented at the same page? ",Simplicity,https://stackoverflow.com/users/588855,"strel('ball',radius,height) Type this into matlab and it will display a matrix: strel('ball',5,10) The first matrix you get is the area and size of the ball as a matrix. The second matrix is the height of the each element of the ball. ",Ben,https://stackoverflow.com/users/1880266,http://stackoverflow.com/questions/18677161/ball-structuring-element-representation,STACKOVERFLOW,stackoverflow.com 4163,Twisted Fate: Do Wildcards (Q) apply the effects of Pick A Card (W)?,"Wildcards (Q): Twisted Fate throws 3 cards forward in an arc, dealing magic damage 60 / 110 / 160 / 210 / 260 (+ 65% AP) to enemies they pass through. Pick a Card (W): When first activated, cards flash over Twisted Fate's head in the following order: blue, then red, then gold (this cycle repeats itself). When he uses the ability again, he picks the current card over his head; the card picked converts his next basic attack within 6 seconds to deal magic damage and add a special effect. Twisted Fate has 6 seconds to select a card. Do the Wildcard cards apply the same effect as the cards in Pick a Card? ",DropDeadSander - EUW,https://gaming.stackexchange.com/users/61976,"His Q ability is simply an AoE spell that deals damage. Although the cards do occasionally change their color, there is no additional effect to it. It's just cosmetic. ",Jutschge,https://gaming.stackexchange.com/users/64410,http://gaming.stackexchange.com/questions/184880/twisted-fate-do-wildcards-q-apply-the-effects-of-pick-a-card-w,CULTURE,gaming.stackexchange.com 4125,"Does adding a comma before ""or"" change the meaning of a phrase?","For example, the definition given from the OALD for pronoun is the following one: a word that is used instead of a noun or noun phrase, for example he, it, hers, me, them, etc. If I would rewrite it as the following, would the mean change? a word that is used instead of a noun, or noun phrase, for example he, it, hers, me, them, etc. If the meaning doesn't change, are there other differences between those phrases? Is this just an example of using the Oxford comma, or is there something different/more? I am asking because I rephrase a similar phrase, and I was said it was more correct without the comma. ",kiamlaluno,https://ell.stackexchange.com/users/95,"This is not an Oxford comma because it is not the serial comma customarily used before a coördinating conjunction at the end of a series. It is instead an example of paired commas used as a weak or less obtrusive form of parentheses. These are all equivalent: A pronoun is a word that is used instead of a noun, or noun phrase, for example he, it, hers, me, them, etc. A pronoun is a word that is used instead of a noun (or noun phrase), for example he, it, hers, me, them, etc. A pronoun is a word that is used instead of a noun — or noun phrase — for example he, it, hers, me, them, etc. Such “parenthifying” punctuation is something that could be omitted without great loss. I don’t think you can use the comma there, because “or noun phrase” cannot be freely omitted without changing the overall meaning. Also, the indefinite article seems intended to distribute across noun and noun phrase in that sentence, and if you break it up with a comma, you lose that. My own preference would be to write that this way: A pronoun is a word used in place of a noun or noun phrase; for example, he, it, hers, me, mine, and them are all pronouns. Incidentally, this is the pro- that means “for”, so a pronoun is a word used for a noun (or noun phrase). ",tchrist,https://ell.stackexchange.com/users/141,http://ell.stackexchange.com/questions/3208/does-adding-a-comma-before-or-change-the-meaning-of-a-phrase,CULTURE,ell.stackexchange.com 5115,Patch OpenSSL CVE-2014-0160 on ubuntu 12.04?,"NO, this is not a duplicate of How to patch the Heartbleed bug (CVE-2014-0160) in OpenSSL?. So, read on. I am seeing conflicting information with respect to Ubuntu 12.04: The Heartbleed page claims Ubuntu 12.04 to be affected and needs to be patched with 1.0.1g The Ubuntu Security Notice USN-2165-1 claims that version 1.0.1-4ubuntu5.12 for the package libssl1.0.0 should fix the issue on Ubuntu 12.04. Now I do have these packages installed: # dpkg -l | grep ssl ii libssl1.0.0 1.0.1-4ubuntu5.10 SSL shared libraries ii openssl 1.0.1-4ubuntu5.10 Secure Socket Layer (SSL) binary and related cryptographic tools # lsb_release -a | grep -i description Description: Ubuntu 12.04.3 LTS So, If I consider above two points, I am not sure which one is true. Besides, this Heartbleed test page says that my machine is vulnerable. Has anyone yet been able to fix this issue successfully on Ubuntu 12.04? If yes, then could you provide me the steps you have taken? ",slayedbylucifer,https://askubuntu.com/users/95973,"Why don't you update? If Ubuntu says you need 5.12, and that heartbleed site says you're vulnerable, what's the problem? I have the following installed, which was updated yesterday or today on my machine. ii openssl 1.0.1-4ubuntu5.12 ",SPRBRN,https://askubuntu.com/users/55365,http://askubuntu.com/questions/445340/patch-openssl-cve-2014-0160-on-ubuntu-12-04,TECHNOLOGY,askubuntu.com 7682,how to send a mail by telnetting through some SMTP server?,"I wanted to send a mail by telnetting through smtp server ""telnet smtp_Server 25"" and want to send mail. How is it possible.. Also, please share something about CISCO products and what kind of software they use in their products. If i wanted to gain some insight knowledge, where should go to.. Thanks.. ",RBA,https://serverfault.com/users/16031,"Your ISP usually provides you with one you can access, if not - at least they'll have a relay you can authenticate and send e-mail through from an smtp server you set up yourself. ",Oskar Duveborn,https://serverfault.com/users/1463,http://serverfault.com/questions/59621,TECHNOLOGY,serverfault.com 1818,How to hide a DIV element when I click outside,"I have a div and want to hide it when I click outside. My code is: <div id=""mydiv"">The div must be above button</div> $('#mydiv').click(function(e) { e.stopPropagation(); }); $(document).click(function() { $('#mydiv').fadeOut(300); }); But it is not working for me ... UPDATE Full code is presented below. When I click on a button it shows a div above, so I need to hide this div when I click outside. DEMO <div id=""but"" style=""text-align: right;""><button type=""button"">Show Div!</button></div> <div id=""mydiv"" style=""display:none;"">The div must be above button</div> $(""#but button"").click(function(){ var pos = $(this).offset(), div = $(""#mydiv""); // Make it visible off-page so // we can measure it div.css({ ""display"": ""block"", ""border"": ""1px solid black"", ""position"": ""absolute"", ""left"": -10000, ""top"": 0 }); // Move it where we want it to be div.css({ ""left"": pos.left - 40, ""top"": pos.top - div.height() - 10 }); }); $('#myDiv').click(function(e) { e.stopPropagation(); }); $(document).click(function() { $('#mydiv').fadeOut(300); }); ",andys,https://stackoverflow.com/users/1139767,"try .blur(), and like this: $('#mydiv').blur(function(e) { $(this).fadeOut(300); }); Hope it help ",Michael Antonius,https://stackoverflow.com/users/1466229,http://stackoverflow.com/questions/13892375/how-to-hide-a-div-element-when-i-click-outside,STACKOVERFLOW,stackoverflow.com 2975,What was the meaning of the tunnel scene?,"In Vanishing on 7th Street, people disappear if they become engulfed in darkness. At one point Paul is lying on the pool table and the kid went to the bathroom. The lights flicker and Paul gets up. He ends up finding his way into this tunnel. When he reaches the end he looks back and all of the lights go out. The kid goes back in and finds Paul missing. What is the meanign of the tunnel scene? It seems that it didn't actually happen, but I'm confused as to why it's included. ",DForck42,https://movies.stackexchange.com/users/52,"I think that the Paul became engulfed because he imagined himself being tricked by the ""Shadows"".In other words he loses inside his mind. ",Mungunbat Enkhbayar,https://movies.stackexchange.com/users/6846,http://movies.stackexchange.com/questions/3764/what-was-the-meaning-of-the-tunnel-scene,LIFE_ARTS,movies.stackexchange.com 5198,Is it possible to encrypt a file so that it can not be brute forced?,"Is there any program or method that allows encryption that can not be brute forced or is it just that any encrypted file can be decrypted by brute force? ",user43351,https://security.stackexchange.com/users/43351,"The difficulty of brute forcing an encryption system is based on the degree of randomness produced by the key. When a key is less than the length of a file, there has to be some type of reuse, and this means less than perfect randomness and thus some small susceptibility to being brute forced. Thus, in order to make something truly brute force proof against an attacker with unlimited resources and time, the only option is a truly random key that is the same length as the input and that has never been used as a key on another message. This technique is actually very, very old and is known as a one time pad (or OTP). An OTP is completely future secure as long as the key remains secret. Since the key is random and only used once, the input bears no resemblance to the output and ""jfeidj"" could just as easily be ""attack"" as it could be ""dinner"". That said, attackers don't have unlimited time or resources, so practically speaking, almost any modern symmetric algorithm will provide more than enough security even at key lengths as low as 128 bits or lower. 128 bit AES, for example, while ""technically"" able to be brute forced would take so long trying to brute force that chances are good that if every computer on the planet worked on nothing but cracking the message, the sun would die and the solar system get sucked in to a black hole before they finished cracking the message. (Provided there aren't any unknown flaws in the algorithm and that the key is properly generated.) If you make it 256bit, the heat death of the universe will come before you successfully brute force it. So practically speaking, just about any modern algorithm is secure against brute forcing with sufficient key length. ",AJ Henderson,https://security.stackexchange.com/users/12578,http://security.stackexchange.com/questions/54724/is-it-possible-to-encrypt-a-file-so-that-it-can-not-be-brute-forced,TECHNOLOGY,security.stackexchange.com 9579,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) ",Atif Mohammed Ameenuddin,https://graphicdesign.stackexchange.com/users/100,"See this thread from the Apple support, but Safari uses the monitor's colorspace, which is different than most browsers, which only use sRGB. Hopefully the article will have some good information for you. ",PearsonArtPhoto,https://graphicdesign.stackexchange.com/users/69,http://graphicdesign.stackexchange.com/questions/160/how-to-export-png-to-be-compatible-with-all-browsers,LIFE_ARTS,graphicdesign.stackexchange.com 766,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? ",P..,https://expressionengine.stackexchange.com/users/1962,"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. ",Marc,https://expressionengine.stackexchange.com/users/847,http://expressionengine.stackexchange.com/questions/21510/ee-control-panel-dashboard-search-field,TECHNOLOGY,expressionengine.stackexchange.com 2779,How can I do some free design work?,"I am a designer that wants to do some free design work for people, but the problem is, how do I find people to do free work for? Is there any place online? The reason behind this is that I am good at this, but I don't have any clients, or any previous experience and I am a freelancer, so this would look good on my portfolio. My skills are very vast and include : 3D, 2D animation, 3D modeling, motion design, stop motion animation,video editing, game design, level design, FluidSIM, illustration, unreal engine 4, graphics design, editorial design, web design and I also know HTML5, CSS, JavaScript and jQuery. By free work, I mean that the clients don't have to pay a single penny for the work that I do. ",Zach Roschack,https://graphicdesign.stackexchange.com/users/43164,"Have you tried offering your services to your community? Places always in need of graphic designers include: Religious communities (churches) Community centres Amateur theatre groups Support groups (i.e. AA) Schools Immigration welcoming groups Senior communities Condominiums By the way, you can always do these things without saying explicitly ""hey, I am a graphic designer and I am looking for graphic design tasks"". Just volunteer to do things that are graphic design by nature like posters, websites, flyers etc. As a bonus, you will get experience on how to handle clients: even if you do it for free people can get very demanding and opinionated. Mind you, the more we offer or work for free the more people think our work is worth nothing. It is always good to give back to the community, but it is also important to educate the world. We do what we do for a living, not just for the love of it. ",cockypup,https://graphicdesign.stackexchange.com/users/12151,http://graphicdesign.stackexchange.com/questions/51992/how-can-i-do-some-free-design-work,LIFE_ARTS,graphicdesign.stackexchange.com 7390,"Was the Second Doctor's ""regeneration"" actually a regeneration?","I recently saw a mix up of all of the Doctors regeneration scenes. When the second Doctor changes to the third (from Patrick Troughton to Jon Pertwee in ""The War Games, Part Ten"" (1969)), it is forced on him as punishment before being exiled to earth. The Doctor was not critically injured or dying. The transformation was the Time Lords doing. Does this really count as one of the 12 regenerations? ",Keo,https://scifi.stackexchange.com/users/16220,"Yep, it was his first regeneration ",L.J Rob,https://scifi.stackexchange.com/users/25111,http://scifi.stackexchange.com/questions/39036/was-the-second-doctors-regeneration-actually-a-regeneration,LIFE_ARTS,scifi.stackexchange.com 3947,How can I set Spotlight metadata to files?,"I am looking for a command line utility (I need to use it in a script) that can set Spotlight metadata to files. ",Kostas,https://apple.stackexchange.com/users/2290,"Here is a function I use to write Finder Comments to a file. They show up in Spotlight, but not in the Get Info box... def writexattrs(F,TagList): import subprocess """""" writexattrs(F,TagList): Writes the list of tags to xattr field of file named F """""" plistFront = '<!DOCTYPE plist PUBLIC ""-//Apple//DTD PLIST 1.0//EN"" ""http://www.apple.com/DTDs/PropertyList-1.0.dtd""><plist version=""1.0""><array>' plistEnd = '</array></plist>' plistTagString = '' for Tag in TagList: plistTagString = plistTagString + '<string>{}</string>'.format(Tag) TagText = plistFront + plistTagString + plistEnd WhichAttribute = ""com.apple.metadata:kMDItemFinderComment"" # Other attributes you might want to try: [""kOMUserTags"",""kMDItemOMUserTags"",""_kMDItemUserTags"",""kMDItemkeywords""] XattrCommand = 'xattr -w {0} \'{1}\' ""{2}""'.format(WhichAttribute,TagText.encode(""utf8""),F) # optional, print command format to check: # print XattrCommand ProcString = subprocess.check_output(XattrCommand, stderr=subprocess.STDOUT,shell=True) return ProcString ",beroe,https://apple.stackexchange.com/users/55567,http://apple.stackexchange.com/questions/5828/how-can-i-set-spotlight-metadata-to-files,TECHNOLOGY,apple.stackexchange.com 4101,Exporting (bullet) collision shapes,"I'm writing a scene exporter from blender to a format to be used by a game. I need to be able to export physics information the game needs, mainly the collision shape of every object (either the one set in Blender Render or Blender Game but the latter is better). I cannot seem to find anywhere that the collision shape is available to python. I've seen references to PhysicsConstraints.exportBulletFile() but this appears to be under the bge module, which as far as I can tell, is not accessible by exporter scripts. Is there any way to determine the details of a shape (rotation and scale, width, height, depth for box or radius and height for cylinder, vertices for convex hull, etc...)? ",luminus,https://blender.stackexchange.com/users/1789,"Finding the parameters necessary to generate such a shape should be possible with python. From the wiki: The Shape setting determines the collision shape of the object. The following shapes are available: Primitive shapes - these are best in terms of memory/performance but don't necessarily reflect the actual shape of the object. They're calculated based on the object's bounding box. The center of gravity is always in the middle for now. Box: The size per axis is calculated from the bounding box Sphere: The radius is the largest axis of the bounding box Capsule: This points up the Z-Axis. Cylinder: This points up the Z-Axis. The height is taken from the z-axis, while the radius is the larger of the x/y-axes. Cone: This points up the Z-Axis. The height is taken from the z-axis, while the radius is the larger of the x/y-axes. 'Mesh based shapes' - these are calculated based on the geometry of the object so they are a better representation of the object. The center of gravity for these shapes is the object origin. Convex Hull: Convex approximation of the object, has good performance and stability. Mesh: Allows to simulate concave objects, but is rather slow and unstable. To build these shapes using the UI: Box: Select the target object and press CtrlShiftAltC > Origin to goemetry, and then press F6 and select bounds center. With the target object selected, press ShiftS> Cursor to selected to move the cursor to the objects origin. Add a cube to be the bounding box. It will automatically be centered at the 3D cursor, which is snapped to the target object's origin point. Copy the Dimension and Rotation values from the target object to the bounding cube. These values are located on the Properties region (N in the 3D view): You can quickly copy and paste values by hovering over the number field and pressing CtrlC/CtrlV accordingly. Since this process of copying and pasting the values of each channel can be a bit tedious, you can use a quick bit of python to do this for you: import bpy active = bpy.context.active_object selected = bpy.context.selected_objects for obj in selected: obj.dimensions = active.dimensions This copies the dimensions from the active object to the selected objects. Parent the bounding box to the target object so the relative location, rotation, and scale is kept the same. You can also set the bounding cube's Draw type to Wire in Properties > Object > Display > Maximum Draw Type. Sphere Do steps 1 to 3 from the Box instructions, adding a sphere instead of a cube. Copy only the largest dimension value from the target into all three dimensions of the sphere. Do step 3 of the instructions for Box (Parent the bounding mesh and set the draw type to wire) Cylinder Do steps 1 to 3 from the Box instructions, adding a cylinder instead of a cube. Copy the largest dimension value of the target excluding the Z axis, so the value of either X or Y into both the X and Y dimensions of the Cylinder. Copy the Z dimension value of the target to the Cylinder. Do step 3 of the instructions for Box (Parent the bounding mesh and set the draw type to wire). Cone Do the same as for Sphere. Convex Hull This is more complex. you could try to generate your own using python, or you could try one of these existing options: The Convex Hull operator built into blender. Duplicate target object (ShiftD) With the duplicate selected, enter edit mode (Tab) and select all (A) Run the convex hull operator (Space> Search > Convex Hull) This Convex Hull generator written in python. Existing addons I also found a couple existing scripts/addons from a quick google search: One for exporting to YAML Niftools Wiki - Blender 2.49 nif import/export - Collisions Niftools - Blender 2.6x nif export collision code ",gandalf3,https://blender.stackexchange.com/users/599,http://blender.stackexchange.com/questions/5371/exporting-bullet-collision-shapes,TECHNOLOGY,blender.stackexchange.com 734,"Has Jesus ever directly said he would die as a voluntary sacrafice? If so, wasn't it double sense?","I know about mentioning Jesus died to redeem mankind in evangelical literature like: For God so loved the world, that he gave his only Son, that whoever believes in him should not perish but have eternal life. (John 3:16) But I suspect these are only later interpretations. Has Jesus himself ever said his dead is a sacrifice? If so, isn't double meaning in Greek? At least in Czech, English and German you could use the phrase ""he died for humans' sins"" in sense of ""because of"" - like cause of his death was humans' fault - fault of the Romans who crucified him. (btw I think I understand the evangelical message so I'm not asking how christians get it today, so please don't make your interpretations of the direct Jesus' quote much distant) Thank you. ",Probably,https://christianity.stackexchange.com/users/12541,"The most obvious answer is Jesus' words to his disciples at the Last Supper, in Matthew's version: this is my blood of the covenant, which will be shed on behalf of many for the forgiveness of sins. (Matthew 26:28, New American Bible Revised Edition) ",Matt Gutting,https://christianity.stackexchange.com/users/12563,http://christianity.stackexchange.com/questions/41485/did-jesus-ever-directly-say-he-would-die-as-a-voluntary-sacrifice-if-so-was-it,CULTURE,christianity.stackexchange.com 4863,How to remove the “ .0” in Decimal format and convert 1.01 to 1 in java,"My application deals with prices, I am facing a small problem here. I will explain it clearly in steps. Following are my inputs and OutPut should be. input 1.01 = output 1 input 1.748 = output 1.75 input 1.98 =output 2 input 1.49 = output 1.5 input 20.0 = output 2 0 I have used the following code but I can't achieve it double calc = 1.98; DecimalFormat df = new DecimalFormat(""#.##""); calc = Double.valueOf(df.format(calc)); System.out.println(String.valueOf(calc).replaceAll(""([0-9])\\.0+([^0-9]|$)"", ""$1$2"")); ::> output is 1.98 which should be 2 double calc = 20.0; DecimalFormat df = new DecimalFormat(""#.#""); calc = Double.valueOf(df.format(calc)); System.out.println(String.valueOf(calc).replaceAll(""([0-9])\\.0+([^0-9]|$)"", ""$1$2"")); ::> output is 20 this is correct for me. double calc = 2.01; DecimalFormat df = new DecimalFormat(""#.##""); calc = Double.valueOf(df.format(calc)); System.out.println(String.valueOf(calc).replaceAll(""([0-9])\\.0+([^0-9]|$)"", ""$1$2"")); ::> output is 2.01 Which should be 2. following code which I have tried. ",Nikhilreddy Gujjula,https://stackoverflow.com/users/1010854,"Try this. I hope it handles all your requirements. public static void main(String[] args) { double d = 20.0; int decimalPlaces = getDecimalPlaces(d) - 1; double res = Math.round(d * Math.pow(10, decimalPlaces))/Math.pow(10, decimalPlaces); // Rounding String text = Double.toString(Math.abs(res)); int integerPlaces = text.indexOf('.'); if (getDecimalPlaces(res) == 1 && text.charAt(integerPlaces + 1) == '0') System.out.println((int)res); else System.out.println(res); } private static int getDecimalPlaces(double d) { String text = Double.toString(Math.abs(d)); int integerPlaces = text.indexOf('.'); int decimalPlaces = text.length() - integerPlaces - 1; // To Round return decimalPlaces; } ",Christian,https://stackoverflow.com/users/2670792,http://stackoverflow.com/questions/19721584/how-to-remove-the-0-in-decimal-format-and-convert-1-01-to-1-in-java,STACKOVERFLOW,stackoverflow.com 9218,"Who was the ""Starship Troopers"" representative who appeared in ""The Cat Who Walks Through Walls""?","From ""The Cat Who Walks Through Walls"" Wiki article: During a meeting of the Council of the Time Scouts, representatives from every major time line and setting written by Heinlein appear, including Glory Road and Starship Troopers; and a reference is made to other authors' works as well. Who was the representative from Starship Troopers? ",DVK-on-Ahch-To,https://scifi.stackexchange.com/users/976,"The members of the Circle of the Ouroboros are introduced as: Master Mobyas Toras of Barsoom (Timeline 1, Coded John Carter) Her Wisdom Star, Arbitrar of the Ninety Universes (Composite timeline, Coded Cyrano) Woodrow Wilson Smith, Senior of the Howard Families (Timeline 2, Coded Leslie LeCroix) Dr. Jubal Harshaw (Timeline 3, Coded Neil Armstrong) Dr. Hilda Mae Burroughs (Timeline 4, Coded Ballox O'Malley) Commander Ted Smith (Timeline 5, Coded DuQuesne) Captain John Sterling (Timeline 6, Coded Neil Armstrong Alternate) Sky Marshal Samuel Beaux (Timeline 7, Coded Fairacre) In Starship Troopers, the person with the rank of Sky Marshal commands Earth's entire military, so we can reasonably assume that the representative from Starship Troopers is Sky Marshal Samuel Beaux. ",Bob Warwick,https://scifi.stackexchange.com/users/4937,http://scifi.stackexchange.com/questions/13716/who-was-the-starship-troopers-representative-who-appeared-in-the-cat-who-walk,LIFE_ARTS,scifi.stackexchange.com 7398,perl how to print out a hash with multiple keys?,"i'm setting my hash in my function as $hash{$loginId}{$month}=$hash{$loginId}{$month}+$time1; and I can print the value in one spot as print ""$hash{maclawty796}{Sep}\n""; #just some name and date in the text file i imported But I want to print out all the values. When i use print ""@{[%hash]}\n""; I get a bunch of weird results and what looks like memory addresses. How can i print out the loginId's Months and times? Here's the full code if you need it # # adapted from regex9.pl # $file ='timelog.txt'; open(INFO, $file) or die(""Could not open file.""); use strict; my ($loginId, $month, $time1, $time2, $pts, $line, $time1T, $time2T); my %hash=(); while (<INFO>) { $line=$_; #assignment of Login ID's if( ($loginId) = /([a-y]*(\d|\w)*)/ ){ printf(""%-15s"", $loginId); } if( ($month) = /((Jan)|(Fed)|(Mar)|(Apr)|(May)|(Jun)|(Jul)|(Aug)|(Sep)|(Oct)|(Nov)|(Dec))/ ){ printf(""%-5s"", $month); } if(($time1, $time1T, $time2,$time2T)= /(\d\d):(\d\d)\s-\s(\d\d):(\d\d)/ ){ #print($time1, "" "", $time1T, "" "", $time2,"" "", $time2T,""\n""); #for testing $time1=($time2*60+$time2T)-($time1*60+$time1T); printf (""%-5s minutes\n"" ,$time1); } $hash{$loginId}{$month}=$hash{$loginId}{$month}+$time1; print ""hash $hash{$loginId}{$month}\n""; } print ""@{[%hash]}\n""; print ""$hash{maclawty796}{Sep}\n""; ",Michael Kimin Choo,https://stackoverflow.com/users/2116655,"A hash can't have multiple keys. A hash only has a single level of keys, but the values of those keys can point to other hashes. You have a hash called %hash that is keyed by $loginId. The values in this hash point to other hashes (each value is a completely separate hash) that are all keyed by $month. It's an important point to understand. I find that I can help myself remember this by using the -> operator. This reminds me I'm talking about references and not merely other keys. For example, instead of writing this: $hash{$loginId}{$month} = $hash{$loginId}{$month} + $time1; I would have write this: $hash{$loginId}->{$month} = $hash{$loginId}->{$month} + $time1; It's not much, but it's a good reminder that $month are keys to a hash reference and I need to dereference that hash before I can see its values. Let's take a simple loop that prints out %hash: for my $loginId ( sort keys %hash ) { print qq(\$hash{$loginId} = ""$hash{$loginId}""\n""; } This will print out something like this: $hash{bob} = ""HASH(0x7f8e3b804ee8)"" $hash{david} = ""HASH(0x...)"" $hash{sue} = ""HASH(0x...)"" The HASH{0x...) are addresses to a hash reference. I need to dereference that hash to get the values: for my $loginId ( sort keys %hash ) { my %months = %{ $hash{$loginId) }; # Dereferencing the hash; } Now, that I've dereferenced the hash, I can print out the months for each user: for my $loginId ( sort keys %hash ) { my %months = %{ $hash{$loginId) }; for my $month ( sort keys %months ) { print qq(\$hash{$loginId}->{$month} = ) . $hash{$loginId}->{$month} . ""\n""; } } By the way, there's no reason I couldn't combine the referencing with the inner for loop: for my $loginId ( sort keys %hash ) { for my $month ( sort keys %{ $hash{$loginId) } ) { print qq(\$hash{$loginId}->{$month} = ) . $hash{$loginId}->{$month} . ""\n""; } } It looks like you were trying for a quick dump of all of your data. To do that, you can use the Data::Dumper module: use strict; use warnings; use feature qw(say); # Better way to print than print use Data::Dumper; .... say Dumper \%hash; #Prints out the entire data structure. ",David W.,https://stackoverflow.com/users/368630,http://stackoverflow.com/questions/22333699/perl-how-to-print-out-a-hash-with-multiple-keys,STACKOVERFLOW,stackoverflow.com 6068,Eclipse Java EE Indigo 's XML formatting is suddenly screwed up,"A few days ago it was just fine. I haven't made any change to the IDE or anything else in the preferences. Looks like random instability, but I hope I'm wrong, I don't want to go through the IDE setup again....... Here are two screenshots to tell the story: Before Ctrl+Shift+F (format): After (format results): What can I do about it? I've tried comparing settings in another Eclipse setup that I have which has XML formatting working properly. (Window -> Preferences -> XML -> XML Files -> Editor). Also (Structured Text Editors). ",Poni,https://stackoverflow.com/users/286260,"Solved. It looks like ""Android Common XML Editor"" took over, and the above crappy formatting belongs to it. All I had to do is right click on the XML file and choose Open With -> XML Editor. ",Poni,https://stackoverflow.com/users/286260,http://stackoverflow.com/questions/10941447/eclipse-java-ee-indigo-s-xml-formatting-is-suddenly-screwed-up,STACKOVERFLOW,stackoverflow.com 1277,Can I substitute a stainless steel pot for the traditional iron dutch oven?,"I have very limited options in my kitchen, and while the dutch oven is the preferred method for getting an 'oven spring' while baking sourdough, I do not have a cast iron pot to do it. IF stainless steel is a good substitute, should I consider extra precautions? ",erasmortg,https://cooking.stackexchange.com/users/23068,"Cast iron is ideal, but any pot that can take the heat and has a tight lid will work. Like @talon8 said in his comment, it doesn't even have to be metal. This article from Around the World in 80 Bakes specifically uses terracotta for sourdough, not cast iron. Just as an FYI, this related question deals with preheating (for no-knead bread, not sourdough), and the differing answers are interesting. To me it just goes to show that bread-making doesn't always have to follow super-strict rules. Preheat the Dutch oven (and the oven itself) for No-Knead Bread? (experiment results) ",Jolenealaska,https://cooking.stackexchange.com/users/20183,http://cooking.stackexchange.com/questions/47833/can-i-substitute-a-stainless-steel-pot-for-the-traditional-iron-dutch-oven,LIFE_ARTS,cooking.stackexchange.com 9090,how to calculate intersection time and place of multiple moving arcs,"I have rocks orbiting moons, moons orbiting planets, planets orbiting suns, and suns orbiting black holes, and the current system could have many many layers of orbitage. the position of any object is a function of time and relative to the object it orbits. (so far so good). now I want to know for a given 2 objects(A,B), a start time and a speed, how can I work out the when and where to go. I can work out where A and B is given a time. so i just need. 1: direction to travel in from A to B(remember B is moving(not in a straight line)) 2: Time to get to b in a straight line. travel must be in a straight line with the shortest possible distance. as an extension to this question, how will i know if its better to wait, EG is it faster to stay on object A and wait for a hour when the objects may be closer, than to set off from A to B at the start. Cheers, it hurt my brain. ",user20733,https://gamedev.stackexchange.com/users/20733,"If your bodies are subject to complex orbits it may well be difficult or impossible to solve using a closed-form expression (solve an equation to get the desired results. One approach would be to perform a mathematical simulation over time to arrive at a solution. In your case, a body leaving A at a time t0 travelling in a straight line with velocity v will be somewhere on the circumference of a circle or (sphere in 3D) with radius vt (t=time since leaving). The centre of the circle will be the position of A at the time of launch (Apos(t0)). You can imagine this circle like a ripple on a pond getting bigger over time) Assuming you can calculate the position of B at time t+t0 (Bpos(t+t0)), you can create a simulation with a loop to find out the earliest time that the growing circle intersects B's path searching=true t=0 while(searching){ if (distance between Apos(t0) and Bpos(t0+t)) < v*t then{ searching=false //found a solution target_position=Bpos(t0+t) // can be used to find direction to head in time_to_reach_B=t } else t+=delta_t //a small time step (smaller = more accuracy) } You will of course have to add code to prevent an infinite loop in the case that there is no solution (or no solution to be found in reasonable time). Depending on the complexity or B's motion and the value of delta_t, this algorithm is not guaranteed to find the ideal solution in every case, but should work well for the vast majority of cases. ",Ken,https://gamedev.stackexchange.com/users/4568,http://gamedev.stackexchange.com/questions/38696/how-to-calculate-intersection-time-and-place-of-multiple-moving-arcs,TECHNOLOGY,gamedev.stackexchange.com 6767,Etiquette for posting civil and informative comments,"Sometimes I leave a comment like ""Stack Overflow is not your personal research assistant,"" but am accused of being rude. How can I craft a comment that is seen as civil to the community and instructive to the OP? What tone should I strike in comments? What are some examples of bad comments and their better replacements? ",Robert Harvey,https://meta.stackexchange.com/users/102937,"Another way to make a comment more friendly is, when possible, to cast it as a question rather than a statement. Consider the difference between: (Answer) doesn't work because of X. and When you do that, how do you account for the problem of X? It could well be that X isn't a problem -- your assumption is wrong. If you assert it you look bad; if you raise the question the poster isn't put on the defensive, and if it's a problem he can fix it (and thank you for the help). I used to leave comments like the following that I thought were friendly and helpful: This question/answer could be improved by adding (details/a source). I realized that comments like the following got better results and also that I preferred them when on the receiving end: Could you add more details about X? Do you have a source? This approach doesn't always work (e.g. for site policy). It's also most important for the initial comment, before you and the other person are engaged in a dialogue. ",Monica Cellio,https://meta.stackexchange.com/users/162102,http://meta.stackexchange.com/questions/138173/etiquette-for-posting-civil-and-informative-comments,TECHNOLOGY,meta.stackexchange.com 1422,GIS Software Choice for a small university research centre,"I need to choose a GIS system for a small university research centre. We are handling a broad range of data, (for example, numerical tidal analyses, weather data, poverty, isolated economic activity, skills availability and renewable energy resource availability) and operate primarily in countries with relatively poor existing data sets. We interact with other groups, some of which use ARCGIS. Do I have to wade through every GIS software descriptor on the web, or can someone please give an indication of likely candidates? ",Alan Owen,https://gis.stackexchange.com/users/8127,"Based on your requirements, you may need a GIS stack: server, database, presentation, and then the analysis tools. I'd recommend GeoServer (http://www.geoserver.org) for server, PostgreSQL with PostGIS extension for database (http://postgis.net). This combination can enable easy distributed authoring/analysis and publishing using WFS, WPS, and WMS, which are OGC standards. You can use the tools mentioned above for analysis. In addition to QGIS, you can also use uDig (http://udig.refractions.net) for editing. For presentation, you may use OpenLayers or GeoExt. ",okello,https://gis.stackexchange.com/users/7560,http://gis.stackexchange.com/questions/27188/gis-software-choice-for-a-small-university-research-centre,TECHNOLOGY,gis.stackexchange.com 8602,Bordermatrix without brackets,"I am hanging on this one since yesterday and was not able to find an example nor anything in the documentation --- maybe I am blind? What i want is a matrix with border annotations BUT without the brackets (neither round nor squared nor curled, each of which have been discussed here). I also want to make the bordertext (A-E) bold and italic on the X and the Y axis... I have some code to construct the matrix as I have it right now: \documentclass{article} \def\VR{\kern-\arraycolsep\strut\vrule &\kern-\arraycolsep} \def\vr{\kern-\arraycolsep & \kern-\arraycolsep} \begin{document} \LARGE $\bordermatrix{ & A & B & C & D & E \cr A & 0 & 0 & 1 & 0 & 1 \cr B & 0 & 0 & 1 & 0 & 0 \cr C & 0 & 1 & 1 & 0 & 1 \cr D & 1 & 0 & 1 & 0 & 0 \cr E & 1 & 1 & 1 & 0 & 0 }$ \end{document} ",RalfB,https://tex.stackexchange.com/users/46244,"Don't use \bordermatrix, that's all! \documentclass{article} \begin{document} \begin{tabular}{c @{\hspace{2\tabcolsep}} *{5}{c}} & \itshape A & \itshape B & \itshape C & \itshape D & \itshape E \\[1ex] \bfseries A & 0 & 0 & 1 & 0 & 1 \\ \bfseries B & 0 & 0 & 1 & 0 & 0 \\ \bfseries C & 0 & 1 & 1 & 0 & 1 \\ \bfseries D & 1 & 0 & 1 & 0 & 0 \\ \bfseries E & 1 & 1 & 1 & 0 & 0 \end{tabular} \end{document} If you want the column and row headers to be bold italic, just tell TeX to. \documentclass{article} \newcommand{\bolditalic}{\bfseries\itshape} \begin{document} \begin{tabular}{c @{\hspace{2\tabcolsep}} *{5}{c}} & \bolditalic A & \bolditalic B & \bolditalic C & \bolditalic D & \bolditalic E \\[1ex] \bolditalic A & 0 & 0 & 1 & 0 & 1 \\ \bolditalic B & 0 & 0 & 1 & 0 & 0 \\ \bolditalic C & 0 & 1 & 1 & 0 & 1 \\ \bolditalic D & 1 & 0 & 1 & 0 & 0 \\ \bolditalic E & 1 & 1 & 1 & 0 & 0 \end{tabular} \end{document} ",egreg,https://tex.stackexchange.com/users/4427,http://tex.stackexchange.com/questions/249881/bordermatrix-without-brackets,TECHNOLOGY,tex.stackexchange.com 405,Unprotect a Word Document," Possible Duplicate: Can’t edit a specific document in Word 2007 How do I remove the password protection (unprotect) on a Word document if I don't know the password? (i.e. The protection provided by Tools > Unprotect Document) ",Rob Wright,https://superuser.com/users/24927," Save the file in Rich text format RTF Open the file with WordPad Save the RTF file with a different name Open the new RTF file with Word Save the document as a word document Delete the two rtf files ",bugtussle,https://superuser.com/users/21685,http://superuser.com/questions/96242,TECHNOLOGY,superuser.com 5030,How do I opt-out of the Social Security system?,"How do I opt-out of the Social Security system and give up my Social Security Number? If I do this, am I then exempt from paying Social Security income tax? ",Jesse,https://money.stackexchange.com/users/9631,"To give up your Social Security number, you would probably have to renounce your citizenship, since merely leaving the United States, becoming a permanent expatriate, etc. wouldn't be enough. Paying Social Security taxes is mandatory, however. Even if your income exceeds the means testing limits, you are still required to pay Social security (FICA) taxes on the income that falls beneath it. That being said, there are several groups that are exempt from paying Social Security taxes, based on what I can scrounge up through online searching. College students who work under the Federal Work Study program. 1 State or local government workers (like teachers, city workers, police, firefighters, etc.) hired before March 31, 1986 and who participate in their employers' alternative retirement systems. Self-employed workers with with yearly net earnings less than $400 Ministers, members of certain religious orders, and Christian Science practitioners may file IRS Form 4361 to exempt themselves from self-employment taxes, including FICA taxes. The picture is more complicated than this, however (see below). All members of certain religious groups, like the Amish, Mennonites, etc. 2 Election workers earning $1,000 or less a year. Minor children with earnings from household work but for whom household work is not their principal occupation. If you aren't part of one of these groups or you joined them after already being enrolled in the Social Security system (i.e. paid FICA taxes, etc.), you don't have to take Social Security payments, but you are not exempt from FICA payroll taxes. This means that you can't simply become Amish and be exempt if you've already paid into the system. Many of these answers were listed here, but the only stated source is ""Wikipedia,"" so take it with a grain of salt. I've tried to provide other sources where I could. Ministers/religious officials I mentioned that the situation with ministers and/or religious officials is more complicated. Among other things, these officials need to certify that they are religiously opposed to receiving public insurance benefits and they have to file by a certain deadline soon after earning a certain amount as a minister. Furthermore, if you file this exemption and choose/chose to revoke it later on, e.g. by filing IRS Form 2031, during the short time windows when this is possible, you're no longer eligible to file for another exemption. Once you revoke your exemption, you won't get another one. Also note that this opt-out only applies to income earned as part of your ministry. For non-ministerial income, you're still required to pay FICA taxes even if you follow the procedure(s) above. If you do opt-out Clearly, opting out of the Social Security isn't easy, or even feasible, for many people, but if you are outside the system, common sense dictates that you should insure yourself against risks that would usually be covered, at least in part, by Social Security. Dave Ramsey maintains a list of such investments that he recommends ministers and religious officials who opt out of the Social Security system should purchase, but the rationale applies to anyone who isn't part of the system. Term life insurance that covers 10x your annual income. Normally, your spouse or dependents will receive a Social Security death benefit upon your death, but if you opt-out, your family doesn't have this option. Since the death benefit is a pittance ($255), however, you may want life insurance regardless of your participation in Social Security. Long-term disability insurance. If you become disabled, you won't receive disability benefits, so you'll may want insurance to cover this risk. Long-term care insurance. Similar to disability insurance, you may want additional income to cover you in case you require long-term care, and Medicaid isn't enough. Other retirement savings. If you're not going to be paying money into Social Security, it makes sense to invest that money in some form of tax-advantaged or tax-sheltered retirement account to ensure that you still have some income in retirement. You won't be receiving Social Security checks, but you'll still need income. Depending on your circumstances, it's may be a good idea to invest in some or all of these instruments anyway (especially tax-advantaged/tax-sheltered retirement accounts), because Social Security doesn't cover 100% of the risks you'll face, but that decision is highly specific to each person/family. ",John Bensin,https://money.stackexchange.com/users/7590,http://money.stackexchange.com/questions/21327/how-do-i-opt-out-of-the-social-security-system,LIFE_ARTS,money.stackexchange.com 5448,"Christian description of ""self-love"" (from Matthew 22)","Matthew 22: 39 And the second command is like the first: ‘Love your neighbor the same as you love yourself. Self love, esteem, worth, etc are matters of the spirit and personality - that are foundations for how we live our lives. What is the description of self-love Christians are expected to have for themselves and their neighbors? Another issue, what is meant by this in a society where self love is low or rare (and why wasn't that considered when Jesus said this)? ",Greg McNulty,https://christianity.stackexchange.com/users/1400,"My answer is based on a definition of love that is implied in Scripture, but not necessarily spelled out in chapter and verse. I learned it from Les Feldick's ""Through The Bible"" program. Any child can grasp the definition of Biblical love. It's simply seeking the other's highest good. (and only God is good). When Jesus commands us to love our neighbor as our selves. We simply seek eternal life for them as we desire it for ourselves. Jesus further commands his apostles ""love one another as I have loved you"" Jesus loved us by doing His Father's will. Believers love one another likewise, by doing our Father's will. For some, this love manifests itself in working toward getting God's Word out, the Gospel of grace, so that every man and woman, boy and girl can come to the saving knowledge of Jesus Christ. ",barney,https://christianity.stackexchange.com/users/3796,http://christianity.stackexchange.com/questions/13718/christian-description-of-self-love-from-matthew-22,CULTURE,christianity.stackexchange.com 3382,How to visualize a value resulted from math node?,"How to visualize a value resulted from math node,or just to know it. I tried the way of scaling this value to the scene size and then pick the color and get the value but I want more effective way to do this. ",Omar Ahmad,https://blender.stackexchange.com/users/5794,"Unfortunately this isn't possible without the clumsy tricks already mentioned in the question. You might consider asking the devs if this can be changed. See Best Place to put Feature Requests? ",gandalf3,https://blender.stackexchange.com/users/599,http://blender.stackexchange.com/questions/23605/how-to-visualize-a-value-resulted-from-math-node,TECHNOLOGY,blender.stackexchange.com 1692,Can I connect multiple line segments to a single point using the pen tool in photoshop?,"I'm using the pen tool in CS5 to draw shapes, and I'm getting more comfortable with it, but one thing I'd really like to be able to do is add to a path. For example, if I draw a circle, I'd like to be able to bisect it with the pen tool and have two distinct paths emerge without having to draw two separate paths and try to get the duplicate points on top of each other by hand. How do I do this? ",Ben Collins,https://graphicdesign.stackexchange.com/users/401,"Unfortunately, no. Anchor points in Adobe software have 2 connectors, an in and an out. Therefore, no single anchor point can contain a Y shape of paths. You must use multiple paths. This is true in Photoshop, Illustrator, Fireworks, et al. ",Scott,https://graphicdesign.stackexchange.com/users/3270,http://graphicdesign.stackexchange.com/questions/5358/can-i-connect-multiple-line-segments-to-a-single-point-using-the-pen-tool-in-pho,LIFE_ARTS,graphicdesign.stackexchange.com 6442,Why are my recovered images only 160x120 pixels?,"I am trying to recover some lost images, and with all the programs I've tried, some of the photos resulted to be in a 160x120 pixel resolution. What does this mean, and is there any possibility to recover photos in original dimensions? Any help is appreciated. ",cprogcr,https://photo.stackexchange.com/users/10908,"The recovered images might be the thumbnails and not the actual images. Some of the image programs or browsers create the thumbnails from the actual images for displaying in the GUI. If you know any other attributes that might ascertain that the recovered image were, indeed, the actual images (location etc) then you may wish to investigate further. ",Nitin Kumar,https://photo.stackexchange.com/users/10718,http://photo.stackexchange.com/questions/25820/why-are-my-recovered-images-only-160x120-pixels,LIFE_ARTS,photo.stackexchange.com 5200,Angular $http promise not resolving,"I am currently working on building a login flow in AngularJS 1.3. My problem is that the promise return from an $http call is not resolving the code inside of its '.then'. I am working to handle error messages that come back from the server, specifically to handle any 401 errors which are returned when the user has input the wrong username or password. However, when a 401 is returned, the .then never resolves itself and the code within them never runs. The relevant code is as follows: The controller for the login form as a login function on its scope, as follows: $scope.login = function() { $scope.authError = null; // Try to login var promise = session.login($scope.user); promise.then(function(loggedIn) { // THIS CODE NEVER RUNS if ( !loggedIn ) { $scope.authError = localizedMessages.get('login.error.invalidCredentials'); } }, function(x) { $scope.authError = localizedMessages.get('login.error.serverError', { exception: x }); }); }; I have a session factory that takes care of the login and other session based needs. The code for login is: login: function(credentials) { var $http = $injector.get('$http'); var url = ENV.apiEndpoint + ""/sessions""; var newSession = $http.post(url, credentials); return newSession.then(function(data) { session.set(data.token); //THIS CODE ONLY RUNS ON A SUCCESS RESPONSE if(session.isAuthenticated()) { closeLoginModal(true); } return session.isAuthenticated(); }); } I have placed comments in the code where the problem is. I am at a loss as to why this code isn't working. From my understanding of promises, then 'then' should resolve no matter what the response was, success of error. I have an interceptor running, but I have tried disabling it with no luck to the end result. Am I missing something? ",Octothorpe,https://stackoverflow.com/users/2988799,"If your login (server-side) returns an HTTP error code, like a 401, this should resolve to an error, e.g., the second function passed to then. If you don't pass one it should bomb out; that's why your higher-level error function gets called. ",Dave Newton,https://stackoverflow.com/users/438992,http://stackoverflow.com/questions/27320215/angular-http-promise-not-resolving,STACKOVERFLOW,stackoverflow.com 469,How do I deal with a compromised server?,"I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism: What are my first steps? When I arrive on site should I disconnect the server, preserve ""evidence"", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning? This is meant to be a canonical post for this topic. Originally from serverfault. ",Lucas Kauffman,https://security.stackexchange.com/users/3339,"Making a file ""undeletable"" in Linux is done with attributes, specifically the ""immutable"" attribute. See lsattr to see attributes, chattr to change them. However, this only answers to the proximal cause. The important thing is that your machine was put through hostile control, and the hijacker installed things for his own devious goals. In particular, he most probably installed a rootkit in order to keep the entry open despite cleansing attempts like what you are trying to do. Rootkits may have altered the kernel and/or the system binaries in ways that will not be visible from the machine itself, and which will prevent their own removal. The bottom-line is that your machine cannot be saved; there is no way you can reliably make your machine clean again, save by reformatting the disk and reinstalling from scratch. Save yourself from future worries and headaches; nuke your system from orbit. ",Tom Leek,https://security.stackexchange.com/users/5411,http://security.stackexchange.com/questions/39231/how-do-i-deal-with-a-compromised-server,TECHNOLOGY,security.stackexchange.com 1862,Move Box2d object on touch of button?,"I have a player box2d object on screen, who should be controlled by two buttons, one left, and one right. When you press the right button, the player should move right, but when you press the left button, the player should immediatly stop moving right and move left. This should also happen vice versa. I tried to do this to move right, b2Vec2 impulse(4, 0); body->ApplyLinearImpulse(impulse, body->GetWorldCenter()); and this to move left b2Vec2 impulse(4, 0); body->ApplyLinearImpulse(impulse, body->GetWorldCenter()); This works, but when I press right and then left, the player doesn't immediatly go left, but continues right for a while, and then goes left. How do I make sure this doesn't happen? ",maor10,https://stackoverflow.com/users/1005978,"set the body's linearVelocity to b2Vec2_zero before applying the new force – LearnCocos2D yesterday ",maor10,https://stackoverflow.com/users/1005978,http://stackoverflow.com/questions/12662291,STACKOVERFLOW,stackoverflow.com 6784,Isn’t the FAQ label obsolete by now?,"Don’t get me wrong in the beginning of reading this. I really mean the label and not the content of FAQ. The content is very useful if its’ made the right way (as here on ux.se), but there are plenty of examples where it isn’t. The real question concerns the label which is a convention I’d like to challenge. History In 1647 Matthew Hopkins wrote The Discovery of Witches which were introduced as ""Certain Queries answered"" and had the form of a list of Question and Answer, even if the topic is inappropriate by today’s standards. The label FAQ origins from the early 1980s mailing lists where NASA hoped to get new users read the old mail conversations, which were not the case. Instead the same questions were answered again and again and the need for FAQ was born. The acronym FAQ was invented by Eugene Miya and FAQ were later used in mail on a weekly basis at first and later on as a daily mail. Today FAQ is more frequently used to refer to the list, and a text consisting of questions and their answers is often called an FAQ regardless of whether the questions are actually frequently asked, if they are asked at all.[1] Problem Acronyms are generally bad, since it excludes those who do not know the meaning. They either have to search for the acronym, if they are interested, or just ignore it. If a label is ignored, there is not much use of it and an entire section of valid content is lost by bad labeling. However, it is a very strong web convention which might lead to confusion over time for experienced users. Also the original meaning have changed (see quote), which also implies that the label would be wrong. Question Isn’t the FAQ label obsolete by now? and if so How do we relabel it to suit both experienced and new users? Edit: I’d really like to know why we can or cannot change the label FAQ. Current answer does not meet that criterion. [1] http://en.wikipedia.org/wiki/FAQ ",Benny Skogberg,https://ux.stackexchange.com/users/4679,"Isn’t the FAQ label obsolete by now? I'd say no, it isn't. The label FAQ is widely used which means it isn't obsolete. For example: Google, Apple, the Oxford English Dictionary, and the Nielsen Group (UX conferences) all use the label FAQ. ",Solracnapod,https://ux.stackexchange.com/users/13153,http://ux.stackexchange.com/questions/18600/isn-t-the-faq-label-obsolete-by-now,TECHNOLOGY,ux.stackexchange.com 1662,Problems Binding MouseDoubleClick via M-V-MV Design Pattern,"I have the following snippet of code in an .xaml file: <TreeView MouseDoubleClick=""TreeView_MouseDoubleClick"" ItemsSource=""{Binding MyList}""> <TreeView.ItemContainerStyle> <Style TargetType=""{x:Type TreeViewItem}""> <Setter Property=""IsExpanded"" Value=""{Binding IsExpanded, Mode=TwoWay}"" /> <Setter Property=""IsSelected"" Value=""{Binding IsSelected, Mode=TwoWay}"" /> <Setter Property=""FontWeight"" Value=""Normal"" /> <Style.Triggers> <Trigger Property=""IsSelected"" Value=""True""> <Setter Property=""FontWeight"" Value=""Bold"" /> </Trigger> </Style.Triggers> </Style> </TreeView.ItemContainerStyle> As you can see, when you ""MouseDoubleClick"" on an item in the TreeView it will execute the code in the code behind...namely... private void TreeView_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e) { try { MessageBox.Show(((TreeViewWithViewModelDemo.LoadOnDemand.HtmlFileViewModel)(((System.Windows.Controls.TreeView)(sender)).SelectedValue)).HtmlFileName); } catch { } } I'm trying to follow the Model-View-ViewModel Design Pattern and would like to move the implementation of this MouseDoubleClick event away from the View and into the ViewModel. I understand that if I was using a command I would use {Binding Command=""Select""} (or something similar that implements the ICommand interface) but I cannot seem to find the syntax for this particular issue since it is not a command button. Can someone help me out? Thanks ",Ann Sanderson,https://stackoverflow.com/users/1161283,"Using MVVM doesn't mean there mustn't be any code in the code-behind file. It just means moving all the associated logic into the viewmodel. You could just implement necessary double-click method on the viewmodel, and call it from the code behind like this: _viewModel.MouseDoubleClickOnTree(); Also, I'd recommend looking at this topic: MVVM C# WPF binding mouse double click ",Dmitry Reznik,https://stackoverflow.com/users/838302,http://stackoverflow.com/questions/9811538/problems-binding-mousedoubleclick-via-m-v-mv-design-pattern,STACKOVERFLOW,stackoverflow.com 8514,When should a supervisor be a co-author?,"What are people's views on this? To be specific: suppose a PhD student has produced a piece of original mathematical research. Suppose that student's supervisor suggested the problem, and gave a few helpful comments, but otherwise did not contribute to the work. Should that supervisor still be named as a co-author, or would an acknowledgment suffice? I am interested in two aspects of this. Firstly the moral/etiquette aspect: do you consider it bad form for a student not to name their supervisor? Or does it depend on that supervisor's input? And secondly, the practical, career-advancing aspect: which is better, for a student to have a well-known name on his or her paper (and hence more chance of it being noticed/published), or to have a sole-authored piece of work under their belt to hopefully increase their chances of being offered a good post-doc position? [To clarify: original question asked by MrB ] ",MrB,https://mathoverflow.net/users/2189,"It really depends: I had two doctoral advisors, I wrote papers under the direction of both (separately): my first supervisor did not have her name on the paper; one of the papers I worked on with my second supervisor is joint, another has just my name (and yet a third has both our names plus a co-author). The details are boring and not very enlightening, so I won't go into them, but the important thing in that in every case, there was a different, rational and very good reason why the supervisor name did or did not appear. It had to do with the cultural differences between France and the US, publication medium, and how the work was conducted. In that respect, the etiquette question is similar as what happens when a colleague chats with you about your current research, or even better when they provide a crucial lemma or idea for your research. You should definitely acknowledge, but when do you offer co-author credit? In that case also, hierarchical considerations can easily come to the fore (if a person is clearly higher then the other in the pecking order, they can easily pass for a bully if they're not careful). Even the area of math you work with is relevant (I've heard stories of people solving a problem in a group and the paper being published under a single name simply because the culture in that specific field does not give rise to many joint papers). ",Thierry Zell,https://mathoverflow.net/users/8212,http://mathoverflow.net/questions/57337,SCIENCE,mathoverflow.net 8896,Create a table that fills a page with empty rows,"I'm trying to create an inventory sheet for our lab, and as such I need a large blank table. Is there a better way to do this then copy and pasting \midrule&&&\\ over and over again? I'd like to look like this, but automatically repeat the blank cells until the page is full: %Page layout here \documentclass[letterpaper, 12pt,twocolumn]{article} \usepackage[left= 2 cm, right=2 cm, top = 2 cm, bottom = 2 cm]{geometry} %Font stuff here \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} %Goddamn tables. \usepackage{booktabs} %Makes the pretty table based on wikibooks example \begin{document} \centering {\large \begin{tabular}{c|c|c|c} \toprule Date & User & Amount Used & Procedure\\ \phantom{2015-3-17} & \phantom{NAME} & (mg) & \phantom{XXX3-33}\\ \midrule &&&\\ \midrule &&&\\ \midrule&&&\\ \midrule&&&\\ \midrule&&&\\ \bottomrule \end{tabular} } \end{document} Note: I'm just using Booktabs to add the midrule, that can be dropped. This is just going on a clipboard on the wall, it can be ugly as you want. I'm just sick of fighting with Word's hellish layout tools. Edit: There is this answer that places blank lines in the middle, but I don't understand the code nearly enough to modify it to fill to the end of the page. ",Canageek,https://tex.stackexchange.com/users/7880,"David Carlisle has gotten me most of the way to a solution, so I thought I'd post it: %Page layout here \documentclass[letterpaper, 12pt,twocolumn]{article} \usepackage[left= 1 cm, right=1 cm, top = 2 cm, bottom = 1 cm]{geometry} \newlength\linefillheight % vertical distance between lines \setlength\linefillheight{1cm} \newlength\wcolone %first column width \setlength\wcolone{\dimexpr.125\textwidth-4mm\relax} \newlength\wcoltwo %second column width \setlength\wcoltwo{\dimexpr.125\textwidth-4mm\relax} \newlength\wcolthree % third column width \setlength\wcolthree{\dimexpr.125\textwidth-4mm\relax} \newlength\wcolfour % third column width \setlength\wcolfour{\dimexpr.125\textwidth-4mm\relax} \newcommand\linefill{\leavevmode \rule{\wcolone}{0.4pt}\hspace*{4mm}\rule{\wcoltwo}{0.4pt}\hspace*{4mm}\rule{\wcolthree}{0.4pt}\hspace*{4mm}\rule{\wcolfour}{0.4pt}} \makeatletter \def\fillwithlines#1{% \begingroup \ifhmode \par \fi \hrule height 0pt \nobreak \cleaders\hbox to \hsize{\hskip \@totalleftmargin \vrule height \linefillheight depth 0pt width 0pt \linefill} \vskip #1 \hbox{}% \endgroup} \makeatother \begin{document} \noindent\begin{minipage}[c][1cm][t]{\textwidth} \parbox{\dimexpr\wcolone+4mm\relax}{\textbf{\centering Date}}% \parbox{\dimexpr\wcoltwo+4mm\relax}{\textbf{\centering User}}% \parbox{\dimexpr\wcoltwo+4mm\relax}{\textbf{\centering Amount Used\\mg}}% \parbox{\dimexpr\wcoltwo+4mm\relax}{\textbf{\centering Procedure}}% \end{minipage} \fillwithlines{\dimexpr\textheight-1cm\relax} \noindent\begin{minipage}[c][1cm][t]{\textwidth} \parbox{\dimexpr\wcolone+4mm\relax}{\textbf{\centering Date}}% \parbox{\dimexpr\wcoltwo+4mm\relax}{\textbf{\centering User}}% \parbox{\dimexpr\wcoltwo+4mm\relax}{\textbf{\centering Amount Used\\mg}}% \parbox{\dimexpr\wcoltwo+4mm\relax}{\textbf{\centering Procedure}}% \end{minipage} \fillwithlines{\dimexpr\textheight-1cm\relax} \end{document} Based on this answer. However, I'd like to be able to centre the column headers and draw a line down the middle, if anyone could help with this. some minor tweaks: \documentclass[letterpaper, 12pt,twocolumn]{article} \usepackage[left= 1 cm, right=1 cm, top = 2 cm, bottom = 1 cm]{geometry} \newlength\linefillheight % vertical distance between lines \setlength\linefillheight{1cm} \newlength\wcolone %first column width \setlength\wcolone{\dimexpr.125\textwidth-4mm-1.25pt\relax} \newlength\wcoltwo %second column width \setlength\wcoltwo{\dimexpr.125\textwidth-4mm-1.25pt\relax} \newlength\wcolthree % third column width \setlength\wcolthree{\dimexpr.125\textwidth-4mm-1.25pt\relax} \newlength\wcolfour % third column width \setlength\wcolfour{\dimexpr.125\textwidth-4mm-1.25pt\relax} \newcommand\linefill{\leavevmode \rule{\wcolone}{0.4pt}\hspace*{4mm}\rule{\wcoltwo}{0.4pt}\hspace*{4mm}\rule{\wcolthree}{0.4pt}\hspace*{4mm}\rule{\wcolfour}{0.4pt}} \makeatletter \def\fillwithlines#1{% \begingroup \par \hrule height 0pt \nobreak \cleaders\hbox to \hsize{% \vrule height \linefillheight depth 0pt width 0pt \hss\linefill\hss} \vskip #1 \hbox{}% \endgroup} \makeatother\showoutput \setlength\columnseprule{1pt} \begin{document} \noindent\begin{minipage}[c][1cm][t]{\linewidth} \parbox{\dimexpr\wcolone+4mm\relax}{\centering\textbf{Date}}% \parbox{\dimexpr\wcoltwo+4mm\relax}{\centering\textbf{User}}% \parbox{\dimexpr\wcoltwo+4mm\relax}{\centering\textbf{Amount Used\\mg}}% \parbox{\dimexpr\wcoltwo+4mm\relax}{\centering\textbf{Procedure}}% \end{minipage} \fillwithlines{\dimexpr\textheight-1cm\relax} \noindent\begin{minipage}[c][1cm][t]{\linewidth} \parbox{\dimexpr\wcolone+4mm\relax}{\centering\textbf{Date}}% \parbox{\dimexpr\wcoltwo+4mm\relax}{\centering\textbf{User}}% \parbox{\dimexpr\wcoltwo+4mm\relax}{\centering\textbf{Amount Used\\mg}}% \parbox{\dimexpr\wcoltwo+4mm\relax}{\centering\textbf{Procedure}}% \end{minipage} \fillwithlines{\dimexpr\textheight-1cm\relax} \end{document} In chat you said you wanted single column with 7 headings... \documentclass[letterpaper, 12pt]{article} \usepackage[left= 1 cm, right=1 cm, top = 2 cm, bottom = 1 cm]{geometry} \newlength\linefillheight % vertical distance between lines \setlength\linefillheight{1cm} \usepackage[T1]{fontenc} \newcommand\linefill{\hspace{\stretch{.5}}% \rule{.1\textwidth}{0.4pt}\hfill \rule{.1\textwidth}{0.4pt}\hfill \rule{.1\textwidth}{0.4pt}\hfill \rule{.1\textwidth}{0.4pt}\hfill \rule{.1\textwidth}{0.4pt}\hfill \rule{.1\textwidth}{0.4pt}\hfill \rule{.1\textwidth}{0.4pt}\hspace{\stretch{.5}}% } \makeatletter \def\fillwithlines#1{% \begingroup \par \hrule height 0pt \nobreak \cleaders\hbox to \hsize{% \vrule height \linefillheight depth 0pt width 0pt \linefill} \vskip #1 \hbox{}% \endgroup} \makeatother \setlength\columnseprule{1pt} \begin{document} \noindent\begin{minipage}[c][1cm][t]{\linewidth} \parbox[t]{\dimexpr\linewidth/7\relax}{\centering\textbf{Date}}% \parbox[t]{\dimexpr\linewidth/7\relax}{\centering\textbf{User}}% \parbox[t]{\dimexpr\linewidth/7\relax}{\centering\textbf{Amount Used\\mg}}% \parbox[t]{\dimexpr\linewidth/7\relax}{\centering\textbf{Procedure}}% \parbox[t]{\dimexpr\linewidth/7\relax}{\centering\textbf{User}}% \parbox[t]{\dimexpr\linewidth/7\relax}{\centering\textbf{Amount Used\\mg}}% \parbox[t]{\dimexpr\linewidth/7\relax}{\centering\textbf{Procedure}}% \end{minipage} \fillwithlines{\dimexpr\textheight-1cm\relax} \end{document} ",Canageek,https://tex.stackexchange.com/users/7880,http://tex.stackexchange.com/questions/233700/create-a-table-that-fills-a-page-with-empty-rows,TECHNOLOGY,tex.stackexchange.com 4410,"Embedded devices Authentication, Integrity and Confidentiality","Embedded devices send messages to the server. The server occasionally sends messages to individual devices(Reboot, upgrade firmware etc) After some research this is my ad-hoc solution: 1) Each devices gets a unique id(like MAC address) and a public/private key pair when first programmed at the factory. The server will have a copy of the unique id and the public key for each device. 2) The server has a public certificate. 3) When the device wants to send a message: If it wants confidentiality it can encrypt the message using symmetric encryption and the key,salt etc will be encrypted with the servers public key. Then it can use it's private key to digitally sign the message which gives the message Authentication and Integrity. 4) The same process could be reversed when the server wants to send a message to the client. 5) Timestamps will be part of the message to resist replay attacks. The time needs to be fairly synchronized (within a minute of each other) for data collection purposes. Are there any flaws with doing it this way? The devices are fairly resource constrained so have to pick fast public key algorithms. ",Kish,https://crypto.stackexchange.com/users/20001,"I do not see an immediate flow, but the public-key cryptography seems to be an overkill in your system with a single server. As long as the server keeps some keys of each device $D$, it may as well keep a single symmetric key $K_D$, and use a single authenticated encryption scheme $\Pi$ with key $K_D$, for instance, AES-GCM. This would simplify your system significantly, and you would not need certificates. You would not even need random number generator, except for the key generation. ",Dmitry Khovratovich,https://crypto.stackexchange.com/users/9072,http://crypto.stackexchange.com/questions/21013/embedded-devices-authentication-integrity-and-confidentiality,TECHNOLOGY,crypto.stackexchange.com 2511,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) { B = ""../Images/GreenButton.png"" ; MO = ""../Images/GreenButtonMouseOver.png"" ; color1 = ""#66FF33""; color2=""#000000""; color3=""#000000""; color4=""#000000""; color5=""#000000""; //==================================================================================================================== // Check User Defined States By Rule //==================================================================================================================== if ( Status4 ) { B=""../Images/BlueButton.png""; MO=""../Images/BlueButtonMouseOver.png""; color1=""#FFFFFF""; } if ( Status32 ) { B=""../Images/LightGreenButton.png""; B=""../Images/LightGreenButtonMouseOver.png""; C1color=""#000000""; } if ( Status2 ) { B=""../Images/YellowButton.png""; MO=""../Images/YellowButtonMouseOver.png""; C1color=""#000000""; } if ( Status1 ) { B=""../Images/OrangeButton.png""; MO=""../Images/OrangeButtonMouseOver.png""; C1color=""#000000""; } if ( Status8 ) { B=""../Images/RedButton.png""; MO=""../Images/RedButtonMouseOver.png"";C1color=""#FFFF00""; } if ( Status16 ) { B=""../Images/PurpleButton.png""; MO=""../Images/PurpleButtonMouseOver.png""; C1color=""#000000""; } document.write( ""<td ONCLICK=\""Jump('""+Link+""')\""onmouseover=\""this.style.cursor='hand'\"" height='37' width='350' background='""+B+""' ><font color='""+color1+""'><p align='center'><b>""+T+""</b></td>"" ); ",chriswiec,https://stackoverflow.com/users/2571339,"you can use this syntex : onmouseover=""changeImage(this.id);"" create a function like this : <script language=""javascript"" type=""text/javascript""> function changeImage(id) { $('#'+id).css(""background-image"", ""url(your image path)""); } </script> you must include jquery.js ",Mukesh Dabhi,https://stackoverflow.com/users/2640640,http://stackoverflow.com/questions/18012530/on-mouse-over-background-change-in-document-write,STACKOVERFLOW,stackoverflow.com 7414,"I can get visual studio for free through school, should I?","I am currently using dev++, I am a complete beginner, (Freshman CS major) learning C++. I can get one of the newest versions of visual studio (2008 or 2009 i think) for free through my school. Not sure if it is worth the trouble of getting. thoughts? ",Matt,https://programmers.stackexchange.com/users/10922,"Point blank answer: YES. You have to remember that, regardless of whether you get it from school (via the MSDNAA) or through DreamSpark, you are going to be using a version with an academic license. Technically, that means you're supposed to only use it for school, although I don't know that there are people going around and looking at the metadata of people's source code to see what version they used. If you want an alternative to both VS and Dev++, you could also use Eclipse, which has a C/C++ version, which would also help you transition to Java, if it's part of your curriculum. ",Tieson T.,https://programmers.stackexchange.com/users/20046,http://programmers.stackexchange.com/questions/35214/i-can-get-visual-studio-for-free-through-school-should-i,TECHNOLOGY,programmers.stackexchange.com 9074,Change Drupal Commerce line item titles,"I'm building a webshop with a lot of promotions in. And some articles in the shopping cart, have a linked promotion. And I want to show this promotion in the shopping cart summary (before the order completion). Is there a way to change the title of the product in the shopping cart summary? It's a shop without any visible prices. The total amount of the order is calculated on the servers... (it's a complicated proces). So there is nothing to worry about that... But how can I display the pink text in a proper way? Would it be best to get this data from the database and place it as a field in a table (since the shopping cart summary is a view)? Or what other options do I have? ",Michiel,https://drupal.stackexchange.com/users/3224,"There are sevetal methods for this: You can set the product title as you want on /admin/commerce/products page. Edit product and set your title. You can set the product title in a moment you add it. To view this field the option 'Auto generate the product title' should be turned off on product display content type settings. You can use the hook_commerce_cart_product_add() to set the product title automatically and (for example) depending on product type. ",Peter Lozovitskiy,https://drupal.stackexchange.com/users/7500,http://drupal.stackexchange.com/questions/78892/change-drupal-commerce-line-item-titles,TECHNOLOGY,drupal.stackexchange.com 1822,"How do I convert date in VBA with format ""YYYYMMDD HHMMSS""?","I have my datetime stored as string: ""20120515 061115"" would be ""May 15, 2012 at 6 hour 11 minutes 15 second"" How do I convert this to datetime? Maybe using the ""CDate"" function? ",Bill,https://stackoverflow.com/users/468384,"Or you can do this in a query by parsing the date and then reconstructing it: In this example my UglyDate looks like this: Wed Mar 17, 2010 10:07 PM SELECT [Tbl_UglyDate].[UglyDate], Mid([UglyDate],5,3) AS M, Mid([UglyDate],9,2) AS D, Mid([UglyDate],13,4) AS Y, Month(""1 "" & [M]) AS M2, ([M2] & ""/"" & [D] & ""/"" & [Y]) AS date1, CVDate([date1]) AS [date] FROM [Tbl_UglyDate]; ",TSS,https://stackoverflow.com/users/1895119,http://stackoverflow.com/questions/17323247/how-do-i-convert-date-in-vba-with-format-yyyymmdd-hhmmss,STACKOVERFLOW,stackoverflow.com 7073,What planets in the Romulan system survived the supernova?,"It was told that Romulus was devastated into pieces by the nearby star that went supernova. But what happened to Remus (and the Remans for that matter) or any other minor planets in that system? From the Star Trek: Countdown comic series, Nero and his crew were mining in the Hobus system at the time the star went supernova. ",Jared,https://scifi.stackexchange.com/users/1338,"According to Memory Alpha the supernova was a nearby star, (but supposedly NOT the star Romulus and Remus orbited). This is never clearly explained or diagrammed so we can understand how this happened. (For this example we will assume it was the Romulan star which went nova to explain potential effects.) In 2387, a star close to Romulus went supernova, endangering the entire galaxy. Ambassador Spock created a red matter singularity which consumed the star, but not before the supernova reached Romulus, destroying the planet. (Star Trek) Romulus (and presumably Remus) is destroyed in the supernova. Given the explosion was clearly seen to engulf Romulus in a fiery wake, the star had to be relatively close, otherwise, the Romulans would have (and should have) been able to evacuate in a timely fashion. Normally, any planets within the orbit of a star going supernova are more than likely destroyed in the resulting blast. Remus was the third planet in the Romulan star system so it was likely as destroyed as Romulus was. In a normal supernova, the energy of the explosion is strong enough to strip away even the dense atmospheres of local gas giants, leaving only their metallic or compressed matter cores. Depending on the size of the star and the distance between the local stars, nearby star systems can be affected by gamma ray and other radiation effects. During this short interval of a star explosion, a supernova can radiate as much energy as the Sun is expected to emit over its entire life span. The explosion expels much or all of a star's material at a velocity of up to 30,000 km/s (10% of the speed of light), driving a shock wave into the surrounding interstellar medium. This shock wave sweeps up an expanding shell of gas and dust called a supernova remnant. All supernova are not created equal but most will have devastating effects on their local star systems. This can include emissions of gamma ray pulses and other energetic radiations including dangerous cosmic rays. In extreme conditions, the star's collapse could even result in a singularity or black hole. ",Thaddeus Howze,https://scifi.stackexchange.com/users/2765,http://scifi.stackexchange.com/questions/36539/what-planets-in-the-romulan-system-survived-the-supernova,LIFE_ARTS,scifi.stackexchange.com 2161,Redirect all requests to index.php except subdomains,"I'm using AltoRouter: (http://altorouter.com/) and I modified .htaccess as suggested in the instalation to: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteRule . index.php [L] This is so that index.php can handle all the requests. My problem is that I am using addon domains in cpanel and I am having internal server errors when I try to access one of the domains associated with the addon domain. Example: My main domain is mainsite.com. Then I have several sites: site1.com that cpanel automatically associates with site1.mainsite.com and creates a folder mainsite.com/site1.com. So if I access site1.com I would see in browser site1.com but the content delivered would be the one inside the mainsite.com/site.com folder. This works if I don't use the .htaccess rule but I need it for routing. If I have that rule I get internal server errors everytime I access site1.com (I assume that it's a conflict between cpanel rules and .htaccess). How can I modify the rule so that it only affects maindomain and not subdomains? I am assuming that by doing this there would be no conflict and my problem would be solved. I am really bad at .htaccess and regex but I am willing to learn if needed. I would still appreciate if you could point me to the right direction. (both in the idea and in good websites that can help me understanding this) ",2Noob2Good,https://stackoverflow.com/users/2793248," How can I modify the rule so that it only affects maindomain and not subdomains? You can add a new condition based on host name: RewriteEngine on RewriteCond %{HTTP_HOST} ^(?:www\.)?mainsite\.com$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule . index.php [L] ",anubhava,https://stackoverflow.com/users/548225,http://stackoverflow.com/questions/28098146/redirect-all-requests-to-index-php-except-subdomains,STACKOVERFLOW,stackoverflow.com 2557,How best to handle a popup gaining focus in the middle of the user typing?,"Often I'll set some process off, then change focus to another program and be typing away in a textbox (for example), when the first thing pops up into view, maybe with a Yes / No box which I'd then accidentally interact with as I'm still typing. I just accidentally sent a license agreement for something that was downloading & installing, to the printer as it popped up once it had downloaded, while I was typing a url into Chrome. If I didn't quickly cancel it I'd have had to wait while 53 pages printed while I reflected on what had happened. What can application developers, or the OS itself do to minimize these problems? ",George Duckett,https://ux.stackexchange.com/users/9382,"Two things are possible: Do not force the application to gain focus. Show the message and keep waiting till user switches to the application. Implement blinking notifications. This is OS dependent. May or may not be feasible in other OS but in Windows operating system, there is system tray (systray in short). Application can be coded in such a way that if user attention is required and the application is not in view, application can put a blinking or baloon notification in the systray. Looking at that, user can switch to the application and respond to the confirmations / queries thrown by application ",rags,https://ux.stackexchange.com/users/25817,http://ux.stackexchange.com/questions/39595/how-best-to-handle-a-popup-gaining-focus-in-the-middle-of-the-user-typing,TECHNOLOGY,ux.stackexchange.com 6711,How to wipe RAM on shutdown (prevent Cold Boot Attacks)?,"My system is encrypted using Full Disk Encryption, i.e. everything except /boot is encrypted using dmcrypt/luks. I am concerned about Cold Boot Attacks. Prior work: https://tails.boum.org/contribute/design/memory_erasure/ http://tails.boum.org/forum/Ram_Wipe_Script/ http://dee.su/liberte-security http://forum.dee.su/topic/stand-alone-implementation-of-your-ram-wipe-scripts Can you please provide instructions on how to wipe the RAM once Ubuntu is shutdown/restarted? Thanks for your efforts! ",proper,https://askubuntu.com/users/71850,"You could use sdmem. sudo apt-get install secure-delete To make it run at every shutdown, we'll create an Upstart job file called memory_wipe.conf. Note: this is one command. Copy/paste it in its entirety! echo '# upstart config - wipes memory on shutdown description ""Wipes memory on shutdown"" start on (runlevel [016] and stopped gdm) script sdmem end script' > sudo tee /etc/init/memory_wipe.conf Restart your computer and upon the next reboot, your RAM will be wiped securely! ",SirCharlo,https://askubuntu.com/users/40421,http://askubuntu.com/questions/153245/how-to-wipe-ram-on-shutdown-prevent-cold-boot-attacks,TECHNOLOGY,askubuntu.com 959,2-D Wavelet output changing when using 'figure' command in Matlab,"I am having trouble understanding what is causing the problem to my Wavelet output when i am trying to display the image with the figure command. I want to display both the Original image and its Wavelets decomposition, but when I'm using this code the original image is not displaying in a separate figure. Here is my code, im = imread('cameraman.tif'); imshow(im),title('Original Image') [cA1,cH1,cV1,cD1] = dwt2(im,'bior3.7'); A1 = upcoef2('a',cA1,'bior3.7',1); H1 = upcoef2('h',cH1,'bior3.7',1); V1 = upcoef2('v',cV1,'bior3.7',1); D1 = upcoef2('d',cD1,'bior3.7',1); % To display the results of the level 1 decomposition, type: subplot(2,2,1); image(wcodemat(A1,192)); title('Approximation A1') subplot(2,2,2); image(wcodemat(H1,192)); title('Horizontal Detail H1') subplot(2,2,3); image(wcodemat(V1,192)); title('Vertical Detail V1') subplot(2,2,4); image(wcodemat(D1,192)); title('Diagonal Detail D1') and the output of this code is just one figure with four plots (Digonal, Horizontal, Vertical details and Approximations) but when I'm using figure command to display the original image in a separate figure, im = imread('cameraman.tif'); imshow(im),title('Original Image') figure it messes up the wavelet output, Why does it happens that my output is changed to blue and red color ? ",Sufiyan Ghori,https://dsp.stackexchange.com/users/1324,"The reasoning is simple. MATLAB defaults to a 'jetblue' colormap when you use imshow(im). Typically you need to specify the colormap being used when you use imshow. For this, add another command like: $$colormap(gray(256));$$ to your current script. ",Naresh,https://dsp.stackexchange.com/users/958,http://dsp.stackexchange.com/questions/8201/2-d-wavelet-output-changing-when-using-figure-command-in-matlab,TECHNOLOGY,dsp.stackexchange.com 4810,Kernel density estimation across multiple UTM zones,"I'm trying to compare the spatial distribution between two groups of fishing locations (for each of several different years) in the Bering Sea (lat's ~53 to 65N, long's ~ -178 to -158W. My preliminary explorations have used kernel density estimation (with an unconstrained plug-in bandwidth matrix) and then examined different overlap indices of their home ranges (quantified via utilization distribution overlap index and Bhattacharyya's Affinity) to compare similarities/differences (all performed in R). However, I'm concerned about the interpretation of these data when the data may span more than one UTM zone. Most of my data are in UTM zone 3 with some data points seeping into zone 4. In more extreme cases, my data may span from zone 1 to 4. Am I being really ignorant in thinking that I can compare across zone boundaries? Since I am interested only in relative differences between calculations with the same distortion, will it not matter? Should I simply make sure that I have my UTM origin set at the southwesterly most point of the data and I'm fine from there? I've been reading StackExchange and other sites all morning and have seen several discussions about measuring across UTM zones, but I haven't been able to logically extend such responses to a method such as this one. Thank you for your time and expertise! ",Jordan,https://gis.stackexchange.com/users/44780,"I suggest (as Vince) to put the center of your custom projection in the middle of the study area at 168 W 59 N. The following projections might give best results: +proj=laea +lat_0=59 +lon_0=-168 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +proj=aea +lat_1=53 +lat_2=65 +lat_0=59 +lon_0=-168 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +proj=tmerc +lat_0=59 +lon_0=-168 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs They look pretty much the same (with the UTM zones as reference): ",AndreJ,https://gis.stackexchange.com/users/9159,http://gis.stackexchange.com/questions/129694/kernel-density-estimation-across-multiple-utm-zones,TECHNOLOGY,gis.stackexchange.com 4502,How to do this indices example?,"Beginner question, I have been trying to figure out how my book got the solution it did for this question : $$\frac{(2r^2)^5 (3r^4)^3}{(6r^3)^2} = 24r^{16} $$ I get the $r^{16}$ part but how did they get 24?! EDIT Thanks to Brian for the clear answer below. In maths the same answer can be reached many ways, I tried like this : $$\frac{2^5r^{10} 9r^{12}}{6r^6} = \frac{311r^{22}}{36r^6}= \text{something strange}$$ Please if you could let me know why my approach is leading to an incorrect answer and at which stage is my mistake? ",sprocket12,https://math.stackexchange.com/users/65215,"$$\frac{2^5\cdot3^3}{6^2}=\frac{2^2\cdot2^3\cdot3^2\cdot3}{6^2}=\frac{(2^2\cdot3^2)\cdot2^3\cdot3}{6^2}=\frac{(2\cdot3)^2\cdot8\cdot3}{6^2}=\frac{6^2\cdot24}{6^2}=24$$ Added: You tried $$\frac{2^5r^{10} * 9r^{12}}{6r^6} = \frac{311r^{22}}{36r^6}= something-strange\;.$$ The first problem is that $(3r^4)^3=3^3r^{12}=27r^{12}$, not $9r^{12}$. I’m not sure how you got $311$: $2^5\cdot9=32\cdot9=288$, and the correct $2^5\cdot27=864$. In the denominator you have two errors that cancelled each other out: the original $(6r^3)^2$ is $6^2r^6$, not $6r^6$, but that means that $36r^6$ is correct. With the arithmetic errors corrected, you have a numerical coefficient of $$\frac{864}{36}=24\;.$$ ",Brian M. Scott,https://math.stackexchange.com/users/12042,http://math.stackexchange.com/questions/329798/how-to-do-this-indices-example,SCIENCE,math.stackexchange.com 7655,Get IP network range after reverse DNS?,"For analytics purposes, I'm looking at large sets of IP addresses in server log files. I'm trying to perform reverse-DNS lookups to understand where traffic is coming from - e.g. what percentage of IPs resolve to corporations, schools, government, international etc. Despite a bunch of optimizations, individually reverse-DNS'ing every IP address still appears to be fairly expensive though. So - is there any way to obtain an entire range of IPs from a reverse-DNS? If yes, this could greatly reduce the number of actual reverse-DNS lookups. Example (numbers slightly obfuscated): Log file contains a request from an IP 128.151.162.17 Reverse DNS resolves to 11.142.152.128.in-addr.arpa 21599 IN PTR alamo.ceas.rochester.edu (So this is a visitor from Rochester University, rochester.edu) Now, would it be safe to assume that all at least all IPs from 128.151.162.* will also resolve to rochester.edu? What about 128.151.*.*? Is there a way to get the exact IP range? ",Max,https://serverfault.com/users/28167," Is there any way to obtain an entire range of IPs from a reverse-DNS? Not really, no; in extremely rare cases you might be able to do a DNS zone transfer query to get all the records in the zone (the whole /24, generally), but there's a very low chance that the name server you're querying will respond to this request. Expect one query per address for reverse DNS (sorry!). Now, would it be safe to assume that all at least all IPs from 128.151.162.* will also resolve to rochester.edu? Generally speaking, probably, as a university they're likely to own the whole /24. However, that's not a good rule to apply as a general case; a smaller school might not have a whole /24, or might not have it in reverse DNS. The reverse DNS itself is going to be pretty hit-or-miss - in many cases it'll be just generated names under the ISP's hostnames or no records at all. For better data, we're going to make things even more expensive - you should also look at data from whois. For example, here's the info from that Rochester IP - it shows the size of the allocation (the whole /16 range, so in this case that applies to 128.151.*.*) and the organization it's allocated to. The whois info should provide a great source of truth for the info you want, and has the upside of being able to see what range that applies to. The downside is that for smaller allocations, a range will often just show as belonging to the ISP instead of the end customer. Combining both whois and reverse DNS should provide the best information (and be ridiculously slow). ",Shane Madden,https://serverfault.com/users/72586,http://serverfault.com/questions/604104,TECHNOLOGY,serverfault.com 4797,Connect to Microsoft Access database via Microsoft SQL Server / MySQL,"A client has an Microsoft Access database where they save their products. To access the database now you have to login via VPN and open Microsoft Office Access. I need to access this database from a PHP script running on another server. I've done some research and found that it's not possible to connect to an Access database like a MySQL database. So what I wonder is if it may be possible to set up an Microsoft SQL Server on the same server that uses the Microsoft Access database. So I can connect to the Microsoft SQL Server with the PHP script. Or if it's possible MySQL. They are running Microsoft Windows Server 2008 and Microsoft Office Access 2003. ",Patrik,https://dba.stackexchange.com/users/27985,"I thought you could use php to connect to an Access database. Here's the php manual on this topic: http://php.net/manual/en/function.odbc-connect.php And a code sample from that page connecting to Access database. <?php // Microsoft SQL Server using the SQL Native Client 10.0 ODBC Driver - allows connection to SQL 7, 2000, 2005 and 2008 $connection = odbc_connect(""Driver={SQL Server Native Client 10.0};Server=$server;Database=$database;"", $user, $password); // Microsoft Access $connection = odbc_connect(""Driver={Microsoft Access Driver (*.mdb)};Dbq=$mdbFilename"", $user, $password); // Microsoft Excel $excelFile = realpath('C:/ExcelData.xls'); $excelDir = dirname($excelFile); $connection = odbc_connect(""Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=$excelFile;DefaultDir=$excelDir"" , '', ''); ?> ",sa555,https://dba.stackexchange.com/users/26481,http://dba.stackexchange.com/questions/49492/connect-to-microsoft-access-database-via-microsoft-sql-server-mysql,TECHNOLOGY,dba.stackexchange.com 8693,Why use a small aperture when trying to see sensor dust?,"Here and there I read of people who set their lens to a small aperture while testing their sensor cleanness, supposedly to get the best image of dust speckles. However, the image of the on-sensor dust particles should not, to my understanding, be affected by the sharpness induced by the lens settings. Same is true for dust particle on the lens elements themselves. It makes me wonder - do these people misunderstand the theory of how the optical system work, or am I missing something? ",ysap,https://photo.stackexchange.com/users/1024,"If the dust was really on the sensor proper, you'd be absolutely correct. At least in the normal case, it's virtually impossible for dust to get on the surface of the sensor itself, because there's a couple millimeters or so of filters directly in front of the sensor. The front-most of these is (at least in the usual case) the AA filer. The important thing is that all of this transparent glass. Therefore, with a wider aperture, there's more light coming at the sensor from various angles. Since the light can travel at whatever angle through those filters (because they're all at least mostly-transparent glass), the dust spots won't normally block all the light. With a smaller aperture, the light comes nearly straight back from the small aperture, so the edges of any dust spots are clearly defined. In practice, the difference is pretty obvious. Here's a shot at f/1.7, then shot taken a few moments later at f/22 (same camera, same lens, etc. -- all that's changed is the aperture and shutter speed): f/1.7: f/22: Like usual for this situation, I've also boosted the contrast to make the dust more visible -- since it's a plain, low-contrast subject, the histogram starts out like this: To make the dust more apparent, you adjust the levels something like this: If you apply it to the f/1.7 picture (as I did above, to keep things fair), that will also overemphasize the light falloff at the corners of the picture. Though there is some anyway, it's not normally even close to as bad as it looks in the first shot above. Note that this is a pretty rigorous test. This sensor is clean enough that on typical shots, there's no sign of dust on the sensor at all. Between the total lack of contrast/detail in the subject, tiny aperture, and extreme boost of contrast, we're seeing quite a bit that we'd never see in any normal picture (not to mention that the two worst spots here are near the bottom of the frame, where there's nearly always at least a little detail to hide these problems anyway). If you test this on your own camera, don't be too surprised if it looks (quite possibly a lot) worse than the ones above. From what I've seen, I'd guess that most dSLRs (and a pretty fair number of P&S cameras too) are at least a little, and often a lot, worse than this. ",Jerry Coffin,https://photo.stackexchange.com/users/603,http://photo.stackexchange.com/questions/12087/why-use-a-small-aperture-when-trying-to-see-sensor-dust,LIFE_ARTS,photo.stackexchange.com 788,Equal elements in SubArray,"I have an array containing N elements and I need to find the distance between the index of equal elements in a subarray; which we will get in form of query (L R) where L is starting index of subarray and R in ending index. Total No. of array elements can be N<=10^5 and Queries Q<=10^5. ex: 7 0 4 0 8 0 32 0 2 0 2 0 5 //answer for 1st query will be 2 (index 2-0) //answer for 2nd query will be 8 (index (2-0) + (4-2) + (4-0)) Edit: I am not expecting code (though it would be really helpful) general idea to solve will be a great help. ",Ryan Stein,https://stackoverflow.com/users/4899129,"Create a map whose key are the elements of the array and values are lists of the position they appear in (your example would become {0: [0, 2, 4, 6], 8: [3], 4: [1], 32: [5]}). These groups form unrelated problems. One way finding the answer is to see them as maximum flow problems where each index form two vertices. Each index is connected to all the indexes following it and all the indexes preceding it are connected to it. The weight of the edges is the distance of the elements in the array, i.e. the difference between the two indexes. All the ""source"" vertices are connected to an infinite source and all the ""destination"" vertices are connected to a sink. The sum of the values of the maximum flows for all the problems is the sum you are looking for. As an example, let's use the indexes for the item 0: +-------- 0 ----------+ 0 --------+ | | | | | | Source ----+-------- 2 -------+ +----> 2 --------+---- Sink | | | | | | | | +-------- 4 ----+ +--+----> 4 --------+ | | | | | | | | | | +-------- 6 +--+--+----> 6 --------+ Weight of arc (u, v) = v - u Note that the number of edges grows as V^2 because every edge corresponds to a difference you have to do in order to compute the result, which are between each index and all its successors. This makes the complexity of the solution O(n^3) which is even worse than the naive algorithm, it's just a nice way of viewing things from another perspective :) ",BlackBear,https://stackoverflow.com/users/521776,http://stackoverflow.com/questions/30245691/equal-elements-in-subarray,STACKOVERFLOW,stackoverflow.com 7455,AES using derived keys / IVs. Does it introduce a weakness?,"I'm looking for an efficient way to encrypt multiple fields in a database with AES using a single global key, used throughout a large web application. Obviously in order to re-use this key, a unique random IV is required for each field that is to be encrypted. I'd rather not introduce more fields to the database to store each of these IVs, so the programatic approach seems to be to derive these IVs some how. I'm toying with using either: key = sha256(global_key + table_name) iv = sha256(column_name + primary_key) Or even simply: key = global_key iv = sha256(table_name + column_name + primary_key) I'm leaning towards the former to generate per-table keys. I've already read that the IVs do not need to be kept secret. So I'm working on the assumption that a derived key or IV (even if the algorithm becomes known), is no more insecure than any other non-secret IV, as long as the original key remains secret. The question is: Is there a fatal flaw in my approach? Am I introducing any serious weaknesses that, in the event that an adversary obtains a copy of the database, would make it easier for them to retrieve the plaintext data? I realise that is potentially soliciting one word answers. Suggestions for alternate / better schemes very much welcomed, as well as references to existing works and how they implement similar scenarios. ",Leigh,https://security.stackexchange.com/users/1349,"I am assuming you are using CBC mode... I would make the argument that this is a CWE-329 violation. The IV can be known the to attacker, but it must be random. A more common solution to your problem is just to store a very secure random value and use this as your ""IV"". Lets say you have a table named ""secret"". The attacker has a SQL Injection vulnerability and sees this table, he can also see that the current primary key value. By computing a simple sha256 hash he is able to predict the next IV, or even per-compute a table of future IVs. (Depending on your platform the SQL Injection vulnerability could be turned into a decryption oracle! Nasty!) If I where building this I would use a proper Key Derivation Function such as PBKDF2. These are heavier functions which make it more difficult for the attacker to ore-compute or calculate in mass. It doesn't have to be much heavier, but the resulting value does have to be the same size as your cipher. Another possible solution is to have an global ""IV secret"". Pass iv_secret + column_name + primary_key to your Key derivation function to produce your IV. Due to the use of a secret the IV is no longer a predictable value and this is no longer a CWE-329 violation. Further more this value is also a nonce, it is not likely that the same IV would be generated twice for two different values... (Unless you made an update, which would be a violation). To mitigate this you could add a ""version number"" or last-modified timestamp to the IV calculation. ",rook,https://security.stackexchange.com/users/975,http://security.stackexchange.com/questions/23937/aes-using-derived-keys-ivs-does-it-introduce-a-weakness,TECHNOLOGY,security.stackexchange.com 438,Clustering algorithm and distance function for sets,"I am willing to run a clustering algorithm on data records consisting in sets each one representing the features enabled at a certain time. Is there any clustering algorithm you would recommend me to try out? In my first tests I'm experimenting with K-means, but maybe there is something more suitable. Is there any distance function that works well with sets? I guess that there is something better than the Euclidean distance but I don't have may clue on how the better metric could look like. ",mariosangiorgio,https://stats.stackexchange.com/users/10841,"You can convert set information to binary vectors (0/1 for presence/absence of a feature), then use a binary metric (e.g. Jacard, Tanimoto, Russell-Rao, Skal-Sneath, Yule metric) to cluster your data. I would try to pick a good visualization tool to explore the results and decide which algorithm/metric is the best for the data/problem. ",James LI,https://stats.stackexchange.com/users/14411,http://stats.stackexchange.com/questions/38064/clustering-algorithm-and-distance-function-for-sets,SCIENCE,stats.stackexchange.com 8433,"Difference in ""capable"" and ""able""","What is the difference in being physically capable and physically able? When would one choose one over the other? ",Homer,https://english.stackexchange.com/users/21117,"Capable is more of a mentality. Able is more of a physical idea. You can be mentally capable of describing the object in front of you; you can be able to lift the 100 lb weights. However, the words are nearly interchangeable anywhere. Even in the examples I gave, the other fits, but one seems more appropriate than the other commonly. ",Alex,https://english.stackexchange.com/users/116855,http://english.stackexchange.com/questions/75010/difference-in-capable-and-able,CULTURE,english.stackexchange.com 4209,Looking up for an item in a list and different table styles in iOS,"I have a settings view with a grouped table. One of the cells of such table is intended to show a very long list of items from where I want the user to select one. Due to the length of the list, I need to provide a way to make easier to find a certain item. One of the options I think there are, is to show letters of alphabet as indexes at the right side of a plain table. Since my first table is a grouped one, my navigation hierarchy would be then like this: Would it be inconsistent to navigate from a grouped table to a plain table? If so, could somebody give an existing example? I didn't find anything related to this in iOS Human Interface Guidelines, maybe it is described somewhere else and this navigation pattern breaks the guidelines. Another option could be having a search bar. Can a search bar be used in both a plain table and a grouped table? The existing example of such bar I found is in Contacts app and it is a plain table. In a plain table, could both an alphabet index and a search bar be shown? ",AppsDev,https://ux.stackexchange.com/users/30975,"IDEA 1: Grouping Can you group items in the second table (plain table) further? If so, the interface is much simplified. IDEA 2: Filtering If IDEA 1 is impossible to follow, then you can do another thing. Implement a filter feature to the long list. Just place an icon at the top of the list. Clicking on it should bring a new page. Provide checkboxes, sliders, or some other facility according to your situation. Avoid the search bar if possible -- users don't know what words you have used in your list. IDEA 3: Sorting If IDEA 2 fails, then you must sort and present the list manually. Think about the options again and decide which are the most used options? Guess what most users want. Show those options first! IDEA 4: Visual cues Use icons or pictures relating to the actions/properties of the items in the list. This allows easy scanning. ",StupendousMan,https://ux.stackexchange.com/users/33311,http://ux.stackexchange.com/questions/42839/looking-up-for-an-item-in-a-list-and-different-table-styles-in-ios,TECHNOLOGY,ux.stackexchange.com 3662,Kernel compilation and free space,"I am compiling linux kernel 3.0.1 My operating system is Ubuntu 11.04 The source is in /usr/src/linux-3.0.1 Though there is no free space remain in / the compilation is still going on .. ! What is happening exactly ?? Should I stop it ? ",Vikram,https://superuser.com/users/121505,"Are you compiling as root? I don't know if the free space reported by df takes into account the typical 5% superuser reservation. Also it could be the kernel hasn't flushed the disk cache yet. It is also possible your /usr is mounted on a separate partition. This is quite likely if you took the defaults during your Ubuntu install (unless something has changed since the last time I used Ubuntu...) If you run out of disk space and the compilation fails, free up some disk space and resume the compilation by issuing the make command again. Bad idea to let / run out of space. I would try to address that ASAP. ",LawrenceC,https://superuser.com/users/51705,http://superuser.com/questions/403022,TECHNOLOGY,superuser.com 9563,Timer writes in log twice,"Everything works fine except for one thing. My program prints ""player hit"" 2 times then ""mob hit"" 2 times and then ""player hit"" 2 times again and so forth. I want it to type ""player Hit"" ""mob Hit"" ""player Hit"" ""mob Hit"" and so on. I can't see why it types it 2 times. My code looks like this: public partial class Form1 : Form { public Form1() { int Rase1 = 0; InitializeComponent(); timer1.Tick += new EventHandler(timer1_Tick); timer1.Interval = (1000); timer1.Enabled = false; timer2.Tick += new EventHandler(timer2_Tick); timer2.Interval = (1000); timer2.Enabled = false; } private void buttonChoseRase_Click(object sender, EventArgs e) { if (Rase1 == 0) { Rase1 = 1; Rase Rase = new Race(this); Rase.Show(); } else if (Race1 >= 1) { buttonChoseRase.Enabled = false; Rebirth Reb = new Rebirth(this); Reb.Show(); } } private void buttonStart_Click(object sender, EventArgs e) { textBoxCombatLog.Text = """"; buttonStart.Enabled = false; buttonStop.Enabled = true; timer1.Start(); timer2.Stop(); } private void buttonStop_Click(object sender, EventArgs e) { buttonStart.Enabled = true; buttonStop.Enabled = false; timer1.Stop(); timer2.Stop(); } private void LogWrite(string txt) { textBoxCombatLog.AppendText(txt + Environment.NewLine); textBoxCombatLog.SelectionStart = textBoxCombatLog.Text.Length; } private void timer1_Tick(object sender, EventArgs e) { LogWrite(TimeDate + ""Player Hit \n""); timer1.Stop(); timer2.Start(); } private void timer2_Tick(object sender, EventArgs e) { LogWrite(TimeDate + ""Mob Hit \n""); timer2.Stop(); timer1.Start(); } private string TimeDate { get { return ""["" + DateTime.Now.ToString(""HH:mm:ss"") + ""]"" + "": ""; } } } Here is what is looks like running, and no matter what I do, everything shows up twice: ",Johannes Bjärehall,https://stackoverflow.com/users/2414858,"You've attached the event handler to the Tick event of the timer through designer in addition to through the code file itself. You need to remove one of the two. Either attach the event handler in code or attach it through the designer. ",Servy,https://stackoverflow.com/users/1159478,http://stackoverflow.com/questions/16741646/timer-writes-in-log-twice,STACKOVERFLOW,stackoverflow.com 174,Recover Console Text Output after Using fbi App to display image on /dev/fb0,"I am not using X and I'm using fbi to display an image on the /dev/fb0 framebuffer device. When I boot up my Pi, I see all the usual text and it boots up to where I can log in on the console. After I use fbi like this: fbi -T 2 -d /dev/fb0 -a myimage.png My image is displayed and replaces the text. How do I 'discard' the image painted in fb0 and recover my text session so I can type? ",PhilBot,https://raspberrypi.stackexchange.com/users/10182,"From man fbi: COMMAND USAGE ESQ, q Quit. I think that should be ""ESC"" -- anyway, lots of informative stuff in the man page. In case you are unaware, there are 6 virtual terminals (VTs) with log-in prompts created at boot, but only the first one is where init messages appear. You can access these via CtrlAltF1-6. Which I think you know since you are using -T 2, making it sort of a strange question... ",goldilocks,https://raspberrypi.stackexchange.com/users/5538,http://raspberrypi.stackexchange.com/questions/28398/recover-console-text-output-after-using-fbi-app-to-display-image-on-dev-fb0,TECHNOLOGY,raspberrypi.stackexchange.com 8168,"How do I make a Make, Make Install, and deb file for a python program?","I recently got done making a python program. Now the question is, how do I go about making an installation script for it. From my understanding you need to create a make file, but from what my understanding is that a make file is made for compiled languages, not interpreted languages. What all do I need to do to make an installation script for my python program? ",user3346931,https://unix.stackexchange.com/users/121406,"If you'd like to package your application for installation on Debian systems, your best starting point is the dh-python package. You may also find the Debian Python FAQ, The Hitchhiker’s Guide to Packaging and the Python distutils useful references. ",mjturner,https://unix.stackexchange.com/users/5186,http://unix.stackexchange.com/questions/216460/how-do-i-make-a-make-make-install-and-deb-file-for-a-python-program,TECHNOLOGY,unix.stackexchange.com 8855,Travelling with electric violin under revised airport security rules,"In light of suspected terrorist threat airport security has been tightened to include new restrictions on ""electronic devices"". For example, on Heathrow Airport's site they say: Make sure your electronic devices are charged before you travel. If your device doesn’t switch on when requested, you won’t be allowed to bring it onto the aircraft. I travel with an electric violin, not so that I can rock-out during business trips but so that my practise does not disturb people in neighbouring hotel rooms since the electric violin is near-silent without an amplifier. Will my electric violin fall foul of new airport security restrictions? If so how does one prove that an electric violin (or any other active electronic instrument) is ""turned on"" without an amplifier to hand? ",dumbledad,https://music.stackexchange.com/users/2125,"I doubt this will be an issue, but there are plenty of ways to connect your guitar to an mobile phone. I'm guessing the electric violin outputs the same signal, so it can be used in a guitar amplifier. If so, you could use one of those together with your smartphone, and some sort of sound will be produced. Or even simpler, use one of those portable practice devices, which are just a 1/4"" plug and a small box you can connect headphones too. ",Meaningful Username,https://music.stackexchange.com/users/8682,http://music.stackexchange.com/questions/21931/travelling-with-electric-violin-under-revised-airport-security-rules,LIFE_ARTS,music.stackexchange.com 1508,How to compile and install programs from source,"This is an issue that really limits my enjoyment of Linux. If the application isn't on a repository or if it doesn't have an installer script, then I really struggle where and how to install an application from source. Comparatively to Windows, it's easy. You're (pretty much) required to use an installer application that does all of the work in a Wizard. With Linux... not so much. So, do you have any tips or instructions on this or are there any websites that explicitly explain how, why and where to install Linux programs from source? ",Nitrodist,https://unix.stackexchange.com/users/193,"Recently I've started using ""Checkinstall"" when installing from source outside of my package manager. It builds a ""package"" from a 3rd party tarball which can then be installed and managed (and uninstalled) through your package manager tools. Check out this article - http://www.linuxjournal.com/content/using-checkinstall-build-packages-source ",Aryeh,https://unix.stackexchange.com/users/288,http://unix.stackexchange.com/questions/173/how-to-compile-and-install-programs-from-source,TECHNOLOGY,unix.stackexchange.com 1804,Opening a file on unix using c++,"I am trying to open a file in c++ and the server the progam in running on is based on tux. string filename = ""../dir/input.txt""; works but string filename = ""~jal/dir1/dir/input.txt""; fails Is there any way to open a file in c++ when the filename provided is in the second format? ",Jaelebi,https://stackoverflow.com/users/92682,"You could scan the string, replacing ~user by the appropriate directory. The POSIX function wordexp does that, and a few other things variable substitution, like you can use $HOME optional command substitution, like $(echo foo) (can be disabled) arithmetic expansion, like $((3+4)) word splitting, like splitting ~/a ~/b into two words wildcard expansion, like *.cpp and quoting, like ""~/a ~/b"" remains that ",Johannes Schaub - litb,https://stackoverflow.com/users/34509,http://stackoverflow.com/questions/932519/opening-a-file-on-unix-using-c,STACKOVERFLOW,stackoverflow.com 2612,How much more polite does the word please make a request?,"When I learnt ""could you possibly"" pattern, my friend said to me this is very polite form to use when I make a request.I said 'how about if I use the please also with it"" and he said ' it is a bit too polite that almost in a begging manner'. I can understand that but what I would like to ask that there are other ways of making request.For example : Would you open the window or Could you open the window But in these forms it is ok if I do not use the word please? Does its politeness degree change depending on where to use the please? For example : Could you please open the window or Could you open the window please? Which one is more idiomatic or more polite ? And at last but not least which one is more polite? ""Would you please open the window"" ""Could you please open the window"" ""Could you possibly open the window"" ""Could you possibly open the window please"" ""Would you mind opening the window"" ""Would you mind opening the window please"" ",Mrt,https://ell.stackexchange.com/users/11631,"I agree with your friend that if you use please in addition to another ""softening"" phrase in your request that it could be perceived as somewhat obsequious or even a bit sarcastic. As Adam mentioned, inflection is very important. These examples could be spoken in a way that makes them more of a demand than a polite request. Could you possibly roll down the car window please? The next time you decide to eat 5 bean burritos for lunch, you should drive by yourself back to the office. Would you mind taking your feet off of my desk, please? I tend to use ""Could you..."" mostly if there is some doubt as to whether the person is able to do what I ask. I think it's fairly common in AmE to make that distinction, but I'm certain some folks don't see much difference between ""could you"" and ""would you"", so it's not really a rule that you have to follow. Could you possibly speed up the process for me? I need to get those permits before next week. Could you please speed up the process for me? I need to get those permits before next week. I tend to use ""Would you..."" mostly in situations where I'm asking the person if they would be willing to do what I'm requesting. Would you help me carry these boxes please? Would you mind helping me with these boxes? ",ColleenV,https://ell.stackexchange.com/users/9161,http://ell.stackexchange.com/questions/52105/how-much-more-polite-does-the-word-please-make-a-request,CULTURE,ell.stackexchange.com 9427,How long does PhD Application Process take in the UK?,"I submitted my application with a supervisor's name fora UK university last week. I plan to apply for a scbolarship after getting an offer. The scholarship application deadline is in March. I would like to know how long it takes to get an application result in a UK uni? ",Potential PG Student,https://academia.stackexchange.com/users/27421,"Most PhD students in the UK will be looking for some sort of scholarship, often directly from the university. Universities will therefore base decisions around what funding they can get confirmation for. If you're applying elsewhere for funding, and you need to have a confirmed offer before applying, I would talk to whoever you submitted the application to, as they could probably make a decision on an unfunded place in time if needed, but won't necessarily do so without a reason to. ",Jessica B,https://academia.stackexchange.com/users/20036,http://academia.stackexchange.com/questions/37158/how-long-does-phd-application-process-take-in-the-uk,LIFE_ARTS,academia.stackexchange.com 7447,Performance of SQL query with condition vs. without where clause,"Which SQL-query will be executed with less time — query with WHERE-clause or without, when: WHERE-clause deals with indexed field (e.g. primary key field) WHERE-clause deals with non-indexed field I suppose when we're working with indexed fields, thus query with WHERE will be faster. Am I right? Thanks! ",Mike B.,https://stackoverflow.com/users/462347,"There are cases where a where clause on the primary key will be slower. The simplest is a table with one row. Using the index requires loading both the index and the data page -- two reads. No index cuts the work in half. That is a degenerate case, but it points to the issue -- the proportion of the rows selected. Or, more accurately, the proportion of pages needed to resolve the query. When the desired data is on all pages, then using an index slowed things down. For a non primary key, this can be disastrous, when the table is bigger than the page cache and the accesses are random. Since pages are ordered by a primary key, the worst case is an additional index scan -- not too bad. Some databases use statistics on tables to decide when to use an index and when to do a full table scan. Some don't. In short, for low selectivity queries, an index will improve performance. For high selectivity queries, using an index can result in marginally worse performance or dire performance, depending on various factors. ",Gordon Linoff,https://stackoverflow.com/users/1144035,http://stackoverflow.com/questions/11802884/performance-of-sql-query-with-condition-vs-without-where-clause,STACKOVERFLOW,stackoverflow.com 3790,Best CMS for review-type sites,"Is there an ideal CMS for making a review site? By review site, I mean like a restaurant review site where you have each entry belonging to different major categories like Cuisine and City. Then users can browse and filter by each or by combination (Chinese Food in Los Angeles, with suggestions of other Chinese restaurants in LA, etc). Furthermore, I'd want it to support other fields like price, parking, kid-friendliness, etc. And to have users be able to filter by those criteria. I've been told that with a combination of custom taxonomies, plug-ins and many clever little queries, that Wordpress 3.x can handle this. But I'm having a heck of a time with it getting into the nitty gritty, and that's where I find the community support is lacking. The sort of stuff you'd think would work in WP, like making one parent category for Cuisine and one for City, don't really work once you get further in and start trying to pull it all together. Then you find these blog posts where people say, ""This example shows that one could create a huge movie review site using custom taxonomies..."" but when you go and try it you hit all sorts of challenges and oddities that point a big long finger at Wordpress being in fact a blogging platform. The best I came up with was one category for the cuisine and one tag for the city, then I created a couple of custom tag-like taxonomies for the other features. It's quite a mess to try to figure out how to assemble all of that into a natural, intuitive site. I expect a few versions down the road WP will be able to do these sorts of sites out of the box. So I thought I'd take a step back before I run back into the Wordpress fray and find out if maybe there is another platform better suited to this sort of relational content site. Directory scripts in some ways offer many of the features I'm looking for, but I need something more flexible and, hopefully, interactive (comments, reviews). I'm especially looking for feedback from people who've crafted sites like this. Thanks! ",Pru,https://webmasters.stackexchange.com/users/2120,"There are many directory scripts out there, although many are made by PHP script-kiddies and not great quality. Hot Scripts will have a good selection I'm sure. There is a ""professional"" extension for Joomla called Mosets Tree, which I have used and is pretty good. It can take a little effort to customize it, if you want to change the layout a lot, but the default set up looks fine in most cases. Incidentally, as I asked on SO, you don't have to pay for it since it is an open source license. If you can find it anywhere (it's quite prevalent on torrent sites), then it's perfectly legal to install and use. There may be similar plugins for Wordpress and Drupal too, so shop around. ",DisgruntledGoat,https://webmasters.stackexchange.com/users/233,http://webmasters.stackexchange.com/questions/3398/best-cms-for-review-type-sites,TECHNOLOGY,webmasters.stackexchange.com 1615,How could I launch the sequence of git commands from java application?,"I need to add the file to the repository and then commit it from my java project. I use Runtime.getRuntime().exec(""C:\\Program Files (x86)\\Git\\bin\\sh.exe""); to start git but what should I do next? ",cadmy,https://stackoverflow.com/users/3110505,"sh.exe isn't Git, it's the command shell distributed with Git. You'd want to run Git directly, e.g. like this: String[] command = {""C:\\Program Files (x86)\\Git\\bin\\git.exe"", ""add"", ""some-file-to-add""}; Runtime.getRuntime().exec(command); But since you're writing in Java I suggest you have a look at JGit, a native Java Git library. ",Magnus Bäck,https://stackoverflow.com/users/414355,http://stackoverflow.com/questions/21530450/how-could-i-launch-the-sequence-of-git-commands-from-java-application,STACKOVERFLOW,stackoverflow.com 8385,Background-attachment: fixed is not working in iPad,"I use this css button working background-attachment: fixed;in ipad. please help me.Below the link Link is here .home #bottom-header { background-attachment: fixed !important; background-clip: border-box; background-color: rgb(255, 255, 255); background-image: url(""images/hero_bg.jpg""); background-origin: padding-box; background-position: center top; background-repeat: no-repeat; background-size: 100% auto; height: 100%; position: relative; width: 100%; } ",user1844884,https://stackoverflow.com/users/1844884,"This process is quite costly to the render process on mobile browsers so it is disabled. See this post: How to replicate background-attachment fixed on iOS ",BennyTicklez,https://stackoverflow.com/users/2970221,http://stackoverflow.com/questions/31295953/background-attachment-fixed-is-not-working-in-ipad,STACKOVERFLOW,stackoverflow.com 4483,Should I put newlines before or after binary operators?,"When you're in Python or Javascript, you should always put binary operators at the end of the previous line, in order to prevent newlines from terminating your code prematurely; it helps you catch errors. But in C or C++, this isn't an issue, so I'm wondering: Is there any reason for me to prefer the second version to the first? return lots_of_text + 1; versus return lots_of_text + 1; (For example, does one of them help prevent other kinds of errors? Or is one of them considered more readable?) ",Mehrdad,https://programmers.stackexchange.com/users/11833,"I'd always use the first. You want it to be clear what you are doing with that 1 there. If I saw that and there was a wall of text above that 1 I'd have no idea what was going on as far as that 1's usage. The '+' being next to 1 makes it clear that at a minimum I am doing something with the 1 in question rather than it hanging out going ""I'm all in your code dude..."" for no apparent reason. ",World Engineer,https://programmers.stackexchange.com/users/28988,http://programmers.stackexchange.com/questions/160522/should-i-put-newlines-before-or-after-binary-operators,TECHNOLOGY,programmers.stackexchange.com 646,""" not all code paths return a value"" when return enum type","I have enum list and method and i get error: "" not all code paths return a value"" Some idea whats wrong in my method ? I am sure I always return STANY type :/ Thanks for help :) private enum STANY { PATROL, CHAT, EAT, SEARCH, DIE }; private STANY giveState(int id, List<Ludek> gracze, List<int> plansza) { // Sprawdz czy gracz stoi na polu z jedzeniem i nie ma 2000 jednostek jedzenia bool onTheFood = false; onTheFood = CzyPoleZjedzeniem(id, gracze, plansza, onTheFood); if (onTheFood && (gracze[id].IloscJedzenia < startFood / 2)) return STANY.EAT; // Sprawdz czy gracz nie stoi na polu z innym graczem bool allKnowledge = true; allKnowledge = CzyPoleZInnymGraczem(id, gracze, allKnowledge); if (!allKnowledge) return STANY.CHAT; // Jesli ma ponad i rowna ilosc jedzenia patroluj if (gracze[id].IloscJedzenia >= startFood / 2) return STANY.PATROL; // Jesli ma mniej niz polowe jedzenia szukaj jedzenia if (gracze[id].IloscJedzenia > 0 && gracze[id].IloscJedzenia < startFood / 2) return STANY.SEARCH; // Jesli nie ma jedzenia umieraj if (gracze[id].IloscJedzenia <= 0) return STANY.DIE; } ",netmajor,https://stackoverflow.com/users/259227,"Maybe you're sure that a return type will always be given, but the compiler isn't [imagine that all the if conditions fail - ie: a variable was changed while your code was executing by an external program. Then what would happen?] Just stick a return at the bottom as a ""default"" value. You could also throw an exception too, if you want, since the bottom should never be reached, right? ",Warty,https://stackoverflow.com/users/273085,http://stackoverflow.com/questions/2894131/not-all-code-paths-return-a-value-when-return-enum-type,STACKOVERFLOW,stackoverflow.com 6100,Tilde on unix:hpux and / or solaris,"On Linux press F9 return a correct ~ On unix(solaris or hpux) return 0~ How to set correct tilde on those systems? ",elbarna,https://unix.stackexchange.com/users/80389,"I don't know what makes you think F9 returning a tilde is ""correct"", but if you want a tilde, you should use the tilde key. Function keys are mostly undefined, based on the differences in the client-side hardware you are using, the client-side software you are using, the server-side software you are using, and the server-side hardware you are using. ",hymie,https://unix.stackexchange.com/users/27982,http://unix.stackexchange.com/questions/180503/tilde-on-unixhpux-and-or-solaris,TECHNOLOGY,unix.stackexchange.com 4658,Should I include high school details in Grad School Resume?,"I was wondering if I should include my high school details in the resume of my graduate school application ? It's unclear about this bit since we are not actually submitting any proof of high school records during grad school application( they only ask for undergraduate details). But my high school final examination details are particularly good (better than my undergraduate credentials infact!) ",pjamu,https://academia.stackexchange.com/users/9186,"I have to disagree slightly with the stark ""No"" answers. Only when those details provide evidence of your potential for research. Some information about your high-school experience may shed light on your research potential. Certainly you would want to mention winning the Intel Science Talent Search or the International Olympiad in Informatics, or describe the peer-reviewed research papers you published as a high school student. But your high school grades? No, leave them off. ",JeffE,https://academia.stackexchange.com/users/65,http://academia.stackexchange.com/questions/13872/should-i-include-high-school-details-in-grad-school-resume,LIFE_ARTS,academia.stackexchange.com 5436,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. ",user,https://webapps.stackexchange.com/users/10154,"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\\\). Then set your filter to delete any such message. When you send a message with that string in it the message will get labelled ""Trash"" (as if you'd deleted it yourself). Two possible complications If the recipient replies and quotes your ""tag"" the message will go straight to Trash. If they don't it won't If you use this to reply to a message, the reply will go to Trash, but the original won't. It doesn't delete the whole thread Depending on what you're trying to accomplish these may or may not be a problem. ",ale,https://webapps.stackexchange.com/users/354,http://webapps.stackexchange.com/questions/14697/send-delete-in-gmail,TECHNOLOGY,webapps.stackexchange.com 887,Is an old mtb with replaced gear safe to buy?,"I believe this question to be on topic for this site, I want it to be more factual based than opinion, another similar question is this one. If its not feel free to close it. I am looking at buying an older (10 yrs old) Giant NRS 1 MTB, it has very good reviews for the frame especially, but other parts have been replaced (it has a new front wheel, cables etc.). Should I be worried that other parts will be about to fall off, or are replacements a good thing? EDIT: Ok so the wheel was replaced due to hitting a stump at night time, the cables were getting old, it has had plenty of action, but was well looked after. The rear sus has a tiny bit of play in the top bush (not enough to realise when riding) It also has a leaking front fork, not a big issue (probably new seal, or not worry), but makes me wonder if it is worth it, will cost around $400 US ish, do you think it will have other issues? cheers in advance! ",W1ll1amvl,https://bicycles.stackexchange.com/users/14123,"Aluminum fatigues. A 10 year of bike with a lot of miles could be getting towards the end of it life. It has a modern headset. Full suspension has come a long way in 10 years. But 26"" wheels. I would rather have a hard tail 29"". You would have to judge the parts based on inspection. With a leaky fork I would not do it period. How do you know it is not a big issues? Do you have a quote that it is a cheap repair? To me that is not the kind of bike you put a lot of money into. ",Paparazzi,https://bicycles.stackexchange.com/users/7785,http://bicycles.stackexchange.com/questions/25691/is-an-old-mtb-with-replaced-gear-safe-to-buy,CULTURE,bicycles.stackexchange.com 744,Are scientifically detached professors referred to as ‘clinical’?,"I have come across this term fairly often, where full/associate/assistant professors are referred to by the term ‘clinical’. Given that their departments had nothing to do with medicine, I thought the term referred to the second meaning of clinical: scientifically detached; strictly objective Is this interpretation correct? If yes, isn’t such a branding offensive? ",Sheeba,https://academia.stackexchange.com/users/37947,"There can be clinical professors in fields other than medicine, though they may be labeled something else. The definition of a ""clinical professor"" is not limited to medicine: ""The prefix Clinical identifies appointments that primarily provide practical instruction and application of practical knowledge. On the Medical Campus, the title describes faculty whose primary activity is limited to clinical or public health practice and associated teaching. The duties, terms of appointment, and salaries (if any) of such persons are specified in the letter of appointment. In general, the applicable rank and any subsequent promotions should be determined by the relevant academic achievements, professional accomplishments, and demonstrated effectiveness of the appointee."" (Boston University faculty handbook) So, though I don't know much about engineering, I imagine that a professional from an engineering firm that specializes in a particular process could be hired as a clinical professor. S/he would teach about the particular niche they occupy in the industry. ",ewormuth,https://academia.stackexchange.com/users/37649,http://academia.stackexchange.com/questions/49759/are-scientifically-detached-professors-referred-to-as-clinical,LIFE_ARTS,academia.stackexchange.com 5544,Fill: SelectCommand.Connection property has not been initialized. what to do?,"When I try to use the method GetCities(), it says: Fill: SelectCommand.Connection property has not been initialized. Can anyone please advise on what to do? public class CitiesService { public DataSet DS; public OleDbConnection myConnection; public OleDbDataAdapter adapter; public OleDbDataAdapter adapter2; public CitiesService() { } public DataSet GetCities() { OleDbCommand myCmd = new OleDbCommand(""SPtblCities"", myConnection); myCmd.CommandType = CommandType.StoredProcedure; OleDbDataAdapter Adapter = new OleDbDataAdapter(); Adapter.SelectCommand = myCmd; DataSet dataSet = new DataSet(); try { Adapter.Fill(dataSet, ""tblCities""); dataSet.Tables[""tblCities""].PrimaryKey = new DataColumn[] { dataSet.Tables[""tblCities""].Columns[""CityID""] }; } catch (OleDbException ex) { throw ex; } return dataSet; } } ",user3198739,https://stackoverflow.com/users/3198739,"I would recommend you use this pattern and remember that some of these objects are disposable. public class CitiesService { public DataSet DS; public OleDbConnection myConnection; public OleDbDataAdapter adapter; public OleDbDataAdapter adapter2; public CitiesService() { } public DataSet GetCities() { using (DataSet dataSet = new DataSet()) { using (OleDbConnection myConnection = new OleDbConnection(ConnectionString)) { myConnection.Open(); using (OleDbCommand myCmd = myConnection.CreateCommand()) { myCmd.CommandType = CommandType.StoredProcedure; using (OleDbDataAdapter Adapter = new OleDbDataAdapter()) { Adapter.SelectCommand = myCmd; try { Adapter.Fill(dataSet, ""tblCities""); dataSet.Tables[""tblCities""].PrimaryKey = new DataColumn[] { dataSet.Tables[""tblCities""].Columns[""CityID""] }; } catch (OleDbException ex) { throw ex; } } } myConnection.Close(); } return dataSet; } } } ",Glenn Ferrie,https://stackoverflow.com/users/747965,http://stackoverflow.com/questions/21141350/fill-selectcommand-connection-property-has-not-been-initialized-what-to-do,STACKOVERFLOW,stackoverflow.com 226,When are we first informed about Gerry Lane's profession?,"In World War Z, Brad Pitt plays the role of a former UN investigator named Gerry Lane. When are we first informed of this fact? When I watched the film, I spent half the movie wondering who he was that he could get a helicopter to specially ferry him and his family out of the city. It was only when he spoke to the naval honcho that I found out that he was a former UN man. Is this the first instance of this information being revealed to the audience? I can remember a conversation about his job when the Lanes are having breakfast. But I don't recall the UN being mentioned. ",coleopterist,https://movies.stackexchange.com/users/3650,"No, the scene when his daughter mentions him doing pancakes all the time. I think he replied, I've left my old job/or retired. Also the daughter asked him what was Martial Law, which tells us that he was former military or in some Defence organization. ",Rohan Naik,https://movies.stackexchange.com/users/5632,http://movies.stackexchange.com/questions/13714/when-are-we-first-informed-about-gerry-lanes-profession,LIFE_ARTS,movies.stackexchange.com 6918,How do I make certain areas editable?,"I'm new to wordpress and I'm currently converting an HTML/CSS site I made to wordpress to make it easier for my client to edit it from the admin panel. I have provided 3 screenshots and I'll refer to them here. The first screenshot shows how my website looks so far. It's using a template I made called homepage.php (see screenshot 3 for code). The template includes header.php which contains the logo, navigation menu etc. It has the image banner and finally includes footer.php. I want the ""Our Values"" part to be editable so that my client can change the text any time they need to. Currently, they can edit the top part which says ""PROtential Coaching"" and that's because it's included on the page within the admin panel and not in the template. I want the bottom part including""Our Values"" to be editable from that panel too, is there a way to do this or does this content have to be static and within the template? ""Our Values"" and ""Our People"" are in a dynamic secondary navigation menu which my client can add items to if they want to, however they can't change the content for the menu item. Images: http://imgur.com/yq9y8SQ,5IqOPzr,SHkzrFz Please help me out guys, I've been looking all over the place for days to get this done. ",Jamie O'Hanlon,https://wordpress.stackexchange.com/users/31205,"I would recommend installing the Advanced Custom Fields plugin in order to achieve the desired functionality. Once you download it, create a few fields. For example, create a field called ""footer_text"" and print it like this: <?php the_field('footer_text'); ?> and so on with the rest of the fields. ",Johann,https://wordpress.stackexchange.com/users/21245,http://wordpress.stackexchange.com/questions/95182/how-do-i-make-certain-areas-editable,TECHNOLOGY,wordpress.stackexchange.com 8397,Highcharts - Cannot set x-axes categories in column charts with negative values,"Hi I have a column chart with negative values which is showing wrong x-axes categories value. I'm sending a pre-build JSON array from the server , but no matter what i can't get the x-axes categories to show the right values. Here is the code : var chart_data = JSON.parse(data).avg_range; console.log(chart_data.x_axes); var safety_chart_average = { chart: { type: 'column', renderTo: pattern + '-safety-mini-chart-section', spacingRight: 20, spacingLeft: 20, }, rangeSelector: { enabled: false }, navigator: { enabled: false }, scrollbar: { enabled: false }, credits: { enabled: false }, title: { text: ""Avg Changes"", marginBottom: -10 }, xAxis: { categories: chart_data.x_axes }, series: chart_data.prices }; This is what i'm getting The x-axes is showing wrong values, as you can see from the picture above. But console.log(chart_data.x_axes) gives [""Day 1"", ""Day 2"", ""Day 3""] which should be the correct x-axes label. Please let me know how can i fix this x-axes label error. ",Maxx,https://stackoverflow.com/users/2536469,"Highstock is containing all of Highcharts options. All you need is to change constructor. So in steps: include Highstock: <script scr=""http://code.highcharts.com/stock/highstock.js""></script> when you need Highstock, call: new Highcharts.StockChart(options) when you need Highcharts, call: new Highcharts.Chart(options) ",Paweł Fus,https://stackoverflow.com/users/1451635,http://stackoverflow.com/questions/24596073/highcharts-cannot-set-x-axes-categories-in-column-charts-with-negative-values,STACKOVERFLOW,stackoverflow.com 4023,what size can be the nuts holding the front wheel?,"I am trying to install a front wheel in a bike - the axle of the wheel is threaded, but I have trouble finding out what size thread it is, and what nut can go on this. The size of the thread on the axle is the same as of a 8 mm screw, but a standard M8 nut (with 13 mm hex) does not fit on it. Do bikes have some special kind of nut there? If I look at the thread, and at a standard M8 screw, the thread on the bike axle is a bit more dense then on the screw, but I am not aware of existence of two kinds of M8 nuts, so far every M8 nut did fit every M8 screw. ",miernik,https://bicycles.stackexchange.com/users/670,"Could be 5/16"" which is very close to M8 (7.9375mm vs. 8mm). Thread might be UNF 24 (24 threads per inch) or British Cycle Std. at 26 threads per inch. There are even some that are metric in terms of diameter but use BSC for thread spacing! If it's 5/16"" at 26 threads per inch then an M8-1.00 nut may fit since 25.4 tpi is very close to 26 tpi and 7.9mm diameter is very close to 8mm. ",Art,https://bicycles.stackexchange.com/users/8640,http://bicycles.stackexchange.com/questions/2047/what-size-are-the-nuts-holding-the-front-wheel,CULTURE,bicycles.stackexchange.com 4110,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? ",Zeroth,https://programmers.stackexchange.com/users/97416,"The ""buy vs build"" decision comes down to a number of factors. Can you maintain the tool that you are buying (even if it's open-source)? Is there adequate support for it, if you run into a problem? Do you have the resources to build it yourself, and are you smart enough to generalize it so it can be reused in a variety of scenarios? And so on. Regarding dependency injection: DI containers are not needed for most applications. Unless your application is a large, enterprise-type application, you don't need a DI container, and if you do need one, there are a number of containers already available that would serve the purpose well. Smaller applications benefit more from a simpler form of DI, like injecting your dependencies directly through the constructor methods of your objects. You would only use a DI container if you needed to provide a central place to manage your dependencies in, say, an XML file describing them. In the vaguest of terms, there is a ""rule of three."" If you find yourself doing the same thing three times in a software application, you either refactor it into its own tool or method, or find an off-the-shelf tool that replaces those three things with one generalized thing. Knowing when to do this comes with experience. ",Robert Harvey,https://programmers.stackexchange.com/users/1204,http://programmers.stackexchange.com/questions/233092/when-to-use-tools-vs-custom-development,TECHNOLOGY,programmers.stackexchange.com 947,"What's the difference in meaning between ""emigrate"" and ""immigrate""?","What's the difference between emigrate and immigrate? They seem to have the same definitions in the dictionary but they are antonyms...   ",JFW,https://english.stackexchange.com/users/482,"Emigration & immigration are almost equal to product movement internationally: Export: leaving this country and go to another country — emigration Import: Leaving another country & arriving in to this country — immigration ",Madhusudhana,https://english.stackexchange.com/users/64230,http://english.stackexchange.com/questions/16781/whats-the-difference-in-meaning-between-emigrate-and-immigrate,CULTURE,english.stackexchange.com 8695,"Is ""either you or [third-person]"" followed by a singular verb or a plural verb?","Or, put in examples: which of the following is grammatically correct? Either you or your sister is going to have to do the chores. Either you or your sister are going to have to do the chores. The second option comes off as really strange; am I right to say that the first is grammatically correct because ""is"" directly follows ""your sister"" as opposed to ""you""? ",BoltClock,https://english.stackexchange.com/users/196,"You are correct; the correct way to write it is based on the number of the closer subject: Either you or your sister is going to have to do the chores. As suggested in point 5 on this page, you might consider the order of the subjects to avoid awkward phrases if one is singular and the other is plural. Compare Neither my father nor my brothers are going to sell the house. with Neither my brothers nor my father is going to sell the house. ",Andy,https://english.stackexchange.com/users/1787,http://english.stackexchange.com/questions/14658/is-either-you-or-third-person-followed-by-a-singular-verb-or-a-plural-verb,CULTURE,english.stackexchange.com 6430,Why did they choose Barabbas?,"John 19:38 - 40 (NLT) 38 “What is truth?” Pilate asked. Then he went out again to the people and told them, “He is not guilty of any crime. 39 But you have a custom of asking me to release one prisoner each year at Passover. Would you like me to release this ‘King of the Jews’?” 40 But they shouted back, “No! Not this man. We want Barabbas!” (Barabbas was a revolutionary.) Why were they so messed up that they would choose the rebellious, murderous Barabbas over the innocent Son of God? ",Andrew,https://christianity.stackexchange.com/users/65," John 12:12-13 (KJV) 12On the next day much people that were come to the feast, when they heard that Jesus was coming to Jerusalem, 13Took branches of palm trees, and went forth to meet him, and cried, Hosanna: Blessed is the King of Israel that cometh in the name of the Lord. When Jesus came into Jerusalem on Palm Sunday, the people welcomed Him as a deliverer from the oppression of Rome. They cried, ""Hosanna!"" which means ""Save us!"" They threw down palm branches, which since the time of the Maccabean revolt had been a Jewish symbol of victory (see section ""3. Palm Branches"" from Bible Encyclopedia and 1 Maccabees 13:51). John 12:14-15 (KJV) 14And Jesus, when he had found a young ass, sat thereon; as it is written, 15Fear not, daughter of Sion: behold, thy King cometh, sitting on an ass's colt. This prophecy is from Zechariah 9:9, and if you read the entire passage, you can see again what the Jews expected: a Messiah that would drive out their oppressors and be a physical savior. Why did the Jews choose Barabbas instead of Jesus mere days after they welcomed Him so strongly? The other answers correctly point out that the chief priests and elders stirred the crowd against Jesus. However, the people were able to be swayed because their expectations were disappointed. Jesus didn't ride into Jerusalem on a battle charger, accepting a crown and forming an army to defeat Rome. Instead He came humbly, on a donkey, and He came not to conquer Rome, but to conquer death and sin through His sacrificial death. ",Brian Koser,https://christianity.stackexchange.com/users/491,http://christianity.stackexchange.com/questions/7043/why-did-they-choose-barabbas,CULTURE,christianity.stackexchange.com 776,MS SQL Stored Procedure for counting Dynamic table items,"I had wrote this below stored procedure and getting incorrect statement. ALTER PROCEDURE dbo.[Counter] @TableName VARCHAR(100) AS BEGIN DECLARE @Counter INT DECLARE @SQLQ VARCHAR(200) SET NOCOUNT ON; --SET @TableName = 'Member'; SET @SQLQ = 'SELECT COUNT(*) FROM dbo.[' + @TableName + ']'; --Preparing the above sql syntax into a new statement(get_counter). --Getting an error here I had googled the prepare statement but don't know why facing this error. PREPARE get_counter FROM @SQLQ; @Counter = EXEC get_counter; -- here @resutl gets the value of the count.@TableName DEALLOCATE PREPARE get_counter; -- removing the statement from the memory. END Then I had wrote another one: ALTER PROCEDURE dbo.[Counter] @TableName VARCHAR(100) AS BEGIN DECLARE @Counter INT DECLARE @SQLQ VARCHAR(200) SET NOCOUNT ON; --SET @TableName = 'Member'; SET @SQLQ = 'SELECT COUNT(*) FROM dbo.[' + @TableName + ']'; --Preparing the above sql syntax into a new statement(get_counter). Execute @SQLQ; -- here @resutl gets the value of the count.@TableName --DEALLOCATE PREPARE get_counter; -- removing the statement from the memory. Return @Counter; END It is running fine but I can't get the result in the Counter , anyone please help me(I know that I haven't assigned any value to the counter but if I do I get error). After your answer martin I had replace my code with yours now its : ALTER PROCEDURE dbo.[Counter] @SchemaName SYSNAME = 'dbo' , @TableName SYSNAME AS BEGIN SET NOCOUNT ON; DECLARE @SQLQ NVARCHAR(1000) DECLARE @Counter INT; SET @SQLQ = 'SELECT @Counter = COUNT(*) FROM ' + Quotename(@SchemaName) + '.' + Quotename(@TableName); EXEC sp_executesql @SQLQ , N'@Counter INT OUTPUT', @Counter = @Counter OUTPUT Return SELECT @Counter END Now I had retrieved it . ALTER PROCEDURE dbo.[CreateBusinessCode] @MemberID bigint, @len int, @RewardAccountID bigint, @ConnectionStatusID tinyint, @Assign smalldatetime AS BEGIN SET NOCOUNT ON; DECLARE @counter INT EXEC @counter = dbo.Counter 'dbo','member'; Select @counter; END ",user1542653,https://stackoverflow.com/users/1542653,"In SQL Server, if you want to get a result into a variable, you have two choices. The first is to use cursors. The second is to do dynamic SQL: declare @sql varchar(max) = whatever; declare @cnt int; declare @cntTable table as (cnt int); insert into @cntTable exec(@sql); select @cnt = t.cnt from @cntTable It is cumbersome, but one or the other does work. ",Gordon Linoff,https://stackoverflow.com/users/1144035,http://stackoverflow.com/questions/11592327/ms-sql-stored-procedure-for-counting-dynamic-table-items,STACKOVERFLOW,stackoverflow.com 1878,Mobile 3D engine renders alpha as full-object transparency,"I am running a iOS project using the isgl3d framework for showing pod files. I have a stylish car with 0.5 alpha windows, that I wish to render on a camera background, seeking some augmented reality goodness. The alpha on the windows looks okay, but when I add the object, I notice that it renders the entire object transparently, where the windows are. Including interior of the car. Like so (in example, keyboard can be seen through the dashboard, seats and so on. should be solid) The car interior is a seperate object with alpha 1.0. I would rather not show a ""ghost car"" in my project, but I haven't found a way around this. Have anyone encountered the same issue, and eventually reached a solution ? ",Nils Munch,https://gamedev.stackexchange.com/users/7746,"(No experience with 3D programming on iOS, but this should work on regular OpenGL devices.) I can think of 2 options that might fix this. Try separating the model in 2 parts, first render the opaque part and then render the transparent part. Another option might be to disable alpha writing when rendering the object. What I think is happening is that when the window is rendered the alpha value is simply written to the color buffer. When then rendering the color buffer over the camera image the windows are alpha blended with the image behind it, causing ghost cars. ",Kevin van der Velden,https://gamedev.stackexchange.com/users/337,http://gamedev.stackexchange.com/questions/27620/mobile-3d-engine-renders-alpha-as-full-object-transparency,TECHNOLOGY,gamedev.stackexchange.com 2338,"Does following ""musical forms"" suppress ""creativity""?","I'm not a professional musician (actually, I'm a computer programmer), but I'm playing Guitar and Recorder, and I also sometimes write some themes coming to my mind. Thus, let's assume that I'm a little novice composer. Now, when a theme comes to my mind (or a simple motif), I start developing it, based on my intuition, and based on my sensational analysis. I only extend it, the way it sounds good to me. In other words, I don't follow any kind of musical form to extend (I can't find a better word for it) my theme into a more complete piece. On the other hand, when I give the extended song to my close friends, or my wife, or people close to me, they might like it, only based on its aesthetic value, not based on its musical and technical analysis. In other words, they say like ""oh, it's beautiful"". However, when I try to put my song in a musical form, and to my opinion, make a highly technical piece, I feel that it looses its beauty (of course, IMO), and people around me say ""the way before it was more beautiful"". Now, I have a question. Should we follow musical forms? Why we have to confine ourselves to musical form at all? Isn't it true that we only create music, because of its aesthetic value? Does following form suppresses creativity in art, which in turn suppresses beauty and ingenuity of our work of arts? ",Saeed Neamati,https://music.stackexchange.com/users/925,"If you're not following any existing form, it becomes encumbant on you to construct the form anew. Without form, you'll have real difficulty making the song listenable beyond a certain length. It's the same with programming. Beyond a few thousand lines, the lack of structure makes the entire enterprise unweildy. So it is very useful to learn how to follow this or that form, so you can steal little bits of structure. Eg. I had a little guitar riff that was very catchy. You could speed it up, slow it down, add drones, lead lines. But I could not, for the life of me, make it go anywhere. When I finally began to wonder why, theory showed the way. The riff was essentially a 2-measure chord progression: I / / / | V / / /. I couldn't start a new phrase (bridge/chorus/anything ""different but the same"") on V because I was already there. So I had to steal pieces from other forms: deceptive cadence or ""sitting"" on I the last time round (of some binary repetitions) [this one actually makes the ""new phrase on V"" possible]. On the otherhand, it can be very interesting to start out following a form, and then radically depart from it. So you will find it useful to be aware of forms, so you can make conscious choices about when to follow, when to lead. In other words, Knowledge of Forms is the glue you put under your shoes in order to stand on the Shoulders of Giants. ",luser droog,https://music.stackexchange.com/users/1344,http://music.stackexchange.com/questions/4899/does-following-musical-forms-suppress-creativity,LIFE_ARTS,music.stackexchange.com 8466,Computing best subset of predictors for linear regression,"For the selection of predictors in multivariate linear regression with $p$ suitable predictors, what methods are available to find an 'optimal' subset of the predictors without explicitly testing all $2^p$ subsets? In 'Applied Survival Analysis,' Hosmer & Lemeshow make reference to Kuk's method, but I cannot find the original paper. Can anyone describe this method, or, even better, a more modern technique? One may assume normally distributed errors. ",shabbychef,https://stats.stackexchange.com/users/795,"This is a huge topic. As previously mentioned, Hastie, Tibshirani and Friedman give a good intro in Ch3 of Elements of Statistical Learning. A few points. 1) What do you mean by ""best"" or ""optimal""? What is best in one sense may not be best in another. Two common criteria are predictive accuracy (predicting the outcome variable) and producing unbiased estimators of the coefficients. Some methods, such as Lasso & Ridge Regression inevitably produce biased coefficient estimators. 2) The phrase ""best subsets"" itself can be used in two separate senses. Generally to refer to the best subset among all predictors which optimises some model building criteria. More specifically it can refer to Furnival and Wilson's efficient algorithm for finding that subset among moderate (~50) numbers of linear predictors (Regressions by Leaps and Bounds. Technometrics, Vol. 16, No. 4 (Nov., 1974), pp. 499-51) http://www.jstor.org/stable/1267601 ",Thylacoleo,https://stats.stackexchange.com/users/521,http://stats.stackexchange.com/questions/2111/computing-best-subset-of-predictors-for-linear-regression,SCIENCE,stats.stackexchange.com 8840,Why would analysts recommend buying companies with negative net income?,"Can anyone explain why some analysts recommend companies in the biopharmacy sector as a ""buy"" even though they have high R&D costs and no real profit? I followed three companies and I see the same story. The only positive number is income, and only in one case does it cover expenses after net borrowing. For the next four in a row, the net income the net income is below zero. Why are these companies a buy? ",hephestos,https://money.stackexchange.com/users/2031,"The biotechnology sector as a whole is a popular buy recommendation among some analysts these days for a few reasons. Some analysts feel that the high costs in R&D, even without much profit, are a positive sign for growth because it means a company is working towards finding the next ""blockbuster drug"" or the next class of such drugs. There haven't been many new classes of blockbuster drugs since the development of SSRI's and statins, and many of the new drugs that have been developed have been tweaks to existing classes of drugs. Some analysts feel that ""it's about time"" for a new class of blockbuster drugs to hit the market. A new blockbuster drug means significant profits for the company that develops it; a new class of blockbuster drugs means significant profits for the whole industry. Since about 2009, the Food and Drug Administration has been more lenient in its approval of new drugs. This wave of new approvals has reduced R&D costs for companies because they don't need to go back to the lab or earlier phases of clinical trials and continually tweak their drugs in order to gain approval. This has also made some analysts optimistic. Genetic engineering is considered an up-and-coming field with potentially significant applications to the pharmaceutical industry. Advances in this field may increase profits for the pharm industry, but since biotech companies are often the ones producing the engineering equipment, research, etc. such advances could be a major source of revenue for the entire biotech industry. In the US and in the developed world as a whole, the elderly population is growing, and since people consume more medicine as they grow older, this could lead to higher profits for companies involved in the production of pharmaceuticals (which includes biotech companies, of course) in the long run. In the US, the passage of the Patient Protection and Affordable Care Act expanded insurance coverage, which gives more people the means to afford pharmaceuticals. Also, in general, people consume more healthcare services when they have insurance (this is called moral hazard), so some analysts expect that the expansion of insurance coverage will only lead to more profits for the pharmaceutical industry and biotechnology firms in general. The global food crisis. As the climate changes, companies like Monsanto, which use various forms of genetic engineering to produce crop strains that can survive in increasingly hostile environments, look more and more appealing to places that need crops designed to grow in such environments. Any methods that could increase yields look increasingly popular, and biotechnology companies often market such methods. (As a side note, I know Monsanto is a contentious example, and there are a lot of misconceptions about ""genetically modified food"" and the genetic engineering methods they do, so I won't get into a debate about that). In general, technology is a popular subject right now. I've read analyst reports (from analysts that clearly don't follow the biotech sector) that base their forecasts for the biotech sector on the activities of companies like Dell, Zynga, HP, LinkedIn, Facebook, etc. Clearly, it's problematic when an analyst sees the word ""technology"" and automatically assumes that the biotech sector is responsive to the same factors as social media firms, hardware manufacturers, etc. This isn't to say that the biotech sector is completely isolated from this, but when I read a report that talks about Facebook's IPO being bad news for companies like Gilead Sciences without mentioning upcoming FDA decisions about Gilead's products or any biotech-specific factors, I'm not convinced the analyst has performed due diligence. I keep using the phrase ""some analysts"" because I want to stress that the opinions stated above aren't universal. Although they're popular, not everyone is so optimistic. Also, I don't want you to see these reasons and think that I'm making a buy recommendation, because I'm not. I'm not making a recommendation one way or another. I'm happy to clarify my answer too; I follow the biotechnology sector extensively. If you want to get a rough feel for the daily movements of the sector as a whole, a good place to start is IBB, the iShares Nasdaq Biotechnology Index Fund. The four largest holdings are Regeneron, Gilead Sciences, Amgen, and Celgene, which are all big players in the industry (obviously). These are a little different from the big name pharma companies like Pfizer, Merck, Novartis, etc. but they're still considered pharma companies. It's also worthwhile to follow the FDA press announcements. By the time the news is published there, it's probably already leaked or known to people in the industry (the biotech/pharm sectors are rife with accusations of insider trading), so you might not find trading opportunities, but it's important to get familiar with the information the releases contain if you want to know more about the industry. Volatility trades are always popular trades around FDA drug approvals. ",John Bensin,https://money.stackexchange.com/users/7590,http://money.stackexchange.com/questions/22394/why-would-analysts-recommend-buying-companies-with-negative-net-income,LIFE_ARTS,money.stackexchange.com 1142,How to describe the differences in skewed data with same median but statistically different distribution?,"I am comparing length of stay after laparoscopic and open appendectomy in over 160000 patients. LOS is typically a skewed variable so I use the median and interquartile range and ranksum test to describe the result, which is 2, IQR 2-3 and 2, IQR 2-4, p<0.0001. So there is a highly significant difference but it does not show that well in the median and IQR. The difference in length of stay is very small. This finding is a negative finding but still interesting as it goes against what most people think about LOS after laparoscopic appendectomy. That is why I want to report on the difference in LOS which is not evident if I only report median and IQR with p-value. The arithmetic mean (3.1 vs 2.8 and a difference of 0.3 days) is not recommended as the distribution is skewed. I wonder if any other measure could be used like, geometric mean (2.5 vs 2.3, difference 0.2 days) or harmonic mean (2.1 vs 1.9 days, difference 0.2 days)? When can I use geometric mean or harmonic mean? I am inclined to use the harmonic mean which comes closest to the median and gives a difference of 0.2 days. Is this incorrect? ",Roland,https://stats.stackexchange.com/users/21094,"The same question has been discussed on the Google-group Medstats. It was suggested that the arithmetic mean should be used as this is a more useful measure for planners. A difference in LOS of 0.3 days can be important for planning of health services and cost. Geometric and harmonic mean were dismissed as not correct to use in this situation. Different approaches was proposed for modelling using quantile or Cox-regression. I proposed poisson regression but ended up with negative binomial regression as the data showed evidence of overdispersion. This allowed me to compare the unadjusted difference of 0.3 days with difference after adjusting for age, sex, perforated appendicitis and period, which came down to a difference of only 0.05 days between the two surgical methods. This is important findings (although negative) as it goes against the common thinking about the advantages of laparoscopic appendectomy ",Roland,https://stats.stackexchange.com/users/21094,http://stats.stackexchange.com/questions/50431/how-to-describe-the-differences-in-skewed-data-with-same-median-but-statisticall,SCIENCE,stats.stackexchange.com 9060,how to stop my html page resize,"i made an HTML page with all widths and heights as percentage ""that's primary for my design to work with all resolutions"" but when i re-size my web browser everything will be damaged. is there a way that when i re-size my web browser i can scroll the page? ",trrrrrrm,https://stackoverflow.com/users/223130,"The only way to handle this is with script. Take a look at other examples where people float a footer at the bottom of the page for example. Using jQuery you might do something like:- <script type=""text/javascript""> $(document).ready(function() { setPanels(); }); window.onresize = function() { setPanels(); } function setPanels() { var windowHeight = $(window).height(); var content1Height = $('#topDiv').height(); var content2Height = $('#bottomDiv').height(); // Now calculate the new splits and adjust heights ... </script> ",Ian Mercer,https://stackoverflow.com/users/224370,http://stackoverflow.com/questions/2513345/how-to-stop-my-html-page-resize,STACKOVERFLOW,stackoverflow.com 1616,"Flying from NYC via Philadelphia to Halifax, I clear Immigration and Customs in Canada?","Because I am trying to process an immigration work permit for Canada, (I am an American citizen), I need to fly directly into Halifax from the States. I am trying to make sure that I don't clear Canadian immigration and customs in the Philadelphia airport. (For instance, when I fly from Toronto to the USA, I clear American immigration and customs there.) Any ideas? ",Paul,https://travel.stackexchange.com/users/27254,"No, American airports don't offer preclearance the way Canadian ones do. (The reason is the relative number of airports in each country: the preclearance in a small handful of Canadian cities enables flights into hundreds of American cities. To do it the other way around would be crazy.) You will clear customs and immigration when you land in Halifax. ",Kate Gregory,https://travel.stackexchange.com/users/46,http://travel.stackexchange.com/questions/43898/flying-from-nyc-via-philadelphia-to-halifax-i-clear-immigration-and-customs-in,CULTURE,travel.stackexchange.com 4027,How can I hear if something is behind or in front of me?,"I wonder how I can hear what direction a sound is coming from. I believe that the brain calculates relative to the volume from each ear, meaning I'm unable to know what direction a sound is coming from if one of my ears are not working. But what if the sound is perfect in front of me? Or Above? (Both ears are hearing exact the same) Can I then still hear where the sound is coming from? ",KaareZ,https://physics.stackexchange.com/users/67774,"Sound localization is a very complex phenomenon and in fact your brain uses a few methods to localize sound, some of which work better at high frequencies and some at low frequencies. The basic bits of information that your brain makes use of is interaural time differences (the difference in time taken for a sound to reach different ears), as well as interaural level differences (one ear hears a louder sound than the other). Furthermore, the outer ear, or pinna, modulates sound so that it sounds different depending on whether the sound is coming from in front of you or behind. This seems to be the dominant effect for sound sources that lie on the median plane, as pointed out by dmckee. ",lionelbrits,https://physics.stackexchange.com/users/31635,http://physics.stackexchange.com/questions/161085/how-can-i-hear-if-something-is-behind-or-in-front-of-me,SCIENCE,physics.stackexchange.com 7385,Trouble getting PythonAnywhere to scrape web for me,"I've been experimenting around on PythonAnywhere trying to get some python to work on a webserver. I initially switched from Arvixe because they were running 2.4 and PythonAnywhere's name was just too appealing. My application consists of two files: phones.py and phonesearch.py. Together they are supposed to scrape craigslist for phone prices. I test locally in 2.7 and it runs just fine, generating an html page (celly.html) with a table and all of the prices. When I upload it, it generates the html just fine, but refuses to to add anything to my prices list ([intprices]). My suspicions: (a) because it works fine locally, PythonAnywhere isn't allowing it to communicate with craigslist; or (b) because I'm doing this like a caveman and not using a microframework, PythonAnywhere is denying me; or (c) I am blind to my errors and I have missed something obvious. My python scripts are located in /home/tseymour/mysite and the html is generated at same/mysite/static/celly.html. The file is served up at http://tseymour.pythonanywhere.com/static/celly.html You'll notice that all of my cells are filled with ""N/A"" which means it raised an IndexError in the try:"" in SearchPhone.py. This means my lists are being filled! But WHY is that?! I believe it is because I am PythonAnywhere n00b. Please advise. SearchPhone.py from BeautifulSoup import BeautifulSoup import urllib import re def SearchPhone(phone): y = ""http://losangeles.craigslist.org/search/moa?query="" + phone + ""+-%22buy%22+-%22fix%22+-%22unlock%22+-%22broken%22+-%22cracked%22+-%22parts%22&srchType=T&minAsk=&maxAsk="" site = urllib.urlopen(y) html = site.read() site.close() soup = BeautifulSoup(html) prices = soup.findAll(""span"", {""class"":""itempp""}) prices = [str(j).strip('<span class=""itempp""> $</span>') for j in prices] for k in prices[:]: if k == '': #left price blank prices.remove(k) elif int(k) <= 75: #less than $50: probably a service (or not true) prices.remove(k) elif int(k) >= 999: #probably not true prices.remove(k) #Find Average Price intprices = [] newprices = prices[:] total = 0 for k in newprices: total += int(k) intprices.append(int(k)) intprices = sorted(intprices) try: del intprices[0] del intprices[-1] avg = total/len(newprices) low = intprices[0] high = intprices[-1] if len(intprices) % 2 == 1: median = intprices[(len(intprices)+1)/2-1] else: lower = intprices[len(intprices)/2-1] upper = intprices[len(intprices)/2] median = (float(lower + upper)) / 2 namestr = str(phone) medstr = ""Median: $"" + str(median) avgstr = ""Average: $"" + str(avg) lowstr = ""Low: $"" + str(intprices[0]) highstr = ""High: $"" + str(intprices[-1]) samplestr = ""# of samples: "" + str(len(intprices)) linestr = ""-------------------------------"" except IndexError: namestr = str(phone) medstr = ""N/A"" avgstr = ""N/A"" lowstr = ""N/A"" highstr = ""N/A"" samplestr = ""N/A"" linestr = ""-------------------------------"" return (namestr, medstr, avgstr, lowstr, highstr, samplestr, linestr) phones.py from SearchPhone import SearchPhone phones = [""Iphone 4"", ""Iphone 5"",""Galaxy s3"", ""Galaxy s2"", ""LG Lucid"", ""LG Esteem"", ""HTC One S"", ""Droid 4"", ""Droid RAZR MAXX"", ""HTC EVO"", ""Galaxy Nexus"", ""LG Optimus 2"", ""LG Ignite"", ""Galaxy Note"", ""HTC Amaze"", ""HTC Rezound"", ""HTC Vivid"", ""HTC Rhyme"", ""Motorola Photon"", ""Motorola Milestone"", ""myTouch slide"", ""HTC Status"", ""Droid 3"", ""HTC Evo 3d"", ""HTC Wildfire"", ""LG Optimus 3d"", ""HTC ThunderBolt"", ""Incredible 2"", ""Kyocera Echo"", ""Galaxy S 4g"", ""HTC Inspire"", ""LG Optimus 2x"", ""Samsung Gem"", ""HTC Evo Shift"", ""Nexus S"", ""LG Axis"", ""Droid 2"", ""G2"", ""Droid x"", ""Droid Incredible"" ] f = open('/home/tseymour/mysite/static/celly.html','w') f.write(""""""<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd""> <html xmlns=""http://www.w3.org/1999/xhtml""> <head> <meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"" /> <title>Celly Blue Book</title> </head> <body> </body> </html> """""") #table f.write('<table width=""100%"" border=""1"">') for x in phones: print ""SEarchphone0"" y = SearchPhone(x) print ""SEarchphone"" f.write( ""\t<tr>"") f.write( ""\t\t<td>"" + str(y[0]) + ""</td>"") f.write( ""\t\t<td>"" + str(y[1]) + ""</td>"") f.write( ""\t\t<td>"" + str(y[2]) + ""</td>"") f.write( ""\t\t<td>"" + str(y[3]) + ""</td>"") f.write( ""\t\t<td>"" + str(y[4]) + ""</td>"") f.write( ""\t</tr>"") f.write('</table>') f.close() Also, I did upload beautifulsoup just incase ",Tyler Seymour,https://stackoverflow.com/users/1676658,"PythonAnywhere dev here. You don't say if you're using a free or a paid PythonAnywhere account, but if it's a free one then I think you're running into our whitelist. For free accounts, we only allow access to a particular set of websites -- this is because people were using us to do Bad Things. We put sites on the whitelist so that free accounts can use them if they have an official publicly-accessible API, and unfortunately Craigslist doesn't have one -- quite the opposite, unfortunately. If you sign up for a paid account then you'll probably be able to do what you want, but if the article I just linked to is correct then you might want to make sure you have good lawyers... ",Giles Thomas,https://stackoverflow.com/users/32846,http://stackoverflow.com/questions/13700415/trouble-getting-pythonanywhere-to-scrape-web-for-me,STACKOVERFLOW,stackoverflow.com 2173,How can I debit money to Accounts Receivable in Gnucash without raising an invoice?,"I have some income from Amazon Associates that is paid to me automatically every few months. I don't raise an invoice and Amazon doesn't create one for me. Amazon does specify a date when the payment amount is calculated and then a week or so later, the payment arrives in my current account. It looks like Gnucash expects me to raise an invoice and assign it to a customer before it can be entered in to Accounts Receivable. The Gnucash documentation says that users should never create entries directly in to Accounts Receivable. Even if I try this, there's no option to select a customer (eg, from a drop-down list), but only to type a customer name, which makes me wonder if the transaction actually gets tied to a customer in the Gnucash system. So how can I debit non-invoiceable amounts due to Accounts Receivable? Is this possible, or should I be handling this transaction another way? ",James,https://money.stackexchange.com/users/5226,"You should be handling it in another way. You cannot, strictly speaking, have AR entry if you didn't issue an invoice. You should record it as a current income. Unless you're on accrual basis (in which case you could either create a ""dummy"" invoice or not accrue this income), AR has no real meaning to you. AR means that you billed someone and you have the right to the money. With Amazon affiliate program you do not have the right to the money until they decide you do, and once they do decide that - they just pay you. ",littleadv,https://money.stackexchange.com/users/2998,http://money.stackexchange.com/questions/24956/how-can-i-debit-money-to-accounts-receivable-in-gnucash-without-raising-an-invoi,LIFE_ARTS,money.stackexchange.com 4980,"Biscuit, dowel or simple braces for making unit top with inset lid and slim sides?","I've had 5 pieces of iroko machined for creating a top to my DIY TV lift, complete with a lid for the TV to pop up through: The dimensions are based on the pre-existing cabinet, and the lid size needed for the TV to rise up. I was originally taking my cue from this YouTube video wherein he joins his (very long) pieces with biscuits; however now I have my pieces I'm concerned that: The two sides are too slim to really hold the whole thing together with any strength (as I imagine I could only use one biscuit on each side); The boards may be relatively slim (20mm) and as such need small biscuits or dowels, compounding point 1. Bearing in mind that a) I'm a total novice, and b) I don't own a biscuit-cutter, I was wondering whether a far easier solution might be to use one or two 'braces' (apologies if this is not the correct term) running on the underside of the lid, on either side, joining the front and back pieces and spanning the shorter side pieces. These would be hidden inside the unit once the lid is in place, so it shouldn't affect the look. Although the top isn't structural, it should still be solid and sound, and most likely need to at least bear the weight of a graceless cat who will hurl his body at any piece of furniture like a sack of potatoes. TL;DR Illustrations Biscuits: Braces: ",indextwo,https://diy.stackexchange.com/users/12154,"Honestly for solid wood boards (hardwood in your case) just applying wood glue and clamping would provide more than sufficient strength to hold the weight of a cat. Simple glue joints are used to make table tops without additional fasteners. The strength of the glue joint is generally stronger than the wood itself and since your boards have already been machined they provide great gluing surfaces. Just don't clamp so hard you squeeze out all the glue. 20mm (a little more than 3/4"") is plenty thick to use most fastening systems including biscuits or dowels. Biscuits you need a special bicuit cutting tool which can be expensive. Dowels benefit from a jig to get them to line up properly. My personal choice is to use pocket screw holes for applications like this. A Kreg Mini jig will suffice for your needs as long as you have a power drill and only costs about $13 and you don't need expensive bar clamps as you would with glue alone but a face clamp would benefit to keep everything flush. You can also just use standard quick clamps though. I use mine frequently but there are more advanced models that make positioning easier. I have comparisons of the different Kreg Jig models on my site. The way I would do it is to drill the pocket screw holes on the undersides of the boards using 3 screws on each side, 1 of which is screwed onto the long board. 2 screws per side would be adequate but I like to have some on the alternate board for glueups like this. ",OrganicLawnDIY,https://diy.stackexchange.com/users/18594,http://diy.stackexchange.com/questions/60804/biscuit-dowel-or-simple-braces-for-making-unit-top-with-inset-lid-and-slim-side,LIFE_ARTS,diy.stackexchange.com 4016,English equivalent for 'امریه',"In Iran there is another way to do the mandatory military service and it is working for a governmental organization or company instead. It is simply called 'امریه' in Persian. Is it called CPS (Civilian Public Service)? Civilian Military Service? what exactly? ",neon2017,https://ell.stackexchange.com/users/1846,"That is not something that exists in every country/state in the world. It does not exist in England and the rest of the UK. There is an English word for mandatory military service, which is conscription. See the entry at CDO. The UK used to have conscription until the 1960s. While there is a word for mandatory military service, there is no particular way of referring to a civilian equivalent of it. If you want to refer to it in English, it is probably best to use a description of it, like you have in your question. ",Tristan,https://ell.stackexchange.com/users/1425,http://ell.stackexchange.com/questions/7838/english-equivalent-for-%D8%A7%D9%85%D8%B1%DB%8C%D9%87,CULTURE,ell.stackexchange.com 8380,Non-trivial examples of operations.,"Let $A\neq \emptyset$ and $I$ be sets. An operation on the set $A$ is any function $f:A^{I}\rightarrow A$. Can someone give non-trivial examples of operation. By trivial I mean the most given in books such as sum, subtraction, set inclusion, function composition, boolean sum, empty function, etc. Thanks. ",Paulo Henrique,https://math.stackexchange.com/users/20529,"One interesting infinitary operation that hasn’t been mentioned is the Suslin operation, sometimes (following Suslin) called operation A, which is important in descriptive set theory. If $\mathscr{F}=\{F_\sigma:\sigma\in^{<\omega}\omega\}$ is a family of sets indexed by the set of finite sequences of natural numbers, the result of applying the Suslin operation to $\mathscr{F}$ is $$\bigcup_{\sigma\in^\omega\omega}\;\;\bigcap_{n\in\omega}\;F_{\sigma\upharpoonright n}\;.$$ Added: I should probably note that in terms of the notation in the question, $I$ here is $^{<\omega}\omega$, and $A$ is some family of sets, e.g., the family of closed sets in a metric space. ",Brian M. Scott,https://math.stackexchange.com/users/12042,http://math.stackexchange.com/questions/99911/non-trivial-examples-of-operations,SCIENCE,math.stackexchange.com 4435,Are there any differences in how new vs. well-established professors select students?,"For any professors out there, do you feel that there are any differences in how you selected and recruited students from the time when you were newly hired, to a well-established stage (i.e. after getting tenure)? I'm asking this out of curiosity. There are oftentimes questions about whether students should choose a new/old advisor, but I haven't seen any that asked about this from the prof's perspective. I would assume there are since the challenges and priorities for the two groups are normally somewhat different, but I'm not sure exactly how it would differ. For instance, it might be more difficult for the new PI to recruit students (especially good ones) when they have to ""compete"" with older, better funded peers. This would lead one to think that new PIs might be more likely to take on students they might not necessarily love, but just need bodies in the lab. However, on the other hand, new PIs are more likely to have limited funding, and if they are on the tenure-track, would need their few students to succeed in order to establish a name for themselves in the industry. In this case, it would be detrimental if they chose the wrong student(s) in the beginning, especially if they are limited to the number of students they can afford due to funding issues. I realize that this is field and situation specific, but I'm looking to hear stories/insights from people who have gone through/know about the process. Thanks! ",Cornyvita,https://academia.stackexchange.com/users/33881,"By contrast to Nate Eldredge's answer about mathematics faculty, for faculty in engineering/science fields at some institutions, graduating Ph.D. students is actually one of the key requirements for obtaining tenure. The theory is that successfully supervising Ph.D. students is one of the primary tasks of research-oriented faculty. As a result, selecting a graduate student is likely to be much higher stakes for such faculty, and they may be either more conservative (i.e., ""Can't risk a bad one"") or more risky (i.e., ""Gotta make sure at least some graduate!"") depending on their personality and funding. ",jakebeal,https://academia.stackexchange.com/users/22733,http://academia.stackexchange.com/questions/45935/are-there-any-differences-in-how-new-vs-well-established-professors-select-stud,LIFE_ARTS,academia.stackexchange.com 8623,Sneak attack advancement feat,"One of my players is trying to play as a rogue/druid (mostly for sneak attacking). Unfortunately, these classes don't have a lot of synergy. Are there any feats or items, ideally for pathfinder, that allow a character to increase sneak attack dice while taking levels in a class like druid? I'm hoping for something similar to Monastic Legacy (a feat which lets you advance unarmed damage dice like a monk while leveling another class), but for the sneak attack mechanic. ",Lawton,https://rpg.stackexchange.com/users/9163,"Complete Adventurer had a prestige class for 3.5 called the daggerspell shaper, which advanced Sneak Attack, Spells, and Wild Shape. As for feats, I am not aware of any, but in the same vein as Daring Outlaw etc. from Complete Scoundrel, this feat seems quite reasonable: Natural Ambusher Requirements: Sneak Attack +2d6 Trackless Step Benefit: Your druid levels stack with your rogue levels for the purposes of how much bonus damage you add on a Sneak Attack. For instance, a druid 4/rogue 3 with this feat would deal 4d6 extra damage on a Sneak Attack, as a rogue 7 would. Your rogue levels stack with your druid levels for the purposes of Nature Bond as well as your daily uses and options for Wild Shape. For example, a druid 4/rogue 3 with this feat could have an Animal Companion with the Devotion feature, and could use Wild Shape twice per day, since the druid’s effective level would be 7 and these features are available at druid 6. ",KRyan,https://rpg.stackexchange.com/users/4563,http://rpg.stackexchange.com/questions/46195/sneak-attack-advancement-feat,CULTURE,rpg.stackexchange.com 4305,Framing section headings,"I'm attempting to put a frame around my section headings. I am using the package mdframed which adds functionality to the framed package. It basically draws a box around an object, in an environment. So I wonder how I can do this. Can I use \renewcommand, for example? I'd really like to use mdframed to create the frame. ",Matt Groff,https://tex.stackexchange.com/users/1733,"The titlesec package provides this functionality built-in. Here's an example: \documentclass{article} \usepackage{titlesec} \titleformat{\section}[frame] {\normalfont} {} {5pt} {\Large\bfseries\filcenter\thesection.\quad} \begin{document} \section{A section} \end{document} If this isn't what you want, you should probably use the package in conjunction with mdframed to modify your sections anyway, since it provides a simple, yet powerful system for modifying all section headings. ",Alan Munn,https://tex.stackexchange.com/users/2693,http://tex.stackexchange.com/questions/11998/framing-section-headings,TECHNOLOGY,tex.stackexchange.com 3325,Why do you multiply one way and divide the other way with these trig problems?,"I am practicing finding a side of an angle on Khan Academy. I understand SOH CAH TOA and which sin, cos, tan to choose from. But, I don't understand why they multiply sometimes to find the side and divide other times. I am using a calculator. Here is a multiply example and a divide example thanks. ",Tyler Zika,https://math.stackexchange.com/users/45831,"In the 1st problem, I think you understand it as far as the next-to-last line, $$\sin A={BC\over\sqrt{97}}$$ Also, you are given the value $$\sin A={9\sqrt{97}\over97}$$ So you have $${9\sqrt{97}\over97}={BC\over\sqrt{97}}$$ Since you want $BC$, you multiply both sides of this equation by $\sqrt{97}$ --- that gets $BC$ all by itself on one side of the equation, which is what you want. In the second problem, you understand $$\tan A={10\over AC}$$ You want to isolate $AC$. This can be done by multiplying both sides by $AC$, getting $$(AC)(\tan A)=10$$ and then dividing both sides by $\tan A$ to get $$AC={10\over\tan A}$$ Now you are given $$\tan A={10\over3}$$ so you have $$AC={10\over10/3}$$ which simplifies to $3$. OK? ",Gerry Myerson,https://math.stackexchange.com/users/8269,http://math.stackexchange.com/questions/283989/why-do-you-multiply-one-way-and-divide-the-other-way-with-these-trig-problems,SCIENCE,math.stackexchange.com 2600,How can I create and retrieve default billing address programatically?,"Our site imports customers from external data sources. Part of this import is creating a default billing address from external data if none exists. I have followed advice from other questions, as wells as tutorials, all of which seem to say the same thing for creating/saving a default billing address. This seems to work at least partially. // $c is the customer $data_source = array( 'street' => '', 'city' => '', 'postcode' => '', ); $a = $c->getPrimaryBillingAddress(); // Create a new default billing if none found if (!$a) { $a = Mage::getModel(""customer/address""); $a->setCustomerId($c->getId()) ->setIsDefaultBilling('1') ->setSaveInAddressBook('1'); } foreach ($data_source as $k => $d) $a->setData($k, $d); $a->save(); After this code has been run, the address is visible on the customer's page in the backend and is marked as the default billing. However, the following time data is fetched from our external source and the code is run, the address that was saved is not retrieved (getPrimaryBillingAddress returns false). This results in a new address being created every time this code is run. The exception is when a customer has a default billing address set by magento. In this case, getPrimaryBillingAddress correctly finds the address and the address data is updated and saved. How can I programatically create a default billing address in such a way that I can retrieve it with $customer->getPrimaryBillingAddress()? UPDATE After receiving a possible answer, I have adjusted to code to set customer's default_billing. The main problem persists with the changes. $a = $c->getPrimaryBillingAddress(); // Create a new default billing if none found if (!$a) { $a = Mage::getModel(""customer/address""); $a->setCustomerId($c->getId()) // <-- variations of customer/customerID ->setCustomer($c) // don't seem to affect ->setIsDefaultBilling('1') ->setSaveInAddressBook('1') ->save(); // <--- SAVE SO WE CAN ACCESS ID $c->addAddress($a) // <--| ->setDefaultBilling($a->getId()) // <--+ SAVE default_billing IN CUSTOMER ->save(); // <--| } foreach ($data_source as $k => $d) $a->setData($k, $d); $a->save(); // ---------------- SUBSEQUENT RUNS -------------- $c->getDefaultBilling(); // null $c->getPrimaryBillingAddress(); // false References Variations on this method for creating/setting a customer default address were found at these locations: SO - Magento : Add customer default billing address Programatically create customer and order in Magento with full blown One Page Checkout process under the hood ",Jon Surrell,https://magento.stackexchange.com/users/13399,"You need to set it the other way around. The default_billing for the customer. $customerId = 1234; // Customer id $data = array(); // Address data $customer = Mage::getModel('customer/customer'); // Load customer $customer->load($customerId); // Get current address $address = $customer->getPrimaryBillingAddress(); // Do we add a new address $isNewAddress = false; if (!$address) { $address = Mage::getModel('customer/address'); $address->setCustomer($customer); $isNewAddress = true; } // Append data $address->addData($data); $address->save(); if ($isNewAddress) { // Add address to customer and save $customer->addAddress($address) ->setDefaultBilling($address->getId()) ->save(); } ",Jeroen,https://magento.stackexchange.com/users/3156,http://magento.stackexchange.com/questions/60359/how-can-i-create-and-retrieve-default-billing-address-programatically,TECHNOLOGY,magento.stackexchange.com 536,"C# & VS error: ""make sure that the maximum index on a list is less than the list size""","I faced the error mentioned in the title when doing my homework, and simply can't find a way to remove it. Here is the method that I have this problem with: public static double LaskeMiidi(double[] luvut) { double ka = Keskiarvo(luvut); double miidi = luvut[0]; for (int i = 0; i < luvut.Length; i++) { if (luvut[i] - ka < luvut[i + 1] - ka) // The line error points to! { miidi = luvut[i]; } else { miidi = luvut[i + 1]; } } return miidi; } So basically the problem is that when I say luvut[i + 1], at some point this index might become more than the length of the array is. I just can't figure out any ways to solve this problem, since I'm only a beginner with programming. ",user2884188,https://stackoverflow.com/users/2884188,"Notice that when you define an array, range of items are between 0 and array.length-1. so you should write: for (int i = 0; i < luvut.Length-1; i++) ",pooria haddad,https://stackoverflow.com/users/2751916,http://stackoverflow.com/questions/19391293/c-sharp-vs-error-make-sure-that-the-maximum-index-on-a-list-is-less-than-the,STACKOVERFLOW,stackoverflow.com 8452,drive 3 phase induction motor with only DC (not pwm) thru each phase,"I've been researching making a driver for a 3 phase induction motor powered by DC source using PWM to approximate sine waves in each phase. However, the switching speeds of the PWM signal for the rotational speed I want is difficult to obtain with hobby microcontroller boards like the arduino. Can I just switch the DC directly thru each phase at the correct time only twice per cycle ? Essentially I would be approximating a sine wave with only 2 different voltages thru the coils, ie: +V and -V (using H bridge circuitry here) Will this create enough of a rotating magnetic field that sufficient current is induced in the rotor cage ? What will be the losses in power / efficiency for this, or any other drawbacks for this system ? The bonus is greatly simplified drive electronics. ",bobjandal,https://electronics.stackexchange.com/users/16361,"If you're switching the DC through 3 half-bridges, this will work just fine. Torque will be uneven at low speeds and waveforms rather nasty, but it'll work. Beware that turning current OFF fast to an inductive load (i.e. motor) is a good way to generate very high voltages so pay attention to protective diodes. NOT 1N4001s (FAR too slow) but high speed switching, high current diodes from each motor terminal to both supply rails, and overvoltage protection on the rails... [edit...] The problem with PWM is not the PWM frequency, but the number of times you have to change it per revolution... As you are controlling it with software, there is nothing to stop you using PWM at low speed, and switching to direct (square wave) drive at high speed. ",Brian Drummond,https://electronics.stackexchange.com/users/16324,http://electronics.stackexchange.com/questions/49698/drive-3-phase-induction-motor-with-only-dc-not-pwm-thru-each-phase,TECHNOLOGY,electronics.stackexchange.com 6980,Why is the last line of text separated in MS Visio shapes,"In the image below, you can see two rectangles with some text inside. If you take a closer look you will notice a difference in spacing between lines. The spacing between the first and the second lines is smaller than the spacing between the second and the third. The last line is always separated. If you have 10 lines of text, the spacing between all the lines will be OK except the spacing between the next to last and the last line of text. The font is the same (in every aspect) accross the lines (except the title), and there are no custom paragraph properties set. Why does this happen and how to solve this? ",Kornelije Petak,https://superuser.com/users/12849,"The last line is separated because their is a blank character at the end of the bottom line that is the default font size. Highlight any blank spaces at the end of the bottom line and then change the font size to match the others and it will go away. ",Brian Williford,https://superuser.com/users/184277,http://superuser.com/questions/432770,TECHNOLOGY,superuser.com 8962,How did Adam and Eve win at Hide and Seek?,"I began reading the KJV a couple months ago, and one question that keeps plaguing my mind is, ""How did Adam and Eve successfully hide from God?"" Genesis Chapter 3: 8 And they heard the voice of the LORD God walking in the garden in the cool of the day: and Adam and his wife hid themselves from the presence of the LORD God amongst the trees of the garden. 9 And the LORD God called unto Adam, and said unto him, Where [art] thou? 10 And he said, I heard thy voice in the garden, and I was afraid, because I [was] naked; and I hid myself. ",jay_t55,https://christianity.stackexchange.com/users/4268,"Good question because that scripture screams that question every time it is read. I don't believe that Adam and Eve successfully hid from God. How could they if God is omniscient? Hebrews 4:13 And there is no creature hidden from His sight, but all things are naked and open to the eyes of Him to whom we must give account. Psalm 139:4 Even before a word is on my tongue, behold, O Lord, you know it altogether. So if God knows all, then the question becomes why did God ask the question, because it wasn't because he didn't know. So if the question wasn't for God's benefit, then it must have been for Adam's If we process the whole scene, Adam and Eve had been in perfect relationship and fellowship with God until they disobeyed and sinned against God. Then all of the sudden Adam and Eve are trying to avoid God. When God asks the question, even in Adam's hearing of the question, he has to realize that something isn't right. God has never had to ask this question before, because Adam had never hidden from God before. So for God to ask, let's Adam know even before he answers, that God knows something is wrong. Even in the same scripture God continues to ask questions. God could've just came in and said ""Adam and Eve you sinned and the serpent tempted you, here are your curses, see you later"", but instead He questions them. Then for Adam to answer he can begin to understand and process ""where"" he is in relationship to God versus where he was. Adam's position has changed, and he is not in the same place physically or spiritually. God does this throughout scripture where He asks a question he already knows the answer to, but it is to the benefit of the hearer that he asked the question. There are many scriptures where God asks questions, but indeed already knows the answer. Here are a few: Genesis 4:6 NKJV So the Lord said to Cain, “Why are you angry? And why has your countenance fallen? Genesis 4:9-10 NKJV 9 Then the Lord said to Cain, “Where is Abel your brother?” He said, “I do not know. Am I my brother’s keeper?” 10 And He said, “What have you done? The voice of your brother’s blood cries out to Me from the ground. 1 Kings 19:9-10 NKJV 9 And there he went into a cave, and spent the night in that place; and behold, the word of the Lord came to him, and He said to him, “What are you doing here, Elijah?” 10 So he said, “I have been very zealous for the Lord God of hosts; for the children of Israel have forsaken Your covenant, torn down Your altars, and killed Your prophets with the sword. I alone am left; and they seek to take my life.” After Elijah's final answer God corrects him and gives him an assignment to go anoint Elisha Hopefully this helps. ",Darye,https://christianity.stackexchange.com/users/223,http://christianity.stackexchange.com/questions/17648/how-did-adam-and-eve-win-at-hide-and-seek,CULTURE,christianity.stackexchange.com 8418,How do I deal with a slow and undedicated colleague in the team?,"I have been working on a new project. The project works like this: The end user can access a webapp using a link and he can add multiple systems on his network and manage that particular systems details. My part involves the front end and the webserver, which is done in python. My python actually communicates with another project which is entirely done in c & c++. The c/c++ project is the main app which does all the functionality. My python sends the user request to it and displays the response from it to the user. I am very familiar with my work and I will finish it soon. Since that's not much work in it. And I am a person who loves to work. I spends most of the time in office and only go home when I feel sleepy. The c/c++ app is managed by another colleague who has 5+ year experience and can do things much faster than me, but he never does it. May be he doesn't like to do it. His app crashes often when my python communicate with it or returns wrong values. It's full of bugs. Since my app depends on it, I am having a hard time building it. Instead of fixing the bugs, he asks me to slow down my work. He asks me to tell manager that my work needs a lot of time. He is asking me to fool the manager and even forcing me to work slowly like him. During project meeting, when manager asks him about the bugs he says that he fixed everything and it works fine. Since he is my colleague, I couldn't tell anything to the manager. I obviously need to have a good relationship with my colleagues more than my manager, since most of the time we will be with our colleagues, not with the manager. I am not able to tell the manager anything regarding this, since if manager asks him why, then he may think I complained about him to the manager. And he keeps on lying in the meeting. And since he fixes the bug slowly, it even slows down my work. Now I thought of working on the front-end part of my app and finishing it off so that in the mean time he can make his project stable. Now he is asking me to tell the manager that my front end part require a lot of work and I may need more and more time, simply so that he can drag the project down. And the sad thing is our actual manager has gone to the US, so we have a temporary manager and this guy doesn't know about the project much, so the c,c++ just fools him. Can anyone suggest me how I deal with this? I wanted to finish off the project soon. How can I make him work even by maintaining a good relationship with him? Responses to comments: If he's really deliberately misleading the company, you should report him to management. I am new to this company and the other guy has been there for many years. And I have just started knowing my colleagues. If I directly go and complaint him, I don't think so I can make good relationship with my other colleagues. Even he has the power to mislead them. I am not telling he is a bad guy, he can do the work, but he is not doing it. Doesn't your company have any kind of bug tracking system ? Here actual bug tracking system isn't there. The company tries to finish off the project as soon as possible and gives it to the QA. And then fixes the bugs reported by QA. This is why companies should give employees stock / options or some sort of ownership. That way you can literally tell the guy ""You are costing me monetary growth... don't you want to make money also?"". The company has the stock options they have given me a 2500 share, mostly he too would have got some more. Seniority does deserve some benefit of a doubt. You really need to speak to him first and try to understand the problem. He may be out of his depth, you may be able to help him, there could easily be variables you are unaware of. It may be hard now, but you could easily make the situation a lot worse by jumping the gun. I even does it, first his app wasn't handling multiple requests at a time, he was using a queue to handle the requests I sent to him. I even suggested to him some of my ideas on it. He said he already had these ideas, and will be executing them. His explanations was: ""Everything require certain time to do and this is a project which may need two years to complete and we are asked to finish it in two months"". I used to have a hard time coding during first few weeks because of this bug. But now he fixed it. But he is using a single queue for a user requests and that is now slowing down the app, since it processes one request at a time. What is QA doing this whole time? Why aren't they reporting/confirming the status of the project(s)? The manager is the person who decides when to give to the QA. As of now it has not yet given to QA. He said we should give it by this month end. ",HOT,https://programmers.stackexchange.com/users/34092,"It's difficult and unreasonable to estimate the relative effort and complexity of another project if you aren't familiar with the code base. You say his code is error-prone, but it could be in great shape with all of the remaining issues at a very high level of abstraction... Problem is, that is the only code that your front end needs! Or, maybe he's a bad employee and taking the company for a ride. I can't say, and you may not have all the information you need to know with confidence, either. I'd suggest a midway tactic. Next time you meet, bring some details of a major bug in his code that is affecting you. When he says everything is fine, politely say there is one outstanding issue that's blocking your progress. Politically, saying it like that let's you assert that he's not quite correct, while still giving him an opening to play dumb and not be put on the defensive. Your manager should ask at the next meeting if it's fixed. If not, the pressure falls on him to fix one bug. If it is fix, say thanks, it's working great now, and you found a new blocker. If you want to be especially nice, say you ran into it shortly before the meeting. You're not lying, per se, nor are you taking sides. You're playing politics by calling attention to problems and letting your colleague save face if things are really not proceeding all that well. It's tempting to just talk to your manager, but don't forget which one of them you have to work with the most. ",Stefan Mohr,https://programmers.stackexchange.com/users/27797,http://programmers.stackexchange.com/questions/101528/how-do-i-deal-with-a-slow-and-undedicated-colleague-in-the-team,TECHNOLOGY,programmers.stackexchange.com 2894,Moving a WP Multisite to a subdirectory,"Firstly, I've read a number of posts on this process. However, for various reasons, the process remains difficult to implement or troubleshoot for lack of even abstracted examples, or maybe too abstracted. And there's a few ""can not do"" posts, nearly always followed up by ""with 3.5, you now can"" caveats, so whether one can remains ambiguous, though no doubt non-trivial. Summary: How to move a wordpress multisite (WPMS) from root.com to root/blogs? For this example, we're moving a WPMS from ""root.com"" to ""root.com/blogs"" I understand that I need to update the paths in the database and wp-config.php appropriately. It seems I may also have to update .htaccess? I'm also aware of the serialization issue with search/replace and mysql query updates. I have a WPMS that I've updated to 3.5. I've found the following tables with domain and path info Existing working configuration before move to subdirectory 1. wp_blogs select blog_id, domain, path from wp_blogs; +---------+-------------+--------+ | blog_id | domain | path | +---------+-------------+--------+ | 1 | root.com | / | | 2 | root.com | /matt/ | +---------+-------------+--------+ 2. wp_site select * in wp_site; +----+-------------+------+ | id | domain | path | +----+-------------+------+ | 1 | root.com | / | +----+-------------+------+ 3. The blog_id corresponds to the wp_#_options tables which contain: select option_name,option_value from wp_2_options where option_name = 'home' or option_name = 'siteurl'; +-------------+--------------------------+ | option_name | option_value | +-------------+--------------------------+ | home | http://root.com/matt/ | | siteurl | http://root.com/matt/ | +-------------+--------------------------+ 4. In my wp-config.php I have the following WPMS-specific lines: define('WP_ALLOW_MULTISITE', true); define( 'MULTISITE', true ); define( 'SUBDOMAIN_INSTALL', false); $base = '/'; define( 'DOMAIN_CURRENT_SITE', 'root.com' ); define( 'PATH_CURRENT_SITE', '/' ); define( 'SITE_ID_CURRENT_SITE', 1 ); define( 'BLOG_ID_CURRENT_SITE', 1 ); 5. Lastly, in my .htaccess, I have: RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # uploaded files RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L] RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L] RewriteRule . index.php [L] Updates required to move the site It seems to me that in order to move my site to the /blogs , I would: 1. Update wp_blogs to mysql> update wp_blogs set domain=concat(domain, '/blogs'), path=concat(path, 'blogs/'); select blog_id, domain, path from wp_blogs where blog_id < 3; +---------+-------------+--------------+ | blog_id | domain | path | +---------+-------------+--------------+ | 1 | root.com | /blogs/ | | 2 | root.com | /blogs/matt/ | +---------+-------------+--------------+ 2. Update wp_site to update wp_site set domain=concat(domain, '/blogs'), path=concat(path, 'blogs/'); select * from wp_site; +----+-------------+------------+ | id | domain | path | +----+-------------+------------+ | 1 | root.com | /blogs/ | +----+-------------+------------+ 3. wp_#_options +-------------+--------------------------------+ | option_name | option_value | +-------------+--------------------------------+ | home | http://root.com/blogs/matt/ | | siteurl | http://root.com/blogs/matt/ | +-------------+--------------------------------+ 4. wp_config.php define('WP_ALLOW_MULTISITE', true); define( 'MULTISITE', true ); define( 'SUBDOMAIN_INSTALL', false); $base = '/blogs/'; define( 'DOMAIN_CURRENT_SITE', 'root.com' ); define( 'PATH_CURRENT_SITE', '/blogs/' ); define( 'SITE_ID_CURRENT_SITE', 1 ); define( 'BLOG_ID_CURRENT_SITE', 1 ); note: I'm not clear how this step is appropriately updated 5. .htaccess I found vague ""update .htaccess appropriately"" instructions, but not specifics. Update RewriteBase? Which lines in .htaccess to I update when I move root.com to root.com/blogs? Missing from the above process will be the paths founds in posts. My druthers are to use the search and replace tool for that, after I've made this more fundamental updates; or am I wrong? Update bungeshea suggests that, yes, I point RewriteBase to the ""blogs"" subdirectory, i.e., RewriteBase /Blogs Finally, if you don't know about http://interconnectit.com/products/search-and-replace-for-wordpress-databases/ you should. It's excellent. ",Screenack,https://wordpress.stackexchange.com/users/18155,"It looks to me as if you've solved your own problem - just follow your steps 1-4, and for step 5 update the RewriteBase in .htaccess. For updating the paths in posts, I like using the Interconnect IT sterilized search-and-replace tool. ",shea,https://wordpress.stackexchange.com/users/19726,http://wordpress.stackexchange.com/questions/76913/moving-a-wp-multisite-to-a-subdirectory,TECHNOLOGY,wordpress.stackexchange.com 5184,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. ",Pureferret,https://meta.stackexchange.com/users/175002,"The alt (alternative) attribute is used when the image fails to load, or for user agents that can't display images (screen readers, very old mobile browsers, etc.) According to the HTML5 specifications, The most general rule to consider when writing alternative text is the following: the intent is that replacing every image with the text of its alt attribute not change the meaning of the page. This means that the ""image description"" hint is actually not very accurate. If the image is not important (in the sense that describing it will not help readers), is purely decorative, or if its content is already described by the surrounding text, then the attribute should actually be left blank. Whatever you do, do not leave the placeholder text in, since that is worse than leaving it blank. If you need a tooltip, you can use the title attribute. In Markdown, use ![alt text][1] [1]: http://example.com/image ""Your Title Here"" or ![alt text](http://example.com/image ""Your Title Here"") For example, the same format is used for titles on links, like this. ",Yi Jiang,https://meta.stackexchange.com/users/150097,http://meta.stackexchange.com/questions/144080/whats-the-point-in-adding-alt-text-to-an-image,TECHNOLOGY,meta.stackexchange.com 9537,Programming CC430F5137 using another microcontroller,"I have a CC430F5137 and the board schematic all ready for my application to that requires capturing data over bluetooth. I wish to program the CC430F5137 using another platform except the conventional programmer since I'm short of money for the project. Other platforms I have are: Tiva series Launchpad, Stellaris launchpad, MSP430 Launch pad, Arduino, Atmega 32 development board. Please help me by assisting in which to use and how. ",U7786,https://electronics.stackexchange.com/users/33944,"If the F5137 supports SBW, then you can use the MSP430 Launchpad as a programmer. Just bring out the two SBW signals plus power and ground to a connector on your board, and connect to J4 on the edge of the Launchpad. I don't bother with a connector on mine, I use pogo pins to connect to pads underneath the board. ",Brian Drummond,https://electronics.stackexchange.com/users/16324,http://electronics.stackexchange.com/questions/93239/programming-cc430f5137-using-another-microcontroller,TECHNOLOGY,electronics.stackexchange.com 6965,How do I increase sudo password remember timeout?,"I already know that I need to tune /etc/sudoers file but I would like to see full information and also a solution that would not require me to use vi editor. Update: never, ever try to edit the file with something else than visudo. ",sorin,https://apple.stackexchange.com/users/1916,"All information for sudoers can be found from the terminal with the command man sudoers You can even user simple text to edit files, however the privs make that difficult. sudoers is -r--r----- (Octal 0440) This indicates that Apple really doesn't want you messing with the file. This really is the core security of the OS. Options for editing are vi, emacs, or my personal favourite BBEdit. ",Andrei Freeman,https://apple.stackexchange.com/users/4385,http://apple.stackexchange.com/questions/10139/how-do-i-increase-sudo-password-remember-timeout,TECHNOLOGY,apple.stackexchange.com 4246,Server compromised - How do I find out what is sending mail,"A friend of mine has a few small businesses and hosts Wordpress-based sites for them on a dedicated host. The Wordpress installs were neglected for awhile and the host ended up getting compromised. There's now 100's of spam messages going out every second. What can I look at to determine what's generating the mail? The only way I can get the spam to stop is to shutdown Postfix. We've had it off for a few days to prevent spamming, but this also means he can't send mail from his businesses addresses. If I shutdown both apache and postfix, netstat shows no remote connections except my SSH login. If I then start postfix (but leave apache stopped), 100's of remote connections to port 25 immediately open. This leads me to believe that some process on the host is doing this, rather than something coming in through Wordpress/some rogue script that we missed in the clean-up. There were also IRC bots on here, but we've removed those, and netstat no longer shows any open connections to IRC. When I look at ps axjf - all of the smtp processes roll up to /usr/libexec/postfix/master, which has a parent id of 1. This doesn't really give me an idea of where the mail is being generated. Neither ps nor top show any suspicious processes (as far as I can tell). What else can I look at to see what's creating/sending the mail? I can post the output of ps whatever_flags_you_want both with and without postfix running, if it will help. Thanks. ",pata,https://unix.stackexchange.com/users/103244,"Thanks for the responses everyone. We did install and run rkhunter, it didn't find anything. It looks like we actually did take care of this in the initial clean-up, but postfix was trying to resend messages that had been bounced after the host was blacklisted. There were 100's of thousands of messages stuck in /var/spool/postfix/deferred. I think when I started postfix, it was moving those back to ./active and trying to resend. I just deleted everything in ./deferred and ./active, then started postfix. It doesn't appear that any new messages are being created or sent. I'm thinking this was just me not understanding how postfix works. I've been running watch -d -n 1 'ls -lhart /var/spool/postfix/active' and watch 'netstat --program --numeric-hosts --numeric-ports --extend | grep -E "":25|postfix|smtp""' For about 30 minutes and see no outgoing activity. ",pata,https://unix.stackexchange.com/users/103244,http://unix.stackexchange.com/questions/185023/server-compromised-how-do-i-find-out-what-is-sending-mail,TECHNOLOGY,unix.stackexchange.com 1149,Meteor renderList intercept? client side,"I have chat messages displayed like this: {{#each msg}} {{> chatMsg}} {{/each}} When users enter the chat I add a document to the collection with user joins the chat. When a user rapidly reenters and leaves the chat I don't want to duplicate user joins the chat over and over again. I want to display something like user joins the chat x3. Is there a way to do this on the client side by hooking into renderList? I know I can change the doc on the server side but it seems unnecessarily intensive. ",Harry,https://stackoverflow.com/users/663447,"The easiest way to get there from here is to write a custom publisher. Instead of just returning a cursor from your publish function, call observe() on your cursor within the publish function, and do the appropriate set(), unset(), and flush() calls within that, that do the appropriate multiplying a previous message instead of adding a new one. You can find the relevant documentation at the meteor documentation for Meteor.publish To get a basis from comparison, you can look at the current code to publish a Cursor, which is in packages/mongo-livedata/mongo_driver.js, in Cursor.prototype._publishCursor. Note: My answer here is for Meteor 0.5.2. The API for custom publishers is going to be changing in a future release of Meteor, and there will be different functions you have to call than set() unset() and flush() ",Naomi Seyfer,https://stackoverflow.com/users/1892918,http://stackoverflow.com/questions/13663765/meteor-renderlist-intercept-client-side,STACKOVERFLOW,stackoverflow.com 1208,How to extract name/data from database and use it as my folder name which is created dynamically in asp.net c# using server.MapPath()?,"I have used AjaxFileUpload to upload multiple image files. Now i want to store the uploaded images inside rootfolder>subfolder. The rootfolder is in the name of the user. The rootfolder is created dynamically by taking the session of the user who has logged in Like this: string username = Session[""username""].ToString(); I am able to create this folder and save images in it. but i want to save it in subfolder. the subfolder is also created dynamically but this time i have to take the value(id) from the database and name the folder by that id name. (this is so that i can refer to the database) I know how to create a new folder using Server.MapPath(); Here is the code for it in brief using System.IO if (Directory.Exists(Server.MapPath(uploadPath))) return; else Directory.CreateDirectory(Server.MapPath(uploadPath)); where uploadPath is the folder's name i want to create dynamiclly. but how do I include the subfolder too in my Server.MapPath() so as to make my path as rootfolder/subfolder ? Small example to make the question understandable. I am a seller. I have posted 4 ads online. Now when i am posting my 5th ad i want to include many images. these images should be saved in the folder Seller/5/imagename.jpg. (where Seller is the username(main folder), 5 is the advertID in the database and the name of the subfolder) How do i do this? Please help. I am using asp.net c# ",user2106271,https://stackoverflow.com/users/2106271,"As far as I know, you can't do one statement to create folder and subfolders because you need the folder to be created first. You have all of the code you need, you just need to repeat it. Check to see if the main folder (username) exists. If it doesn't create it, if it does, check to see if the subfolder exists. If it doesn't, create it. Just work through that logic and you'll be set. ",Dave Mroz,https://stackoverflow.com/users/1102128,http://stackoverflow.com/questions/21164125/how-to-extract-name-data-from-database-and-use-it-as-my-folder-name-which-is-cre,STACKOVERFLOW,stackoverflow.com 462,Energy required to break single bond vs double bond vs triple bond of a carbon atom in an organic molecule,"Assuming every other conditions are the same, what would be the comparison of energy required to break single bond, double bond and triple bond of a carbon atom in an organic molecule? ",Organ,https://chemistry.stackexchange.com/users/1857,"Let it be organic or inorganic compound More the no. of bonds between 2 atoms more the energy required to break it. This is because intermolecular force of attraction increases as the no. of bonds increase. So to break the bonds one needs more energy or so called more bond enthalpy. ",Chinmay Chandak,https://chemistry.stackexchange.com/users/14962,http://chemistry.stackexchange.com/questions/5393/energy-required-to-break-single-bond-vs-double-bond-vs-triple-bond-of-a-carbon-a,SCIENCE,chemistry.stackexchange.com 496,Can I change my loan term from 60 to 36 months?,"I am on a 60 months plan with USCCU and now they are offering APR rate of 1.36% for 36 months on used and new vehicles as shown here. Is it a good idea to change my loan term from 60 to 36 months considering the fact that I can afford the monthly installments which could be higher that what I am paying for in 60 months term with an APR rate of say, for example x%. ",John,https://money.stackexchange.com/users/13189,"Just call your credit union and ask if they will let you refinance at the lower rate. If they won't, then just increase your payment every month so that your car is paid off early (in 36 months instead of 60). You won't get the lower rate, but since your loan will be paid early, you'll be saving interest anyway. ",Ben Miller,https://money.stackexchange.com/users/10997,http://money.stackexchange.com/questions/39781/can-i-change-my-loan-term-from-60-to-36-months,LIFE_ARTS,money.stackexchange.com 3562,Disable tap on current Tab (UITabBarController) iPhone App,"Currently, Tapping on the same Tab (in which user is working), The App moves to the very first page of that Tab. I want to disable the tap event on the Tab in which user is working currently. Any Hint? ",viral,https://stackoverflow.com/users/887601,"use like below it will work - (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController { if(self.tabBarController.selectedIndex==[[self.tabBarController viewControllers] indexOfObject:viewController]) return NO; else return YES; } ",Narayana,https://stackoverflow.com/users/815179,http://stackoverflow.com/questions/10054539/disable-tap-on-current-tab-uitabbarcontroller-iphone-app,STACKOVERFLOW,stackoverflow.com 7497,Can't connect to a win2003 pptp vpn if the cisco vpn service is running,"I have a PPTP VPN set-up on a windows 2003 domain controller. Every attempt to connect to the VPN from a client running XP sp3 fails with a 619 error. Googling around I've found a 2006 thread on Google Answers that points to issues with the Cisco VPN client, that sure enough is installed on the client box. Stopping the ""Cisco VPN service"" from the MMC console fixes the problem (quitting the vpn-client isn't enough it seems). Has anyone else experienced this? Any idea what's wrong here? ",agnul,https://superuser.com/users/371,"From Cisco VPN Client breaks Microsoft PPTP VPN connections This may work, go into the settings for your PPTP connection, and go to the network tab, untick ""Determanistic Network Enhancer"". This worked with me to get an Intel VPN client working. ",harrymc,https://superuser.com/users/8672,http://superuser.com/questions/155054,TECHNOLOGY,superuser.com 3337,WordPress Show Single Post on Home Page with previous/ Next Button,"I am new to WordPress and recently doing some stuff with WordPress. I am using WordPress and want to make theme. I want to show a full post on the home page and at the bottom I want to show next and previous post links. There will only be one category in which I will post and only one post will display on the home page at a time. ",Sanjay Khatri,https://wordpress.stackexchange.com/users/2997,"Reducing the number of blog posts to show at Settings->Reading from 10 to 1 might do it for you. ",moraleida,https://wordpress.stackexchange.com/users/7890,http://wordpress.stackexchange.com/questions/23966/wordpress-show-single-post-on-home-page-with-previous-next-button,TECHNOLOGY,wordpress.stackexchange.com 9359,How to Enable Ports 25 - 28 on a Cisco Catalyst 3750,"I am trying to enable ports 25 - 28 on my 28 port Catalyst 3750. These four ports are my fiber ports. I am using the following command to bring up that interface. interface range Gi1/0/25 - 28 That works and it dumps me in the config-if-interface prompt. This is where I get stuck. I just want to enable these four ports and have them be in VLAN1 and On just like ports 1 - 24. How do I do this? ",Jared Brown,https://serverfault.com/users/99915,"Have you tried: - a show interface gi1/0/25 capabilities to see if the switch recognizes the SFP? - checked that the SFP type works with the fiber type you are trying to use? - The fiber path in properly patch and consistently the same type of fiber? - The switch on the other end has a compatible SFP as well? - some interfaces allow speed changes to be configured, you might check that the switches are configured the same on both sides. I took a short LC and flipped the TX - RX, so that I can default the interface do a no shut, then plug in the tester to two interfaces on the same switch. That will eliminate the other switch and the path if the link doesn't come up. ",btk_,https://serverfault.com/users/51704,http://serverfault.com/questions/130710,TECHNOLOGY,serverfault.com 2883,Control 8V H-Bridge with microcontroller,"Good afternoon. I've been trying to control an 8V H-Bridge (PMOS+NMOS) with a 4V microcontroller output signal. I thouth it would work but then i read that the PMOS source voltage had to be equal or smaller than the control voltage in the PMOS/NMOS gates. Does somebody know how to deal with this problem (without adding much more electronics)? ",Electronics_Guy,https://electronics.stackexchange.com/users/43113,"You can't drive the PMOS transistor directly like that. Remember that the gate voltage is always referenced to the source terminal, so if you apply 8V to the source and 0-4V to the gate, the gate-source voltage varies between -8V and -4V. In other words, the PMOS can never shut off, because it's gats-source voltage never goes to zero. To fix this, you need to create a ""level shifter"" for the PMOS gate signal. There are many ways to do this; one of the easiest is to purchase a driver chip designed specifically for the task. ",Dave Tweed,https://electronics.stackexchange.com/users/11683,http://electronics.stackexchange.com/questions/111090/control-8v-h-bridge-with-microcontroller,SCIENCE,electronics.stackexchange.com 7833,Home Network Router Used as Gateway Develops High Latency,"I have a WRT54G2 router (V1) with the most recent firmware that serves as the gateway between my Internet connection and my home network. Over the past few months, I've noticed that the router seems to consistently become unusable due to high latency when it runs for any period of time. The internet connection is working, but the latency is sometimes as high as 2000ms to ping Google or to run a test from Speedtest.net. When a computer is directly plugged into the cable modem provided by my ISP, the problems resolve. Restarting the router proivdes a resolution of the problem, but over time the latency issues increase again until it needs to be restarted. Right now, I have it on a mechanical (plug) timer that restarts it every morning around 4AM, but this still doesn't seem to fix the overall issue; I've had to restart the router manually twice today. Before restart, my ping will be over 1000ms; afterward, it will drop back to 20-60ms. Note that the download and upload speeds don't seem to be affected by this, just the latency itself. The problem appears on both wireless and wired connections. I'm not sure if this is a sign that our router is failing (it was purchased in 2009, so as far as consumer-grade solutions go, it's lasted a pretty decent span), or if there's some misconfiguration on my end, or if something with my ISP is making my router flip out. What can/should I do to fix this issue (please note that flashing the router with DD-WRT is not an option, this version generally sees decreased performance when DD-WRT is installed). EDITED TO ADD: I have ruled out internal traffic causing the problem (I reviewed the log files for the router and tried to identify any unknown stuff, but it seems fine). I can't quite figure out exactly what causes the router to develop the issue, but once it does, I've noticed the following: Extremely high latency (1000ms+) for pings from any computer inside the network to an outside destination The router itself cannot ping or traceroute once it has started developing these high latency issues - if you use the router's PING feature, it returns all timeouts. It does not seem to correlate with any specific type of traffic. ",TARehman,https://superuser.com/users/128601,"I would suggest doing first a factory reset by pressing and holding the reset button of the router for straight 30 seconds while powering on. If that helps, everything is fine. But if it doesn't, then the prognosis is less than optimal. Other people in your situation have given the following advice. From Resetting Router after Firmware Upgrade says (frankly it sounds like black magic, but some people claim it helps) : I was told by Linksys Support that I should Reset my router after updating the Firmware. I had never heard of this before. They gave me the procedures below : Press and hold the reset button of the router for straight 30 seconds while powered on, and then unplug the power cord for 10 seconds and power up again. Connect a PC to the port 3 of the router then restart the PC. (This PC should be the one that can get online if directly connected to the modem). No connection yet to the modem, so only router and computer. Access the router's setup page then on that PC. To access the router's setup page, launch an Internet Explorer browser [or any browser you are using if you don't have IE]. On the address bar, please type 192.168.1.1 and then hit Enter/Return key. A log-in screen will appear. A log-in screen will appear. Please leave the username blank or empty and type admin for the password in lowercase and then hit OK. On the router's setup page, click on the MAC Address Clone sub tab and click on Clone your PC's MAC then save the settings. Click on the Wireless tab. Change the SSID from linksys to your family name or any name that never existed as a wireless network before to avoid network interference. Change the channel to 11 as well and make sure that your SSID Broadcast is enabled. Click on Save Settings. Click on the Security tab and disable or uncheck the 'Block Anonymous Internet Requests', then click on Save Settings. Go back to the Setup tab and look for the Local IP Address which is 192.168.1.1. Change the IP address to 192.168.2.1 then save the settings. Connect modem to Internet/WAN port of the router and shut down everything for 2 minutes. Power on. (Starting from the modem then the router and lastly your PC). From Slow Wireless Connection (WRT54G2) (looks like this is oriented toward wireless, but may be worth trying) : Open up the browser and on the address bar type 192.168.1.1 that will open up the Router setup page. Lower the MTU (Maximum Transmission Unit) from 1500 to 1400 or less (usually found on your routers main/ basic setup page) Then go to the Wireless tab, keep network mode as mixed, make the Channel Width to 20 MHz only and Channel to 6, 9, 11.. Adjust the following advanced wireless settings: Lower the beacon interval from 100 to 75 Lower the fragmentation threshold from 2346 to 2306 Lower the RTS threshold from 2347 to 2304 If nothing helps, then you are not the only frustrated owner of the WRT54G2. In case you would like to try DD-WRT anyway, this wikipedia article lists versions v1-1.3 of the router as compatible, but not v1.5. Here is the installation procedure. ",harrymc,https://superuser.com/users/8672,http://superuser.com/questions/562441,TECHNOLOGY,superuser.com 9375,JavaScript to paste form input in-line into body text,"I have an HTML form with input text fields which i would like to have pasted back into the HTML body resulting in a text string returned by a JavaScript function i.e. in the place where the input fields are sequentially. A simple example would be: <html> <body> This is the first field <input type=""text"" id=""first""/> and this is the second <input type=""text"" id=""second""/> one. </body> </html> When i now view this page and enter ABC into field 1 and XYZ into field 2, i'd like to know how to use JavaScript to create a piece of text like so: This is the first field ABC and this is the second XYZ one. So just to be clear, the web page itself need not change dynamically, i only want to be able to call the JavaScript function from elsewhere and then get the resulting text back with whatever is currently entered, pasted into the body text. Any help much obliged. Tiaan ",Waslap,https://stackoverflow.com/users/1145103,"You can use the DOM to loop through the child nodes of body (probably recursively), collecting the nodeValue properties of the text nodes (those are the bits containing ""This is the first field "" and such) and, where you encounter an input element, getting its value property instead. Build all of that text up into a string and you're there. Some references: DOM2 Core DOM2 HTML DOM3 Core HTML5 Web Application APIs ",T.J. Crowder,https://stackoverflow.com/users/157247,http://stackoverflow.com/questions/8832650/javascript-to-paste-form-input-in-line-into-body-text,STACKOVERFLOW,stackoverflow.com 4422,Tikz: Text along top and bottom of arrow path,"How can I add text to both the top and bottom of a path? My commutative diagram below is 90% complete. I would, however, like text={${gKer({\varphi}){\mapsto}{\varphi(G)}}$} following the path below the arrow and \cong following the path above the same arrow. \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \usetikzlibrary{decorations.text} \usetikzlibrary{decorations.pathmorphing} \begin{document} \begin{tikzpicture} \node (A) {$G$}; \node (B) [right of=A] {$G'$}; \node (C) [below of=A] {$G/Ker(\varphi)$}; \draw[->>] (A) --(B) node[above,midway] {$\varphi$}; \draw[->,postaction={decorate,decoration={text along path,text align=center,text={${\pi}{\;}$}}}] (A) to node[swap] {} (C); \draw[->,postaction={decorate,decoration={text along path,text align = center,text={${gKer({\varphi}){\mapsto}{\varphi(G)}}$}}}] (C) to node[swap] {} (B); \end{tikzpicture} \end{document} ",beethree,https://tex.stackexchange.com/users/25381,"I would suggest you tu use the tikz-cd package for your commutative diagrams; also, since the problematic label is not really the name of a map, but rather its action, I would also suggest you to describe the map outside the diagram (otherwise, the diagram might result too crowded): \documentclass{article} \usepackage{amsmath} \usepackage{tikz-cd} \DeclareMathOperator{\Ker}{Ker} \begin{document} \[ \begin{tikzcd} G\arrow[twoheadrightarrow]{r}{\varphi}\arrow{d}{\pi} & G' \\ G/\Ker(\varphi)\arrow[sloped,swap]{ur}[near start]{\tau}[swap]{\cong} \end{tikzcd} \] where $\tau:G/\Ker(\varphi)\rightarrow G'$ is defined by $g\Ker({\varphi}){\mapsto}{\varphi(G)}$. \end{document} Of course, you can draw the diagram with the originally requested labels, perhaps increasing the distance between nodes: \documentclass{article} \usepackage{amsmath} \usepackage{tikz-cd} \DeclareMathOperator{\Ker}{Ker} \begin{document} \[ \begin{tikzcd}[row sep=60pt,column sep=huge] G\arrow[twoheadrightarrow]{r}{\varphi}\arrow{d}{\pi} & G' \\ G/\Ker(\varphi)\arrow[sloped,swap]{ur}[pos=0.15]{g\Ker({\varphi}){\mapsto}{\varphi(G)}}[swap]{\cong} \end{tikzcd} \] \end{document} Notice the use of \DeclareMathOperator{\Ker}{Ker} (requires the amsmath package) to produce the correct shape for the Ker operator; (I initially overlooked this, but Ethan Bolker signaled it out in a comment). ",Gonzalo Medina,https://tex.stackexchange.com/users/3954,http://tex.stackexchange.com/questions/106410/tikz-text-along-top-and-bottom-of-arrow-path,TECHNOLOGY,tex.stackexchange.com 111,Selecting multiple icons in Finder using the keyboard?,"Is there a way to select icons (using the keyboard) that aren't directly touching? In Windows, I'd press Ctrl+Down, but it doesn't work in the Finder view. I've tried all the usual keyboard shortcuts, but it doesn't seem to work. I can multi-select other icons just fine, but I can't multi-select these two. The picture explains it better than I could. The icons in this folder are aligned to the grid. ",Redandwhite,https://apple.stackexchange.com/users/8950,"The answer, it turns out, is fairly unintuitive. Select the last item (the PSD). Press Shift + Up. Hold Shift and press Right repeatedly until you get the selection you want. ",Redandwhite,https://apple.stackexchange.com/users/8950,http://apple.stackexchange.com/questions/51679/selecting-multiple-icons-in-finder-using-the-keyboard,TECHNOLOGY,apple.stackexchange.com 4591,What does it mean to interpret the Bible literally?,"Here are some common definitions from a dictionary for ‘literal’: Being in accordance with, conforming to, or upholding the exact or primary meaning of a word or words. Word for word; verbatim: a literal translation. Avoiding exaggeration, metaphor, or embellishment; factual; prosaic: a literal description; a literal mind. So what does it mean then to ‘take the Bible literally?’ Which definition are we referring to when we say ‘I take the Bible literally?’ ",Mike,https://christianity.stackexchange.com/users/1743,"Those who claim to interpret scriptures ""literally"" will otherwise propose this means to ""accept the plain meaning"" of the text, rather than seeking a symbolic, allegoric, or otherwise subtle hidden meaning. Of course the ""plain meaning"" itself can be subjective, causing differences in interpretation based on the ""literal"" approach. ",Brent Arias,https://christianity.stackexchange.com/users/1095,http://christianity.stackexchange.com/questions/8344/what-does-it-mean-to-interpret-the-bible-literally,CULTURE,christianity.stackexchange.com 1126,Aldec Active-HDL - No Default Binding,"I'm getting some errors when I try to compile my design in Aldec's Active-HDL. # Warning: ELAB1_0026: BITADJ128.bde(BITADJ128.vhd) : (79, 0): There is no default binding for component ""buf"". (No entity named ""buf"" was found). # Warning: ELAB1_0026: BITADJ128.bde(BITADJ128.vhd) : (157, 0): There is no default binding for component ""INV"". (No entity named ""INV"" was found). # Warning: ELAB1_0026: BITADJ128.bde(BITADJ128.vhd) : (277, 0): There is no default binding for component ""GND"". (No entity named ""GND"" was found). I have added these items to the library multiple times, and in different ways, but it still gets hosed up. I'm wondering if anyone else has had a similar issue? I inherited a large design I'm converting from EDIF to VHDL and switching from Virtex-4 to Virtex-5, and there seems to be a symbol resolution problem. ",trayres,https://electronics.stackexchange.com/users/8245,"You need to download Xilinx libraries for Active-HDL from www.aldec.com. After downloading, install the library. This will install all the Xilinx library that you need and attach them with Active-HDL. Also make sure you use proper library and use statement in your code - just like explained in the previous post. ",SamJ,https://electronics.stackexchange.com/users/19132,http://electronics.stackexchange.com/questions/57859/aldec-active-hdl-no-default-binding,TECHNOLOGY,electronics.stackexchange.com 6046,How does our work on this earth transfer into the new earth when God returns?,"I recently read Every Good Endeavor by Tim Keller and also Surprised by Hope by N.T. Wright. Both are amazing books, focused on the resurrection theology that God will raise up a new heaven and a new earth, and we will dwell in the presence of God, not just sitting around, but living life with new redeemed bodies and doing redeemed work that isn't corrupted by sin. The ideas of heaven are very exciting: that we won't be just sitting around playing harps, but will live much like we do currently, although without the corruption of sin and in the presence of God. Another exciting theme in these books is that the work we do here matters towards the new heaven and new earth, and will be redeemed and made full when God comes. While this is exciting to me, it is also very confusing. Can anybody shed some light into how the work we do here transfers to Gods kingdom, even if it is ""secular"" in nature? ",mrsoltys,https://christianity.stackexchange.com/users/6107,"The works themselves, the particular activity we engage in, do not seem to matter as much as the faithfulness to the Lord with which we render the works. Matthew 24:45-51 shows us the outcome of the work. One servant found his usefulness recalled to mind when the master returned after a long while, and he was rewarded with greater responsibilities. But if that same servant had been found untrustworthy, then he would have been disqualified from any such reward. Note that the same servant is in view; we may prove trustworthy or not in the end; there is no guarantee that we'll reign with Christ; the trustworthiness of our character matters. Matthew 25:14-30 shows us the same situation. The two servants who were faithful in what they did received greater responsibilities. The one servant who did not pursue his duties like the other two was rejected. The idea is that if we are able to follow the Lord's will honorably when we cannot see Him, then we would be able to be trusted to follow Him in the next life with whatever commensurate responsibilities He gives us. See also Luke 16:11-12: ""If therefore ye have not been faithful in the unrighteous mammon, who will commit to your trust the true riches? And if ye have not been faithful in that which is another man's, who shall give you that which is your own?"" God wants to give us something to do in the future kingdom, but He will give it to those who have been found to be of such proven character that it can be entrusted to him/her. This is not a strange or weird idea. Many well-run businesses operate this way, rewarding the top performers (alas, not all governments are). Luke 16:10 tells us, ""He who is faithful in what is least is faithful also in much; and he who is unjust in what is least is unjust also in much."" Do not despise the day of small things; God sees our work as serving Him or serving something else. ",Steve,https://christianity.stackexchange.com/users/4546,http://christianity.stackexchange.com/questions/19725/how-does-our-work-on-this-earth-transfer-into-the-new-earth-when-god-returns,CULTURE,christianity.stackexchange.com 1609,Setup ntp client with embedded device,"I need to run an NTP client on a very limited embedded device. ntpd is available but I do not see anything like rc.conf, or ntp.conf, or xntp.conf? Can someone advise on how to setup NTP? I ran ntpd, but the date and time haven't updated. ",Bob,https://unix.stackexchange.com/users/7295,"Try ntpd -bq That will set the time and quit. It will allow you to sync to broadcast servers as well. That said there are two important things to note. First I don't know who the NTP servers are on you network. If someone is being a bad little techie they could bork your time/date and invalidate some security protocols. Also be aware that a common problem is that your time is ""ahead"" of the NTP servers. so when you adjust your time, your files and other things exist in the future. This can really confuse things. Linux doesn't like time travel and it's not afraid to let you know. Normally this is just warnings but can be more serious issues depending on how some scripts are written. I say this because an embedded device usually has some pretty narly scripts on it. ",coteyr,https://unix.stackexchange.com/users/50370,http://unix.stackexchange.com/questions/113560/setup-ntp-client-with-embedded-device,TECHNOLOGY,unix.stackexchange.com 3984,What is the likelihood of ever discovering the graviton?,"How would one look for and confirm existence of a graviton? Someone was speaking to me about perhaps one day discovering the graviton, but to me it seems unlikely, although I'm young and essentially quite naive, so am coming to you physicists to ask What actually is the likelihood of finding it? How would we find it? ",ODP,https://physics.stackexchange.com/users/8082,"This depends on graviton energy and wavelength. Given a source of a beam of high-frequency gravitons with high luminocity, it would not be difficult to detect one. The problem is that nature has little sources of high-energy gravitons. ",Anixx,https://physics.stackexchange.com/users/1186,http://physics.stackexchange.com/questions/34118/what-is-the-likelihood-of-ever-discovering-the-graviton,SCIENCE,physics.stackexchange.com 2064,Parsing a Text to only see specific data,"I have the following text lines: .add 7971 [Player: Sunfire (Account: 11309) X: 5839.623047 Y: 600.437439 Z: 650.839722 Map: 571 Selected player: Llubia (GUID: 19369)] .add 43956 [Player: Sunfire (Account: 11309) X: 5277.887695 Y: 2862.181641 Z: 446.735931 Map: 571 Selected none: (GUID: 0)] .add 43956 [Player: Sunfire (Account: 11309) X: 5281.407715 Y: 2864.844482 Z: 446.735931 Map: 571 Selected player: Staticbaby (GUID: 19826)] .add 43956 [Player: Sunfire (Account: 11309) X: 5231.464844 Y: 1437.029175 Z: 648.498535 Map: 571 Selected player: Sunfire (GUID: 15295)] .add 44077 [Player: Sunfire (Account: 11309) X: 5231.464844 Y: 1437.029175 Z: 648.498535 Map: 571 Selected player: Sunfire (GUID: 15295)] .add 49285 [Player: Sunfire (Account: 11309) X: 16225.323242 Y: 16252.759766 Z: 12.790466 Map: 1 Selected none: (GUID: 0)] .add 44115 175 [Player: Elmasguapo (Account: 11309) X: 1659.845093 Y: -4198.589844 Z: 56.382870 Map: 1 Selected none: (GUID: 0)] .add 34078 [Player: Sunfire (Account: 11309) X: 16227.969727 Y: 16280.081055 Z: 13.175169 Map: 1 Selected none: (GUID: 0)] .add |cffffffff|Hitem:41427:0:0:0:0:0:0:0:80|h[Fuego de Artificio de Dalaran]|h|r 50 [Player: Sunfire (Account: 11309) X: 16221.392578 Y: 16260.944336 Z: 13.255954 Map: 1 Selected none: (GUID: 0)] .add |cffffffff|Hitem:45932:0:0:0:0:0:0:0:80|h[Gelatina Negra]|h|r [Player: Sunfire (Account: 11309) X: 5874.347168 Y: 679.056763 Z: 167.483719 Map: 571 Selected player: Assasins (GUID: 19438)] .add |cffffffff|Hitem:45932:0:0:0:0:0:0:0:80|h[Gelatina Negra]|h|r [Player: Sunfire (Account: 11309) X: 5873.767090 Y: 679.386841 Z: 167.435257 Map: 571 Selected player: Assasins (GUID: 19438)] .add |cffffffff|Hitem:45932:0:0:0:0:0:0:0:80|h[Gelatina Negra]|h|r [Player: Sunfire (Account: 11309) X: 16226.880859 Y: 16247.247070 Z: 12.286857 Map: 1 Selected player: Irmtarget (GUID: 18521)] .add |cffffffff|Hitem:45932:0:0:0:0:0:0:0:80|h[Gelatina Negra]|h|r [Player: Sunfire (Account: 11309) X: 16229.297852 Y: 16251.202148 Z: 13.081388 Map: 1 Selected player: Irmtarget (GUID: 18521)] .add 41600 2 [Player: Sunfire (Account: 11309) X: 16223.138672 Y: 16250.496094 Z: 12.431313 Map: 1 Selected player: Eifreen (GUID: 20341)] .add 41600 1 [Player: Sunfire (Account: 11309) X: 16223.138672 Y: 16250.496094 Z: 12.431313 Map: 1 Selected player: Eifreen (GUID: 20341)] .add 40516 [Player: Sunfire (Account: 11309) X: 16223.138672 Y: 16250.496094 Z: 12.431313 Map: 1 Selected player: Eifreen (GUID: 20341)] .add 44661 [Player: Sunfire (Account: 11309) X: 16223.138672 Y: 16250.496094 Z: 12.431313 Map: 1 Selected player: Eifreen (GUID: 20341)] .add 40518 [Player: Sunfire (Account: 11309) X: 16223.138672 Y: 16250.496094 Z: 12.431313 Map: 1 Selected player: Eifreen (GUID: 20341)] .add 44005 [Player: Sunfire (Account: 11309) X: 16223.138672 Y: 16250.496094 Z: 12.431313 Map: 1 Selected player: Eifreen (GUID: 20341)] .add 45867 [Player: Sunfire (Account: 11309) X: 16223.138672 Y: 16250.496094 Z: 12.431313 Map: 1 Selected player: Eifreen (GUID: 20341)] .add 45316 [Player: Sunfire (Account: 11309) X: 16223.138672 Y: 16250.496094 Z: 12.431313 Map: 1 Selected player: Eifreen (GUID: 20341)] And I want to parse it so it outputs something like this: Line 1 For example - 7971 Llubia Line 3 For example - 43956 Staticbaby Line 9 For Example - 45932 Assassins And so on.. This is done in the terminal with commands like cut, grep, cat, etc.. UPDATE: Here is the whole file: http://paste2.org/p/1744102 to parse in that way. UPDATE2: Please forgive me if I do not accept an answer just yet. Am waiting for the bounty option to appear since for me, stuff like this deserve a bounty. So I will add a bounty and give it to the correct answer or answers. ",Luis Alvarado,https://askubuntu.com/users/7035,"It's not really feasible to use command line tools to parse irregular ouput. Would be better to use python, etc.. If you had complete regularity, e.g., you could use something as simple as: awk '{print $2 "" "" $17}' INPUT This misses the 'Hitem' lines from your example. This is an ugly hack, but it takes the 'Hitem' lines into account: sed 's/^.*Hitem:\([0-9]*\):0/\1/' INPUT | awk -F: '{print $1 "" "" $0}' | sed 's/\.add //' | sed 's/^\([0-9]* \).*Selected player: \([A-Za-z]* \).*$/\1 \2/' | egrep -v 'Selected none' Which gave me: 7971 Llubia 43956 Staticbaby 43956 Sunfire 44077 Sunfire 45932 Assasins 45932 Assasins 45932 Irmtarget 45932 Irmtarget 41600 Eifreen 41600 Eifreen 40516 Eifreen 44661 Eifreen 40518 Eifreen 44005 Eifreen 45867 Eifreen 45316 Eifreen This fails on the additional info you've added, however, which is why I've added the comments/caveat about regularity here. ",belacqua,https://askubuntu.com/users/8844,http://askubuntu.com/questions/73311/parsing-a-text-to-only-see-specific-data,TECHNOLOGY,askubuntu.com 3742,Setting up a food pantry/orphanage?,"I can't find much on how to set up any kind of establishments that are for charity. HOw would I go about this? Acquiring a building, a few volunteers, how much to run it per day, ect? Anyone have any experience in this? My character is a NG Druid, who had never been to a city and saw the poverty and lack of food and housing for people. He wants to help! But I have no idea on how to establish a continual act of help. Buying food for the town and stuff, one time is easy to figure out. How many people * ammount of food needed is the price. But for bigger acts of continual charity, who knows? EDIT: So, it was suggested that I make an eco orphanage in a forest. I accidently doomed the continent with demons, so that won't work. (Wish spell to get rid of orcs, things went horribly wrong) NO one knows it was me though! :D I don't want the leadership feat cause I need my 6th level feat for a prestige class. Also, I don't want to donate to the churches in this city, I'm finding a lot of corruption in some of these churches, especially this city, so I want something more controllable by me. ",samuraiseoul,https://rpg.stackexchange.com/users/10381,"There isn't anything in the core rules about building ownership, but you (or your DM) can fake it in a good-enough way (at least, so long as nobody tries to break the game using such a ruling) by estimating off the equipment tables. You need three things: cost for building maintenance (or rent), cost for food, and (if not renting) initial price of the building. In the equipment chapter under Food, Drink, And Lodging, a poor meal costs 1sp. I'm picking ""poor"" because no matter how much you have, you want to stretch it as far as you can to feed as many, right? So go with ""poor"". That price is assuming making a profit, so let's be conservative (on the ""more expensive for you"" side) and cut it in half: 5cp to feed an orphan. Maybe shave that down to 3cp, since they're kids and not grown adults eating at a poor inn. (This is really back-of-the-envelope stuff, not rigorous at all.) We can do something similar for the rent/maintenance of the building: a night's stay in a poor inn is listed as 2sp. Let's cut it in half to 1sp to eliminate the profit normally involved. Since a normal poor inn can maintain the whole building on 2sp per room per night, we can be pretty sure that the 1sp per orphan per night will cover (sans profits) whatever costs are involved in paying rent or taxes, repairs, replacing bedding, laundering, upkeep of the non-sleeping quarters and so on. Somewhere, between the price for meals and the price for rooms, a combined inn/tavern also pays for their kitchen, so we're probably safely in the black with our estimates. You probably don't need to maintain a stable like a normal inn, and you're not paying for the volunteer labour, so that makes the estimate even more likely to at least meet or exceed the costs of rooms and food. Altogether, that makes it 1sp, 3cp to feed and house a single orphan per day, assuming one good meal every day (which is not far off the unfortunate reality of old orphanages). If you want to have them slightly healthier, but be able to take in fewer, make it two meals per day and double the meals costs to 6cp, for 1.6sp per orphan per day. So, very roughly, you see how you can use the goods and services lists in the core book to get a gameable estimate of the costs per orphan per day. From there you can look at what money you've got stashed and what your incoming donations are, and estimate how many orphans you can house and feed at once on an ongoing basis. As for the initial cost of acquiring the building, that the core rules don't provide anything even close to helpful for estimating. You don't have to worry about this if you find a willing landlord, but if you have to buy the building outright, this becomes a slightly sticky issue. If I was running this game I'd probably just play it out, maybe angling for the druid to find a donor with a vacant building. At worst I'd just name a price in gold and get on with it, while making sure that the players know that the price is particular to this building from this seller, and they shouldn't expect it to set a precedent. Maybe, like 100gp or something. ",SevenSidedDie,https://rpg.stackexchange.com/users/321,http://rpg.stackexchange.com/questions/32292/setting-up-a-food-pantry-orphanage,CULTURE,rpg.stackexchange.com 1170,What are the pitfalls of buying a used car after an accident?,"I have the option to buy a car that has been in an accident. There are alternatives, but within my budget the alternatives are usually older/have higher mileage. The seller is a local mechanic who did the restoration work and also showed pictures of the car before restoration. The damage was done to one of the front headlights and to the surrounding bits. The mechanic has convinced me that no damage was done to the internal carrying structure. He fixed the lights and did some paintwork restoration. Problem: I read that people advice not to buy cars after the accident. This is my first car, so my experience is nonexistent. Question: What are the cons against buying a car after the accident? About the car: Opel Astra 2007 1.4 Petrol Manual Hatchback priced £2200, 1 prev owner, chain, 66K miles, 1 year MOT, 6 month tax ",JimD,https://mechanics.stackexchange.com/users/3196,"One indicator in this case could be the airbags. In a frontal accident they deploy if the impact was strong enough. So I'd consider the car if the airbags are still the originals. Too big of a chance of structural damage if the airbags deployed and were replaced. Better to steer clear… ",Engin Kurutepe,https://mechanics.stackexchange.com/users/438,http://mechanics.stackexchange.com/questions/6177/what-are-the-pitfalls-of-buying-a-used-car-after-an-accident,SCIENCE,mechanics.stackexchange.com 2747,How long does it take for a calf to be full grown in Harvest Moon A New Beginning?,"How long does it take for a calf to be full grown in Harvest Moon A New Beginning? And for that fact, what about the other animals? (chicks, sheeps, you get the deal) ",MaryAnn,https://gaming.stackexchange.com/users/66145,"According to this source, cows have a pregnancy period of 21 days, followed by another 20 days until adolescence. While the source is somewhat incomplete, I would hazard a guess that sheep and alpaca have the same pre-adolescent period since they share the same pregnancy period of 21 days. Chickens, on the other hand, have an incubation period of 7 days (since you put eggs in the hatcher, rather then get them pregnant), followed by 8 days until adolescence. Note that this source is incomplete for higher quality breeds such as Jersey cows and Silkie chickens, but from my experience with previous games in the series (such as Tale of Two Towns), they should share the same pregnancy/incubation/adolescence period as the base livestock. ",Yuuki,https://gaming.stackexchange.com/users/27975,http://gaming.stackexchange.com/questions/149850/how-long-does-it-take-for-a-calf-to-be-full-grown-in-harvest-moon-a-new-beginnin,CULTURE,gaming.stackexchange.com 6876,Reading XML file and fetching its attributes value in Python,"I have this XML file <domain type='kmc' id='007'> <name>virtual bug</name> <uuid>66523dfdf555dfd</uuid> <os> <type arch='xintel' machine='ubuntu'>hvm</type> <boot dev='hd'/> <boot dev='cdrom'/> </os> <memory unit='KiB'>524288</memory> <currentMemory unit='KiB'>270336</currentMemory> <vcpu placement='static'>10</vcpu> Now i want parse this and fetch its attribute value. For instance i want to fetch the uuid field. So what should be the proper method to fetch it in Python. Any libraries or code snippets that could help is appreciated ",S.Ali,https://stackoverflow.com/users/1585585,"Here's an lxml snippet that extracts an attribute as well as element text (your question was a little ambiguous about which one you needed, so I'm including both): from lxml import etree doc = etree.parse(filename) memoryElem = doc.find('memory') print memoryElem.text # element text print memoryElem.get('unit') # attribute You asked (in a comment on Ali Afshar's answer) whether minidom is a good alternative. Here's the equivalent code using minidom; judge for yourself which is nicer: import xml.dom.minidom as minidom doc = minidom.parse(filename) memoryElem = doc.getElementsByTagName('memory')[0] print ''.join( [node.data for node in memoryElem.childNodes] ) print memoryElem.getAttribute('unit') lxml seems like the winner to me. ",ron rothman ℝℝ,https://stackoverflow.com/users/593047,http://stackoverflow.com/questions/12290091/reading-xml-file-and-fetching-its-attributes-value-in-python,STACKOVERFLOW,stackoverflow.com 2336,Interpretation of riemannian geodesics in probability,"Good morning everybody. My question is, as maybe already hinted in the title, rather philosopic. We know that geometric properties of a riemannian manifold can be interpreted in terms of certain evolution processes; I'm thinking about all the relations between the expansion of the heat kernel and, for example, the gaussian curvature of the manifold. Now, since I'm not a probabilist the question is as follows... are there characterizations, or properties of riemannian geodesics which can be deduced from stochastic operators (like the Brownian motion)? Even more, can we give a characterization of (properties of) riemannian geodesics in these terms? All references are welcomed.. this is just a soft question for me to know where I have to look at in literature. Thanks again for the patience. Guido ",guido giuliani,https://mathoverflow.net/users/57571,"Check out: Franchi and LeJan, Hyperbolic Dynamics and Brownian Motion: An Introduction ",Igor Rivin,https://mathoverflow.net/users/11142,http://mathoverflow.net/questions/182910,SCIENCE,mathoverflow.net 8942,What are the benefits of owning a physical book?,"I have seen this question about updates of the D&D 4th Edition books, and it got me thinking. Since I got my Kindle I have not read a single paper novel; they have fewer drawbacks compared to digital copies than rpg rulebooks. Dead-tree types have some benefits like looking good on a bookshelf, but any ebook reader weighs less with 100 novels than the usual hard-cover book. If you want to look for the damage of Ares Alpha, even with a half-decent tablet it takes less than 2 seconds. Digital copies do not get worn, they never get unwanted earmarks, but you can bookmark them. Rulebooks do get updates, and unless you are willing to take a pen to your book, your hard copies will never contain them. The pdfs can be edited and resent to the buyers. Even better is the WotC approach with the DDI, you can look up any monster or item or (almost any) rule, in the most recent form, for 3 years at the cost of seven books. I think this is the way to go, even considering the horribly slow character builder. Although I must admit good illustration can help build the athmosphere. So what am I missing? Why are people buying rpg rulebooks in paper format? Why are books even published, I do not need to know if feats are supposed to be on the right page and skills on the left, I just want a list of them, filterable any way I want. Is this just a necessary part of earning money? I understand that pdfs are copied illegally, but the Compendium is not. ",András,https://rpg.stackexchange.com/users/9552,"This easily reads as a matter of preference to me over anything. From a subjective standpoint I simply enjoy the smell of ink and paper and the feel of pages but from there... It's anyone's race really. E-Books Portability: The only reason I bring a laptop or e-reader to games is usually because the game is when I'm playing at the home of someone else or a neutral location of some sort. Call me lazy, but I'm less than enthused to carry my entire collection which with my AD&D stuff, is easily a dozen each hardback and soft cover books. Having digital copies saves me some potentially considerable effort to keep everything I need with me. Every game I have been a part of for any serious duration usually has several books and everyone needs only one or two pages from the extras but the whole book has to come along. Indexing: There are precious few books that have a pervasive index. Some are simply maddening because they will place an entry as a subsection of another instead of being its own listing. Searchable text has been a life saving feature that helps me even facilitate answers for this site because I can keep jabbing the ""find next"" button to make sure there isn't some hidden passage of errata in a different section of the book. I can go directly to what I want. Not only this, but I have a dyslexic player who uses the e-book to read aloud to him and that's the only way he learns the rules without a walkthrough mid-game. Errata: Some releases are digital only nowadays. Books can always be scanned for free, but new digital content costs to be printed (even if minutely... at first) and having a file is a resource that can be given back. Unless you choose to print on both sides (or use the back of an already printed page) that page is spent. Maybe line a birdcage with it but that's about it once you're done. Spined Books Redundancy: Murphy is my worst player. He corrupts files, drops books and readers alike, summons unholy deluges that permeate the stoutest bag as I dart from vehicle to building. A book can take a fair amount of damage before becoming useless. Even if it gets wet or torn, the other pages are still viable. A backup of files is cheap and easy but a backup of devices is frustratingly costly. Even if one book becomes totally useless, the rest should still be in good condition anyway. Psychology: I can't agree more with PlasmaHH when it was stated that genuine books imply something about the DM/GM/ST. They usually mean business unless it's that rich friend who can piddle away money for books like they're tissue boxes. Every game I've been in where the DM is serious about their world, the content, and grasp of the rules they never subsumed on PDFs alone (although certainly had them where possible). It's kind of like the illusion a gym membership provides where by virtue of having spent good money on something, you want full value of the resource and hardback books are the most costly. Other than systems that went out of print before I was aware of them, everything I run I keep at least a core book hard copy for communal use if nothing else. Distribution: Probably beating a dead horse with many of the answers explaining how using a genuine book means you can give media away without losing the entire medium to read it. However with some companies being notorious for bad binding, I've seen books split into binder volumes and individual pages given tot he players who need them and right back in the pot when they're done. No entry cost of time to find the right file, download, change storage device/upload to cloud, download to new device, open, find again for a one time use. Just give the page back when you're done. Wear & Tear Can be Your Friend: Believe it or not, the more a book is used, the more useful it gets in my experience. Several of my books have been opened and creased to specific pages I use so often that with a blind grab at the right depth of the volume I can open to the exact page I want to something I may not have thought to leave a bookmark on (digitally or literally). Typically any system's combat turn order, the start of its magic and skill sections become permanently held for intuitive indexing. Equality/Trading Off Annotation: Familiarity breeds ease of use. I can place sticky notes or add comments with equal proficiency, as well as remember the page number (within ten pages) or randomly open to it in the book by approximate depth. These functions are synonymous to me because essentially they work the same by keeping custom information. In a hard copy you have limited space and might lose a sticky note or tucked index card where in an e-book you might have to guess where the comment trigger is to be found since it collapses. Multiple Pages: As a subjective factor, being able to separate books and pages to be larger than a screen's resolution can accurately display helps me do the work faster. However! Using a laptop for almost all of my digital reading, I have been known to make a second copy of the core book in the folder so I can hold two pages simultaneously open in the same book without creating a conflict. I have on many occasions held three or four books open and traversed them as easily as my books splayed like scalemail when the situation called for it. Visibility: For hard copies of books the resolution is almost always perfect. It matches the size of the viewer (IE the book's physical size) and thus you can always see a full page at the proper reading size. While the viewing area is often limited on e-readers (I'm rarely displeased with monitors/laptops) the ability to zoom is surprisingly useful, especially for farsighted gamers. Granted, you can zoom with a mundane magnifying lens on a hard copy as well. But ultimately both methods fulfill the need equally to me objectively. I can shrink a window and hold two completely different sources side by side concurrently when not using an e-reader specifically for PDFs. Space: Being able to keep a library in a device the size of a 9v battery is quite handy... But where did you put that book on it? Unless you're a database generating fiend such as myself, you probably just have a big mess of books in one spot with no sorting method in place, which when you're looking at a series of identical icons can get tiresome. Sure hard copies take up space and weight but the visual indexing is powerful as is the mnemonic device of having to sort them as they go on the shelf (if you're even half as compulsive as me when it comes to books) and have at least two senses tied to their shelving - seeing the book slide into space, touching the book (as at least to me different publishers feel different in the slightest ways), maybe even smelling the book as you do. However, searchable indexing on most devices tends to alleviate this issue which is why it shows up in the ""both"" category instead of as a distinct advantage. ",CatLord,https://rpg.stackexchange.com/users/3273,http://rpg.stackexchange.com/questions/34615/what-are-the-benefits-of-owning-a-physical-book,CULTURE,rpg.stackexchange.com 1881,Is it possible to jailbreak an iPad 2 (A1395) after updating to iOS 6.0.1?,"I have a jailbroken iPad 2 (A1395) running Version 5.0.1 (9A405). If I update to 6.0.1, can I jailbreak untethered? Will I have to re-install all my Cydia apps & settings, or do they get backed up and restored? Confused by too many Google results! ",Ze'ev,https://apple.stackexchange.com/users/18438,"This is no longer true; Both answers were written before evasi0n came out. Now it's more than possible to JB 6.x devices, in fact up to 6.1.1/6.1.2. As for backing up, you don't need to back up Cydia - it gets reinstalled anyway. What I would back up are any manually installed (i.e. hackulous-type) apps you may have (cd to /var/mobile/Applications, then do a tar) ",Technologeeks,https://apple.stackexchange.com/users/44246,http://apple.stackexchange.com/questions/79565/is-it-possible-to-jailbreak-an-ipad-2-a1395-after-updating-to-ios-6-0-1,TECHNOLOGY,apple.stackexchange.com 2965,Why did Lucifer interfere with Mammon crossing over?,"Why did Lucifer care about Mammon crossing over from Hell to the real world? Before coming up to drag John (literally) to Hell, he makes a detour and sends his son back to presumably prevent Hell on earth. Why would the master of Hell not want to expand his domain? ",Nick T,https://scifi.stackexchange.com/users/584,"When Angela Dodson visits Constantine in his home, then leaves and Constantine follows her (approximately 36 minutes into the movie), he says the following: Constantine What if I told you that God and the Devil made a wager? A kind of standing bet for the souls of all mankind Dodson I'd tell you to stay on your meds Constantine Humor me. No direct contact with humans, that would be the rule. Just influence, see who would win. Dodson Okay, I'm humoring you. Why? Constantine Who knows? Maybe just for the fun of it, no telling. When Lucifer comes along later on and saves Dodson from Gabriel, he says Lucifer This world is mine, in time. So two reasons here: He wants to win his bet with God, and he wants to stop Mammon from taking over the world, which he considers to be his. ",jono,https://scifi.stackexchange.com/users/11098,http://scifi.stackexchange.com/questions/32585/why-did-lucifer-interfere-with-mammon-crossing-over,LIFE_ARTS,scifi.stackexchange.com 1726,Demonstrating the effect of aliasing,"How does the signal look when we don't use the Nyquist rate to remove aliasing from a signal during sampling? Let's suppose the signal is sinusoidal, with a frequency of 500 Hz and an amplitude of 2. signal = 2*cos(2*pi*500*t) If I sample it, (replacing t=nTs , Ts = sampling period and n represent number of samples) and plotting the sampled signals with a different sampling period using the subplot command in MATLAB, how could I identify the aliasing in a sampled signal? Here is the example code that plotted two signals, one at the Nyquist rate while the other less than the Nyquist rate: A = 2; Fmax = 10; Fs = 2*Fmax; n = 0:1/Fs:1; Cont = A*sin(2*pi*(Fmax/Fs)*n); Cont1 = A*sin(2*pi*(Fmax/18)*n); subplot(2,1,1) stem(n,Cont) hold on stem(n,Cont1) and here is the waveform: I wasn't able to identify the aliasing. How did it affect the signal when Nyquist rate didn't use? ",Sufiyan Ghori,https://dsp.stackexchange.com/users/1324,"You can't identify aliasing with a simple sinusoid at a specific frequency and that in a way is the whole point about trying to avoid it. You can't know if the sinusoid you are ""looking at"" is $Q$ Hz or $2Fs-Q$Hz. A single aliased sinusoidal component looks just like a non-aliased sinusoid. If you want to experience aliasing, you have to attempt it with either a more complex waveform or a sinusoid that is changing in time. One way to ""experience aliasing"" is to undersample a chirp in the following way: Fs = 8000;t=0:(1./Fs):(5-1./Fs);p=2.*pi.*t; %Sampling Frequency, Time Vector, Phase Vector y1 = chirp(t,0,5,Fs/2.0); %Create a chirp that goes from DC to Fs/2.0 spectrogram(y1); %Have a look at it through spectrogram, please pay attention at the axis labels. This is basically going to be a ""line"" increasing with time. soundsc(y1,Fs); %Listen to it...It clearly ""goes up"" in frequency y2 = chirp(t,0,5,Fs); %Now create a chirp that goes from DC to Fs spectrogram(y2); %Have a look at it through spectrogram soundsc(y2,Fs); %Listen to it...Do you ""get"" the folding of the spectrum? In general, you can think of Sampling as Modulation because this is what is effectively happening at the sample and hold element of an ADC converter. This will enable you to understand more easily concepts like undersampling for example (and applications where it is perfectly OK to sample at lower than the Nyquist rates). But also, you can load a WAV file in MATLAB (with 'wavread') containing some more complex signal and prior to listening to it with 'soundsc', simply multiply it with a ""square"" wave* (you might want to lookup function 'square') at some frequency lower than the WAV file's $F_s$. This will effectively introduce the key (unwanted) characteristic of aliasing which is this folding of the spectrum. The result is not very pleasant so you might want to keep your speakers volume down. I hope this helps. *EDIT: Obviously, ""square"" returns a square with an amplitude in the interval [-1,1] so prior to multiplying it with your signal it would be better to rescale it as: aSquareWave = (square(100.*p)+1.0)/2.0 % Where p is the phase vector and here we are producing a square wave at 100Hz (given an Fs of 8kHz as above). aSquareWave's amplitude is now in the interval [0,1] ",A_A,https://dsp.stackexchange.com/users/1212,http://dsp.stackexchange.com/questions/2326/demonstrating-the-effect-of-aliasing,TECHNOLOGY,dsp.stackexchange.com 3396,Create Processing Instruction in BizTalk Map,"I know that in BizTalk maps, you can perserve processing instructions. However, the source XML that I will have will not have any processing instructions. However, I will need to create a processing instruction for the Target XML. I know I can write a custom XSLT to do this, however I would like to avoid that as I have the BizTalk map complete except for this. Can I create processing instructions on the Target XML using only the available functoids in the BizTalk mapper? ",TimWagaman,https://stackoverflow.com/users/1240980,"Other than using XSLT as you've mentioned, there is also an option to do this on the send port: Select the native XmlTransmit send pipeline Add your processing instructions to the XmlAsmProcessingInstructions property as per this example ",StuartLC,https://stackoverflow.com/users/314291,http://stackoverflow.com/questions/13980382/create-processing-instruction-in-biztalk-map,STACKOVERFLOW,stackoverflow.com 4794,Can only access one of the router's web portal and the Internet,"On both wired and wireless connections, I can only access one of 192.168.1.1 (the router web portal) and the general Internet. Which ""mode"" my devices are in is seemingly random. This has persisted so far for 5 days (since I began using this network). When connected to the Internet, I can go to 192.168.102.1 and I see a landing page for ""mikrotik routeros"", but I cannot go to 192.168.1.1. When connected to the router but not the Internet, 192.168.1.1 yields the router web portal, and 192.168.102.1 is inaccessible. Attempted solutions Upgrading router firmware Resetting router to factory settings Rebooting devices Fiddling with router settings (changing wireless security modes, removing wireless security, etc) Upgrading wireless drivers on computers Some data Affects BlackBerry, Windows, Android and Ubuntu devices All devices work properly on other networks Devices may switch modes if they have been offline for a long time (eg: overnight), but restarting a device has no effect Router is TP-Link TL-WR740N v4 Router firmware DD-WRT v24-sp2 (04/18/14) std - build 23919 Both wired and wireless connections are affected, but not necessarily simultaneously I don't know anything about networking, but here's some info that seems helpful taken from my Ubuntu laptop. With internet access (wired in this case, but it varies): ~ $ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.102.1 0.0.0.0 UG 0 0 0 eth0 192.168.102.0 0.0.0.0 255.255.254.0 U 1 0 0 eth0 ~ $ ifconfig eth0 Link encap:Ethernet HWaddr 54:ee:75:0c:02:80 inet addr:192.168.103.232 Bcast:192.168.103.255 Mask:255.255.254.0 inet6 addr: fe80::56ee:75ff:fe0c:280/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3273 errors:0 dropped:0 overruns:0 frame:0 TX packets:3035 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2276482 (2.2 MB) TX bytes:517732 (517.7 KB) Interrupt:20 Memory:f0500000-f0520000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:4315 errors:0 dropped:0 overruns:0 frame:0 TX packets:4315 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:342880 (342.8 KB) TX bytes:342880 (342.8 KB) With ""router access"" (wireless in this case, but it varies): ~ $ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0 192.168.1.0 0.0.0.0 255.255.255.0 U 9 0 0 wlan0 ~ $ ifconfig eth0 Link encap:Ethernet HWaddr 54:ee:75:0c:02:80 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:9422 errors:0 dropped:0 overruns:0 frame:0 TX packets:7545 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:6216683 (6.2 MB) TX bytes:1399280 (1.3 MB) Interrupt:20 Memory:f0500000-f0520000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:4446 errors:0 dropped:0 overruns:0 frame:0 TX packets:4446 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:353415 (353.4 KB) TX bytes:353415 (353.4 KB) wlan0 Link encap:Ethernet HWaddr e8:2a:ea:60:31:4b inet addr:192.168.1.105 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::ea2a:eaff:fe60:314b/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:77013 errors:0 dropped:0 overruns:0 frame:0 TX packets:49506 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:25275438 (25.2 MB) TX bytes:30355132 (30.3 MB) With both (wired with wireless turned on): ~ $ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.102.1 0.0.0.0 UG 0 0 0 eth0 192.168.1.0 0.0.0.0 255.255.255.0 U 9 0 0 wlan0 192.168.102.0 0.0.0.0 255.255.254.0 U 1 0 0 eth0 ",William,https://superuser.com/users/367462,"The fact that your are getting assigned IPs on two different subnets implies you have two DHCP servers on the directly attached network. Usually, I'd recommend using something like dhcp_probe -f eth0 or roguechecker to find out which IPs on your network are serving DHCP but you already know which they are. Namely, 192.168.1.1 and 192.168.102.1. You have two options to get internet connectivity AND be able to connect to the 192.168.1.0 network at the same time. Both will require disabling or removing the DHCP server on 192.168.1.1 and letting 192.168.102.1 assign you an IP for internet access. Methods follow: 1) Add a static routing entry to the linux box that tells it that 192.168.1.0 is directly attached. route add -net 192.168.1.0/24 wlan0 should work for this. 2) Add a static routing entry to the router that tells it 192.168.1.0 is directly attached. This would be specific to your router/firmware, but since you're running DD-WRT you can easily find the information on adding a static route. As a note, your gateway should be 0.0.0.0 for directly connected nets. ",ssnobody,https://superuser.com/users/278912,http://superuser.com/questions/810510,TECHNOLOGY,superuser.com 5220,Will installing Ubuntu using Wubi erase Windows?,"I have an HP laptop with 2 partitions: C: and D:, with windows 7 installed in the C: drive and D: is the Recovery partition. When I try to install Ubuntu 12.04 LTS using Wubi, it only shows the C: drive for installing and not the D: drive where I wanted to format and install ubuntu. So, if I go ahead and install in the C: drive where windows 7 is already installed, would Wubi erase windows 7? Or it will just install Ubuntu as a program in windows? ",James Lang,https://askubuntu.com/users/169863," or it will just install ubuntu as a program in windows?? Indeed. Wubi will install it as a program in Windows. This will make Ubuntu slower and dependent on Windows. If you don't want to install as a program in Windows, you should follow these instructions. ",Jop V.,https://askubuntu.com/users/134848,http://askubuntu.com/questions/312139/will-installing-ubuntu-using-wubi-erase-windows,TECHNOLOGY,askubuntu.com 6904,Decompiler Bytecode and Obfuscators,"Can we completely reverse-engineer the source code from java bytecode ? Why this feature is allowed in Java and How successful are java decompilers against obfuscators.? ",Suraj Menon,https://stackoverflow.com/users/1662935,"you can get source code from binary these days. Although the source code obtained by Java's bytecode is more readable, obfuscating will make it slightly unreadable. Its not that only Java can be reverse engineered to code. Even C/C++ these days (with Hexrays plugin for IDA Pro) can be decompiled to source. Obfuscaters will make it hard to read but not impossible. There is nothing that can save your program from an intelligent and capable reverse engineer. :). Good luck. ",Aniket Inge,https://stackoverflow.com/users/1680957,http://stackoverflow.com/questions/13098606/decompiler-bytecode-and-obfuscators,STACKOVERFLOW,stackoverflow.com 1548,What does mathematics have to do with programming?,"I just started a diploma in software development. Right now we're starting out with basic Java and such (so right from the bottom you might say) - which is fine, I have no programming experience apart from knowing how to do ""Hello World"" in Java. I keep hearing that mathematics is pertinent to coding, but how is it so? What general examples would show how mathematics and programming go together, or are reliant on one another? I apologize of my question is vague, I'm barely starting to get a rough idea of the kind of world I'm stepping into as a code monkey student... ",Rory,https://programmers.stackexchange.com/users/48536,"A problem with your question is that ""mathematics"" and ""programming"" are both very wide and deep subjects about which there is more to know than anyone could master in a lifetime (no exaggeration). I personally hold an MA degree in mathematics. During my time in university, it seemed as if the more I learned, the less I knew compared to my peers; it felt is if I became less intelligent over the years. When I presented my master's thesis to a group of professors, even most of them seemed to be largely unfamiliar with what I studied. Likewise, I am now a database-driven web application developer. If you compared me to someone who does embedded assembler language programming, you might think of us as two very talented professionals, but we would have vastly different expertise even though we're both ""programmers"". As you progress in your study of higher mathematics (beyond freshman calculus), you will find that mathematics instills a discipline for abstract reasoning that will serve you well when you program. I think that this discipline is very important because you will deal with abstract concerns as you program. Sure, in freshman programming, you will likely learn about pointer arithmetic. You will write short programs to illustrate this concept and your understanding of how it drives your computer obey your will. However, learning about how pointer arithmetic works in the abstract will not make you good at using pointers in a real program. When it comes time to take on a mess of 10K lines of code and make some changes to the pointer arithmetic, you will need to be able to reason at a very abstract level, making strategic decisions to balance different concerns about how your changes will affect the code. As a programmer, you must balance ""readability"" of your code, performance of your code, ease-of-use of the resulting programs, among many other concerns. You must be able to make very abstract comparisons to balance these concerns among one another. You will make many of these comparisons every day. I haven't even gotten started about time-management. You will abstractly reason about the probability that something you do will affect your ability to do your tasks on time, and once again, you will make many decisions every day that will affect your work. Finally, you must maintain your philosophical discipline to be able to assimilate new ideas and concepts in order to be able to continue on as old methodologies and practices fall out of use. Once again, you will have to be able to evaluate the ideas that come along and make an abstract comparison to what you already know. In short, programming, as most of us know it, doesn't have a whole lot to do with mathematics, as most of us know it; but when you look at it at an abstract level, they have a lot in common. ",Rice Flour Cookies,https://programmers.stackexchange.com/users/25262,http://programmers.stackexchange.com/questions/136987/what-does-mathematics-have-to-do-with-programming,TECHNOLOGY,programmers.stackexchange.com 1845,What is the best place to start Warhammer 40k?,"I've got three omnibus books containing 9 total Warhammer 40,000 stories. Before I mention which ones I've got, which book would you recommend as a good place to start the series? ",jedihawk,https://scifi.stackexchange.com/users/58,"I have only recently started to read Warhammer 40k. I have read the first two books in the Horus Heresy and although at first I didn't understand some things it then later clarifies. By half way through Horus Rising (the first one) I had a pretty firm grasp on the Warhammer 40k world and found the books easy to understand and read. ",Loken,https://scifi.stackexchange.com/users/19468,http://scifi.stackexchange.com/questions/554/what-is-the-best-place-to-start-warhammer-40k,LIFE_ARTS,scifi.stackexchange.com 8215,Need more memory to install Nova 3 Near Orbit on Samsung Galaxy S2,"I have a Samsung Galaxy S2, running Android 4.0.3. I want to install Nova 3 Near Orbit on this device. I need 2 gigabyte of memory to install the game, but I only have 1.97 gigabytes in total. How can i get the other 3 megabyte? I have 11 gigabyte of space on my phone, and I also have an SD card with 14 gigabyte. ",steven ives,https://android.stackexchange.com/users/27739,"There is no way to add additional RAM to your Android device (as you've tagged your question ""RAM"" I assume you are meaning RAM). So: sorry, you won't be able to solve this. ",Izzy,https://android.stackexchange.com/users/16575,http://android.stackexchange.com/questions/38858/need-more-memory-to-install-nova-3-near-orbit-on-samsung-galaxy-s2,TECHNOLOGY,android.stackexchange.com 5757,Persistent Connection Attempts By Akamai Technologies,"I have seen this question asked in different places, but have never seen a satisfactory answer: On different computer builds, ASUS/GIGABYTE/MSI, I constantly have outgoing connections to XXX-XXX-XXX.deploy.static.akamaitechnologies.com over HTTP Port 80, and if the connection attempts are denied, the network card (or at least internet connectivity) stops working... LAN connections still appear to work. The outgoing connections occur on every restart, and must be allowed for the network card to function properly. If the attempts are denied, the system must be restated so that the connections will be attempted again and can be allowed. This post suggests narrowing down an offending application, but I don't see how akamai technologies can be so intertwined in so many systems, cut-off connectivity if not allowed, etc. Something about it feels like unauthorized (or at least unwanted) information transfer, at the very least a phone-home, but I have no Wirshark captures to confirm this :) My primary guess after looking at all the symptoms: the connection attempt is trying to see if there is internet connectivity, and if the attempt fails Windows assumes there is none... But this sounds really, really dumb. ",user58446,https://security.stackexchange.com/users/61842,"CDNs commonly serve their pages based on the geographical allocation of the ip addresses of the connecting user. You could use a proxy server for all your http requests but directed at a country that is nowhere close to where you are located. At the end of it, if the requests still head off towards those ip addresses, you'll know that something isn't quite right. However, that was a while back. Now CDNs also serve contents such as updates, etc. So if you can corroborate the connection as a valid service for something like Apple updates, especially with real life users, then you can be sure that it is a valid request. ",munchkin,https://security.stackexchange.com/users/64180,http://security.stackexchange.com/questions/79818/persistent-connection-attempts-by-akamai-technologies,TECHNOLOGY,security.stackexchange.com 6900,How do I increase sudo password remember timeout?,"I already know that I need to tune /etc/sudoers file but I would like to see full information and also a solution that would not require me to use vi editor. Update: never, ever try to edit the file with something else than visudo. ",sorin,https://apple.stackexchange.com/users/1916,"Run sudo visudo and add this line: Defaults timestamp_timeout=-1 See man 5 sudoers. -1 causes the password to never timeout. You may change the number to whatever you like in minutes. The man page for sudo says that sudo -v ""extends the sudo timeout for another 5 minutes"". Running 'sudo visudo' instead of editing the file directly causes the system to validate the sudoers file before it commits the changes. For instance, if you leave a stray character somwhere, when you save and exit, it will say ""there is an error in the sudoers file, what would you like to do?"" ... hence giving you a chance to go back in and edit. This actually just happened to me 10 minutes ago. ",lhf,https://apple.stackexchange.com/users/22769,http://apple.stackexchange.com/questions/10139/how-do-i-increase-sudo-password-remember-timeout,TECHNOLOGY,apple.stackexchange.com 8489,A desktop e-mail client for multiple accounts,"Currently, I have 3 different mails (2 private and 1 for work) and I have 3 browsers open at the same time to have access to all of them. I am looking for a desktop application in which I can add my e-mail accounts and can receive there my e-mails. What I want as requirements: Easily respond with the e-mail that I have received a message. For example I don't want to change all the time options with which e-mail I will respond to another one. If someone send me an e-mail to my Gmail, then I will respond with the Gmail account.* Desktop notification for a new e-mail. Free Windows and/or Linux if it is a desktop application User-friendly interface Statistics with graphs for each account *I removed the word ""autorespond"" to avoid any misunderstanding. I don't want to choose each time the account to respond to an e-mail, but I want to respond with the one they send me the e-mail. ",Tasos,https://softwarerecs.stackexchange.com/users/76,"I'll recommend Gmail (though actually I usually use Thunderbird and it would be my first rec but if you want a non desktop client or just to have another answer/option I'll add a GMail recommendation anyways). You can create custom autoresponders. AFAIK Gmail does NOT have any graph generation options With Chrome (and I think Firefox as well now) you can configure Gmail to provide desktop notifications I'd say it is a pretty friendly UI. Pricing: Advertising (minimal text based) supported. (ie free to the end user like you but there are ads). 15GB (and increasing by around 130MB/year) is included for free (shared between Google Drive, GMail and Google Photos). If you need more storage you can purchase that - currently $4.99/month for 100GB or $9.99/month for 200GB. You can check (via) POP3 external accounts and reply as them: ",Nick Wilde,https://softwarerecs.stackexchange.com/users/107,http://softwarerecs.stackexchange.com/questions/1003/a-desktop-e-mail-client-for-multiple-accounts,SCIENCE,softwarerecs.stackexchange.com 549,Adding Properties to User Profile and Displaying in List,"I have a site that I am migrating to WordPress, and I have a need to add properties that each of the users can edit (e.g., Address, City, State, Business Name, etc), along with some properties that Administrators can edit (IsActive, CanEmail) that wouldn't be displayed to the user. In addition, I need to be able to display the properties in a table (similar to how the plugin, ""Members List"", displays, but with the custom fields displaying as well. Given these requirements, I had attempted to use a combination of ""Cimy User Extra Fields"" and ""Members List"", but the members list grid did not have an option to display the extra fields created by the other plugin. How would you recommend I approach this? EDIT: So I guess the crux of my question is, what is the preferred method to add properties to the User? ",Steve Wright,https://wordpress.stackexchange.com/users/1371,"To answer the first part of your question, I have just put my class TTT_User_Profile_Addon on GitHub. The class offers a simple interface to add a field to a profile page. I have added an example for a checkbox subclass and some code to initialize it per functions.php. This works in a plugin too, of course. There are some build in placeholders, but you can add your own. Separate filters for the markup and input values make extending the class easier. You can set custom capabilities for showing and saving the fields per constructor call. The whole work is reduced to a simple init function: add_action( 'init', 'ttt_init_profile_addons' ); /** * Registers the extra fields for the user profile editor. */ function ttt_init_profile_addons() { $GLOBALS['ttt_show_profile'] = new TTT_User_Profile_Checkbox( array ( 'name' => 'ttt_show_profile' , 'label' => 'Show a short profile box on my posts.' , 'th' => '' , 'td' => '<input type=""checkbox"" name=""%name%"" id=""%id%"" %checked% /> %label%' , 'cap_show' => 'edit_posts' , 'cap_save' => 'edit_users' ) ); // add more fields here … } Adding the values to the member table is something I still have on my todo list … Oh, and I should probably mention another class to replace or extend the default contact fields: TTT_Contactfields. This may be a case of OOP overdone. :) ",fuxia,https://wordpress.stackexchange.com/users/73,http://wordpress.stackexchange.com/questions/3255/adding-properties-to-user-profile-and-displaying-in-list,TECHNOLOGY,wordpress.stackexchange.com 5909,How do I make a query for if value exists in row add a value to another field?,"I have a database on access and I want to add a value to a column at the end of each row based on which hospital they are in. This is a separate value. For example - the hospital called ""St. James Hospital"" has the id of ""3"" in a separate field. How do I do this using a query rather than manually going through a whole database? example here ",user2199734,https://stackoverflow.com/users/2199734,"You could do this: update yourTable set yourFinalColumnWhateverItsNameIs = {your desired value} where someColumn = 3 Every row in the table that has a 3 in the someColumn column will then have that final column set to your desired value. If this isn't what you want, please make your question clearer. Are you trying to put the name of the hospital into this table? If so, that is not a good idea and there are better ways to accomplish that. Furthermore, if every row with a certain value (3) gets this value, you could simply add it to the other (i.e. Hospitals) table. No need to repeat it everywhere in the table that points back to the Hospitals table. P.S. Here's an example of what I meant: Let's say you have two tables HOSPITALS id name city state BIRTHS id hospitalid babysname gender mothersname fathername You could get a baby's city of birth without having to include the City column in the Births table, simply by joining the tables on hospitals.id = births.hospitalid. ",Tim,https://stackoverflow.com/users/311343,http://stackoverflow.com/questions/16107941/how-do-i-make-a-query-for-if-value-exists-in-row-add-a-value-to-another-field,STACKOVERFLOW,stackoverflow.com 1445,Can I use a package manager of one distribution on another?,"I want to use Gentoo's packages on Fedora. Is this possible? EDIT: I meant that I want to use Gentoo's portage tree. UPDATE: How about Ubuntu's packages on Fedora? Or Fedora's on Gentoo? Or any other distribution's packages/package manager on another? ",Yktula,https://superuser.com/users/33789,"If you want to use portage to install packages as a user, have a look at Gentoo prefix. It works pretty well for me, but it also tends to need more space than I would like. For system-wide package installation you should take into account that Fedora and Gentoo have totally different ideas about what is a package and how it should be installed -- actually way more different than the difference between deb and rpm files than can be converted and installed to some extent into other distributions. Save yourself the hassle and decide upfront what you want and then go with that. ",Benjamin Bannier,https://superuser.com/users/21992,http://superuser.com/questions/132164,TECHNOLOGY,superuser.com 2635,Key-agreement protocol in a REST API,"I have a C# REST API which exposes some methods over the HTTP protocol. The API is intended to be used my my Android applocation (Java) which is currently in the makings. Since the app is in an early development stage, and hasn't been released yet, I access the API methods using http://example.com/resources/item17 without any additional security. However, as soon as the app is released, I don't want anyone but my app users to access the API. My idea is to generate some kind of unique key in my C# + Android code. A simplified version to give you the idea: int key = DateTime.Now.Minute * Math.PI * 5; This would make the request look something like: `http://example.com/resources/item17?key=1234567` The C# API would verify this before sending a response. The only way to figure out how the key is generated would be to reverse my Android code (which will be obfuscated at that point). Does this sound like a good solution, or do you have any other suggestions? ",Johan,https://security.stackexchange.com/users/31864,"It seems like a motivated person could determine the key if they wanted to. Would it be possible to send a unique key along with each instance of the application when it is downloaded? A GUID or a UUID might be good for this and it would be much harder to predict. When someone downloaded the application you would send that key along with the instance and then insert it into a database that you control. Then when a request is submitted you can confirm that it exists in the database. This would also allow you to track the number of requests coming from a specific key. With the original, any way to identify if the code has be compromised. For example if you have 100 users and are getting 1000 requests a day and then it bumps up to 1100 requests a day that would probably look normal. If you identify the number of requests from each key you can see that normally you get 10 requests a day from each of your keys, but if it bumps up to 1100 requests and a single user goes from 10 to 110 requests, you can probably say that that key was compromised and disable it. ",Abe Miessler,https://security.stackexchange.com/users/5169,http://security.stackexchange.com/questions/43695/key-agreement-protocol-in-a-rest-api,TECHNOLOGY,security.stackexchange.com 72,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? ",Matthew Jones,https://meta.stackexchange.com/users/133611,"145% means that you're 45% better than the average programmer. Congratulations. ",Lance Roberts,https://meta.stackexchange.com/users/13295,http://meta.stackexchange.com/questions/24964/why-is-my-cv-145-complete,TECHNOLOGY,meta.stackexchange.com 3856,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) { B = ""../Images/GreenButton.png"" ; MO = ""../Images/GreenButtonMouseOver.png"" ; color1 = ""#66FF33""; color2=""#000000""; color3=""#000000""; color4=""#000000""; color5=""#000000""; //==================================================================================================================== // Check User Defined States By Rule //==================================================================================================================== if ( Status4 ) { B=""../Images/BlueButton.png""; MO=""../Images/BlueButtonMouseOver.png""; color1=""#FFFFFF""; } if ( Status32 ) { B=""../Images/LightGreenButton.png""; B=""../Images/LightGreenButtonMouseOver.png""; C1color=""#000000""; } if ( Status2 ) { B=""../Images/YellowButton.png""; MO=""../Images/YellowButtonMouseOver.png""; C1color=""#000000""; } if ( Status1 ) { B=""../Images/OrangeButton.png""; MO=""../Images/OrangeButtonMouseOver.png""; C1color=""#000000""; } if ( Status8 ) { B=""../Images/RedButton.png""; MO=""../Images/RedButtonMouseOver.png"";C1color=""#FFFF00""; } if ( Status16 ) { B=""../Images/PurpleButton.png""; MO=""../Images/PurpleButtonMouseOver.png""; C1color=""#000000""; } document.write( ""<td ONCLICK=\""Jump('""+Link+""')\""onmouseover=\""this.style.cursor='hand'\"" height='37' width='350' background='""+B+""' ><font color='""+color1+""'><p align='center'><b>""+T+""</b></td>"" ); ",chriswiec,https://stackoverflow.com/users/2571339,"Finally figured it out here is what I had to do pretty simple, it just took 3 days of trying functions, using stylying sheets then I got this! Thanks everyone for their help I upvoted all for contributing! document.write( ""<td ONCLICK=\""Jump('""+Link+""')\"" onmouseover=\""this.style.background='url(""+M+"")'; this.style.cursor='pointer';\"" onmouseout=\""this.style.background='url(""+B+"")';\"" onmousedown=\""this.style.background='url(../Images/Gold-360-ButtonMouseOver.png)'\"" height='25' width='350' background='""+B+""' ><p align='center'><font color='""+C1color+""'><b>""+T+""</b></td>"" ); ",chriswiec,https://stackoverflow.com/users/2571339,http://stackoverflow.com/questions/18012530/on-mouse-over-background-change-in-document-write,STACKOVERFLOW,stackoverflow.com 8360,How do Future Bill & Ted know Rufus' name?,"In Bill and Ted's Excellent Adventure, we never see Rufus introduce himself to Bill and Ted. Instead, Future Bill says to Present Bill and Present Ted: ""Listen to this dude, Rufus. He knows what he's talking about."" How did Future Bill know what Rufus's name was? Did he read it in the history books? This has been on my mind for a while. ",Trav Lane,https://scifi.stackexchange.com/users/16048,"Time loops are always tricky. We have a couple of possibilities here: 1) The Future Bill & Ted we see never met their future selves (this theorizes that the Future Bill & Ted we see is the first copy who initially enter the loop). In this scenario, Rufus had to have introduced himself to them. Or did he? 2) The Future Bill & Ted we see met their future selves and are told Rufus' name. But this assumes that someone, at some point is introduced to Rufus - and NOT by any version of Bill & Ted. Two people meet him - and refer to him by name - and are NOT introduced to Rufus by any version of Bill & Ted: the princesses. Ted: We looked all over England for you. Bill: Where'd you get those savory clothes? Elisabeth: Rufus introduced us to a place called the mall. Flora: And something called credit cards. Rufus: I got them out of England just before they had to marry those royal ugly dudes. Rufus was not in England with Bill & Ted. He went there separately to rescue them and by this point has clearly introduced himself by name to them. So even if Rufus never introduced himself to the original Bill & Ted, they still learn his name from the princesses. ",phantom42,https://scifi.stackexchange.com/users/5184,http://scifi.stackexchange.com/questions/38298/how-do-future-bill-ted-know-rufus-name,LIFE_ARTS,scifi.stackexchange.com 690,"Knowing C++, how long does it take to learn Java?","I am a competent C++ developer. I understand and use polymorphism, templates, the STL, and I have a solid grasp of how streams work. For all practical purposes, I've done no Java development. I'm sure some of you were in a similar situation at one point when you had to learn Java. How long did it take you to become a competent Java programmer? ",Dan Hook,https://stackoverflow.com/users/86924,"I think there are two approaches to meaning of term ""competent Java programmer"". If it is about lexems, syntax and terms of OOP I began to completly understand Java before 2 (two) days of learning. But firstly you will be charmed by impossibility to shoot your own leg ;) But if it is case of embeded class system (i.e. packages), APIs references, tips-and-tricks and etc., it takes about half-year to feel yourself friendly with Java. I think. ",Eskat0n,https://stackoverflow.com/users/78316,http://stackoverflow.com/questions/719124/knowing-c-how-long-does-it-take-to-learn-java,STACKOVERFLOW,stackoverflow.com 5940,How adding one more electron increases the ionization energy?,"Elements of group 6A, compared to 5A, require less ionization energy due to the paired electrons of 6A. But a question arises: why does group 7A, compared to group 6A, require more ionization energy in spite of the paired electrons in group 7a too. Regardless of the general trend that the ionization energy increases as we go from left to right in periods, why didn't we apply the same procedure as the first comparison? ",user14840,https://chemistry.stackexchange.com/users/14840,"Elements of group 6A (also called group 16) require less ionization energy than group 5A (group 15) elements because group 5A elements have a half filled p-orbital. Group 7A (group 17) DOES NOT have paired electrons. Ionization energy of group 7A elements is more than that of group 6A elements due to higher effective nuclear charge on group 7A elements. ",Binary Geek,https://chemistry.stackexchange.com/users/13357,http://chemistry.stackexchange.com/questions/27411/how-adding-one-more-electron-increases-the-ionization-energy,SCIENCE,chemistry.stackexchange.com 5110,Is this strengthening of paracompactness known?,"Consider a topological space $X$. What can be said about the following property? For any open cover $\mathcal U = \{ U_i \}_{ i \in I }$ of $X$, there exists an open refinement $\mathcal V = \{ V_j \}_{ j \in J }$ such that any set $V \in \mathcal V$ of the refinement intersects only finitely many other sets of $\mathcal V$. This property is stronger than paracompactness, but is it weaker than compactness? Does it hold on topological manifolds (which are paracompact and second-countable)? ",shuhalo,https://math.stackexchange.com/users/3557,"This property has been called hypocompactness; it is strictly weaker than compactness and strictly stronger than paracompactness. The Sorgenfrey line is hypocompact but not compact: every open cover has a disjoint clopen refinement. Any hedgehog space $X$ of uncountable spininess is an example of a paracompact space that is not hypocompact. $X$ is metrizable, so it’s paracompact. If $X$ has spininess $\kappa$, $p$ is the centre point of the hedgehog, the points at the ends of the spines are $q_\xi$ for $\xi<\kappa$, and the metric $d$ is as in the linked article, the open cover $$\left\{B_d\left(p,\frac23\right)\right\}\cup\left\{B_d\left(q_\xi,\frac23\right):\xi<\kappa\right\}$$ has no open refinement that is star-finite at $p$. Added: Henno reminds me that I forgot to answer the last question. Paracompact Lindelöf spaces are hypocompact, so separable metric spaces are hypocompact. ",Brian M. Scott,https://math.stackexchange.com/users/12042,http://math.stackexchange.com/questions/1124179/is-this-strengthening-of-paracompactness-known,SCIENCE,math.stackexchange.com 4055,How to add a website to Safari Top Sites manually?,"How to add a website to Safari Top Sites manually instead of viewing it so many times that Safari chose it for you? ",Ave Maleficum,https://apple.stackexchange.com/users/35562,"You can add it by dragging URL to top sites window. ",maseth,https://apple.stackexchange.com/users/36467,http://apple.stackexchange.com/questions/84565/how-to-add-a-website-to-safari-top-sites-manually,TECHNOLOGY,apple.stackexchange.com 4833,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 playing guitar and having both recorded with the one mic)? What are they? I'm most interested in a mic for case (3). This is obviously not professional, I just want something with passable quality and not too much noise considering I'll be in a random room in a house or apartment. What kind of things should I look for in a mic to achieve that? What are the factors that most depend on price? (If it's feasible I'd like to try to fit it into my $50 contest reward.) There are a few terms I saw like ""moving coil"", ""condenser"", and ""dynamic"" that I saw used to describe mics. If you could touch on these and any other relevant terminology that would be awesome. ",Matthew Read,https://music.stackexchange.com/users/28,"Guitar-and-vocal studio and live micing has been studied heavily, yet while there are a lot of recommendations, perhaps the foremost among them is ""experiment"". Now, that advice is generally aimed at the professional recording engineer or home studio enthusiast, with a locker full of microphones to choose from. Someone looking to buy their first mike, like yourself, is going to need a good way forward, so the mikes you buy will be well-suited to the task. Probably the most common technique for studio recording of a guitar, because it's very simple, is to take one large-diaphragm side-address cardioid condenser microphone, like an AT4040 (about $300, well-known and respected among pros), and position it between 6 inches and a foot away from the guitar, pointed somewhere between the neck/body joint and the octave marker on the fretboard: This is a single ""close-mic"" approach; it'll get you a bit of everything, from the actual strings' brightness to the deep resonance of the body chamber, to the sounds of you actually playing the thing, moving your hands and fingers around. You can experiment with exactly where the mic is; in the image, it's moved up in the direction of the neck, but still pointed at the neck/body joint. This gets the mic out of the way of the performer and anyone who may be watching his hands. You can do the same thing with a small-diaphragm condenser as well, but the large-diaphragm will be more sensitive, so you can back it away and reduce the proximity effect and the amount of string noise, while still getting a sound that fills your ear instead of sounding like the microphone's all the way across the room. Another very common technique is the XY-pair. This approach is designed to mimic the way your ears would hear the guitar if you stood in front of it. Same basic placement, but instead of one large-diaphragm condenser, use two small-diaphragm ""cigar mikes"", like Rode NT5s ($430 for a matched pair; generally well-liked in their price range though there are many others to choose from), arranged at 90* to each other and 45* offset from whatever you're pointing it at: This arrangement is the most straightforward way to get a stereo recording of just about anything; one mike is your left ear, the other is your right, and there will be a natural amount of crossover between the two, which you can play with using the channels' pan knobs on the mixer to create a ""wide"" (""left"" mic panned hard left, ""right"" mic panned hard right) or ""narrow"" ( both mics close to center) stereo image. The nice thing about either of these setups is that these mikes are just as good for the human voice as they are for guitar; they need to capture all the same frequencies in about the same overall balance, at about the same dynamic levels. So, once you have the mikes positioned well for the guitar, just start singing, and make minute adjustments as needed to get more or less of your voice. You can provide another condenser of just about any type (side-address, handheld, cigar) specifically for vocals. However, caveat soundman; first, the more mikes you have, the more effort you spend and the less success you have isolating their sound sources (the vocal mike will pick up some guitar and the guitar mike will pick up some vocals). Second, more mikes == more $$$. I'm recommending mikes that are expensive but a good value; you want these mikes, and not their cheaper lookalikes, but the money will mean that you get fewer of them, so I'm encouraging you to use fewer mikes for more purposes, instead of buying a cheap-sounding mike to point at everything you might ever want to record separately. There are other, slightly more esoteric setups for micing. You may hear of the ""mid-side"" setup; it's one cardioid cigar mike pointed at the neck joint, with a second side-address mic with a ""figure-8"" pattern right underneath or behind it, with the travel of the diaphragm positioned parallel to the fretboard. The figure-8 pattern mic's signal is then split into two channels, one out-of-phase with the other, and when you bring it all back together in the mixer, the result is a stereo image that you can ""narrow"" or ""widen"" by adjusting the out-of-phase channel's fader. Other setups find ""sweet spots"" on the surface of the guitar's soundboard and close-mic them with cigar mikes, or seek to capture what the guitarist hears from his/her instrument with an ""over-the-shoulder"" mic (hey, if the guitar didn't sound good to you while you played it in the store, you wouldn't have bought it, right?), all very similar to approaches seen for other instruments. Exactly what you want to do will determine the mics you will want to use to do it. Personally, I would go with a pair of cigar mikes, because they're extremely versatile; they can go places a larger mike can't, and you can point them at almost anything and get a good sound. Most of the common mic setups use at least one cigar mic. In addition, they're commonly used for all sorts of acoustic instrument recording, from guitars to solo strings and winds, and they also work well for drums. The side-address condenser would have many of the same purposes, but with only one mic, you're recording in mono; however, that same single mike would be better than the cigar mikes for solo voice in a studio environment, and many side-address mikes can be set to different response patterns such as cardioid, figure-8 or omni. So, if you want one single do-it-all for home recording, I'd choose a side-address. Now, for live amplification, these same techniques won't be as useful; they may still work if you're careful, but a sensitive studio condenser mic will start giving you problems when you put it in the same room as the speakers hooked up to the mixer. Such is the nature of live sound; your subject is no longer sitting in an isolated, reverb-dampened booth, but on an open stage, with main and monitor speakers, and the walls of the venue, sending his sound right back at him. In these situations, usually a sound engineer's primary concern is getting the volume he needs out of the mains without feedback, and that means rejecting ""off-axis"" sound sources using narrower mic response patterns like cardioid/supercardioid, or less sensitive microphones like dynamic mikes or small-diaphragm condensers as compared to side-address mikes. ",KeithS,https://music.stackexchange.com/users/766,http://music.stackexchange.com/questions/8312/what-should-i-look-for-in-a-recording-microphone-for-personal-use,LIFE_ARTS,music.stackexchange.com 5887,Unusual Differential Equation,"I have the differential equation $$y''y+n(y')^2=0\tag 1$$ I haven't found any references to equations of this type by searching. Does anyone have a suggestion as to how to proceed? It comes about from the following progression: $$y=(y')^n-\frac 1n\tag 2\\ y'=ny''(y')^{n-1}\implies1=ny''(y')^{n-2}\\ 0=n(n-2)(y'')^2(y')^{n-3}+ny'''(y')^{n-2}\\ 0=(n-2)(y'')^2+y'''y'$$ Taking $y$ in place of $y'$ and $n$ in place of $n-2$ I get the form shown in $(1)$. Are there any good ways to solve any of the other intermediate forms, or even the initial form shown in $(2)$? Further constraints: $y(0)\approx 1.27$ is an otherwise-unknown constant that I am attempting to build an expression for. The initial problem is the recurrence relation with $a_1\approx 1.27$ the unknown constant and $$a_{n+1}=(a_n)^{n+1}-\frac 1{n+1}$$ with the additional constraint $\lim_{n\to\infty}a_n=1$. ",abiessu,https://math.stackexchange.com/users/86846,"hint: as long as $yy' \ne 0$ you can divide through by it, giving: $$\frac{y''}{y'} + n\frac{y'}{y} = 0 $$ giving $ln\; y' = -n \;ln \; y + c$ ",David Holden,https://math.stackexchange.com/users/79543,http://math.stackexchange.com/questions/583334/unusual-differential-equation,SCIENCE,math.stackexchange.com 4919,possible different ways to get the kanto starters and ways to get fossils in x and y,"hi there I was wondering if you guys would happen to know the most effective ways to get the kanto starter pokemon because using friend safari seems kind of ineffective and slow. also how would one obtain fossils aside from the original glittering cave ones thanks ",that guy,https://gaming.stackexchange.com/users/79887,"Just go to the Glittering Cave and grind for fossils in the big boulder room. ",Link,https://gaming.stackexchange.com/users/83351,http://gaming.stackexchange.com/questions/173022/possible-different-ways-to-get-the-kanto-starters-and-ways-to-get-fossils-in-x-a,CULTURE,gaming.stackexchange.com 5908,Undefined offset 1,"Undefined offset: 1 Hello ... I am facing a problem that undefined offset :1 in line 3. I can't understand that what type of error it is. Can anyone tell me that why such error occurs in php Undefined offset in line : 3 foreach ($lines as $line) { list($var,$value) = explode('=', $line); //line 3 $data[$var] = $value; } ",tushAR,https://stackoverflow.com/users/2016096,"Your are getting PHP notice because you are trying to access an array index which is not set. list($var,$value) = explode('=', $line); The above line explodes the string $line with = and assign 0th value in $var and 1st value in $value. The issue arises when $line contains some string without =. ",Nauphal,https://stackoverflow.com/users/932319,http://stackoverflow.com/questions/16728268/undefined-offset-1,STACKOVERFLOW,stackoverflow.com 9135,Ensuring successful merges in Subversion,"Subversion Re-education actually convinced me, but for now I'll stick to svn - mastering the use of a very popular tool can't be bad. To date I've not used branching/merges in production code, now I decided to give it a try in a small team environment. I'm afraid of suffering the same pain as the described in Spolsky's article. Is there a ""right"" way of working with branches in svn? ",vemv,https://programmers.stackexchange.com/users/24071,"The most important part of working with Subversion branches is to merge from trunk often. Daily at a minimum, more if possible. The converse is also true - merge to trunk often - once features can go to trunk, merge them. The more branches diverge from each other, the more merging becomes hell. The longer you take between merges, the more files you will have to merge, the more chances of conflicts and the more chances that people will not recall the details of changes (meaning that making the right call on a conflict can become very difficult). You will also need to decide on a branching strategy - this is not something that you will need to tailor to your team and workflow and will probably need to tweak as you go along. Interesting presentation here (pdf). ",Oded,https://programmers.stackexchange.com/users/4767,http://programmers.stackexchange.com/questions/117938/ensuring-successful-merges-in-subversion,TECHNOLOGY,programmers.stackexchange.com 5667,How do I find which elements in one array aren't in another?,"I am new to programming and hence I am stuck on a basic level problem. Following is code I wrote for comparison. But the result I get does not make sense to me. I would appreciate if someone could tell me what is going wrong. There are two arrays: @array1 , @array2 of unequal length. I wish to compare both and list down values not present in @array1. my %temp = map {$_,$_}@array2; for (@array1){ next if exists $temp{$_}; open (FILE, "">>/filename"") or die ""$!""; print FILE ""$_\n""; close(FILE); } ",birdy,https://stackoverflow.com/users/131194,"If you're doing this for a test, which I assume you are I would highly suggest is_deeply in the newer versions of Test::More You'll have to update Test::More cpanp install Test::More or if you're on perl 5.5 cpan Test::More Then you'll have use it use Test::More; tests => 1 is_deeply ( \@arr1, \@arr2, 'test failed' ); If you're not doing this for testing, but you're doing this for introspective purposes and the arrays are small, I'd suggest using XXX: cpanp install http://search.cpan.org/CPAN/authors/id/I/IN/INGY/XXX-0.12.tar.gz Then you'll have use it use XXX; YYY [ \@arr1, \@arr2 ]; ",Evan Carroll,https://stackoverflow.com/users/124486,http://stackoverflow.com/questions/1759418/how-do-i-find-which-elements-in-one-array-arent-in-another,STACKOVERFLOW,stackoverflow.com 1658,Different tyre width (front and back),"Out of necessity, I had to put an 1.26"" (32mm) rear tyre on my bike where the front tyre is only 1.1"" (28mm) wide (and the bike came with 1.1"" tyres when I bought it). Are there any advantages or disadvantages of this, shall I try to get an 1.1"" tyre for the rear wheel ASAP or is it safe this way? ",Tamás,https://bicycles.stackexchange.com/users/482,"Should be perfectly safe. I actually did a similar thing on my road bike to allow a little more cushion in the rear, for my rear. The only hassle I can see is if you have to carry two different tubes. Can't remember off the top of my head if you can get some that span those two sizes. ",sillyyak,https://bicycles.stackexchange.com/users/1089,http://bicycles.stackexchange.com/questions/3727/different-tyre-width-front-and-back,CULTURE,bicycles.stackexchange.com 1350,Caucasus: end overland trip where I started without retracing my steps,"I'm looking into a Caucasus trip visiting Turkey, Georgia and Armenia. A return flight from IST is far cheaper than a multi-city flight, so I'd like to get back to Istanbul without going over the same route I came in (through Georgia, which as I understand seems to be the only way to get to Armenia from Turkey) Given local neighbour relations, what path can I take that includes all three but doesn't repeat any part of the journey ? To return from Armenia, I see two equally unreliable options: Getting an Azerbaijan transit visa and crossing Naxchivan, but the Armenia-Azerbaijan border is apparently closed, and I'm afraid an Armenian stamp in my passport could complicate this passage. The Armenia-Azerbaijan border is closed, so that settles this issue. Getting an Iranian visa in Georgia then boarding the Tehran-Istanbul train. This is risky as Canadian-Iranian relations aren't super right now, I've heard of people being denied visas. ",blackbird,https://travel.stackexchange.com/users/9551,"I've done this at least twice and there's a new way now since I was last there. Basically there were two border crossings between Turkey and Georgia, but a third one has now opened too. The only problem is how adventurous you are. Because there is only public transport across the major cross on the Black Sea. I've crossed from Georgia to Turkey twice from Vale to Posof. It always feels like adventure. The first time I was hitchhiking solo and the second time I was hitchhiking with two Chileans I met in Tbilisi who had never hitched before. There were no other backpackers either time. The first Turkish town is not so close and there are no buses but I always got a ride pretty quickly because Turkish people are extremely hospitable and kind to travellers. This route continues on to Kars if that interests you. I got invited home by a local family for Iftar and to stay the night. They're even more hospitable during Ramadan! (-: Just recently I learned that the border crossing at Kartsakhi is now open too so next time I would love to try entering Turkey that way. If you're a bit hardcore but less hardcore than me you can ask around and probably hire taxis at the two remote border crossings, especially if you plan it in advance. ",hippietrail,https://travel.stackexchange.com/users/140,http://travel.stackexchange.com/questions/49913/caucasus-end-overland-trip-where-i-started-without-retracing-my-steps,CULTURE,travel.stackexchange.com 8311,"Meaning of 'on' in ""We feasted that evening as 'on' nectar and ambrosia"""," “I meant to give each of you some of this to take with you,” said she, “but as there is so little toast, you must have it now,” and she proceeded to cut slices with a generous hand. We feasted that evening as on nectar and ambrosia; and not the least delight of the entertainment was the smile of gratification with which our hostess regarded us, as we satisfied our famished appetites on the delicate fare she liberally supplied. (Jane Eyre) What’s the meaning of ‘on’? ",Listenever,https://ell.stackexchange.com/users/504,"I think the key word here is as, actually. The word as lets you know that it's a simile; the word on is just the preposition in the phrase ""feast on [something]"". It means the same thing as if these words were inserted: We feasted [on the food we had] that evening as [we would] on nectar and ambrosia [...] ",snailplane,https://ell.stackexchange.com/users/230,http://ell.stackexchange.com/questions/3393/meaning-of-on-in-we-feasted-that-evening-as-on-nectar-and-ambrosia,CULTURE,ell.stackexchange.com 5275,Front wheel shudder on Cyclocross brakes,"I have a Javelin Primitivo with cantilever brakes. My front fork is carbon. When I brake the front wheel will ""shudder"". I replaced my wheels and adjusted my brakes (toed them in). I have even tried my road bike wheels. Any thought on solving this? I would like to upgrade my brakes but I want to keep the option for my wide tires. ",brentwpeterson,https://bicycles.stackexchange.com/users/9039,"The stutter comes from the way the brakes are actuated. From the picture on Javelin's site I see that the housing is held at the top of the head-tube. When you brake the fork flexes backwards causing the cable's tension to change. The brakes will be slightly released causing to fork to move again, re-tightening the brakes, pushing the fork backwards. This happens in quick succession thus the brake stutter. The way to cure it is to move the attachment of the cable-housing to the crown of the fork. There are front cable hangers that can be screwed to the hole where a side-pull brake would be attached. Google for 'Front Cable Hanger Fork Mount' ",Carel,https://bicycles.stackexchange.com/users/10401,http://bicycles.stackexchange.com/questions/24189/front-wheel-shudder-on-cyclocross-brakes,CULTURE,bicycles.stackexchange.com 1867,"Centering on the decimal separator, figure font selection","I'd like to format a column with numbers with a decimal point. In my body text I use old-style figures for numbers, and lining figures in equations. If I use dcolumn my tables use lining figures, instead of old-style figures. I've fiddled around with the definitions in dcolumn.sty already, but it seems to rely on math mode to get the dot 'right', so removing all the $-characters leads to breakage. Temporarily changing the math font to use old-style figures seems to be a pretty difficult thing as well, this is all set up during the loading of the font package... Using siunitx with \sisetup{mode=text} I do get old-style figures, but then \figureversion{tab}, which I use to switch to tabular figures, is ignored, and the figures also don't line up nicely. Does anyone have a good suggestion to either use dcolumn in non-math mode, or to get siunitx to use old-style tabular figures? A minimal example, using siunitx: \documentclass{standalone} \usepackage[mathlf]{MinionPro} \usepackage{siunitx} \sisetup{mode=text} \begin{document} {\figureversion{tab} \begin{tabular}{SSS[table-format=4.1]} {A wide heading} & $x$ & {more data} \\ 14.1 & 14.1 & 1111.1 \\ 1.674 & 1.671 & 4882.8 \\ \end{tabular}} \end{document} ",Michel,https://tex.stackexchange.com/users/4086," \documentclass[12pt]{standalone} \usepackage{dcolumn} \makeatletter \newcolumntype{O}[3]{>{\everymath{\mathgroup\symletters}\DC@{#1}{#2}{#3}}c<{\DC@end}} \makeatother \begin{document} \begin{tabular}{cO..{-1}D..{-1}} zzzz & 1.1 & 1.1\\ zzzz & 1.12 & 1.12\\ zzzz & 2341.1 & 2341.1\\ zzzz & 1.1043 & 1.1043 \end{tabular} \end{document} ",David Carlisle,https://tex.stackexchange.com/users/1090,http://tex.stackexchange.com/questions/167822/centering-on-the-decimal-separator-figure-font-selection,TECHNOLOGY,tex.stackexchange.com 4474,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. ",Louis Rhys,https://programmers.stackexchange.com/users/8486,"Any decent quality Work-Life Balance courses, workshops, or even books can be helpful to stress the importance, and remind us (all of us) how important it is in the long run to maintain a balanced life so we don't end up burnt-out, divorced, and suffering from major depressive disorder alone and laid off. In poor economic times it may be even more important, because of the tremendous pressure to cheat ourselves of this balance for what is typically a false hope of security (if the situation are really that precarious, it will mostly eventually fail anyhow). Avoid any training or seminars that are too gimmicky, or quick-fix oriented, but simple common-sense oriented balance is the best bet in my opinion. ",mctylr,https://programmers.stackexchange.com/users/11206,http://programmers.stackexchange.com/questions/31567/important-non-technical-course-for-programmers,TECHNOLOGY,programmers.stackexchange.com 8998,in hibernate4.1.9 buildsessionfactory method is deprecated so why serviceRegistry is paased to buildsessionFactory,"in hibernate4.1.9 buildsessionfactory method is deprecated so why serviceRegistry is passed to buildsessionFactory ",Mangesh,https://stackoverflow.com/users/2107283,"like this? public class Util { private static SessionFactory sessionFactory; private static ServiceRegistry serviceRegistry; public static SessionFactory configureSessionFactory() { Configuration configuration = new Configuration(); configuration.configure(); serviceRegistry = new ServiceRegistryBuilder().applySettings( configuration.getProperties()).buildServiceRegistry(); sessionFactory = configuration.buildSessionFactory(serviceRegistry); return sessionFactory; } } ",KangHouchao,https://stackoverflow.com/users/2332539,http://stackoverflow.com/questions/15109280/in-hibernate4-1-9-buildsessionfactory-method-is-deprecated-so-why-serviceregistr,STACKOVERFLOW,stackoverflow.com 6897,Is it appropriate to e-mail a researcher asking about progress on a follow-up paper?,"Recently, I saw an online presentation by a researcher and professor regarding a series of recently published papers. At the end, she mentioned she was working on a follow-up paper, regarding such and such... I have checked for it, and it has still not been published. Perhaps it was a dead-end, and abandoned. Would it be appropriate to ask the professor about the progess made, and whether it has been abandoned, or when it will be published? ",JNS,https://academia.stackexchange.com/users/15736,"Certainly this is appropriate, especially if you indicate who you are and why you are interested. Researchers are interested in spreading their results far and wide to get citations. The worst that can happen is that the research is not yet quite publication-ready, and the author prefers not to share it yet, to avoid academic claim-jumping. If so, you may get exactly this explanation, or no answer at all. The best, conversely, would be that this could actually lead to a fruitful discussion and/or even collaboration. ",Stephan Kolassa,https://academia.stackexchange.com/users/4140,http://academia.stackexchange.com/questions/21577/is-it-appropriate-to-e-mail-a-researcher-asking-about-progress-on-a-follow-up-pa,LIFE_ARTS,academia.stackexchange.com 2197,Expectation of drawing the second color from an urn,"My urn contains 3 red, 2 green and 1 white ball. I pick a ball with replacement until I pick the second color. What is the average number of picks for picking the second color? With the expected value formula I got the following. $EX=\sum\limits_{k=2}^\infty k[\frac{1}{2}r^{k-1}+\frac{2}{3}g^{k-1}+\frac{5}{6}w^{k-1}]$ Where r, g and w are the probabilites of drawing a red, green, or white ball. I don't know how to calculate this sum, and I am not sure this is the right way to solve this excercise. ",user010010001,https://math.stackexchange.com/users/137425,"We discuss the probability based on the color of ball you first picked up. Then you continue to pick up the same color for totally $k-1$ time until you pick up another color at $k$th. $E(X)=\sum\limits_{k=2}^\infty k[(\frac{1}{2})^{k-1}\frac{1}{2}+(\frac{2}{6})^{k-1}\frac{4}{6}+(\frac{1}{6})^{k-1}\frac{5}{6}]$ To calculate the sum, the easiest way is to make use of the fact: for $|r|<1$, $\sum\limits_{k=0}^\infty r^k=\frac{1}{1-r}$. Differentiate both sides, $\sum\limits_{k=1}^\infty kr^{k-1}=\frac{1}{(1-r)^2}$. Then $\sum\limits_{k=2}^\infty kr^{k-1}=\frac{1}{(1-r)^2}-1$ ",John,https://math.stackexchange.com/users/105625,http://math.stackexchange.com/questions/970034/expectation-of-drawing-the-second-color-from-an-urn,SCIENCE,math.stackexchange.com 1748,"Why isn't ""Column ordering"" available in my list settings?","I want to change the column order visible when viewing or editing a list item. I have accessed the ""Column ordering"" interface via the list settings page on other lists in the past, but it isn't visible in this list's settings. Cheers! ",Pete,https://sharepoint.stackexchange.com/users/6300,"If you have Content Type management enabled for the list (if you see a list of content type with the option to add more), the display order of columns is set for each content type. Drill down into one of them and you'll see the option under the list of columns for that content type. ",Louis,https://sharepoint.stackexchange.com/users/6551,http://sharepoint.stackexchange.com/questions/29643/why-isnt-column-ordering-available-in-my-list-settings,TECHNOLOGY,sharepoint.stackexchange.com 6298,My MacBook Air won't connect to wifi,"I bought a new MacBook Air and was able to connect to the internet at first but now it won't connect. I have other devices as well as other computers on wifi but my Mac won't connect. When I try and click on the wifi, it tells me that it can't be joined. How can I troubleshoot? ",Jason,https://apple.stackexchange.com/users/127879,"Option click the wifi icon in the menu bar and select Wireless Diagnostics. Follow the instructions and post a second question if you get stuck with a specific step or can't narrow down the issue. Also, carefully read the help guide on how to be specific and show how your research such as what version of OS X and what router is not working as expected. ",bmike,https://apple.stackexchange.com/users/5472,http://apple.stackexchange.com/questions/187174/my-macbook-air-wont-connect-to-wifi,TECHNOLOGY,apple.stackexchange.com 1235,Results with and without interaction,"I'm working on an analysis with another person. First we did a logistic regression with study group and variable X. They were both significant. Then we added the interaction between study group and X only the study group and the interaction were significant. Actually, there are 3 groups and only one of the groups and one of the group*X interactions is significant. I am having a hard time to convince this person that we should not present the odds ratios for X from the first analysis that do not account for this interaction. This person thinks that we can show the results of the first analysis AND then the second analysis. I think this is misleading and will confuse people. I am not the best at explaining things (as you can tell), so any help with how to argue my point would be appreciated. ",SB3,https://stats.stackexchange.com/users/42351,"The interaction means the effect to X in the response Y is different in the categories defined by the Group variable. Sometime it is useful to do a stratified analysis, by Groups, where you analysis the effect of X in Y in each group. You should see the effects are different. You could present these stratified analysis and show the P-value of the interaction for justify the stratification. ",Jesus Herranz Valera,https://stats.stackexchange.com/users/15980,http://stats.stackexchange.com/questions/115152/results-with-and-without-interaction,SCIENCE,stats.stackexchange.com 9097,WinJs: How to navigate to another start page programatically?,"Let's say I want to display a login screen before going into the app's main screen This does not work and I don't understand why: default.js var p = WinJS.UI.processAll().then(function () { WinJS.Navigation.navigate('/pages/login.html'); }); ",Alex,https://stackoverflow.com/users/2413469,"WinJS.Navigation.navigate is merely a mechanism to raise navigation events. Some other piece of code has to handle those events to do the actual page loading. Without such code, the WinJS.Navigation APIs do nothing on their own. With the usual Store app templates in Visual Studio, there's a navigator.js file that provides this boilerplate code and works with pages you've defined with WinJS.Pages.define. If you are using navigator.js already, then check that the path you give to navigate exactly matches a path given to WinJS.Pages.define. If there's a mismatch, the page will fail to load. I'd point you to the MSDN docs on doing page navigation, but all of that's moving around in advance of Windows 10 so the links I know about are broken. But you can refer to Chapter 3 of my free ebook, Programming Windows Store Apps with HTML, CSS, and JavaScript, 2nd Edition, for all the details. ",Kraig Brockschmidt - MSFT,https://stackoverflow.com/users/1342405,http://stackoverflow.com/questions/31522108/winjs-how-to-navigate-to-another-start-page-programatically,STACKOVERFLOW,stackoverflow.com 286,How to increase difficulty in Dungeon World,"I've been GMing for a couple of sessions now and I'm still struggling at making encounters or situations more difficult. I will describe dangerous situations and encounters in fiction but the mechanics make it too easy for my players to succeed. For instance no matter how big I describe the Troll, if the fighter of the party charges him and swing his sword, roll+2 for Hack and slash, he'll easily hit the troll. Almost 40% chance to hit without consequences. ",MrJinPengyou,https://rpg.stackexchange.com/users/4000,"The narrative at hand is a perfect reason to make things difficult for the player. You should always ask questions like crazy, ie. ask for justification from the player about how he does what he does. He may want to hack and slash at the troll but he doesn't decide on what move his intended action corresponds to. Feel free to challenge his intent by clarifying details and then asking. I can imagine a conversation going like: — I hack and slash at the troll! — Cool, how do you do it? — I just swing my sword to chop his head off! — Well, he's swinging a huge tree trunk around, how do you intend to get close enough to bring your steel toohpick in striking range? — Well, I try to look for an opening and dive in. — Looks like discern realities, please roll+wis. — That's an 8, I get to ask one question, ok, what should I be on the lookout for? — His swing has a semi-random looking pattern but you can guess it out. — So I can just run in with perfect timing to avoid his swing. — Cool, that looks like defy danger with roll+int to outsmart the troll. — What? Not dex? Why? — Because you can see that even with speed and reflexes, you'd eventually get hit by the trunk unless you figure out his rythym. — Well, here goes… a 4, ouch! — There's no way you're getting in by timing it, sooner or later that trunk will push your skull into your ribcage unless you keep your distance. That's what you have been doing instinctively anyway without realizing that you have been cornered, with nowhere to retreat anymore. The troll seizes the opportunity to deliver its skull-to-ribcage promise by swinging the trunk straight down on you. What do you do? — Whoa, I duck and tumble inside his guard. — Sure, defy danger with roll+dex… — 9 this time. What now? — Well, you're obviously not going to pull that off with a sword in your hand. Either let go of it or feel the impact of the trunk on your back, your call. — I need the HP, so ok, I let go of the sword and tumble. — Cool. You're now inside the troll's guard without your sword. The troll grins to show you his rotting teeth, drops the trunk which just falls on your sword, and lunges to grab you by your throat. What do you do? Here, the GM diverts the player's action so that he's on the defensive rather than the offensive he intends. The player had to go through three potential points of failure and he still couldn't take a real swing at the troll. That, in my opinion, is what makes this a difficult adversary. Not how improbable your chance of succeeding is, but how many other things you have to go through before you can take a shot at your quarry. ",edgerunner,https://rpg.stackexchange.com/users/554,http://rpg.stackexchange.com/questions/27267/how-to-increase-difficulty-in-dungeon-world,CULTURE,rpg.stackexchange.com 3449,How do I deal with a slow and undedicated colleague in the team?,"I have been working on a new project. The project works like this: The end user can access a webapp using a link and he can add multiple systems on his network and manage that particular systems details. My part involves the front end and the webserver, which is done in python. My python actually communicates with another project which is entirely done in c & c++. The c/c++ project is the main app which does all the functionality. My python sends the user request to it and displays the response from it to the user. I am very familiar with my work and I will finish it soon. Since that's not much work in it. And I am a person who loves to work. I spends most of the time in office and only go home when I feel sleepy. The c/c++ app is managed by another colleague who has 5+ year experience and can do things much faster than me, but he never does it. May be he doesn't like to do it. His app crashes often when my python communicate with it or returns wrong values. It's full of bugs. Since my app depends on it, I am having a hard time building it. Instead of fixing the bugs, he asks me to slow down my work. He asks me to tell manager that my work needs a lot of time. He is asking me to fool the manager and even forcing me to work slowly like him. During project meeting, when manager asks him about the bugs he says that he fixed everything and it works fine. Since he is my colleague, I couldn't tell anything to the manager. I obviously need to have a good relationship with my colleagues more than my manager, since most of the time we will be with our colleagues, not with the manager. I am not able to tell the manager anything regarding this, since if manager asks him why, then he may think I complained about him to the manager. And he keeps on lying in the meeting. And since he fixes the bug slowly, it even slows down my work. Now I thought of working on the front-end part of my app and finishing it off so that in the mean time he can make his project stable. Now he is asking me to tell the manager that my front end part require a lot of work and I may need more and more time, simply so that he can drag the project down. And the sad thing is our actual manager has gone to the US, so we have a temporary manager and this guy doesn't know about the project much, so the c,c++ just fools him. Can anyone suggest me how I deal with this? I wanted to finish off the project soon. How can I make him work even by maintaining a good relationship with him? Responses to comments: If he's really deliberately misleading the company, you should report him to management. I am new to this company and the other guy has been there for many years. And I have just started knowing my colleagues. If I directly go and complaint him, I don't think so I can make good relationship with my other colleagues. Even he has the power to mislead them. I am not telling he is a bad guy, he can do the work, but he is not doing it. Doesn't your company have any kind of bug tracking system ? Here actual bug tracking system isn't there. The company tries to finish off the project as soon as possible and gives it to the QA. And then fixes the bugs reported by QA. This is why companies should give employees stock / options or some sort of ownership. That way you can literally tell the guy ""You are costing me monetary growth... don't you want to make money also?"". The company has the stock options they have given me a 2500 share, mostly he too would have got some more. Seniority does deserve some benefit of a doubt. You really need to speak to him first and try to understand the problem. He may be out of his depth, you may be able to help him, there could easily be variables you are unaware of. It may be hard now, but you could easily make the situation a lot worse by jumping the gun. I even does it, first his app wasn't handling multiple requests at a time, he was using a queue to handle the requests I sent to him. I even suggested to him some of my ideas on it. He said he already had these ideas, and will be executing them. His explanations was: ""Everything require certain time to do and this is a project which may need two years to complete and we are asked to finish it in two months"". I used to have a hard time coding during first few weeks because of this bug. But now he fixed it. But he is using a single queue for a user requests and that is now slowing down the app, since it processes one request at a time. What is QA doing this whole time? Why aren't they reporting/confirming the status of the project(s)? The manager is the person who decides when to give to the QA. As of now it has not yet given to QA. He said we should give it by this month end. ",HOT,https://programmers.stackexchange.com/users/34092,"Pat's answer was great. I agree 100%. Don't go sneak a meeting with the boss. Either take it with your colleague between 4 eyes or do it with all 3 of you. But Pat's suggestion to focus on the code issues and not on people is the right way to go. Btw, 40h/week is enough dude. You need to keep your motivation high! ",AndSoYouCode,https://programmers.stackexchange.com/users/34480,http://programmers.stackexchange.com/questions/101528/how-do-i-deal-with-a-slow-and-undedicated-colleague-in-the-team,TECHNOLOGY,programmers.stackexchange.com 6616,"How to customize Windows ""Performance Monitor""?","I'm wondering if that's possible to set a customized action counter that is not listed as one of the counters? e.g. a batch script that measure a time for running my application, and then notify the real-time graph the time it took to load it. Also I'd like to set its frequency. If possible, please let me know how to apply. Thank you ",user986086,https://serverfault.com/users/132510,"You can create perfmon counters using .NET code and thus using PowerShell too. A moderate amount of coding is required. ",the-wabbit,https://serverfault.com/users/76595,http://serverfault.com/questions/497129,TECHNOLOGY,serverfault.com 7604,Many POST requests to /xmlrpc.php from GoogleBot taking down server?,"I have several hosted wordpress blogs, and I've been trying to visit them and they are really slow. I looked at my server logs and I found this stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:28 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:28 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:28 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:28 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:29 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:29 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:29 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:29 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:31 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:31 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" stanfordflipside.com:80 188.138.33.149 - - [17/Aug/2013:17:14:31 -0700] ""POST /xmlrpc.php HTTP/1.1"" 200 595 ""-"" ""GoogleBot/1.0"" I am getting ~10 hits per second to the file /xmlrpc.php from the GoogleBot to several sites, and this seems to be slowing down the server. I am running tail -f on the log file, and can just see these requests continuing. Does anyone know why this might be happening or what you could do to stop it? ",jkeesh,https://wordpress.stackexchange.com/users/36758,"I would block the IP with iptables if it were me, and if you have that kind of server level access. You could also disable xmlrpc. Unfortunately, since 3.5 the admin screen option to disable that feature has been removed. A single line of code should disable it though: add_filter( 'xmlrpc_enabled', '__return_false' ); That might save some overhead from the requests, though it won't eliminate all of it. ",s_ha_dum,https://wordpress.stackexchange.com/users/21376,http://wordpress.stackexchange.com/questions/110513/many-post-requests-to-xmlrpc-php-from-googlebot-taking-down-server,TECHNOLOGY,wordpress.stackexchange.com 3728,How to retrieve datetime from database in Drupal?,"How do I retrieve a DateTime column from my MySQL database using Drupal Database API + PHP. The DateTime format is in YYYY-MM-DD HH:MM:SS(2013-02-20 23:59:59). I want to retrieve all the rows in the database that match a specific date, and then store the hour inside an array. For example, I want to grab all the data from January 1, 2013. I then only want to store hours 00:00 to 23:59 inside my array, not the entire date. I do not want to use any modules to accomplish this.. because I need to code it inside my custom module. Thanks for your help! Current Code: $query = db_select('Project', 'p'); $query->fields('p', array('submissions', 'date_time')); $query->condition('p.user_id', $user->uid); $results = $query->execute()->fetchAll(); foreach($results as $r) { $rows[] = array(strtotime(date(""H:i:s"", $r->date_time))*1000, $r->submissions); } I plan to display the data on my Flot line graph. ",John Smith,https://drupal.stackexchange.com/users/13894,"The code below works for me for fetching a group, so you can quickly adapt it for your own purpose. $query = db_select('og') ->fields('og', array('etid')) ->condition('gid', $gid,'='); $results = $query->execute(); $result = $results->fetchAssoc(); ",Pawel G,https://drupal.stackexchange.com/users/12153,http://drupal.stackexchange.com/questions/62944/how-to-retrieve-datetime-from-database-in-drupal,TECHNOLOGY,drupal.stackexchange.com 1167,How to delete duplicate solutions of this system of equations?,"I want to find vertices (has integer coordinates) of the triangle $ABC$ with the centorid is $G(1,1)$ and orthocenter is $H(3,3)$. I tried a = {x1, y1}; g = {1, 1}; h = {3, 3}; b = {x2, y2}; c = {x3, y3}; Solve[{x1 + x2 + x3 == 3 g[[1]], y1 + y2 + y3 == 3 g[[2]], (h - a).(c - b) == 0, (h - b).(c - a) == 0, -20 < x1 < 20, -20 < y1 < 20, -20 < x2 < 20, -20 < y2 < 20, x2*y3 - x1*y3 + x1*y2 - y2*x3 + y1*x3 - y1*x2 != 0}, {x1, y1, x2, y2, x3, y3}, Integers] There are some duplicate triangles. How to delete this duplicate triangles? ",minthao_2011,https://mathematica.stackexchange.com/users/2241,"I am not certain I understand, but starting with sols = Solve[ . . . ] does this help?: {{x1, y1}, {x2, y2}, {x3, y3}} /. sols; Union[Sort /@ %] {{{-17, 7}, {7, -17}, {13, 13}}, {{-11, 3}, {7, -9}, {7, 9}}, {{-9, -3}, {3, 9}, {9, -3}}, {{-9, 7}, {3, -11}, {9, 7}}, {{-5, -5}, {1, 7}, {7, 1}}, {{-3, -9}, {-3, 9}, {9, 3}}, {{-3, 3}, {3, -3}, {3, 3}}} ",Mr.Wizard,https://mathematica.stackexchange.com/users/121,http://mathematica.stackexchange.com/questions/23833/how-to-delete-duplicate-solutions-of-this-system-of-equations,TECHNOLOGY,mathematica.stackexchange.com 6812,Why choose an 80-200mm over an 18-200mm lens?,"Being a beginner, I can't see why I must choose an 80-200 over an 18-200. Are there scenarios where an 80-200 would be preferable over an 18-200? I will be buying a D7000 soon and am looking at these: AF Zoom-NIKKOR 80-200mm f/2.8D ED AF-S DX NIKKOR 18-200mm f/3.5-5.6G ED VR II but similar considerations would apply to other brands as well. ",Ygam,https://photo.stackexchange.com/users/2362,"Usually lenses with a large focal ranges end up having poorer quality than lenses for each ""normal"" focal range (tele, wide, regular zoom). You get more versatility with lower image quality, it's a case of ""Jack of all trades, master of none"". ",t3mujin,https://photo.stackexchange.com/users/938,http://photo.stackexchange.com/questions/11247/why-choose-an-80-200mm-over-an-18-200mm-lens,LIFE_ARTS,photo.stackexchange.com 1836,Using regular expressions to find img tags without an alt attribute,"I am going through a large website (1600+ pages) to make it pass Priority 1 W3C WAI. As a result, things like image tags need to have alt attributes. What would be the regular expression for finding img tags without alt attributes? If possible, with a wee explanation so I can use to find other issues. I am in an office with Visual Web Developer 2008. The Edit >> Find dialogue can use regular expressions. ",awrigley,https://stackoverflow.com/users/271087,"This works in Eclipse: <img(?!.*alt).*?> I'm updating for Section 508 too! ",Mr.Black,https://stackoverflow.com/users/1356748,http://stackoverflow.com/questions/4031948/using-regular-expressions-to-find-img-tags-without-an-alt-attribute,STACKOVERFLOW,stackoverflow.com 4223,php regular expession convert to python code,"i have this code written in php , and i want to convert it into python code $title_regex = ""/<title>(.+)<\/title>/i""; preg_match_all($title_regex, $string, $title, PREG_PATTERN_ORDER); $url_title = $title[1]; /// fecth decription $tags = get_meta_tags($url); // fetch images $image_regex = '/<img[^>]*'.'src=[\""|\'](.*)[\""|\']/Ui'; preg_match_all($image_regex, $string, $img, PREG_PATTERN_ORDER); $images_array = $img[1]; i have tried this .. but it give me errors in pics part import re out=Data #web site html page .. title_regex = ""/<title>(.+)<\/title>/i"" #no need for this .. un used m = re.search(""<title>(.+)<\/title>"", out) print ""title"",m.group(1) #for pics i have tried this but it give me error .. pics = re.match(r""/<img[^>]*'.'src=[\""|\'](.*)[\""|\']/Ui"", out)#the conversion is not correct print ""grop"",pics.group(1) my full code import re import urllib print ""Start"" url=""http://www.deviantart.com"" data=urllib.urlopen(url) out=data.read() print title_regex = ""/<title>(.+)<\/title>/i"" m = re.search(""<title>(.+)<\/title>"", out) print ""first"",m print ""title="",m.group(1) title_regex = ""/<title>(.+)<\/title>/i"" pics = re.match(r""/<img[^>]*src=[\""|\'](.*)[\""|\']/Ui"", out) print ""pics>>"",pics.group(1) how i can convert a php re>>""/]*'.'src=\""|\'[\""|\']/Ui"" to a python re ? ",John silver,https://stackoverflow.com/users/744852,"Working version .. display all images from a given web site using tag IMG src > code: import re import urllib print ""Start"" url=""http://www.deviantart.com"" data=urllib.urlopen(url) out=data.read() print title_regex = ""/<title>(.+)<\/title>/i"" m = re.search(""<title>(.+)<\/title>"", out) print ""first"",m print ""grop"",m.group(1) title_regex = ""/<title>(.+)<\/title>/i"" pics = re.compile(r""<IMG[^>]*src=([^>]*[^/])"")#Change IMG tag allpics=pics.findall(out) print ""found"",pics for mypic in allpics: print ""< IMG src="",mypic thanks all ",John silver,https://stackoverflow.com/users/744852,http://stackoverflow.com/questions/6397021/php-regular-expession-convert-to-python-code,STACKOVERFLOW,stackoverflow.com 6192,Increasing number of decimal places with FixedPoint,"I've tried: In[169]:= newton3[x_] := N[1/2 (x + 3/x)]; FixedPointList[newton3, 1.0] Out[170]= {1., 2., 1.75, 1.73214, 1.73205, 1.73205, 1.73205} Of course: In[164]:= N[Sqrt[3], 20] Out[164]= 1.7320508075688772935 How do you use the FixedPointList to increase the number of decimal places? ",David,https://mathematica.stackexchange.com/users/5183,"The problem is not FixedPointList - the problem is that Mathematica by default doesn't display that many digits. Consider for example FixedPoint[newton3, 1.0] // InputForm which displays several more decimals. Another option is to increase PrintPrecision: SetOptions[InputNotebook[], PrintPrecision -> 10] This increases the number of decimals shown for all values in the current notebook. Style[FixedPoint[newton3, 1.0], PrintPrecision -> 10] does the same for the particular expression. Finally we may do the following to make sure the problem isn't with FixedPoint: FixedPoint[newton3, 1.0] == Sqrt[3] (* True *) ",C. E.,https://mathematica.stackexchange.com/users/731,http://mathematica.stackexchange.com/questions/67634/increasing-number-of-decimal-places-with-fixedpoint,TECHNOLOGY,mathematica.stackexchange.com 5386,97 Honda Civic dies in neutral,"I have a 97 Honda Civic that will occasionally die in neutral. This is what I have done so far: Replace both O2 sensors Replace MAP sensor Replace Air filter Added Lucas treatment to fuel tank Even after the above changes, occasionally when coasting in neutral the rpm's will eventually drop to 0 and the engine will die. It starts back up just fine. My engine and fuel mileage have definitively improved with all the changes, especially after using Lucas. ",BrandonG,https://mechanics.stackexchange.com/users/4549,"My suspicion is it's related to the fuel system. So I'd be testing the fuel pressure. If fuel pressure is fine, then check the injectors. ",SimpleSimon,https://mechanics.stackexchange.com/users/4518,http://mechanics.stackexchange.com/questions/8856/97-honda-civic-dies-in-neutral,CULTURE,mechanics.stackexchange.com 755,Testing multiplayer android,"In what way can an android game be tested considering the following constrains: minimal to no budget, so I cannot hire an external company to do the testing for me Testing should occur on multiple devices and types (phones and tablets, I have 1 available for each) I do not have a team of testers, nor a large group of people with android devices willing to back me up. The game is a multiplayer game (min 2, max 4 players per game) with a backend that will be hosted on an external server (which is already arranged), so for every testrun 2 devices are needed. The game server is not built in java and will be unit tested, the testing is more about doing integration testing. Optional is stress testing the game server so we can get some sort of baseline for this hardware. ",Thomas,https://gamedev.stackexchange.com/users/12374,"Minimal to no budget means you're doing it yourself. As an indie developer, you shouldn't be considering to hire an external company to ""test"" for you-- this is a game, not a NASA rocket. If you have the hardware, then you're already halfway there. A couple of ways to gather people to test your game: If you live near a university or college, you might have success postering with things like ""Game test volunteers needed! Android developer needs 2-4 students who are very interested in gaming to test new multiplayer game SPROCKETS. Game genre is RTS strategy. PIZZA will be provided."" and attach your number Meetup.com might put you into contact with like-minded individuals in your area You might also try Craigslist (volunteer jobs) and kijiji (also asking for volunteers) ",bobobobo,https://gamedev.stackexchange.com/users/998,http://gamedev.stackexchange.com/questions/46830/testing-multiplayer-android,TECHNOLOGY,gamedev.stackexchange.com 1914,Keeping values in textboxes permanently until changed by user in a sharepoint webpart,"I am working on a Visual Web Part for a SharePoint 2013 site that is a ""scoreboard"" for people to track progress on a project. Basically what I have is a lot of textboxes that users will enter values in. I want the values to stay in the textbox until someone changes it. <tr> <td>&nbsp;</td> <td>A-Crew</td> <td>B-Crew</td> <td>C-Crew</td> <td>D-Crew</td> </tr> <tr> <td>Daily</td> <td> <input id=""msaCrewDaily"" type=""text"" /> </td> <td> <input id=""msbCrewDaily"" type=""text"" /> </td> <td> <input id=""mscCrewDaily"" type=""text"" /> </td> <td> <input id=""msdCrewDaily"" type=""text"" /> </td> </tr> A few things I have tried are using PHP inside the input tag to save the value but it doesn't keep it after closing and re-opening the page with webpart on it. I've thought about using local storage but i'm not sure if that will work. My Question Is there a way to keep the the input even if the page is closed? If not would it be better to set up a list as a Data Source? Is the something I could do in C# to keep the values? Other Information This is a temporary solution until a database is set up then the values will come from there. However its going to take some time to set that up. Also as of now all my code is HTML and CSS. Any help or ideas are very much appreciated and thank you in advanced!!! ",egalyk,https://stackoverflow.com/users/3864499,"You can use local storage ""jStorage"" write a javascript which will be called onkey of textbox and store value on local storage and call it on page load. Just check on page load if local storage contains any value if yes then set the textbox with that value ",Parag Ghogal,https://stackoverflow.com/users/1890798,http://stackoverflow.com/questions/24997100/keeping-values-in-textboxes-permanently-until-changed-by-user-in-a-sharepoint-we,STACKOVERFLOW,stackoverflow.com 705,"3.5"" FDD to SATA / USB","Motherboards these days don't tend to have floppy cable/bus pins. It's a bit ""old hat"" I suppose. I have such a motherboard, but would like to connect an internal floppy drive to it. It's the sort of drive that's usualy sold as a 7 in 1 floppy and media card drive. It has a USB connector, but also the old fashioned floppy bus connector and a power connector. I would like to know if such an adapter exists that I can convert the floppy bus connector, either to a SATA port, or to an internal USB pinout? ",series0ne,https://superuser.com/users/166563,"You'll need a floppy drive controller (you can't simple convert a floppy cable to USB), but they basically just don't exist anymore. You'll probably just have to get a USB floppy drive and a USB card reader, and live with two separate devices. ",Ƭᴇcʜιᴇ007,https://superuser.com/users/23133,http://superuser.com/questions/890180,TECHNOLOGY,superuser.com 9230,Custom Request Handlers/Components with Solr-4.x,"I was referring this http://sujitpal.blogspot.in/2011/02/solr-custom-search-requesthandler.html for making custom handlers in solr. They are pretty nice but conform to the old apis. Is there any similar example I can refer to for solr-4.3.0. ",Apurv,https://stackoverflow.com/users/1055001,"Your best bet is to download the Solr source and check the existing implementations Of RequestHandlers. There are some that are quiet simplistic and can give you a good grasp of the API and a starting point.PingRequestHandler comes first to mind, if your goal is to do something very simple. For more complex scenarios look for the ones that make use of components and take a look in solr config for their initialization parameters. Best of luck! ",Ion Cojocaru,https://stackoverflow.com/users/2123154,http://stackoverflow.com/questions/17091720/custom-request-handlers-components-with-solr-4-x,STACKOVERFLOW,stackoverflow.com 7373,Is it necessary to run own DNS server?,"I would like to buy a second-level domain name (e.g. example.com) and I will run web server on my own machine (named www, having public IP address). Is this sufficient for my machine to be accessible by visitors via browser with http://www.example.com? I expect that every visitor machine accessing http://www.example.com will first ask it's DNS server if it knows the IP address of www.example.com. If it doesn't know. The DNS server will ask the root server on the address of .com top-level domain. Then it will ask .com top-level domain if it knows the IP address of www.example.com and it should be there because I bought it. So finally it will send the IP address to the visitor's DNS server and then visitor's DNS server will send the IP address to visitor's machine? I would like to avoid installing and configuring own DNS server (I have only one laptop). Is my expectation correct that I don't need to install own DNS server? If yes/no, please describe a little the reasoning behind the scene. ",xralf,https://webmasters.stackexchange.com/users/6231,"Your domain name registrar should be hosting your DNS records. This is not something you have to do or worry too much about. In fact, you are far better off not running a DNS server because of the security implications. When you register your domain name many registrars will host your DNS records free of charge. Some do charge a small fee. If your registrar for some extremely odd reason cannot host your DNS records, there are DNS hosts. So there are plenty of options. I suggest making this a question you ask the registrar prior to registering your domain name. ",closetnoc,https://webmasters.stackexchange.com/users/36029,http://webmasters.stackexchange.com/questions/76991/is-it-necessary-to-run-own-dns-server,TECHNOLOGY,webmasters.stackexchange.com 47,How do different tissue culture matrices affect background in fluorescent microscopy?,"In response to my previous question, I've been reading up a little bit on poly-D-lysine, Collagen I, Collagen IV, laminin, and other tissue culture coatings that promote cell adhesion. I've always assumed that anything other than standard TC-treated plastic or glass would significantly increase background, but perhaps my views on background fluorescence are a little outdated. Does anybody have experience with these in a fluorescent microscopy/high-throughput screening environment? Specifically in my case, I'm looking at endocytosis and trafficking of a labeled protein into the lysosome. I'm labeling the protein with the pH-dependent dye pHrodoTM from Molecular Probes, which supposedly has very little fluorescence at neutral pH, but becomes very bright as the pH drops when endocytic vesicles become lysosomes. This theoretically means that a final wash step is not needed, but with a matrix coating on the plates I'm worried about background. So, what is the current thinking as far as background fluorescence of the various TC matrices is concerned? Does the background come from the matrix itself, or by the fluorescent dye becoming adsorbed to it? Is it wavelength-dependent? Fortunately I may not be stuck with my poorly-adhering cells, and I may not need supplemental matrix at all in the end, but I still want a better understanding of how it works. ",MattDMo,https://biology.stackexchange.com/users/948,"Extracellular matrix (ECM) fluoresces, especially Collagen and Laminin. The maximum is in the DAPI and FITC channels and the fluorescence becomes weaker towards longer wavelengths. However, since the coat on the TC flasks is very thin, I would not expect this to be a problem. The best thing is just to try it. There is also a quite famous document available which might be of help: Autofluorescence: Causes and Cures ",Eekhoorn,https://biology.stackexchange.com/users/852,http://biology.stackexchange.com/questions/8656/how-do-different-tissue-culture-matrices-affect-background-in-fluorescent-micros,SCIENCE,biology.stackexchange.com 1254,Does becoming martyr have an evolutionary advantage?,"This is related to How does "be altruist to those who are similar to you" evolve? Altruism that is Not reciprocal Not familiar has little explanation. One possible explanation is that the trait itself may correlate well with genetics. One great answer there is that often the cost of altruism is small anyway. It can explain why people vote. Here the expense is small anyway. Still there seems to be some factors that are even bigger. Let's take a look at people that die for their ideology. Christian martyrs, Muslim suicide bombers, or Communist guerilla fighters. They seem to get so little and well, die. And that's pretty common. It seems pretty easy for a leader or pedagogue to rouse men to be soldiers. Of course, becoming a soldier is a pretty shitty job, yet most men don't mind. These people make a huge sacrifice for the sake of their country, ideology, or people that are not even genetically related to them. Why? ",J. Chang,https://biology.stackexchange.com/users/554,"Your question is quite broad and asks for explanations for various behaviours which can lead to self-sacrifice. Religious reasons: The genetic influence here may be a predisposition to let others influence you. This is what gives rise to culture in the first place, in other words: the predisposition to at some point maybe sacrifice yourself because you are taught to do so can only die out if the basic behaviour which gives rise to culture dies out. Cultures which lead their members to die may decimate their own numbers, but they will not wipe out culture itself because in the bigger scale, those with culture do better than those without. (Plus, those who sacrifice themselves may have children as well, so any genetic influence on their behaviour can be carried on.) This also goes far into the field of memetic evolution, which is disputed but may be interesting to read about. Political reasons: As in, dying for one's nation or country rather than because of teachings. This probably has a defensive behaviour towards one's own group as the genetic influence. Also, reputation plays a big role: see shigeta's excellent answer. You also mention willingness to subordinate oneself which is a very common pattern not only in humans. Richard Dawkins touches on this in The Selfish Gene, but there are probably papers more focussed on this particular topic out there as well. I think it is far-fetched to assume a genetic inheritance of in general ""willingness to die for something"" (which would be required for genetic evolution to work on it). Each thing that some people may be willing to die for can have completely different reasons. I think in these terms the willingness to die is usually an exaggeration of a behaviour which evolved for different reasons. ",Armatus,https://biology.stackexchange.com/users/806,http://biology.stackexchange.com/questions/2366/does-becoming-martyr-have-an-evolutionary-advantage,SCIENCE,biology.stackexchange.com 6088,Constantly lag in opengl application,"I'm getting some repeating lags in my opengl application. I'm using the win32 api to create the window and I'm also creating a 2.2 context. So the main loop of the program is very simple: Clearing the color buffer Drawing a triangle Swapping the buffers. The triangle is rotating, that's the way I can see the lag. Also my frame time isn't smooth which may be the problem. But I'm very very sure the delta time calculation is correct because I've tried plenty ways. Do you think it could be a graphic driver problem? Because a friend of mine run almost the exactly same program except I do less calculations + I'm using the standard opengl shader. Also, His program use more CPU power than mine and the CPU % is smoother than mine. I should also add: On my laptop I get same lag every ~1 second, so I can see some kind of pattern. ",user1312724,https://stackoverflow.com/users/1312724,"There are many reasons for a jittery frame rate. Off the top of my head: Not calling glFlush() at the end of each frame other running software interfering doing things in your code that certain graphics drivers don't like bugs in graphics drivers Using the standard windows time functions with their terrible resolution Try these: kill as many running programs as you can get away with. Use the process tab in the task manager (CTRL-SHIFT-ESC) for this. bit by bit, reduce the amount of work your program is doing and see how that affects the frame rate and the smoothness of the display. if you can, try enabling/disabling vertical sync (you may be able to do this in your graphic card's settings) to see if that helps add some debug code to output the time taken to draw each frame, and see if there are anomalies in the numbers, e.g. every 20th frame taking an extra 20ms, or random frames taking 100ms. ",Michael Slade,https://stackoverflow.com/users/1306033,http://stackoverflow.com/questions/10010285/constantly-lag-in-opengl-application,STACKOVERFLOW,stackoverflow.com 2974,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? ",Andrew Fogg,https://raspberrypi.stackexchange.com/users/181,"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 how it looks like: ",Oleg Gryb,https://raspberrypi.stackexchange.com/users/10114,http://raspberrypi.stackexchange.com/questions/381/how-do-i-turn-off-my-raspberry-pi,TECHNOLOGY,raspberrypi.stackexchange.com 1744,How do I counter support Zyra?,"I main support, usually opting for poke supports such as Lulu and Sona or aggressive supports such as Blitzcrank and Leona. Since the various Regional Finals, however, I've begun to encounter support Zyras in my bot lane. This is a very difficult lane for me. I can't establish lane dominance, since Zyra just sits in her bush and puts seeds in mine. I've tried a rune page with flat MR for when I play against Zyra to counter some of her harass, but it doesn't help against her cc. How can I effectively counter a support Zyra? ",Schism,https://gaming.stackexchange.com/users/31508,"Alistar with Varus as partner. Varus has a long range harass with his Q, what is a nightmare to no-healers supports. As Varus takes care of this part, you'll be Alistar and be a bodyguard to him. Play safe, always near the carry and try to fall back a little to coordinate ganks with your jungler. Alistar's CC will leave them helpless against a high-speed gank like Xin Zhao's or Jax's. Janna is also vary strong when facing offensive champions. Her CC and shield can frustrate the enemies if well played. Let's just think: Zyra has no abilities for direct support and being a mage, she depends on her mana. Poking and harassing is the best way to push this kind of support back, and picking a champion with direct support will leave your carry with an advantage against Zyra's carry. ",AsfaltMan,https://gaming.stackexchange.com/users/42121,http://gaming.stackexchange.com/questions/88816/how-do-i-counter-support-zyra,CULTURE,gaming.stackexchange.com 163,Where exactly is the London Shoreditch National Express Coach Stop?,"For some reason the rubbish website shows that the Shoreditch stop is just off the Ivory Coast. Any idea where it actually is? ",Andrew Welch,https://travel.stackexchange.com/users/4028,"The National Express website is presumably the one you mean, where it shows it off the African coast. However, if you look further down the page, it says: London (Shoreditch) Bethnal Green Rd (to Stansted Airport: Stop J opp Overground Stn; or from Stansted: Stop K) Bethnal Green road on Google Maps clearly shows the road running west-east, with the Overground station indicated on the same map. Hope that helps! ",Mark Mayo,https://travel.stackexchange.com/users/101,http://travel.stackexchange.com/questions/13375/where-exactly-is-the-london-shoreditch-national-express-coach-stop,CULTURE,travel.stackexchange.com 6489,Question-like structure (word order) in non-question sentences,"Occasionally I see constructs like this in English sentences: Not only is this true in this case, but ... What puzzles me is the ""is this"" part of it. The sentence is not a question, yet it seems to have a question-like order. Isn't this correct/preferred: Not only this is true in this case, but ... Are there other cases where non-question sentences contain question-like parts (so to speak)? ",ojkoorde,https://ell.stackexchange.com/users/18445,"This (abridged) entry from Swan in Practical English Usage (p303) under the heading Inversion after negative and restrictive expressions provides the answer to your questions: If a negative adverb or adverbial expression is put at the beginning of a clause for emphasis, it is usually followed by auxiliary verb + subject. These structures are mostly rather formal. At no time was the President aware of what was happening. Seldom have I seen such a remarkable creature. Little did he realise the danger he faced. Only then did I understand what she meant. Not only did we lose our money, but we were nearly killed. Here is a short Wikipedia article on inversion. ",Shoe,https://ell.stackexchange.com/users/1296,http://ell.stackexchange.com/questions/53609/question-like-structure-word-order-in-non-question-sentences,CULTURE,ell.stackexchange.com 3849,Should I turn the text on my poster to outlines before I print?,"What would be the best practice for printing text based work from Illustrator, such as a poster? This is aimed at the final print quality of my workk. I am creating an advertisement which will be about A4 size to go into a newspaper. Would it be best to Create Outline all the text in the advert before I send the files off to be printed or will it not make much of a difference in terms of quality? ",SaturnsEye,https://graphicdesign.stackexchange.com/users/21355,"Customarily, you'd send a PDF/X-1a file with fonts embedded by simply saving that format (with crops and bleed), therefore outlining type would actually not always be a good thing. PDF/X-1a is often preferred because it is a self-contained format with fonts embedded and artwork flattened. This ensures the most accurate preproduction. If you are sending a .eps or .ai file, then outlining type is the best practice. ",Scott,https://graphicdesign.stackexchange.com/users/3270,http://graphicdesign.stackexchange.com/questions/34936/should-i-turn-the-text-on-my-poster-to-outlines-before-i-print,LIFE_ARTS,graphicdesign.stackexchange.com 7112,Word for a result/achievement so exceptional that it is impossible?,"I am looking for a word or phrase regarding something that is ""impossible"". I can't seem to put my finger on it, but I am trying to think of the word to describe something that is the top of the top, and thus impossible to achieve? The only two words I have come up with are elusive and formidable, neither of which really mean what I want them to mean. I want something more clever to put it plainly. ",user128274,https://english.stackexchange.com/users/128274,"Unattainable Not able to be reached or achieved: an unattainable goal ",Tushar Raj,https://english.stackexchange.com/users/77339,http://english.stackexchange.com/questions/257713/word-for-a-result-achievement-so-exceptional-that-it-is-impossible,CULTURE,english.stackexchange.com 9527,"What does ""flattens"" mean in this context?","I have an assignment for Programming Fundamentals (we are using Python 3.4), and some questions are sometimes not really obvious to understand, maybe because my English is not so good. Two of the introductory questions of our last assignment were: Write a function that “flattens” its input list. Write a function that accepts a list that contains nested lists and returns the “depth” of the list. Sincerely I am not understanding exactly what they are asking. Can someone explain me? ",nbro,https://ell.stackexchange.com/users/9470,"Guessing a bit, as I'm not a programmer... ""Flatten the list"" Two possibilities, so I would really check with the test setter... Empty the list, ready to start the task (most likely) Take the nested lists & concatenate them into one list (less likely) ""depth of the list"" Again, I see two possibilities & I have no idea as to which may be more appropriate ... Calculate the total number of list lines, including all nested lists Calculate the number of levels used in the nesting. A coder might know better. ",Tetsujin,https://ell.stackexchange.com/users/11747,http://ell.stackexchange.com/questions/39008/what-does-flattens-mean-in-this-context,CULTURE,ell.stackexchange.com 3905,Can I use a package manager of one distribution on another?,"I want to use Gentoo's packages on Fedora. Is this possible? EDIT: I meant that I want to use Gentoo's portage tree. UPDATE: How about Ubuntu's packages on Fedora? Or Fedora's on Gentoo? Or any other distribution's packages/package manager on another? ",Yktula,https://superuser.com/users/33789,"It is possible, although it will take quite a bit of work to get operational, and it won't be supported by either distro's teams generally. I only know it's possible because I've watched as a co-worker of mine did it one time merely to say he could/had. As for the logistics of it, I think the init system differences is going to be one of the biggest hangup. The init system in gentoo is going to be completely different from the init system in fedora. As such, you'll have to either hack portage so that it will work with fedora's init system, or hack fedora to work with gentoo's. The other hangup you'll run into is that portage doesn't like dealing with software and packages that haven't been installed by portage to begin with. ",Matrix Mole,https://superuser.com/users/31131,http://superuser.com/questions/132164,TECHNOLOGY,superuser.com 7508,Dialog is partially shown when SoftKeyBoard is shown,"I have a custom Dialog as shown below: When I click on the Edit Text, The dialog is shifted upwards but half of the dialog becomes invisible as shown below: I verified the issue on Android ICS and Gingerbread but it doesn't happen on Android Lollipop. I appreciate your help for figuring out why. Here is the custom dialog layout XML: <LinearLayout xmlns:android=""http://schemas.android.com/apk/res/android"" android:id=""@+id/layoutChatInGame"" android:layout_width=""305dp"" android:layout_height=""190dp"" android:background=""@drawable/dialog_table_border"" android:orientation=""vertical"" android:visibility=""visible""> <LinearLayout android:orientation=""horizontal"" android:layout_width=""match_parent"" android:layout_height=""wrap_content"" android:background=""@color/roomlist_title_background""> <ProgressBar android:layout_width=""wrap_content"" android:layout_height=""wrap_content"" android:id=""@+id/progressBar"" android:layout_margin=""5dp""/> <LinearLayout android:orientation=""horizontal"" android:layout_width=""fill_parent"" android:layout_height=""fill_parent"" android:layout_gravity=""center"" android:layout_margin=""5dp""> <LinearLayout android:orientation=""vertical"" android:layout_width=""fill_parent"" android:layout_height=""wrap_content"" android:layout_gravity=""center_vertical""> <TextView android:layout_width=""fill_parent"" android:layout_height=""fill_parent"" android:text=""Game is on hold because the host paused the app"" android:id=""@+id/lblOnHoldDialogMessage"" android:textColor=""@color/progress_dialog_on_hold_text"" android:textSize=""18dp"" android:singleLine=""false"" android:layout_gravity=""center_horizontal""/> </LinearLayout> </LinearLayout> </LinearLayout> <TextView android:id=""@+id/lblChatHistoryGameOnHold"" android:layout_width=""match_parent"" android:layout_height=""fill_parent"" android:layout_weight=""1"" android:gravity=""bottom"" android:maxLines=""5"" android:scrollbars=""vertical"" android:textColor=""@color/edit_text_general_text"" android:textColorHint=""@color/edit_text_general_hint"" android:paddingRight=""2dp"" android:paddingLeft=""2dp""/> <LinearLayout android:layout_width=""match_parent"" android:layout_height=""wrap_content""> <EditText android:id=""@+id/textChatGameOnHold"" android:layout_width=""0dp"" android:layout_height=""wrap_content"" android:layout_marginLeft=""2dp"" android:layout_marginStart=""2dp"" android:layout_weight=""1"" android:ems=""10"" android:hint=""@string/edit_text_send_chat_message"" android:imeOptions=""flagNoExtractUi|actionDone"" android:inputType=""text"" android:maxLength=""100"" android:maxLines=""1"" android:textColor=""@color/edit_text_general_text"" android:textColorHint=""@color/edit_text_general_hint""/> <Button android:id=""@+id/btnSendGameOnHold"" style=""@style/lightboxButton.Blue"" android:layout_width=""wrap_content"" android:layout_height=""wrap_content"" android:onClick=""sendChatMessageInGame"" android:text=""@string/btn_send""/> </LinearLayout> </LinearLayout> ",E B,https://stackoverflow.com/users/4718314,"Try to use also android:imeOptions=""flagNoFullscreen"" in your .xml. Recommend you to make some tests, using it with and without flagNoExtractUi. Please give me some feedback. ",Geraldo Neto,https://stackoverflow.com/users/4398784,http://stackoverflow.com/questions/31895818/dialog-is-partially-shown-when-softkeyboard-is-shown,STACKOVERFLOW,stackoverflow.com 6756,"What are the disadvantages of ""puncture proof"" (or puncture resistant) tires?","Some people refer to tires that are more resistant to punctures as ""puncture proof"" tires. For example: Specialized All Condition Armadillo Tyre Even though these tires are not really puncture proof, they do reduce a lot the chances of puncturing. So the advantage is obvious. Apparently, they're not too expensive compared to regular tires. So, I was wondering why people would choose not to use these more resistant tires. What are their disadvantages? ",b.roth,https://bicycles.stackexchange.com/users/131,"Though there no doubt are ""puncture-resistant"" tires that seek to accomplish that end by means of extra-thick rubber, for the past 15-20 years the standard for puncture resistance has been Kevlar belted tires, which look and ride like ordinary tires and weight essentially the same as ordinary tires (maybe a few grams more). The Kevlar belt under the tread increases puncture resistance by at least a factor 10, eliminating most common glass/thorn punctures, and also reducing the tendency of the tire to ""bruise"". Price wise, my recollection is that they are about 30% more expensive than standard tires, but they likely last that much longer (plus save a lot on tubes), so the cost is pretty much a wash. (The odd thing is that Kevlar-belted tires are so hard to find.) Some people apparently confuse ""Kevlar belted"" tires with ""Kevlar bead"" tires. The latter are ""folding"" tires and are supposedly desired because they are a hair lighter than metal bead tires, plus they can be folded and stuffed in a pannier. But you can buy Kevlar belted with a metal bead (my preference, since folding tires are a PITA to install), and Kevlar bead tires are not necessarily Kevlar belted (in fact, most often not). Update: Last Saturday I had my first puncture in maybe 5 years (maybe 2000 miles), while finishing up a 35-mile morning. Just got around to fixing it because it's been ungodly hot and humid. (Hitched a ride home the last two miles, since there was no way to fix the flat in 95-degree weather on a 4-foot shoulder in the sun with traffic whizzing by at 70 MPH.) The culprit was apparently a construction staple that had pierced the tire just outside the belt, gone through the sidewall of the tube, and then punched a bigger hole in the inside diameter of the tube. I do notice the tire is wearing a bit thin, so I'll probably have to replace it within a year or so. I'm dreading trying to find a 700/35c road tire with Kevlar belt, though -- the catalogs are now full of off-road tires and cater even less to the touring market than they did 5-10 years ago. OK -- To make this into a direct answer to the question, the main disadvantage of Kevlar belted tires is that you forget how to change a tire, you do it so rarely. ",Daniel R Hicks,https://bicycles.stackexchange.com/users/1584,http://bicycles.stackexchange.com/questions/246/what-are-the-disadvantages-of-puncture-proof-or-puncture-resistant-tires,CULTURE,bicycles.stackexchange.com 5521,What are the current and voltage limits when determining low vs. high voltage wiring?,"I'm trying to figure out what is considered a power line( for outlets) and data communication line. What are the qualifying factors here. I know outlets have 120V AC at 60Hz and data lines have anything around 0 to 12V, but I don't know how much current that allows. so What is the current limit for the Data line? What is the voltage limit for the Data line? I would expect that results can vary based on where to you live. I live in Utah, USA ",Ashitakalax,https://diy.stackexchange.com/users/6182,"Article 250 as mentioned in the other answer does state that low voltage is 50 Volts or less, but it is in reference to grounding and bonding. The NEC does not define low voltage! You don't have to take my word for it, refer to Mike Holt. He is a well known expert on the NEC ",A meany,https://diy.stackexchange.com/users/11362,http://diy.stackexchange.com/questions/15310/what-are-the-current-and-voltage-limits-when-determining-low-vs-high-voltage-wi,LIFE_ARTS,diy.stackexchange.com