I’m building a model using Linear SVM from the Scikit-learn package in Python. I have found that Linear SVM performs much better on my training set than Logistic Regression.   My question is, is there a way to interpret the coefficients from my linear SVM in a similar way as we would interpret logistic regression coefficients? I can output the coefficient of each feature in my model using coef_.   I’m trying to figure out if there is a way to measure how effective each feature in my dataset is in regards to predicting an outcome. For example, a completely hypothetical situation, using logistic regression to predict whether a student is in an honors class or not, given the student’s test scores. Using Logistic Regression it’s possible to calculate an output along the lines of “a one-unit increase in the test score leads to an expected 10% increase in odds of the student being in the honors class”. Is it possible to calculate something similar using Linear SVM?   As you can probably tell, I’m a complete newbie when it comes to this and any help would be greatly appreciated! Thanks

I am trying to interpret the variable weights given by fitting a linear SVM.  (I'm using ):  from sklearn import svm  svm = svm.SVC(kernel='linear')  svm.fit(features, labels) svm.coef_   I cannot find anything in the documentation that specifically states how these weights are calculated or interpreted.  Does the sign of the weight have anything to do with class?


Originally, i was trying to find the value of $$\lim_{h \to 0} \frac{e^{-\frac{1}{h^2}}}{h}$$ to find out differentiabiltiy of     $f(x) = \begin{cases} e^{-1/x^2} & \text{ if } x \ne 0 \\ 0 & \text{ if } x = 0 \end{cases}$   at 0.  In this case,  $$\lim_{h \to 0} \frac{e^{-\frac{1}{h^2}}}{h}=\lim_{x \to \infty} \frac{x}{e^{x^2}}=\lim_{x \to -\infty} \frac{x}{e^{x^2}}$$  So when I applied L'Hospital's rule, then its value was 0.  And I thought that No matter how big $k$ is,  $$\lim_{x \to \infty} \frac{x^k}{e^x}$$ will be equal to zero because exponential's increase speed is much faster than polynomial's.  Definitely, we can also apply L'hospital's rule at here, but I think it is not proper qualitative explanation for the fact that exponential is much bigger than polynomial.  Is there any other approach which explains why  about this problem?  (In fact, I tried to use $\epsilon-\delta$ but how can i show that there exist some $M$ s.t. for every $M<x$ then  $x^k<\epsilon e^x$?)  (And I also tried to use inequality like $e^x>x+1$  for all $x>0$ but it only worked for $k<1$)

In other words, how to prove:  For all real constants $a$ and $b$ such that $a > 1$, $$\lim_{n\to\infty}\frac{n^b}{a^n} = 0$$  I know the definition of limit but I feel that it's not enough to prove this theorem.


I am trying to get this Symbol   I already tried using Detexify, but to no avail. Any pointers would be really appreciated.

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


I am a newbie in testing and i just write in the bug report, the pre-requisites , actual results and expected result section under "description".  Other testers say that my report is not professional and it's incomplete.  How can I improve my verbiage in expected results. Is it like - "user should be deleted on clicking delete button ' or "user is or must be deleted?  How to write a high quality bug? Refer to a sample bug report written by  testing experts.

Nothing can ruin your day like a poorly-written bug report.  I've seen several sets of guidelines for bug reporting in different organizations. In your opinion, what guidelines/steps are most essential for good bug reporting?  Feel free to share complete guideline recommendations from prior/current projects/organizations.


I have example of fetching multiple nodes with EntityFieldQuery, but i am not able to show pager. (intial question here: )  if ($type == 21) {    $query = new EntityFieldQuery();     $entities = $query->entityCondition('entity_type', 'node')     ->propertyCondition('type', 'product')      ->fieldCondition('field_razred', 'tid', array (607,608,609,610), 'IN')     ->pager(10) // this is the bit you're missing     ->execute();     $nodes = node_load_multiple(array_keys($entities['node']));    print render(node_view_multiple($nodes, 'teaser')) . theme('pager'); }   Does theme('pager') depends on something i am not aware of ? I built my theme on Framework theme. This code is in fact run in node.tpl.php (when conditions are met)

I have problem to understand how I should use theme('pager') as explained on .  I can't make it work (display pager and links to resulting pages).  Does pager(10) in EntityFieldQuery automatically invoke the pager? Should it be displayed with print(theme('pager'))?  Is this functionality included in Drupal core (7.15)?  I am doing my queries in template.php and injecting the query result in article.tpl.php through a variable.  As a workaround, I am thinking of doing two queries, one to find out what the number of nodes that meet a condition is, output links with numbering, attach the variable to those links, read the variable in another query and select the resulting nodes with range($i,$j).


The phrase "never knew who to trust" is from a fairly recent popular song.  It should be "never knew whom to trust".  My question is: how do you reach that change?  Is it because "whom to trust" functions as the object of the verb "knew"? If I recall correctly, in Latin, when you have an indirect question or an indirect statement, the relevant indirect phrase following the verb is in the nominative rather than the accusative. So in that language, it would actually be "who". Can anyone confirm my recollection?  Or is it also because in the phrase "whom to trust", "whom" is the object of the verb "trust"?  Either way, you reach the relevant change. I'd be grateful for your thoughts.  Note: this is not a duplicate of the linked questions. There are two elements here, first the accusative (not dative) object of the verb and second the indirect question with complement. That second element has not fully been answered.

has a "who to follow" button on the upper side of the screen. Shouldn't it be "whom to follow"?   suggests that whom is the correct usage in a case like this.


Conceptually it seems like a derived class should be able to override a readonly property with a read write property.  Why isn't this possible?  Public Class Base      Protected _name As String     Public Overridable ReadOnly Property Name() As String         Get             return _name         End Get     End Property  End Class  Public Class Derived     Inherits Base      Public Overrides Property Name() As String         Get             Return MyBase.Name         End Get         Set(ByVal value As String)             _name = value         End Set     End Property  End Class

Why is the following C# code not allowed:  public abstract class BaseClass {     public abstract int Bar { get;} }  public class ConcreteClass : BaseClass {     public override int Bar     {         get { return 0; }         set {}     } }      CS0546 'ConcreteClass.Bar.set': cannot override because 'BaseClass.Bar' does not have an overridable set accessor


I was playing my son using a green deck.  I played a  which has trample.  He played an Eldrazi with deathtouch.  He is a firm believer as soon as the attackers and blockers are announced, the deathtouch would kill the Wurm.  I tried to get him to understand it would be taken care of in the damage phase and the Trample would in fact still do its damage.    Now, I know that Trample damage will take affect on the defending player only after it does lethal dmg to the blocking creature.  So, I announce the attackers and he announces the defenders.  The issue I have is, would my dmg take affect before his deathtouch does.  I believe my dmg is resolved first, activating the trample.  His dmg is activated second, satisfying the rules for deathtouch to work.  That card would destroy the Wurm, but the Wurm would complete the Trample before.

My friend has a trample deck, and I have a  that says "Whenever Stinkweed Imp deals combat damage to a creature, destroy that creature."  Can a creature destroyed this way still deal trample damage?  What if I block with a creature that actually has deathtouch?


This image demonstrates what I'm talking about:    The motherboard's CPU temperature is in green. The individual cores' temperatures are in red.  I've tested the temperatures in three different scenarios:   Idle: All cores <5% utilization. Core temperatures are around 70C, while CPU is around 55-60C. Frequency stays around 2600 Mhz. Gaming: Three of six cores around 50% utilization, remaining three <10%. Core temperatures gradually increase to 90C. CPU temperature gradually decreases to 40C. Frequency is gradually reduced to 1200 Mhz. Pictured above. Stressed: Using Intel's diagnostic tool to stress the CPU; all cores near 100% utilization. All cores are over 90C, while CPU is at 80C (I believe the tool limits itself if it goes above 80C). I can't monitor frequency during this.   Why are the two readings so different? Also, why does the motherboard's reading decrease while gaming, even though the Core readings are almost as high as they are during the stress test?

Everest Ultimate is suddenly telling me that the CPU temperature (and core temps) for my E6850 Core 2 Duo is 72 degrees Celsius. When I stress-test the machine, the temp goes up to 91 degrees and the CPU actually throttles. System remains stable though.  For over a year now, my CPU has run very cool (40's) with a large commercial copper heatsink/fan that I bought separately.   To top it off, I removed the cover of the box and felt the cpu heatsink and it wasn't even warm.   Is there such a thing as a CPU temp sensor showing the wrong readings?  Any tips would help.  UPDATE #1  Temp is also just as high in BIOS. So that leads me to believe it's a CPU seating issue (even though I used thermal paste to seat it two years ago when I built the machine)  UPDATE #2 Well. I removed the heatsink and cleaned off the original thermal paste (which was somewhat crusty). I polished the surface, re-applied some new paste, and reseated the heat sink. After powering it up, there was no noticeable change in the temp - ideling at 74. Ran the stress test and it went up to 94 degrees before being 100% throttled. I let it sit at 94 degrees for 20 minutes straight and the computer didn't even flinch. I then immediately shut it off and opened the case and felt around. The heatsink was completely cold to the touch. Even the copper rods were cold. The area near contact with the CPU was slightly warm but not hot to touch.  Then I ran REALTEMP, which is supposedly more accurate and it told me the CPU was at 104 degrees. (LOL)  At this point, I'm thinking no doubt the cpu's sensor is wrong. Sidenote: the BIOS has the latest version so no option to flash there. Reverting hasn't been known to help from what I've read.  What angers me is the false temps force the CPU to artificially throttle from 3GHz down to 2GHz and my CPU fan is cranking at full force all the time.  Should I call intel and tell them to send me another E6850?   SOLUTION UPDATE  I switched the processor out with another one and got the same obscene temperatures with the new processor followed by a heatsink that was cool to touch. My suspicion in the heatsink was suddenly renewed. I swapped it out with the stock heatsink/fan and lo and behold the temperatures returned to the normal 35C-50C. Even though the thermal paste was visibly flattened out every time I removed it, it looks like the heatsink was still not pressing hard enough on the CPU to effectively conduct the heat. The heatsink is a Masscool 8Wa741, which screws into a standard position on a mount on the back of the MOBO. Only thing I can surmise after 2 years of use was that, over time, the heatsink pressure on the CPU gave way until the heat began to be ineffectively conducted.   Lessons learned:     Intel CPU's can run SUPER HOT (upwards of 95C) and still be stable.  Heatsink's need to be VERY firmly pressed against the CPU to conduct heat.


I have lost my android phone please help me find its location. I have tried to recover it but all in vain.   What can I do to recover it back using  IMEI ?

I have lost my Android Phone. How can I track it via IMEI number.   Can I install any application which can given me the number of SIM currently on given IMEI number.  Please help


I just did apt-get upgrade on my Ubuntu 16 and noticed that mysql-client package was updated. I don't remember installing it though.  How to check which package I did install depends upon it?

In order to research what caused the installation of a given package, I'd like to get a list of packages which depend on that package. I couldn't find anything obvious in man dpkg.


This is a real story.  About 6 months ago, someone asked me to help her to solve her financial problem. I didn't know about her at all. At that time, I replied as ... Sorry, I want to help you but I can't .... She asked me to help her again, but I declined again.  She is an USA Air Force Officer.  Yesterday, I received a beautiful letter from her.     Hello my dear friend      It is my pleasure to reach you after our successful attempt on the   transaction. Well, i just want to use this medium to thank you very   much for your earlier assistance in the past to help me in receiving   the fund, I am obliged to inform you that i have succeeded in   transferring the fund with the help of a new partner from Canada.   everything was perfectly done because we stroke a deal with one of the   Lady accountant who works with the Federal Ministry of Finance, and   she rendered tremendous help to us.      You have to contact [SomeOne] to send you the ATM visa card i kept for   your compensation, the amount on the ATM is Nine hundred and fifty   thousand united state dollars ( $950,000 USD ) and your pin code is   (XXXX) thank you for all your effort and how you tried to help me, i   believe this money will solve some of your financial problem,      If you cannot travel to meet [SomeOne] in Senegal you can send him   your personal contact address where to post the Atm card to you   through dhl or ups, remember that i had giving him instruction to   release the ATM for you once you been in contact with him. once you   received the Atm remember to inform me so we can share the joy   together,      His name: someone      Email: [removed]      Phone Number: [removed]      Sincerely, Sgt Dr xxx xxxx   Is this possible?  I can't understand current situation?  How can I handle this situation?

I received the below email. Is is a scam or not a scam?     Attention: Mohamed Atef,      May the peace of the Lord be with you.      Yes He left an ATM/VISA CARD with me before he traveled out of the   country, He ask me to send it to you, but do not know how to convert a   card to money when he did not give me the pin code due to security   reasons. He said that as soon as you confirm that you have received   the ATM CARD that his bank will give me the code so that I will send   it to you for onward withdrawal of your money.      I will need your full name, address and telephone number, to enable me   gives it to courier Service Company so that they will deliver it to   you.      I will be waiting for you to send to me your full address.      God bless, Rev. James Koko


What are the practical ramifications of philosophy & How can we make it relevant to ordinary people.   Philosophy is  seen by many as a useless subject and a mere waste of resources.   Countless degree programs in philosophy have been retired by universities the world over because of this.   So my question is  How is philosophy useful?  What are the practical of philosophy to the day to day lives of ordinary people? What is the usefulness of philosophy to the plumber, to the engineer & scientists? Is philosophy all talk, talk & talk with no action? Is philosophy really necessary? What type of jobs do philosophers do with a degree in philosophy other than become lecturers & teach other students who will become lecturers & the cycle goes on.

Examining the practical, impactful, real-life benefits of getting a degree in philosophy It is often asked, "What is the practical use of philosophy?" or "How will learning about philosophy impact real-life?" It is easy to see why there is such mystery surrounding the topic. Most schools up through high school may only offer 1 or 2 courses on it, if any. It is also often talked about in general conversation as a "wishy-washy" subject, often negatively, as though it contains no answers but only raises an endless series of questions. To add to this, those who hear of the subject but know very little of it may be surprised to see it offered at their university as a major. It is clear to most why some people would want to major in Computer science, Mathematics, or Physics. But what would a degree in philosophy get you?


I'm making a an alarm clock using a form and making it all pretty with buttons and stuff but I need a way to read the Windows system clock but I am unaware of how to do so. I have read through a few questions here but I am unable to find what I need. I only need to second precision; I'm doing an hour, minutes and second digital clock.   I've read about using the SNTP server like time.windows.com but I don't have that much experience in C# so anything minimal to help me expand my knowledge on C# would be really useful.

How do you get the current time (not date AND time)?  Example: 5:42:12 PM


Currently I'm working on a class that manipulates FITS files (image files used in astronomy), but I'm having trouble with a class method that is a template.  My code (shortened for legibility)is as follows:  File: fitslib.h  class FitsLib { private:     //some variables and functions public:     //some functions     //my problem function:     template<typename T>     void addFITS(T *data) }   File: fitslib.cpp  #include fitslib.h //Various other functions... //my problem function: template<typename T> void FitsLib::addFITS(T *data) {     //my code is here }   When I use this function within my main.cpp, I get an undefined reference. I understand why and the code works when I define it within the header file. However, I don't want to have it all in my header file.  Furthermore, I tried explicitly instantiating the template as described in solution 1 from , but I get the errors relating to nested-name-specifiers and the function not being recognised as a template.  I also tried switching between typename and class to no avail.  Thank you in advanced if a solution is found, the help is greatly appreciated!

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I do understand how to achieve putting letters in a list separated by commas:  e.g.  a = 'hello'  print(list(a))   How can I achieve such an output below?  ['h':0, 'e':1, 'l':2, 'l':3, 'o':4]

How do I access the index in a for loop like the following?  ints = [8, 23, 45, 12, 78] for i in ints:     print('item #{} = {}'.format(???, i))   I want to get this output:  item #1 = 8 item #2 = 23 item #3 = 45 item #4 = 12 item #5 = 78   When I loop through it using a for loop, how do I access the loop index, from 1 to 5 in this case?


I tried the following program   class test{ public static void main (String argv[]){     double x = 0.1;     double y = 0;     for (int i =0;i<10 ; i++){         y=y+x;         System.out.println (y);     } } }   but it gives the following output  0.1 0.2 0.30000000000000004 0.4 0.5 0.6 0.7 0.7999999999999999 0.8999999999999999 0.9999999999999999   Why does java7 give this instead of just 0.3 or 0.8  ...!   I tried the following in online java compiler as well

double r = 11.631; double theta = 21.4;   In the debugger, these are shown as 11.631000000000000 and 21.399999618530273.  How can I avoid this?


I have a caller function that invokes another function that send a HTTP POST with parameters. Now i want that this called function blocks execution until there is its "success" (so when its HTTP POST has been done).  This is my logical code:  var fingerprint = null; var janus_session = null; var inserted = "false";  $(document).ready(function() {       //stuff       fingerprint = FindFingerprint(jsep);        janus_session = janus.getSessionId();       inserted = SendSDPLine(fingerprint, janus_session);       console.log("**in MAIN: inserted= " + inserted);        //other stuff     }  function SendSDPLine(fingerprint, janus_session) {   var sdp = fingerprint;   //    var url = "http://localhost:8484/Shine/AccountController";   var action_type = "InsertSDPLine";   var sessionid = janus_session;    $.ajax({     type: "POST",     url: url,     xhrFields: {       withCredentials: false     },     data: {       "action": action_type,       "sdpline": fingerprint,       "sessionid": sessionid     },     success: function(data) {       if (data == "INSERTED") {         inserted = "true";         console.log("in SENDSDPLINE: inserted= " + inserted);       }       return inserted;       //        return checkFingerprint (fingerprint);     },     // vvv---- This is the new bit     error: function(jqXHR, textStatus, errorThrown) {       console.log("Error, status = " + textStatus + ", " +                   "error thrown: " + errorThrown);     }   });  }   In few words, i want that other stuff has been executed after that HTTP POST response has been checked. I've already seen another problem: initially, inserted has false value. In success(data) in HTTP POST response, it has true value. But, in the caller function, in the following console.log has undefined value.  So, i have two question:   how to return this value to the caller function how to stop execution of the caller function until HTTP POST response has been received?

I have a JavaScript widget which provides standard extension points. One of them is the beforecreate function. It should return false to prevent an item from being created.   I've added an Ajax call into this function using jQuery:  beforecreate: function (node, targetNode, type, to) {   jQuery.get('http://example.com/catalog/create/' + targetNode.id + '?name=' + encode(to.inp[0].value),    function (result) {     if (result.isOk == false)          alert(result.message);   }); }   But I want to prevent my widget from creating the item, so I should return false in the mother-function, not in the callback. Is there a way to perform a synchronous AJAX request using jQuery or any other in-browser API?


In how many different ways can we place 8 identical rooks on a chessboard so that no two of them attack each other and none of them is on main diagonal?  I have tried many ways to solve it and I am quite sure it should be done by few cases. But I can't come up with any idea.

On the chess board 8x8, we have 8 Rooks that , each Rook don't atack the other. How many situation if we give out:  a) 1 main diagonal  b) 2 main diagonals That's mean we can't put the Rook to the cells of diagonal


I'm trying to install Emacs for my ubuntu 16.04.1 using the steps mention in  link but at step 4 I got an error but there is some emacs file already installed in my system. When I run sudo apt-cache search emacs there is file showing under these.  So I want to remove those file.  I found this command:  sudo apt-get remove `apt-cache search emacs | awk '{print $1}' --purge   That doesn't work. So please help.

When I want to compile something from source in Ubuntu/Debian, I usually get build-dependencies by running "sudo apt-get build-dep PACKAGE_NAME" in the terminal.   They are (usually) useless once the compilation job is done.  So, how do I remove all build-dependencies for a particular package?


How do you do this? Sometimes I'll be playing a game and find something funny I'd like to save as a picture, but there seems to be no option to do this.  I remember Nintendo updating the 3DS and saying we could screenshot the game, but I can't find anything that would work.  I've tried using Game Notes and using Home >> Camera, but that doesn't do the trick either.

In Pokemon X and Y there are specific locations in the game that allows you to save what are essentially 3D screenshots from the upper screen using a virtual camera. This made me wonder - is it possible to take screenshots, 3D or otherwise, from within the 3DS?


In beamer, to set e.g. title in bold I can use \textbf as in  \documentclass{beamer} \title{\textbf{Title}} \begin{document} \frame{\titlepage} \end{document}   How would a skilled beamer expert approach this problem?

I sadly haven't been able to answer this questions using Google. In beamer, I'd like to make the default font for the entire title page, as well as frame titles, to be the default font from the old  (example ).


So guidelines say 2 hours unrefrigerated for raw sausage and raw meatballs... but I was wondering if it's still ok at 4 hours if it passes the smell test.  I had a grocery delivery during the day where they didn't ring the doorbell and I only discovered it at 5pm.  It was left in the shade but is the first hot day of the season.  It was still luke cool to the touch but definitely not cold.  The ice cream bars had melted and become runny.  I was going to cook all the bratwurst and meatballs the next day if it would be ok.  Otherwise, I'd have to throw them out.  Should I eat or throw away?

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


I am looking for a short story from late 70's or so.   Two unrelated Englishmen who survived a famine (everyone went hungry, but nobody starved) in their youth live on a remote planet- I think a mining planet. A tenclone arrives (5 men, 5 women who know of the brilliant man they were cloned from), and is amused and dismissive of these geezers who are individuals.   The tenclone has an accident, 9 are killed. The one who survives must learn from the Englishmen how it is possible to love others as a way to escape the loneliness he now experiences. At the end the survivor leaves on the ship which is bringing in a twelveclone as a replacement.

I'm looking for a story I read in the 90s - I'd guess it's 20-30 pages long.  Two men are posted as scientific observers on an isolated planet for many years.  Despite their differences, they learn to get along and survive the solitude.  One day, a team of 12 identical clones arrives.  There are 6 males and 6 females who were cloned from a brilliant male biologist (by adding X chromosomes, etc.).  They are super close to each other; each one specializes in a different field of science, they all sleep together, and they don't really communicate well with outsiders.  The point of the story is the contrast between the original pair's way of dealing with differences and the clone's identical, in-built similarity which makes those skills unnecessary.  A disaster on the planet results in the death of some of the clones & explores the psychological aftermath of the breakup of their unit.


Though it's a very simple HTML, CSS layout, I am facing problem with this. It does not look like what I want it to be.  <!DOCTYPE html>       <meta charset="UTF-8">     <title>Test</title>
This is the main container
This is the left side

This is the right side

      I want to know why left and right blocks overlaps the container element?     Why left and right blocks overlaps the container element?  I uploaded a screenshot of the code executed in Chrome on PC. Here is the Google Drive preview link:   Thanks in advance.

Although elements like
s normally grow to fit their contents, using the float property can cause a startling problem for CSS newbies: If floated elements have non-floated parent elements, the parent will collapse. For example:

Div 1

Div 2

    The parent div in this example will not expand to contain its floated children - it will appear to have height: 0. How do you solve this problem? I would like to create an exhaustive list of solutions here. If you're aware of cross-browser compatibility issues, please point them out. Solution 1 Float the parent.

Div 1

Div 2

    Pros: Semantic code. Cons: You may not always want the parent floated. Even if you do, do you float the parents' parent, and so on? Must you float every ancestor element? Solution 2 Give the parent an explicit height.

Div 1

Div 2

    Pros: Semantic code. Cons: Not flexible - if the content changes or the browser is resized, the layout will break. Solution 3 Append a "spacer" element inside the parent element, like this:

Div 1

Div 2

    Pros: Straightforward to code. Cons: Not semantic; the spacer div exists only as a layout hack. Solution 4 Set parent to overflow: auto.

Div 1

Div 2

    Pros: Doesn't require extra div. Cons: Seems like a hack - that's not the overflow property's stated purpose. Comments? Other suggestions?


Something has been accessing my 256GB SSD on my Windows 7 -64 bit computer in the past 5 days like crazy and and i did a wipe and reload 1 and a half months ago so not a lot of software has been on it and I don't know what it is is there anyway to see what it is Ty.

Possible Duplicate:          My HDD on a dock just started making noises like it's being accessed but I don't see any program accessing it.  Is there a program that shows which HDD is accessed by which program in percentages similar to how the task manager shows which programs use the most CPU?


Hey I'm traveling to Canada via LAX from Australia on a non connecting flight. Do I need a visa for the USA in this case, or can I change flights without a visa

In Europe usually you don't need to go through immigration to change planes (unless you are entering/exiting Schengen). Is it the case in the US as well? May I catch a connecting flight on one of the US airports if I don't have US visa?


I have vague memories of a sci-fi story that involves "the whisper line" as a crucial plot device. The whisper line refers to 2 secret points in a highly oppressive prison institution between which it is possible for 2 inmates to hold a private conversation without anyone else's notice.  Sadly, all other plot details escape me.  I seem to remember these other features:   Darkness, silence, and the routine of life in the institution The institution was submerged (subterranean?), possibly in a ravine, reserved for Jon Smith type dissidents Long quiet struggle and shifting fate for a mostly limp and powerless protagonist An unlikely bond between characters who grow to sympathise with each other in an almost animal sense (prior enemies drawn together in prison, I deduce) Slow, unsensationalist observation of the dehumanising effects of authoritarianism   The vivid feeling I have of the last 2 makes me think this could be an Ursula Le Guin novella, but I'm fairly sure I've read all her material in the last 5 years or so and haven't been able to retrieve this.

There's a story my grandpa use to tell me when I was younger, about the sole survivor of of an attack on a mining vessel in space. The man lives in space for months/years, ignored by the company he worked for and never rescued. Then when he thinks he is being rescued, it's actually another set of raiders who attack him and kidnap him.  He then wakes up in captivity in some sort of prison inside of an asteroid, and has a word tattooed on his forehead. My grandpa called him Ronin (that's what the tattoo on his forehead said) but I don't know what the character's real name is. Anyways, he learns that he has the ability to teleport after having a brush with death and decides to make his way back to Earth so that he can exact revenge on the mining company who abandoned him and left him floating to die.  Does anyone know what this story or book may be? My grandpa told it to me when I was little, he said that he got it from a book he use to love reading when he was younger. I'm assuming the book is very old (possibly pre 1940's as he was born in the 20s). I can't ask him as he is no longer alive. I'm also unsure as to whether or not all the details in the story he told me, are the same as in the original.


the new search console is pointing out usability errors on mobile devices on WordPress upload pages, that is, pages where I can not change font size, viewport window and things like that, how do I solve it, or what to do with that Google does not take those pages into account.  The errors are these:        Text too small for reading   The preview window is not set   The clickable elements are very close

I have just had an email from google console to say “New Mobile Usability issue detected for site “ and below that it says        Viewport not set   Text too small to read   Clickable elements too close together      As I have had the website as it is for several years I assume they have changed their criteria but really not sure what is wrong. Looking further into the console it has an example  and says only one page is affected. And that page is not supposed to be accessible to bots. Really confused. Any help greatly appreciated.  My robots.txt looks like that:  User-agent: *  Disallow: /wp-admin/  Disallow: /wp-includes/  Disallow: /wp-content/plugins/  Disallow: /wp-content/themes/   So, basically, the new search console is pointing out usability errors on mobile devices on wordpress upload pages, that is, pages where I can not change font size, viewport window and things like that, how do I solve it, or what to do with that google does not take those pages into account.


This theorem is the converse of Wilson's theorem:     If $n$ is composite and $n>4$, then $(n-1)! \equiv 0 \pmod n$   The question holds up for all the composites I have tried but I'm struggling to form a proof for all composites greater than $4$.

I have a proof and need some feedback. It seems really obvious that the statement is true but it is always the obvious ones that are a little trickier to prove. So I would appreciate any feedback. Thank you!  Here is what I am asked to prove:     If $n$ is composite then $(n-1)! \equiv 0 \pmod n$.   Proof:  $n$ is composite $\implies n=ab$ where $a,b \in \mathbb{Z}$ and $0<a,b<n$.  Case 1: If $a=b$ then $n=a^{2}$. Now $n \mid (n-1)! \implies a \mid (n-1)!$, so $$\begin{aligned} (n-1)! &\equiv 1\times 2\times \dotsb \times a \times\dotsb\times (n-a)\times\dotsb\times (n-1) \\ &\equiv 1\times 2\times \dotsb\times a \times\dotsb\times -a\times\dotsb\times -1 \\ &\equiv 0 \pmod n \end{aligned}$$  Case 2: $0<a<b<n$.  Then, since $a \mid n$, $b \mid n$ and $n \mid (n-1)!$ we have that $a \mid (n-1)!$ and $b \mid (n-1)!$.  So this implies $(n-1)! \equiv 1\times 2\times \dotsb\times a \times\dotsb\times b\times\dotsb\times (n-1) \equiv 0 \pmod n$, Q.E.D.


First off, I understand .  Today I ran across this for the first time when I signed up on the musicians' SE site. I was confused as to why I got all this free rep. After looking into it, I see that there is a good rationale behind starting you off right on a new site, as explained by this paragraph:     If you are an experienced Stack Exchange network user with 200 or more reputation on at least one site, you will receive a starting +100 reputation bonus to get you past basic new user restrictions. This will happen automatically on all current Stack Exchange sites where you have an account, and on any other Stack Exchange sites at the time you log in.   That's very clear. It explains how it works. I'm not asking "how" it works, but why. I have read  as well as several others, and they only explain what it is, and that it is by design. My issue is exactly the same as described in , but again, I understand why it happened--it is by design--I just don't understand why it is by design.  Why do I receive this rep bonus on my first SE account?   It makes sense I should get the bonus on a new account, as it says above, to get past some new user restrictions. But if I already have 200 rep on another site (this is the reason I'm getting it on the new site), why give me 100 rep on the old one as well?

I was just awarded +100 reputation on all of my Stack Exchange accounts.  What is this bonus for? It simply says "Association Bonus" on my reputation overview.  Also:   What privileges does the association bonus grant users? Can I lose the association bonus? Does it make my reputation 101 everywhere? Can I earn the association bonus on sites I haven't joined yet? Does it matter which site I earn the 200 reputation on? Will I get an association bonus every time my reputation on a site crosses 200 points? Does the association bonus allow me to answer protected questions? Does the association bonus count towards the reputation cap? Can I get the association bonus if I only have a profile on one site? What else is there to know about the association bonus?


We hired rented cars in Australia during our visit as tourists there. After 3 months of coming back we received a penalty reminder notices of same day, same highway for exceeding the speeding limit. My speed was 66Km ( while limit was 60kmph). Two notices are within a duration of 1 hour. The total amount is 226 AuD each. I am in India now & as such don't have any plans to visit Australia in near future, but I do visit other countries.  I need to know how it will impact me if I don't pay the fine and is there a possibility to get a waiver of this fine?

I live in Italy and I own a car registered in Italy as well.  Next year I'm planning a long stay in the US (around 6 months) and I want to bring my car with me.  I was wondering: can I abuse carpool lanes, not pay for parking, break the speed limit, etc, with no consequences (while still driving safely, of course)?  If they give me a fine, is it just trash paper or can they somehow force me to pay?  (What I want to avoid is basically going back to the US 20 years from now and getting arrested for that, or something similar)


If my opponent makes me discard a card and I choose a creature card with the Bloodrush ability, can I pay the cost during the forced discard in order to activate the ability?

I'm starting on mono blue mill deck and I saw . I'm not sure about its ability.     {tap}: put a charge counter on Grindclock      {tap}: target player puts the top X cards of his or her library into his or her graveyard, where X is the number of charge counters on Grindclock.   If I just cast  and use its first ability, will the second ability take effect, or do I just put a charge counter on it? If there's already one charge counter on it and I use the first ability again, it will have two charge counters on it? Then the second ability will take effect with two cards being sent to graveyard?  If I use spells or ability to untap it after being used can I use its ability again on the same turn?


How to get db server time using linq in selenium C# without using add and substract. Date.TimeNow is giving system time (EST) but the server is with different time (CST). As per instructions I am not supposed to use Add or substraction. Could someone help me with this.

If I have a Linq to SQL expression like this:    from subscription in dbContext.Subscriptions  where subscription.Expires > DateTime.Now select subscription   I want this to to use the SQL Servers GETDATE() function instead of the time of the machine running the C# program.  The next question would be how to translate this:  DateTime.Now.AddDays(2)   to this:  DATEADD(dd, 2, GETDATE())


I am aware that we can get .exe versions of many linux utilities. I happen to have wget.exe, curl.exe and busybox.exe. But how can I install them so that instead of typing   C:\Users\Rahul>cd downloads  C:\Users\Rahul\Downloads>wget   I can straight away type  C:\Users\Rahul>wget

Suppose I have a program named any_program.exe and my operating system drive is C:. The location of the program is D:\Any_Folder\any_program.exe  How do I start/execute that program via command prompt in Windows 8?  I have tried the command line START any_program.exe, but it shows me an error that      Windows cannot find 'any_program.exe'. Make sure you typed the name correctly, and then try again.   By the way, it worked perfectly in Windows 7. And, if I type START notepad.exe or START firefox.exe (Firefox is not installed in C: drive), it works in Windows 8.


I have Ubuntu together with Window 8 installed on my laptop. I have installed Kaspersky Antivirus inside.  Do I need to install any new antivirus program? Any advice for the more efficient anti virus program?

I thought that there was no need to scan for viruses either in Ubuntu or any Linux distros until I found virus scanner packages clamtk and klamav in Ubuntu software center yesterday.  This leads to the following questions:   How do viruses differ between Linux and Windows? How do the strategies for protection differ between Linux and Windows? Should a virus scanner package be installed on my system? If so, which would be a better option?


I was having some troubles when trying to set the on click listerner for
 dynamically. Here is my code to populate the list:  for(var i = 0; i < chatlist.length; i++){         $('

' + contact + '

' + preview + '

').appendTo($('#contacts ul'));     }   On click listener for selected row:      $('#contacts').on('click', 'li', function() {         var index = $(this).index();         console.log(index);    });   I am using . Upon selecting row, I wanted to set the selected
 tag to

   I managed to get the selected row index but I not sure how to set the HTML class for selected
. Any idea?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


How we can detect magnet monopole? How we can distinguish it from electric monopole? If we change E to B and B to -E in Maxwell's equations we get proper equations for charge and current density which we can call them magnetic charge and magnetic current. Even if magnetic monopole exits there is no distinction with electric monopole!

A question needed for a "solid" sci-fi author: How to detect a strong magnetic monopole? (yes, I know no such thing is to be found on Earth).  Think of basic construction details, principles of operation and necessary components of a device capable of detecting/recognizing a macroscopic object emitting magnetic field of equivalent of order ~0.1-10 Tesla near its surface, but with only one pole, reliably distinguishing it from normal (2-pole) magnets, preferably at a distance.  Preferably a robust method, not involving extremely advanced technology. Detect the presence, possibly distance (or field strength) and direction.  I know of SQUIDs, but these concentrate on extreme sensitivity. I'm thinking of something less sensitive but more robust (like, no need for the monopole to fall through the loop) and still able to recognize a monopole against a magnet.  Also, how would such a macroscopic object behave practically? Such a "one-pole magnet" about the size and strength of a refrigerator magnets - how would it behave around ferromagnetics, normal magnets and so on?


I was curious to know about my 512mb ram vps and I checked  my centos vps with the 'top' command    Apparently out of there is like ~20Mb of free ram. Is that an issue? This vps has been running for like 6 months, should I clear ram cache or that won't solve anything. I saw a pretty similiar stuff of another vps's screenshot whereas he has 1G of ram and 0.9G were used like in my case.  A single website runs on this website and it is pretty much static (no mysql). Just xml encoding/decoding when a visitor visits the page. I imagine installing mysql or other packages would kill the ram?  I'm a beginner so I apologize in advance for any silly question I might have made.

This is a  about how Unix operating systems report memory usage.   Similar Questions:                    I have production server that is running Debian 6.0.6 Squeeze  #uname -a  Linux debsrv 2.6.32-5-xen-amd64 #1 SMP Sun Sep 23 13:49:30 UTC 2012 x86_64 GNU/Linux   Every day cron executes backup script as root:  #crontab -e  0 5 * * * /root/sites_backup.sh > /dev/null 2>&1   #nano /root/sites_backup.sh  #!/bin/bash str=`date +%Y-%m-%d-%H-%M-%S` tar pzcf /home/backups/sites/mysite-$str.tar.gz /var/sites/mysite/public_html/www mysqldump -u mysite -pmypass mysite | gzip -9 > /home/backups/sites/mysite-$str.sql.gz cd /home/backups/sites/ sha512sum mysite-$str* > /home/backups/sites/mysite-$str.tar.gz.DIGESTS cd ~   Everything works perfectly, but I notice that Munin's memory graph shows increase of cache and buffers after backup.  Then I just download backup files and delete them. After deletion Munin's memory graph returns cache and buffers to the state that was before backup.  Here's Munin graph:  Externally hosted image was a dead link.


Do Moderators of the community make any money or get paid from SE.  Just wanted to know what is the motivation factors that drive them to work as a moderator ?

I just wonder if moderators earn any money or earn a salary for being moderators - or do they do it just to help out on the site?


I am a beginner to python and coding in general and have not a clue why return in the code below doesn't move across functions. Shouldn't the value for n be stored for use in all functions? print(n) is in there only for my own sake to see if it works, and it is apparently not. def main():     print("This program tests the Goldbach's conjecture")     get_input()     print(n)   def get_input():     n = 0     while n == 0:         try:             v = int(input("Please enter an even integer larger than 2: "))             if v <= 2:                 print("Wrong input!")                 continue             if v%2 == 1:                 print("Wrong input!")                 continue             if v%2 == 0:                 n = v         except ValueError:             print("Bad input!")             continue     return n

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


I have a table that looks like this:  \begin{table}[h] \centering \caption{MYCaption} \label{tbl:table1} \begin{tabular}{|l|l|l|l|} \hline \rowcolor[gray]{.8} \multicolumn{4}{|c|}{Team 1}\\ \hline \textbf{Caption1} & \textbf{Caption 2} & \textbf{Caption3} & \textbf{Caption 4}\\ \hline Some values & Some values & Some values & Some values\\ \hline \rowcolor[gray]{.8} \multicolumn{4}{|c|}{Team 2}\\ \hline \textbf{Caption1} & \textbf{Caption 2} & \textbf{Caption3} & \textbf{Caption 4}\\ \hline Some values & Some values & Some values & Some values\\ \hline \end{tabular} \end{table}   I also have a two column layout, but the table spreads across both columns. However, at the moment the table is too wide for the page width. Now I would like that the font size is automatically adapted so that the table always fits into the page. The solutions I could find so for are not able to do this, because they use linebreaks to fit the table. I don't want linebreaks.

I have a table that I want to insert on a page, but at least one (perhaps both) of the following conditions are met:   The table is too wide to fit within the text block or page. That is, I'm exceeding some horizontal restriction. The table is too tall to fit within the text block or page. That is, I'm exceeding some vertical restriction.   What are my options to make this table fit? If it doesn't fit, regardless of my attempts, what other options exist?


I've heard unverified stories of people who wait around at airports until there is a vacant spot on a flight where they want to go, and then get on for insanely cheap. I would also imagine that it is theoretically possible to hitch a flight with a non-commercial plane where you want to go. I'm thinking international fares in the double digit range.  Of course, the kind of travel I'm imagining would not be comfortable or convenient. I'm thinking things that might be borderline "stowaway", but legal and ethical. I don't mean flight search websites, promotional deals, or other obvious ways of flying cheap.  Does anyone have any experience or ideas on how I could travel like this?

We had , which covered ground on what happens to flight prices over the period.  What I'm interested to know is if I had to fly out at short notice, say within 1-2 days, then am I better off booking within that 1-2 day gap online, or am I better off trying my luck directly at the airport (as long as I'm willing to wait at the airport) for a cheaper price? Is there any truth to rumours that airlines sell tickets at cheaper prices at the airport right before flights to fill empty seats or is that a myth?


The camera origin is:  scene = bpy.data.scenes["Scene"] camera_origin = scene.camera.location   The camera direction is calculated with  camera_direction = scene.camera.matrix_world.to_quaternion() @ Vector((0.0,0.0,-1.0))   The view_frame i.e. camera_corners are:  camera_corners = scene.camera.data.view_frame(scene=scene)  # camera corners   At this point camera_corners contains 4 vectors.  Question: From the camera_origin, how do I calculate the direction of the view_frame/camera_corners similar to the camera_direction?

How to get coordinates of corners of camera border in camera view relative to the viewport area?  After checking  import bpy print('-----') print() print() for a in bpy.context.screen.areas:     if a.type == 'VIEW_3D':         for s in a.spaces:             print(s)             for d in dir(s):                 print(d) print('-----')   I have no idea how to find out where I can get this


I am trying to add a phone number mask using jquery.  I am having an issue with the hidden phone number fields that get added after user asks for more phone number fields.   $(".phone").on('input', function (e) {     var x = e.target.value.replace(/\D/g, '').match(/(\d{0,3})(\d{0,3})(\d{0,4})/);     e.target.value = !x[2] ? x[1] : '(' + x[1] + ') ' + x[2] + (x[3] ? '-' + x[3] : ''); });  am  not really sure why its not applying the on 'input' function to the rest of fields in the same class. This is what my HTML looks like:

                         <input asp-for="PhoneNumber" type="text" name="addmore[]" id="phone" class="form-control k-textbox phone" placeholder="Enter Phone No.">
                             <button class="btn btn-success add-more" type="button"></button>

                     <input asp-for="PhoneNumber" type="text" name="addmore[]" id="phone" class="form-control k-textbox phone" placeholder="Enter Other Phone No.">
                         <button class="btn btn-danger remove" type="button"></button>

  Here is the full script incase it helps to narrow it down: $(".phone").on('input', function (e) {     var x = e.target.value.replace(/\D/g, '').match(/(\d{0,3})(\d{0,3})(\d{0,4})/);     e.target.value = !x[2] ? x[1] : '(' + x[1] + ') ' + x[2] + (x[3] ? '-' + x[3] : ''); });  $(document).ready(function () {     $(".add-more").click(function () {         var html = $(".copy").html();         $(".after-add-more").after(html);              }); }); $("body").on("click", ".remove", function () {     $(this).parents(".control-group").remove(); });


I want to select records after first 5 records in a table. The table is getting updated with new records. I have displayed 5 new records select top 5 * from table order by ID DESC.  Now I want to Display another 5 records somewhere else in the page, what will be the query for that?

Is there any way in SQL Server to get the results starting at a given offset? For example, in another type of SQL database, it's possible to do:  SELECT * FROM MyTable OFFSET 50 LIMIT 25   to get results 51-75. This construct does not appear to exist in SQL Server.    How can I accomplish this without loading all the rows I don't care about?  Thanks!


I've been curious for quite a while why you don't have a specific site pertaining to wildlife. From a cursory perusal of other online sites, it seems like it would be a very popular, well-used,  and welcome addition. I hesitate to postulate ,(but will anyway) that it could be a heck of a lot more popular/helpful than some of the other seemingly relatively obscure subjects.  I can't be the only one who has a myriad of questions (and occasional answers) about our feathered, furry, and scaly friends.

I have an idea or subject that should have a Q&A, and want to propose a new site. How can I do this?  Related:


I have   template <class ElemType> class FunctionNode : public ComputationNode<ElemType> {     typedef void(*TensorFunctionFunc)  (TensorView<ElemType>&);      static const map <string, TensorFunctionFunc> fmap;   and in the cpp  template <class ElemType> const map <string, TensorFunctionFunc> FunctionNode::fmap = FunctionNode::create_map();   However i get a variety of errors , tried using as well. Any ideas ? Also i don't think i can use std::function() since i'm using dlopen.    Quite a few similar questions but none covering a static map of function pointer , in a template .  This is not a duplicate of "Why can templates only be implemented in the header file? 12 answers" since even when using the header it does not work due to the static ! . This requires completely different initialization.  ( the answers there do not work) ..

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I'm trying to retroject Natural Earth's Shapefile of the world (Admin 0 – Countries on this page: ).  Here's the original Shapefile in QGIS 3.4.1:    Reprojected in Robinson World, centered at Long 0:    All seem good. However, when I try to reproject centred at a different longitude (say Montréal at -73.3), here's what happens:    The polygons aren't sliced at the edge of the new map, and the software is confused as to where polygons start and end.  What's a good way to deal with these problems?

I wish to display a map in QGIS (world country shapefiles) showing all countries but centered on the Pacific area.   I am not familiar with Proj4, so is there any way this can be done in QGIS?


this is a block of code that im writing (OUDialog is a package from the open university version of bluej that acts like a msgBox):    public void addItems(String accName){       for (int i=0;i<Accounts.size();i++){          if (Accounts.get(i).getName()==accName){             adding = true;             while (adding==true){                String choose = OUDialog.request("enter 'y' to continue.");                if (choose=="y"){                   Accounts.get(i).addEntrie();                }else{                   adding = false;                }             }          }       }          }  as far as i can tell everything should be working but when i run this method this if statement refuses to cooperate: if (choose=="y"){    Accounts.get(i).addEntrie(); }else{    adding = false; }  I have know idea why it cant detect when I enter "y" and cant find answers anywhere else. P.S. im asking here because i already finished my java programming course w/ the OU and cant ask my tutor.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Is there any unwritten rule in the academia regarding the rate of paper publication by a PhD student?  I.e. how many paper publication per year is considered as a good performance for a PhD student?  How does that vary from 1st to last year?

Is there any data for the average number of papers published per year by individuals at different career stages (ph.d. student, postdoc, tenure-track, tenured associate/full professor)? It would obviously be dependent on research areas and I also realize that such data may not be easy to obtain - hence the question to put it out and hope to get some direction for my study. I am interested in data from the Computer Science and/or Applied Mathematics fields, but answers for other research areas could also be interesting. In absence of data, anecdotal experience in one's branch may also be helpful.  UPDATE:  - Obviously, the number of paper per year is highly field specific. So is citation counts (which includes all the analysis it comes with such as average citation counts, h factors, impact factor of a journal and so on). - Several countries such as the New Zealand, have their own research evaluation system in which one of the important evaluation criterion for research-groups or even individuals is the number of papers published in one to six years span. The data for average number of papers by individuals in different disciplines may put these evaluations in perspective with the global averages. e.g., individual publishing two paper per year in a sub branch where the average number of papers per year by individuals is one should not be directly compared to those publishing 10 papers a year in subbranches in which 15 papers per year is the average norm. In short, the purpose of obtaining such data is to provide corrections to the evaluation systems in such countries.


In Order of the Phoenix, we encounter the Veil in the Ministry's Department of Mysteries. With the nature of this artifact, it seems as though it would be, at best, very difficult to move. It also appears to be located very centrally within the Department of Mysteries.   Was the Department of Mysteries, and subsequently the entire Ministry, constructed around the Veil?

Was the veil created by someone or was it always there in HP? What is its purpose? If one can't communicate with the dead through the veil, then what/how do unspeakables learn from the the veil? (except investigating how does it flutter,I suppose,,,,)


Recently I've been working on a realistically scaled planet engine. I found several interesting links about how to do it, what problems will come up after, and how to solve them. The approach I took was the one I found on many articles: Use 6 quadtrees, one for each faces, then transform the cube into a sphere.  My quadtree logic seems to be working, I tried it on a flat terrain and on a sphere ( with reasonable distances ), and it worked great, then I tried with bigger distances.  The first problem was z-fighting, fixed using a logarithmic depth buffer (  ). The second was floating point precision on big numbers.  I read two main approaches to fix it. The first one is to use doubles instead of floats for operations, and give the gpu every positions relative to camera space. The second was to use different spaces in different units ( object space in meters, planets space in kilometers, solar system space in AU, etc... ). While the second was encouraged by many people, I took the first one because it seemed easier to do. I plan to try the second in the future anyway.  The first approach worked on flat terrains because it was easy to compute the position relative to the camera ( centerOfNode - cameraPos ). One bug I still have with it is about height. I use 3D simplex noise on the gpu, which works in float and needs a vec3 input. With relatively small distances, the worldspace position works great. With huge distances, the worldspace position doesn't work when far from the origin, the pattern is very odd because of missing precision. And of course, it won't work with cameraspace position as input. I haven't find anything about that. Something I will try tomorrow is the second approach above. That is, define several spaces with different units, transform the position in each of the spaces, and use each of them as input for the simplex noise function, which will give me several textures I will be able to use for scale. I don't know how I will do in details, but I think it won't work since transform from the lower to the high space might result in floating points errors right? I could dynamically create vertices in the CPU using simplex noise with double precision but it doesn't sound right... I'd like to use the GPU as much as possible, unless I have no other choices.  Second problem I have is with spherical terrains this time. So my steps to get the planet are:  1) From the quadtree nodes, scale, rotate and translate an unit quad to his position in the current plane of the 6 quadtrees  2) normalize it to get the normal  3) multiply the radius to get a sphere at sea level  4) add the height  Since the first step is related to the origin of the planet, even in view space it will require operations with huge numbers ( the radius ), so I am not sure how I can avoid precision problems here... Again, I could create them on the CPU and send them to the GPU, but this sounds exhausting and I don't want to do it unless I have no other reasonable choices. I would gladly use the second solution ( several spaces ) if I had an idea of how to fix it with it, but I'm not sure how to do it...

I'm currently trying to generate a really large procedural terrain in WebGL. I use a quadtree for LOD and plan to generate 1 heightmap for each quadtree node (terrain patch).  The heightmaps are generated on the GPU and with such a large terrain, 32 bits floats don't have enough precision for the smaller terrain patches. This results in terrain becoming "blocky".  uses bicubic surfaces to smooth things out.  I thought a lot about it and the only other solution I have is to generate the smallest terrain patche on the CPU (with double precision) instead of the GPU, but continue to generate the larger patches on the GPU. But this doesn't seem like the best thing to do. Does someone have an idea for a better solution?  Also, I can't use double precision on the GPU because I'm using WebGL, which doesn't support it.  Thanks a lot :)


Below is my script.  #!/bin/bash SERVERS="sl20rht00-t" #SERVERS="shcbrht01-t" USR="adm-dt-c" for host in $SERVERS do ssh -tt $USR@$host 'sudo cp /etc/sudoers /Backups/sudoers_11thmarch2015; sudo cp /etc/ssh/sshd_config /Backups/sshd_11thmarch2015; sudo cat /home/adm-dt-c/denyuser >>  sudo /etc/ssh/sshd_config; sudo /etc/init.d/sshd restart;' done exit 0   The problem is I'm not able to append the line in /etc/ssh/sshd_config even after the successful execution of the script.

When you attempt to modify a file without having write permissions on it, you get an error:  > touch /tmp/foo && sudo chown root /tmp/foo > echo test > /tmp/foo zsh: permission denied: /tmp/foo   Sudoing doesn't help, because it runs the command as root, but the shell handles redirecting stdout and opens the file as you anyway:  > sudo echo test > /tmp/foo zsh: permission denied: /tmp/foo   Is there an easy way to redirect stdout to a file you don't have permission to write to, besides opening a shell as root and manipulating the file that way?  > sudo su # echo test > /tmp/foo


I'm trying to install Ubuntu 18.10 on my USB drive, but all the methods I've tried failed.  I booted a virtual machine from ISO file, and installed on my USB drive, but after I've tried to boot from my USB, it didn't even show up in my boot menu.  I used 2 USB drives to do it, one as a live USB, and installing the system on the other, but grub gets installed on my hard drive, not on the USB drive.  I manually installed grub on my USB drive, but it shows "Secure Boot Failure".  So how do I install Ubuntu on my USB drive?  Besides, I need the system to be able to boot in both BIOS and UEFI.

If you are hurrying to reply, System → Administration → StartUp Disk Creator -- no, that's not what I'm talking about.   I want to try Ubuntu 11.04's Unity without touching my existing Ubuntu install.  To do this, I need to install the nVidia drivers first (sigh).  To do this, I need changes to persist a reboot.  To do this, I need to really install Ubuntu on a USB key.  How do you do that?    What I tried   I tried to make a USB key from , then boot from it, then choose "Install Ubuntu." The installer refused to install to the installation media itself. I tried, from my installed copy of Ubuntu:  sudo kvm /dev/sdb --cdrom .cache/testdrive/iso/ubuntu_natty-desktop-i386.iso   ...but the installer didn't detect the disk properly.


was put on hold at 16:31.  However,  was then post afterwards 3 minutes later at 16:34.  How did the user do this? I thought answers were not allowed to be accepted after a post has been closed...?  I guess that this was possible because the user had started writing before the question was closed so it got through, but if this is the case, then this is a  because the 'Post answer' button should check to see whether the question is closed or not before allowing it, just like it checks to see whether the question has been deleted.

Question:   Answer:   The question was closed at 11:57:57 (according to the hover-over-"x-mins-ago" bar) and the answer was posted at 12:16:35. It's a fairly lengthy answer, so it's possible that it was started to be written before it was closed but I swear I've started to answer a question then I got a banner along the top saying "this question has been closed" and the answer was no longer post-able.


One database I recently start working with was designed with one main table containing all possible values, and foreign keys in other tables are specifying the nature of each of those items.   CREATE TABLE entity (      indexid INTEGER PRIMARY KEY NOT NULL,      entitytype INTEGER,      entityname VARCHAR, );   For example, this main table contain a field named 'entityname' possibly containing records such as:   the upc code of the item the short name of the item the long name of the item the location of the item the vendor for this item  the quantity in stock (and many others)   Each record in this table got a entitytype number as a foreign key referring in another table what each records mean, such as   entitytype=10 mean that this entity is a UPC code type, and then   entitytype=12 mean that this entity is a vendor name type, etc...  Obviously there is dozen of such types for entities.  I feel like it is a bit unintuitive. There is this post  (See One table to hold all domain values section) where the author suggest the approach as I expressed it in my example may not be the best way to do this, and I would tend to agree with his opinion on the matter.  I also think it is difficult to make efficient queries, and I feel it is not how this should be done. I would rather have more tables and keep the whole more intuitive. I have a time window where I could redesign this and was thinking about long term and best practices.  So can this approach be considered a good practice in the long term and I just need to deal with it?

We process a routine data feed from a client who just refactored their database from a form that seems familiar (one row per entity, one column per attribute) to one that seems unfamiliar to me (one row per entity per attribute):  Before: one column per attribute  ID   Ht_cm   wt_kg   Age_yr  ...  1      190      82     43    ... 2      170      60     22    ... 3      205      90     51    ...   After: one column for all attributes  ID    Metric   Value  1     Ht_cm     190  1     Wt_kg     82  1     Age_yr    43  1      ...  2     Ht_cm     170  2     Wt_kg     60  2     Age_yr    22  2     ...  3     Ht_cm     205  3     Wt_kg     90  3     Age_yr    51  3     ...   Is there a name for this database structure?  What are the relative advantages?  The old way seems easier to place validity constraints on specific attributes (non-null, non-negative, etc.) and easier to calculate averages.  But I can see how it might be easier to add new attributes without refactoring the database.  Is this a standard/preferred way of structuring data?


I really do not how to attack this problem.

I need to prove that  $$\sum_{n\geq 1}{\frac{|\sin n|}{n}}$$ is convergent. How should I do it?


I am trying to use the terminal to open the file explorer nautilus. When I type the command nautilus into the terminal, I see the following output (nautilus:5814): Gtk-WARNING **: 07:26:19.884: Theme parsing error: gtk.css:2281:23: Expected a valid selector  (nautilus:5814): Gtk-WARNING **: 07:26:19.895: Theme parsing error: gtk.css:11535:3: '/*' in comment block  (nautilus:5814): Gtk-WARNING **: 07:26:19.895: Theme parsing error: gtk.css:11641:2: '/*' in comment block Nautilus-Share-Message: 07:26:20.229: Called "net usershare info" but it failed: Failed to execute child process “net” (No such file or directory)  I can't run any other commands on that terminal window until I close the nautilus window. Its the same case with other apps run from the terminal like Firefox or Spotify. Is there any way to start an app and then still be able to use the same terminal window for other commands?

How do I run a program in the background of a shell, with the ability to close the shell while leaving the program running? Lets say my UI is having problems or for some reason, I need to boot up a program from the terminal window, say, nm-applet:  nm-applet   When it's started, it occupies the foreground of the terminal window.  Is there any simple way to run the program in the background without needing to leave the terminal open or have it occupy the whole terminal?  On that note, I did find a way to run programs from the terminal and have it allow for other inputs, by appending an ampersand (&) to the command as such:  nm-applet &   But this isn't much use as any processes started in the terminal are killed once the terminal is closed.


Let $\sum_{n=1}^{\infty}a_n$ be a converging series with $a_n>0$,  $\forall n\in \mathbb N$. I want to prove that $\sum_{n=1}^{\infty}a_{2n}$ also converges.   I know intuitively since all the terms in the sequence is positive, then the sum of $a_{2n}$ has to be less than the sum of $a_n$, but how would I show this rigorously? Or using a convergence test?

In posting this question, I noticed a lot of 'similar' threads pop up, but felt that they required a fundamentally different approach.  If any of you feel differently, please feel free to vote this thread as a duplicate and I will delete it.  Here is my approach, I would appreciate help/correction where relevant, as I am unsure of how robust my answer is:  If $\sum a_n$ converges absolutely, then we have that $\sum |a_n|$ converges. This implies that $\sum a_n$ also converges, and that the sequence $(a_n)_{n \in \mathbb{N}}\to 0$.$^{(1)}$  This means that the sequence $(a_n)$ is bounded and monotone (decreasing), and as such convergent.  Looking at $(a_{2n})$ we notice it is a sub-sequence of $(a_n)$ and converges to the same value (Bolzano-Weiestrass).$^{(2)}$  Then the partial sums $(s_{2n}) \to A$ and thus $\sum a_{2n} = A$  Is this sufficient? I feel it is a little wishy/washy in using bolzano-weistrass.  Do I need to formally show $(a_{2n})$ is a sub-sequence of $(a_n)$  Any tips/hints/corrections are greatly appreciated.  $^{(1),}$$^{(2)}$ - I am not required to show these results, as quoting the theorem from my notes is considered sufficient by my professor.


Formerly List of all badges with full descriptions.  What are badge name's requirements? Why didn't I get badge name ? Which badges can I earn multiple times?    Jump to:                    Note: Some badges are awarded based on score. The term score means the total number of upvotes minus the total number of downvotes.  Any badge with a *** next to it is one of 20 badges that count towards the  displayed on a moderator candidate in an election. The candidate score is a total of 40 points: the first 20 are awarded based on the user's rep divided by 1000 and rounded down; the second 20 represents the total number of unique badges earned of the 20 that count. Note that if the same badge is earned multiple times, it will only count once towards the candidate score.  Any badge with a "(retired)" next to it is no longer awarded, but is retained by users who previously earned them. See  for more info on what it means for a badge to be retired.       Visit the  of the  on any site to see a complete list of badges that you can filter by earned, unearned, or type.


I wound call this Curtain slider. What's the proper name for this component?

This was a design concept/pattern that I first saw in use for an interactive on a website to show the before and after images of a natural disaster event.  Since then I have seen it pop up in a couple of different places, but mostly used to show before/after images in an interactive side-by-side comparison. Below is an example that I saw on a website showing the transformation of one type of image into another.    Would this UI component be classified as a slider, an image interaction or something else?   This is the only implementation of the design pattern that I have seen (with the slider in the middle of the overlaid images) but if there are sightings of alternate designs please also add them to the answers.


I have a problem using the \index command in an argument to a user-defined command. For some reason, the problem only appears when I use the @ symbol. The following example illustrates the problem:  \documentclass[a4paper]{book} \usepackage{makeidx}  \makeindex  \newcommand\myFoo[1]{#1}  \begin{document}  \chapter{The first chapter}  \index{one} \index{\texttt{two}}  \myFoo{\index{one}} \myFoo{\index{\texttt{two}}}  \printindex \end{document}   When I typeset this source code (with the pdflatex and makeindex commands), the index looks like this:   two, 1 two, 1  one, 1   So, the "two" entry is displayed twice (in typewriter font), the "one" entry is (correctly) only displayed once. The same problem occurs when I use the @ operator.  The idx file generated by LaTeX is:  \indexentry{one}{1} \indexentry{\texttt{two}}{1} \indexentry{one}{1} \indexentry{\texttt  {two}}{1}   I guess the problem is caused by these two spaces before the { character in the last index entry, but I do not understand why these spaces are there.   Can somebody explain why entries with formatting commands and entries without them give different results here, and suggest a solution?

In document class book, and package caption, creating index with makeidx. Index entries for the main text and for footnotes collate properly; but those for captions create their own entries.  Example: for the tag \index{New York!Custom House!\textit{Cartouche}}, text and footnotes collate properly; but used in a caption, a new entry is created at the third level, and is also out-of-alphabetic-sequence. Note: the top level, and first sub are correct; only the second sub is duplicated.  How to get the caption index entries under the same entry?


I have a long string with some placeholders like %name% which should be substituted with a value given by a dict. According to  link, I was able to solve it. Some parts however should only be included in the returned string, if another parameter is True. For example with this formatting: >>optional:This should only get printed, if 'optional' is True<<  I might get it to work, but I was not able to create a regex expression that works also with multiline import re   # This works (https://stackoverflow.com/questions/26844742/advanced-string-replacements-in-python) def replaceParameter(string, replacements):   return re.sub('%(\w+)%', lambda m: replacements[m.group(1)], string)  # This does not work def replaceOptionalText(myString, replacements):   occurences = re.findall(">>(.*?):(.*)<<", myString, re.MULTILINE)   # ... #  myLongString = r"""My name is %name%. I want to >>eat:eat some %food%. (in two lines)<< >>drink:drink something<< """  replacements = {   'name': 'John',   'eat': True,   'food': 'Apples',   'drink': False, }  myLongString = replaceOptionalText(myLongString, replacements) myLongString = replaceParameter(myLongString, replacements) print(myLongString)  with the expected Output: My name is John. I want to eat some Apples. (in two lines)

For example, this regex  (.*)<FooBar>   will match:  abcde<FooBar>   But how do I get it to match across multiple lines?  abcde fghij<FooBar>


I am configuring hotkeys for commands and want a way to open websites from the command line.   For example, how would I open YouTube directly in Firefox without first opening the browser and then entering the address for YouTube?

Is there a command I can use in Bash that will open a specific URL in the default browser?


The math on the carbohydrates section doesn’t seem to add up... how to decipher this section of the label?

2.8g of total fat. Of that 0.4g is saturated fat, 0.9g is polyunsaturated fat and 1g is monounsaturated fat. Adding saturated / polyunsaturated / monounsaturated yields 2.3g of total fat - not 2.8g. What's composing the remaining 0.5g of fat?


I'm running the code below and getting exception below. Am I forced to put this function in try catch or is there other way to get all directories recursively? I could write my own recursive function to get files and directory. But I wonder if there is a better way.  // get all files in folder and sub-folders var d = Directory.GetFiles(@"C:\", "*", SearchOption.AllDirectories);  // get all sub-directories var dirs = Directory.GetDirectories(@"C:\", "*", SearchOption.AllDirectories);   "Access to the path 'C:\Documents and Settings\' is denied."

I am trying to display a list of all files found in the selected directory (and optionally any subdirectories). The problem I am having is that when the GetFiles() method comes across a folder that it cannot access, it throws an exception and the process stops.  How do I ignore this exception (and ignore the protected folder/file) and continue adding accessible files to the list?  try {     if (cbSubFolders.Checked == false)     {         string[] files = Directory.GetFiles(folderBrowserDialog1.SelectedPath);         foreach (string fileName in files)             ProcessFile(fileName);     }     else     {         string[] files = Directory.GetFiles(folderBrowserDialog1.SelectedPath, "*.*", SearchOption.AllDirectories);         foreach (string fileName in files)             ProcessFile(fileName);     }     lblNumberOfFilesDisplay.Enabled = true; } catch (UnauthorizedAccessException) { } finally {}


I am in the position of needing footnotes for my document. I found that the syntax is:  Something pretty complicated\footnote{This complicated thing needs details.}   This will make my source hard to read so I have to ask you guys: is there any method to work like this?  Something pretty compLicated\footnote{ref:1}  \footnote{1}{This complicated thing needs details.}

I want to know if is there a possibility/method/package, by which I can uniquely label all footnote positions in book.tex. And another file, footnote.tex, containing the footnotes and matching labels, which can be used for inserting footnotes?  Example:  blah blah blah\footnotemark{id1} blah blah\footnotemark{id2} in chap1.tex;  \footnotetext{id1}{blah blah},\footnotetext{id2}{blah blah blah} in chap1foot.tex. When chap1.tex is ran I need \footnotetext{id1}{blah blah} to appear with footnote counter starting from 1 in each page.


I am trying to understand the answer to  of a .    The vertical coordinate (“height") of an object in free fall is described by an equation of the form $x(t) = \theta _0 + \theta _1t + \theta _2 t^2,$  We assume that $\theta_0$ is a known constant. We also assume that $\theta_2$ is known. We view $\theta_1$ as the realized value of a continuous random variable $\Theta _1$.  In this case, finding the MAP estimate of $\Theta _1$ involves the minimization of $$\theta _1^2+ \frac{1}{\sigma ^2}\sum _{i=1}^ n(y_ i-\theta _0-\theta _1 t_ i -\theta _2 t_ i^2)^2$$ with respect to $\theta_1$.  1)$$\hat{\theta }_1 = \frac{\sum ^ n_{i=1}t_ i(y_ i-\theta _0-\theta _2t^2_ i)}{\sigma ^2+\sum _{i=1}^ n t_ i^2}$$  2) Let $\sigma =1$, and consider the special case of only two observations ($n=2$). Write down a formula for the mean squared error ${\bf E}[(\hat\Theta _1-\Theta _1)^2]$    Here in 2, it is stated that:  $${\bf E}[(\hat\Theta _1-\Theta _1)^2] = {\bf E}[(\hat\theta _1-\Theta _1)^2] = var(\Theta)$$  For a normal distribution, we recognize that the variance is determined by the coefficient that comes next to a term of the form $\theta _1^2$. So what we're looking for is the constant that sits next to the $\theta _1^2$ term. We collect all of them, it is $1/2*(1+t _1^2+t_2^2)$. So the final answer is $$1/(1+t_1^2+t_2^2)$$    I don't quite follow and understand what he is saying.  Can someone please clarify?  Thank you.    According to this paper on , $\Theta = (\Theta_0, \Theta_1, \Theta_2)$, as can be seen here:      I don't quite follow and understand what he is saying.  Can someone please clarify?  Thank you.

From this  on Bayesian Least Mean Square estimation:  $$\mathbf E\left[(\Theta -\hat\theta)^2\right] = \rm{var}(\Theta -\hat\theta) + \left(\mathbf E[\Theta -\hat\theta]\right)^2 = \rm{var}(\Theta) + \left(\mathbf E[\Theta -\hat\theta]\right)^2$$  which is to say that $\rm{var}(\Theta -\hat\theta) = \rm{var}(\Theta)$.  I would like to ask how that comes about?  Thanks.  $\Theta$ is the random variable being estimated, and $\hat\theta$ is a constant estimate.


Throughout Harry Potter the general rule seems to be that spells have to be spoken the right way in order to be cast. However on numerous occasions wizards are seen casting magic without a word being said (in the final movie voldermort and harry throw spells around with grunting and moans) then at other moments magic words are said to shoot a spell.   What are the rules of spell casting can a spell simply be said in the head, does it not need to be spoken at all or is the film mis representing the rules of magic?

From my memory of the last Harry Potter movie I saw, I've seen many wizards cast spells without saying the spell at all.  During the final battle in Hogwarts, many wizards just swung their wands and their enemies were knocked out. I am 100% sure about this!  The most remarkable spells were the ones that emit a green or red beam in the final battle of Harry Potter against Voldemort when they pushed their beams towards each other.  So, the question is, are they cheating? Because, unless there are wordless spells, they must say the words for a spell.


How prevent LXDE to start at boot.  I prefer to start ubuntu server 16.04 without LXDE running so it coms with the command prompt afther boot. Start LXDE with the command startx. So how can i prevent that LXDE is started at boot time.  Tanks, Ian

Is it possible to disable X at boot time? I'm setting up a server so it would be nice if it wouldn't load the graphical interface every time I boot.


Space is expanding and as we know space and time are intrinsically linked to be now known as spacetime.  What is happening to time during expansion? Is there more time, longer time or is the time part not affected at all by expansion?

Einstein's big revelation was that time and space are inseparable components of the same fabric. Physical observation tells us that distant galaxies are moving away from us at an accelerated rate, and because of the difficulty (impossibility?) of defining a coordinate system where things have well defined coordinates while also moving away from each other without changing the metric on the space, we interpret this to mean that space itself is expanding.   Because space and time are so directly intertwined is it possible that time too is expanding? Or perhaps it could be contracting?


I was curious, so I tried this out:  var test = example = 5;   Now, this is a somewhat common way of defining things...  (for instance in node, module.exports = exports = ...)  The above be equivalent to:  example = 5; var test = example;   Now, if variables don't actually hold a value, but are rather references to values in the memory, when I change example, if test is referencing example which is referencing a value, shouldn't test also have that same value as example?  Lets try it:  var test = example = 5; example = 7;  console.log(test, example);   ... Now, the output isn't really what I expected, due to what I put above..  You get this:  5 7   But how is test still 5 if test is referencing example, and example is now 7?  Shouldn't they both be 7?    EDIT Tried using Objects instead...  But I get the same behavior:  var test = example = {"hello":"world", "foo":"bar"}; example = {"test":"example"}; console.log(test, example);   This outputs:  Object {hello: "world", foo: "bar"}  Object {test: "example"}   So, they're still not the same like I expected.

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


Today my reputation was decreased because of 'User was removed' criteria.   First of all the information provided about this on the reputation page is quite inadequate.   It does not explain, who got removed?(Don't care about this) but I would like to know where my points got deducted on which question and would like some more detailed explanation for all the points awarded or deducted by SO, I always have to go hunting now what does this mean.  Can we have a better messaging system for reputation? The main reason I am writing this question is that found out from what "User was removed" means.      A user who voted for one of your posts had their account deleted   (either by choice or due to violating the network's Terms of Service).   As a result, all of their votes were undone, and the rep you gained   from them (or lost because of them) was revoked.   Some user broke the rules and got himself thrown out.    A user I am not associated with. A user I don't even know who he is. A user I have got nothing to do with.   Why am I getting punished for his acts?

Currently, when a moderator deletes a user all of the user's votes are removed along with the user themselves. I was pretty surprised at this behaviour when I first heard about it, and I don't think it is a good idea to throw away all of the votes just because the user is deleted.  Votes are locked after a short while and you can't change your vote unless the post is edited. This is a precedent that shows that users don't have complete control over their old votes, their ability to change or remove their votes is restricted for the benefit of the whole site. I don't understand why users that get deleted are suddenly exempt from this restriction.   The drawback of removing the votes is that we throw away valuable information. Voting plays an important role on SE sites, and every time an active user is deleted we throw away some of that information.  I also don't see why rage-quitting users get to remove one kind of contribution (votes) while we stop them if they try to remove their other contributions to the site (posts). We stop users from deleting all their posts because they still provide value to the site, I don't see why we shoud treat votes any different. They might have less value than posts, but they are useful to the site as a whole.  I'm ignoring any vote invalidation in connection with vote fraud or sock puppeting for the purposes of this post. Those votes should certainly be invalidated, but that doesn't usually happen by deleting users.  To prevent abuse of user deletion for vote fraud, there could be some minimum requirements on account age and reputation, below those requirements any votes would be discarded on deletion. Any suspicious voting patterns of the user should automatically block the deletion until they have been checked manually. This is of course more effort for the moderators, but account self-deletion doesn't happen so often that this would be a problem in my opinion.  The recent change to counting reputation from deleted questions if they are old enough and have at least three upvotes moves the whole reputation system further into a direction where reputation can't be taken away after some time. The reasoning for this change was that even though certain questions are off-topic now, they used to be on-topic and therefore the reputation earned had some meaning then. This provides further precedent that reputation shouldn't be removed retroactively on a large scale.


Say for example I have a list set up like this:  values = ['Godel Escher Bach', 'What if?', 'Thing Explainer', 'Alan Turing: The Enigma', ' 1979', ' 2014', ' 2015', ' 2014', ' Douglas Hofstadter', ' Randall Munroe', ' Randall Munroe', ' Andrew Hodges']   and I want to take every 4 elements (or whatever n i define) and put them into a list of their own, so it would then be  values = [['Godel Escher Bach', 'What if?', 'Thing Explainer', 'Alan Turing: The Enigma'], [' 1979', ' 2014', ' 2015', ' 2014'], [' Douglas Hofstadter', ' Randall Munroe', ' Randall Munroe', ' Andrew Hodges']]   My attempt was to create a for loop and iterate through all the elements and covnert them to lists as such:  values = ['Godel Escher Bach', 'What if?', 'Thing Explainer', 'Alan Turing: The Enigma', ' 1979', ' 2014', ' 2015', ' 2014', ' Douglas Hofstadter', ' Randall Munroe', ' Randall Munroe', ' Andrew Hodges'] for x in range(0,len(values),1):     values[x:x+4] = [values[x:x+4]]   However, when I try running this, I get  [['Godel Escher Bach', 'What if?', 'Thing Explainer', 'Alan Turing: The Enigma'], [' 1979', ' 2014', ' 2015', ' 2014'], [' Douglas Hofstadter', ' Randall Munroe', ' Randall Munroe', ' Andrew Hodges'], [], [], [], [], [], [], [], [], []]   So my code was what I want it to do, but it also leaves behind a couple of empty []'s, which I do not want. How can I fix this?  EDIT::: NVM, I fixed it.   I did  for x in range(0,int(len(values)/4),1):     values[x:x+4] = [values[x:x+4]]   and it worked  Thanks to those that took their time to answer this question even though in the end I did not need the help, I appreciate your time.

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


I am developing a WPF application and I'm struggling with TreeView. I want to achieve look like in Windows Explorer.  The default TreeView style stretches the TreeViewItem only for the required space.  I have overridden the default template to achieve this look, but I really cannot figure out how to add the space on left of child items.  My code: <ControlTemplate TargetType="{x:Type TreeViewItem}">    <Grid>       <Grid.ColumnDefinitions>          <ColumnDefinition Width="*"/>       </Grid.ColumnDefinitions>       <Grid.RowDefinitions>          <RowDefinition Height="Auto"/>          <RowDefinition/>       </Grid.RowDefinitions>       <Border x:Name="Bd" Grid.Column="0" HorizontalAlignment="Stretch" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">          <Grid>             <Grid.ColumnDefinitions>                <ColumnDefinition MinWidth="19" Width="Auto"/>                <ColumnDefinition Width="*"/>             </Grid.ColumnDefinitions>             <Grid.RowDefinitions>                <RowDefinition Height="Auto"/>                <RowDefinition/>             </Grid.RowDefinitions>             <ContentPresenter x:Name="PART_Header" Grid.Column="1" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>             <ToggleButton x:Name="Expander" Grid.Column="0" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>          </Grid>       </Border>       <ItemsPresenter x:Name="ItemsHost" Grid.Row="1" Grid.Column="1" />    </Grid>

If I set TreeViewItem Background it highlights the header only. How can I highlight the whole line?   I have found a post almost solving a problem   But there are some problems: 1. It does not highlight the whole line 2. The tree has XP style on Vista. I whould like it to looks the same way on Vista as it was, but if user changed the theme to XP - it should be XP way. 3. So many XAML...  Any ideas, what I should look for?


are there copyrights for board game Risk? It's popular and with lots of versions floating around, so I don't know if someone has rights or just for specific version. I'm not planning to make money with it, it would be a free game. If not, can I make something similar to that, and how much do I need to change it? I like the game a lot, it's for fun and learning purpose. Thx in advance :)

Most games build on other games' successes and many are downright clones. Where is the limit of imitation before legal issues come into play? Is it down to literary or graphic work like characters and storyline that cause legal problems, or can someone actually claim to own gameplay mechanics?  There are so many similar clone games out there that the rules are probably very slack or nonexistent, but I'd like to hear the views of more experienced developers / designers.


This  from an online Italian newspaper shows photographs of one of the most powerful phenomena in the cosmos.    Nothing, not even at the speed of light $c$, can escape a black hole one it has been caught. So how is it possible mathematically that a black hole, which "swallows" the stars and gas approaching its powerful accretion disk, can then eject some of the gas into two thin jets of plasma at speeds $V_{pl}$ close to the speed of light?

How are they formed? And why are they so bright?


We will modify part of the existing menu logic to generate an ID for the user. This user ID will be of the type int, and will be 5 digits in length. The values are 00001 – 99999, and should appear with all 5 digits (leading zeroes) on the display upon generating them. Do not change the data type from that of an int. Check out the setfill manipulator as a possible helper for this. Setfill allows you to set a fill character to a value using an input parameter, such as ‘0’ for leading zeroes. Researching it, you’ll see that you will need to reset the fill character after use too, or you will be printing a lot of zeroes on the display! Your program also should guarantee an absolutely unique user ID has been generated for each new activity that is added. Think about how this works...   Currently I've been trying to get the following code to work  srand(time(0)); cout << setfill('0') << setw(5) << rand() %99999 << endl;   Problem is that this doesn't seem random at all (it's just slowly counting up based on the computers internal clock right?) and the first digit is always zero. Like the instructions say it should be between 00001 and 99999.   EDIT: I appreciate the different solutions, but most of them are more advanced than what I'm supposed to be using for this assignment. I'm fairly sure srand() and rand() is what I should be using.

I need to generate random numbers within a specified interval, [max;min].  Also, the random numbers should be uniformly distributed over the interval, not located to a particular point.  Currenly I am generating as:  for(int i=0; i<6; i++) {     DWORD random = rand()%(max-min+1) + min; }   From my tests, random numbers are generated around one point only.  Example min = 3604607; max = 7654607;   Random numbers generated:  3631594 3609293 3630000 3628441 3636376 3621404   From answers below: OK, RAND_MAX is 32767. I am on C++ Windows platform. Is there any other method to generate random numbers with a uniform distribution?


Hi all I have an DL360 GEN 8 Machine. And I need to install ubuntu server on it. However. Accourding to HP, THE Dyanamic Smart Array System is not support. Since I would love to make use of array.. Given that I have 4 Terra bytes of disk .. Which I need to configure Raid 1.  Blockquote  Is there any possible way to achive this Raid without HP Dynamic Array system. ???  Blockquote  Below is the message from HP. Which says that I need to disable Smart array before I can be able to run Ubuntu  HP Dynamic Smart Array System is certified with Dynamic Smart Array disabled. To disable Dynamic Smart Array:  Press F9 to boot into RBSU  Navigate to System Options > HP Dynamic Smart Array B320i and select disable  Go to System options > SATA Controller options and select Legacy SATA or AHCI  Reboot the machine and now you will be able to install the OS

I have an HP Proliant DL380e with a 1TB SAS Drive and I am trying to install ubuntu server 12.04 on it.  I have created a RAID array using Array Controller Utility and had a RAID0 logical volume configured on that array. I also set this logical volume as the  primary bootable device.  Having done this, I believe installing ubuntu on the created partition  should be as smooth as it can be. However, it seems I am so wrong...  During the installation process, the installer does not detect my SAS Drive. At the step required to partition disks, it only avails the option to "Configure iSCSI Volumes".  When I checked the /var/log/syslog file. I see that the installer tries to  detect SATA Drives but finds none.  Are there any custom configurations I need to make to get the installer to successfully detect my SAS Drive? I can't quite figure out what I need  to do get the installer to detect my SAS Drive.  Thanks in advance.