I have minecraft server with a bunch of mods: . The thing is after I explored a big part of world my server began to lag (before that server worked good). When I replaced world with old version of the same world (before exploration and with the same set of mods) lags disappeared. So, I think, I found something in the world that causes lags. How can I find that lagging region and remove the source of lag (kill problem mob, for example, regenerate region)?  This is what I get in console when server starts to lag:  16:24:11 [WARNING] The server is going slow. Last server tick was 20004ms ago 16:24:11 [WARNING] Last Tick: 1398345831441 Current Time: 1398345851445 Warning:  20000 Timeout: 60000 16:24:11 [WARNING] [TPS]: 16.7 Server Tick #54000 16:24:11 [WARNING]   Dimension:0 16:24:11 [WARNING]   Loaded Chunks: 336 Active Chunks: 154 Entities: 127 Tile Entities: 860 16:24:11 [WARNING]   Entities Last Tick: 83 16:24:11 [WARNING]   Tiles Last Tick: 660 16:24:11 [WARNING]   Dimension:7 16:24:11 [WARNING]   Loaded Chunks: 0 Active Chunks: 0 Entities: 0 Tile Entities: 0 16:24:11 [WARNING]   Entities Last Tick: 0 16:24:11 [WARNING]   Tiles Last Tick: 0 16:24:11 [WARNING]   Dimension:-17 16:24:11 [WARNING]   Loaded Chunks: 0 Active Chunks: 0 Entities: 0 Tile Entities: 0 16:24:11 [WARNING]   Entities Last Tick: 0 16:24:11 [WARNING]   Tiles Last Tick: 0 16:24:11 [WARNING]   Dimension:-31 16:24:11 [WARNING]   Loaded Chunks: 0 Active Chunks: 0 Entities: 0 Tile Entities: 0 16:24:11 [WARNING]   Entities Last Tick: 0 16:24:11 [WARNING]   Tiles Last Tick: 0 16:24:11 [WARNING]   Dimension:-100 16:24:11 [WARNING]   Loaded Chunks: 0 Active Chunks: 0 Entities: 0 Tile Entities: 0 16:24:11 [WARNING]   Entities Last Tick: 0 16:24:11 [WARNING]   Tiles Last Tick: 0 16:24:11 [WARNING]   Dimension:1 16:24:11 [WARNING]   Loaded Chunks: 0 Active Chunks: 0 Entities: 0 Tile Entities: 0 16:24:11 [WARNING]   Entities Last Tick: 0 16:24:11 [WARNING]   Tiles Last Tick: 0 16:24:11 [WARNING]   Dimension:-1 16:24:11 [WARNING]   Loaded Chunks: 26 Active Chunks: 9 Entities: 42 Tile Entities: 19 16:24:11 [WARNING]   Entities Last Tick: 3 16:24:11 [WARNING]   Tiles Last Tick: 8   Minecraft v1.6.4 mcpc+ (forge + bukkit) Essentials core plugin installed

I'm an admin for a minecraft server where I suspect one of the players has set up a fast cycle redstone circuit. The reason is the server uses what seems to me to be too high of cpu for only one or two players logged in, and lately there always seems to be a bit of lag.   I've found where he had built one before and he said that he wouldn't build one again, but knowing him, it's likely that he build one similar and not "exactly" like before.   So, are there any good ways to find where there is a redstone circuit like that, or better, is there a bukkit plugin that I can use to globally disable such circuits?  edit  Just to be clear, I'm not an op, I'm the full blown server admin (I pay for the VPS) lol. It's a windows server 2008 rc2 server so I have access to all files. It's currently running bukkit so that's why I would like to know about bukkit plugins that would make my life easier.   I did search for bukkit plugins but I couldn't find any "official" ones, which is why I asked for other unreleased or beta plugins. =)


So far, that is the only information given to me by the journal.  I have no idea if all 18 reviewers were invited at the same time, or if one at a time.  In either cause, is this a bad sign, something like a looming possibility that the editor might eventually reject my manuscript if they can't find any reviewer to go thru my work?

What steps does a manuscript typically go through from submission to publication (or rejection) in a typical journal? How are these steps referred to, in particular by editorial systems, and how long do they each typically take?  Note that this question is about the typical situation and hence not about:   Journals with an atypical workflow, e.g. those that allow for an instantaneous reviewer–author interaction. Exceptional steps or rare occurrences such as withdrawal or .   This is a canonical question on this topic as per . Due to its nature, it is rather broad and not exemplary for a regular question on this site. Please feel free to improve this question.


I have this javascript-code:  $('.get_summary').click(function(ev){     alert("get_summary"); });   html-buttons with that class are created dynamically in javascript.  With firebug I can see that the button got the class "get_summary". However, when I click on the button nothing happens. Neither any error in the console are written.  Looking at "Events"-panel in chrome I see that the button is actually not listening to any event. Why? I put an alert in the file where the class got bind to a function. And the alert shows up. I really dont know where I should look to understand why the class is not listening to the function.

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.


I have the Galaxy S3, and I'd like to watch YouTube videos during my commutes. I like to watch long videos (around 1 hours), so I have no more than 1 video per commute.   However, youtube video takes a lot of bandwidth and I have a cap on data usage. Besides, connection outside during peak hours tend to be slow, which makes the video pause to download a lot of times.   Is it possible to pre-download a video at home (using my Wi-Fi, which is faster and has no data cap), and watch it on the way? I tried pausing it at home and let it download, but whenever the phone sleep (it sleeps often!), or the application switch from youtube to anything else, it seems all previous download will be lost.

Is it possible to download YouTube Videos on my New Samsung Galaxy Y android phone and have it stored in my SD card?


How valid is an approach of using LASSO to determine appropriate values to then use in a logistic regression that does not use any penalties?

I use Lasso logistic regression in order to identify a smaller subset of important variables. I start with N=51 (28/23) and 32 predictors.   So far it looks pretty promising, because I can identify four important predictors in my optimal model.   Now I would like to take those four predictors and examine them along with some control variables in a standard logistic regression.   My question is, does that analysis strategy make sense? Is there a better way to include controls or other variables that might be interesting?  For a better understanding:   Identify important variables via Lasso logistic regression Do further analysis including identified predictors and other control variables using standard logistic regression (using AIC to check model fit)


The featured meta question appears twice on the iOS app, pictured here:    It seems as if one link is showing the question at a previous time (and is not updated), given the mismatch in answer counts.   App Version: 1.6.2.5 Device: iPhone 6s OS Version: Version 10.2.1 (Build 14D27)

I see duplicate questions in the feed (Why is the book still wanted if Aida has memorized it?) and the question is marked as "unanswered" even though it has an upvoted answer.  I would expect unique questions in the feed, as well as questions with answers to not be marked as unanswered.   App Version: 1.6.3.4 Device: iPhone 6 OS Version: Version 10.2 (Build 14C92)


Here is the issue, I would like to count the number of jobs I have in the hpc, but it is not one of the readily provided features. So I made this simple script  squeue -u user_name | wc -l   where squeue prints all the jobs like the following  > squeue -u user_name    JOBID PARTITION NAME     USER ST       TIME  NODES NODELIST(REASON)  8840441    theory cteq      fxm PD       0:00      1 (Resources)  8840442    theory cteq      fxm PD       0:00      1 (Priority)  8840443    theory cteq      fxm PD       0:00      1 (Priority)  8840444    theory cteq      fxm PD       0:00      1 (Priority)   which would be piped to wc and the number of lines would be counted. However, the first line is not an entry of the job. How may I instruct wc to skip the first line when counting? Or should I just take the output of wc and minus one to it?  Thanks in advance!

I have a file named Element_query containing the result of a query :  SQL> select count (*) from element;  [Output of the query which I want to keep in my file]  SQL> spool off;   I want to delete 1st line and last line using shell command.


I'm trying to update a field in a table used in a sub query:  UPDATE counsellors_professional_body_link SET membership_number = CONCAT('0', membership_number) WHERE professional_body_link_id IN (SELECT professional_body_link_id FROM counsellors_professional_body_link WHERE professional_bodyid=5 AND CHAR_LENGTH(membership_number) = 5)   But I am told:  You can't specify target table 'counsellors_professional_body_link' for update in FROM clause  How best to do this please?

I have a table story_category in my database with corrupt entries. The next query returns the corrupt entries:  SELECT *  FROM  story_category  WHERE category_id NOT IN (     SELECT DISTINCT category.id      FROM category INNER JOIN         story_category ON category_id=category.id);   I tried to delete them executing:  DELETE FROM story_category  WHERE category_id NOT IN (     SELECT DISTINCT category.id      FROM category        INNER JOIN story_category ON category_id=category.id);   But I get the next error:      #1093 - You can't specify target table 'story_category' for update in FROM clause    How can I overcome this?


The Summon Greater Demon spell is especially effective when the summoned demon's true name is known:  At the end of each of the demon’s turns, it makes a Charisma saving throw. The demon has disadvantage on this saving throw if you say its true name.  However, the spell description doesn't say that it is possible to request a specific demon for which the true name is known:  You utter foul words, summoning one demon from the chaos of the Abyss. You choose the demon’s type, which must be one of challenge rating 5 or lower, such as a shadow demon or a barlgura.  Is it possible to request a demon for which the true name is known?

In the D&D 5e game I am DMing, one of my players (level 15 fiend patron warlock) successfully cast  on a  and compelled it to tell the player its true name. Now the player has the demon's true name. I had not given any prior indication as to the power of a true name. The player acquired the true name by his own initiative. We've been operating off the common wisdom that true names grant some measure of control over a demon. The dominate monster spell hasn't ended yet, so we haven't used the true name yet, but it would be good to know what the options are for using true names once that spell ends. What can a player do with a demon's true name, particularly if the demon is already on the Material Plane? I know that true names are useful for summoning spells such as gate and summon greater demon, as discussed . But those aren't helpful if the demon is already present. Traditionally, true names grant a large degree of power over fiends and are guarded jealously, but in 5e it appears that true names aren't that useful outside the summon greater demon spell from Xanathar's Guide to Everything. If it helps, this warlock player has an archdevil as his patron. This archdevil can hold the true name and threaten its release or use if the hezrou does not comply with the player's demands (which is harder to subvert than the player threatening release of the name by his own power). While the threat of a true name being released is also one traditional form of leverage over a demon, true names need to actually be useful and dangerous for this threat to have any value.


Tags field placeholder is cut-off on posting a new question:        Google Chrome on iOS 11.

I've noticed that the background text "Type a tag" at the bottom of the "Ask Question" page is cut off:        Reproduced in Microsoft Edge.


In an urn there is five red balls and three blue balls. Two balls are taken randomly from the urn with return. (The colors of the two balls are seen and taken back to the urn). What is the probability of taking out two red balls?   I know how to calculate probabilities like taking one ball after the other (multiplying probabilities)... Not when there is two balls at the same time. How would I resolve it? Do I need to draw to myself a big  $\Omega$ and just count how many possible options there is? It doesn't work at least with tree diagram.

I'm having trouble with the following problem     There are 4 different colored balls: Red, Green, Black, Blue what is the probability that I will get 2 of the same colored balls by drawing 4 balls with replacement.   I attempted to solve this problem by splitting the question into two parts. First I calculated the probability of drawing 4 balls where I have 2 of one color and 2 of another color. Call this event $A$.  $$P(A) = \frac{4 \times 1 \times 3 \times 1 \times \binom{4}{2}}{ 4^4}= \frac{72}{4^4}$$  Next I calculated the probability where 2 balls are the same color and the other 2 are different. Call this event $B$ $$P(B)= \frac{4\times1\times3\times2\times4P2}{4^4}$$ I understand that if I sum these two probabilities I should get the answer but for some reason the event B was not calculated correctly. Any feedback and help is appreciated.


Google chrome wants to use the keychain password frequently in my mac system(OSX version 10.9.2).  Before updating the OS to new version, the applications like Textedit, Preview are used to ask the password while accessing them. If I click the cancel button twice, the popup will be disappeared. But, after updating to new OS version, a popup saying Google chrome wants to use the keychain password without any reason.    I need to click the cancel button for eight to twenty times to disappear the popup. While writing this question that dialog box appears three times. Sometimes, I keep that alert box to the bottom like below.    I tried deleting the password for Chrome in keychain, as suggested in  link. But, no use.

Since I've left Chrome as my main browser, every time I use it as secondary browser, Chrome enters in an eternal loop requesting my password to access each keychain bundle of my system. No matter how many times I click "cancel" it just keeps asking access to my passwords.  Is it possible to just make Google Chrome stop asking for my keychain? Once this start, browsing is not possible. The whole window is blocked with the repeated pop ups.


Lookst like firewalld is not opening port 25. I tried adding the smtp service, and port 25 separately as well, yet, I am unable to telnet to the server.  Any tips?  [root@host ~]# firewall-cmd --zone=public --list-all public (default, active)   interfaces: eth0   sources:   services: dhcpv6-client http https smtp ssh   ports: 3762/tcp 25/tcp 7683/tcp 4424/tcp   masquerade: no   forward-ports:   icmp-blocks:   rich rules:  [root@host ~]# nmap XXXXXXXMYIP  Starting Nmap 6.40 ( http://nmap.org ) at 2016-01-14 00:11 CET Nmap scan report for CentOS-72-64-minimal (XXXMYIP) Host is up (0.0000080s latency). Not shown: 990 closed ports PORT      STATE SERVICE 21/tcp    open  ftp 53/tcp    open  domain 80/tcp    open  http 110/tcp   open  pop3 143/tcp   open  imap 443/tcp   open  https 993/tcp   open  imaps 995/tcp   open  pop3s 3306/tcp  open  mysql 20000/tcp open  dnp  Nmap done: 1 IP address (1 host up) scanned in 0.05 seconds [root@host ~]#

I'm trying to telnet into port 25 on a CentOS server that runs PostFix to test sending email messages from the server.  When I try to telnet in from another CentOS box on the same network I get the message below:   Unable to connect to remote host: Connection refused   SELinux is disabled and I've opened port 25 in iptables...what else should I be looking at?


I'm trying to convert rupee to paise. 1 rupee is 100 paise.   paise =  parseFloat("4532.6523").toFixed(2)*100 //453264.99999999994  How do I get only 453265 only

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I have this to split a file into smaller files with 200000 characters each.  $i = 1; $fp = fopen("styles.css",'r'); while(! feof($fp)) {     $contents = fread($fp,200000);     file_put_contents('styles'.$i.'.css',$contents);     $i++; }   However, splitting a css file requires more than that. I'll need to have each of them in correct css format. For example:  Original css:  .red {     color: red;     font-weight: bold;     font-size: 15px;     background: black; }  .blue {     color: blue; }   What might happen:  .red {     color: red;     font-weight: bold;     font-size: 15px;     background: black; -------------------split-------------------- }  .blue {     color: blue; }   What I expect  .red {     color: red;     font-weight: bold;     font-size: 15px;     background: black; } -------------------split--------------------  .blue {     color: blue; }   Is there a way to have PHP split file by number of character, but always make sure that every file ends with "}"? So some file has more than 200000 characters, and some file has less than 200000 characters.  This is not a duplicated question since I want to split file and keep all the pieces, not just cutting a string.

I have a code snippet written in PHP that pulls a block of text from a database and sends it out to a widget on a webpage.  The original block of text can be a lengthy article or a short sentence or two; but for this widget I can't display more than, say, 200 characters.  I could use substr() to chop off the text at 200 chars, but the result would be cutting off in the middle of words-- what I really want is to chop the text at the end of the last word before 200 chars.


For this question -->   I have thought of making two right angled triangles but I'm not going anywhere with this I think... Can someone point me in the right way...

For one of my homework problems, we had to try and find the maximum possible length $L$ of a pipe (indicated in red) such that it can be moved around a corner with corridor lengths $A$ and $B$ (assuming everything is 2d, not 3d):    My professor walked us through how to derive a formula for the maximum possible length of the pipe, ultimately arriving at the equation $L = (A^{2/3} + B^{2/3})^{3/2}$.  The issue I have is understanding intuitively why this formula works, and exactly what it's doing. I understand the steps taken to get to this point, but there's an odd symmetry to the end result -- for example, is the fact that $\frac{2}{3}$ and its inverse are the only constants used just a coincidence, or indicative of some deeper relationship?  I also don't quite understand how the formula relates, geometrically, to the diagram. If I hadn't traced the steps myself, I would have never guessed that the formula was in any way related to the original problem.  If possible, can somebody give an intuitive explanation as to why this formula works, and how to interpret it geometrically?    Here's how he found the formula, if it's useful:  The formula is found by finding the maximum possible length of the pipe by expressing the length in terms of the angle $\theta$ formed between the pipe and the wall, and by taking the derivative to find when $\frac{dL}{d\theta} = 0$, which is the minimum of $\frac{dL}{d\theta}$ and is therefore when $L$ is the smallest:  $$ L = \min_{0 \leq \theta \leq \frac{\pi}{2}} \frac{A}{\cos{\theta}} + \frac{B}{\sin{\theta}} \\ 0 = \frac{dL}{d\theta} = \frac{A\sin{\theta}}{\cos^2{\theta}} - \frac{B\cos{\theta}}{\sin^2{\theta}} \\ 0 = \frac{A\sin^3{\theta} - B\cos^3{\theta}}{\sin^2{\theta}\cos^2{\theta}} \\ 0 = A\sin^3{\theta} - B\cos^3{\theta} \\ \frac{B}{A} = \tan^3{\theta} \\ \theta = \arctan{\left( \frac{B}{A} \right)^{\frac{1}{3}}} \\ $$  At this point, we can substitute $\theta$ back into the original equation for $L$ by interpreting $A^{1/3}$ and $B^{1/3}$ as sides of a triangle with angle $\theta$ and hypotenuse $\sqrt{A^{2/3} + B^{2/3} }$:  $$ \cos{\theta} = \frac{A^{1/3}}{ \sqrt{A^{2/3} + B^{2/3} }} \\ \sin{\theta} = \frac{B^{1/3}}{ \sqrt{A^{2/3} + B^{2/3} }} \\ \therefore L = A^{2/3} \sqrt{A^{2/3} + B^{2/3} } + B^{2/3} \sqrt{A^{2/3} + B^{2/3} } \\ L = (A^{2/3} + B^{2/3}) \sqrt{A^{2/3} + B^{2/3} } \\ L = (A^{2/3} + B^{2/3})^{3/2} \\ $$  The equation for the formula for the maximum length of the pipe is therefore $L = (A^{2/3} + B^{2/3})^{3/2}$.


My IDE is Visual Studio 2017. I am pretty new in C++ programming so I need a help about understanding principles of creating a new C++ project in Visual Studio. So, in my first solo attempt i just chose a empty project option and afther that i chose to add new item and i write this sample code:  #include <iostream> using namespace std;  int main() {      return 0; }   Afther this step and afther steps with compiling, building and a starting without debugging i did not get any message or consol window with time of code execution or option for entering any key for ending. What is needed for getting this kind of information at the end of code?

I'm starting out in Visual C++ and I'd like to know how to keep the console window.  For instance this would be a typical "hello world" application:   int _tmain(int argc, _TCHAR* argv[]) {     cout << "Hello World";     return 0; }   What's the line I'm missing?


I'm a Saudi national. I will ship my bike to Turkey and travel to it by air. I will have a Turkish visa of course. I will then travel on road to Bulgaria aiming to reach Romania. Do I have to apply for visa prior to reaching there or I can get it on road from both borders? I will stay travelling for a month at the most.

I am a Moroccan living in Italy for several years and I hold an Italian permanent resident permit, next month I would love to go to visit Bulgaria, and also Turkey and Greece, with multiple entrance/exit from Bulgaria. I know that for Greece I do not need visa and also for Turkey as a Moroccan citizen I do not need a visa, but about Bulgaria I have some doubts and looking on the internet is quite confusing, somebody says yes others no, please can you help to figure out if do I need to apply for visa or not.


There is  about the UK and the US and whether their border officers can search your laptop. This is a more general question.   Can customs check files and software inside your laptop or flash cards, external discs, etc? Does this happen in any countries?

I'll be traveling to the UK (London) on a study abroad in the spring and will be bring my laptop for school and intern purposes.  I was just curious what/if any rights UK customs has to search laptops at the border, and how common laptop seizure and search is when returning to the good old U.S.A.


What is the regular expression (in JavaScript if it matters) to only match if the text is an exact match? That is, there should be no extra characters at other end of the string.  For example, if I'm trying to match for abc, then 1abc1, 1abc, and abc1 would not match.

How can I test if a RegEx matches a string exactly?  var r = /a/; r.test("a"); // returns true r.test("ba"); // returns true testExact(r, "ba"); // should return false testExact(r, "a"); // should return true


Is there any way to create chatter group through apex code

It looks like ConnectApi.ChatterGroup is abstract. Is there really no way to create Chatter groups via connect in Apex?   Is the solution to call the chatter REST API from APEX?   UPDATED based on answer below:   public static Id createGroup(String groupName, List<User> users) {      CollaborationGroup g = new CollaborationGroup(Name=groupName, CollaborationType='Public');     g.OwnerId = UserInfo.getUserId() ;     insert g;      List<CollaborationGroupMember> groupMembers = new List<CollaborationGroupMember>();      for (User user: users) {         CollaborationGroupMember member = new CollaborationGroupMember();         member.MemberId = user.Id ;         member.CollaborationGroupId = g.Id ;         groupMembers.add(member);     }      insert groupMembers;     return g.Id ; }


I am trying to recall a book I read quite a while back.  The book revolved around people that no longer faced death I believe as, of I remember correctly, one of the main characters was well over one hundred years old. There was no longer a need for people to work so instead people played games and did as they pleased.   Another random detail was that sex changes were very common and were performed on a whim.

I read this story 8-15 years ago in German. I'm not sure but I think the book had 2 short, totally different stories in it.  The story was about a man who was sent (I think kinda forced to go) to a planet where he should play a game everyone on that planet plays. I think the goal was to beat their leader and conquer the world like this?  The better you are at the game, the higher is your position in the society. I remember that at the end he was playing against the leader and they had a long back and forth game, but I'm not sure who won.  They played the game on a different planet that had only one stripe of forest around the whole planet and a fire that goes around it. But thats only the location they were playing.  The man was chosen because he was the best player in every game if I remember correctly.  The game was a board like game where you have troops or armies that you move around. It was not an easy game everyone just could play.


I am facing a load average of > 3 since past 2 days. The CPU utilization is never above 40 % in all cases. Here are some screenshots of Server Density monitoring tool that I use.    The process snapshot at the highest peak, @ 0:00 is as follows:   And the process snapshot at the peak created at 12:00 is:   My question is, even though CPU utilization is not 100 %, why am I facing a high average?  PS: All snapshots are sorted by descending CPU utilization.


When I fill up a question form, I see an      Answer your own question   checkbox.   What are the differences between checking and not checking this option?

I showed up here to write a perfectly normal rant about misaligned pixels, and there's a big fat checkbox cluttering up the "Ask" page:    WHAT THE EEEEK IS THIS NEW ABOMINATION?


Given a list of log-likelihood $\log\mathcal{L}_i$ for $ i \in [1, N]$, if I want to compute the average log-likelihood correctly, I need  $$ \langle \log \mathcal{L} \rangle = \log\left(\frac{1}{N}\sum_{i=1}^{N}e^{\log\mathcal{L}_i}\right).$$ (taking the mean of the logs themselves is not the same).  However, for large likelihoods I quickly run into numerical problems (the reason for using log-likelihoods in the first place..)  Is there any methods to improve the numerical stability? Or am I missing something here...

I am writing an algorithm where, given a model, I compute likelihoods for a list of datasets and then need to normalize (to probability) each one of the likelihood. So something like [0.00043, 0.00004, 0.00321] might be converted to may be like [0.2, 0.03, 0.77].   My problem is that the log likelihoods, I am working with, are quite small (for instance, in log space, the values are like -269647.432, -231444.981 etc). In my C++ code, when I try to add two of them (by taking their exponent) I get an answer of "Inf". I tried to add them in log-space , but again stumbled upon the same problem.  Can anybody share his/her expert opinion on this?


For example: He's been punished to clean the floor but he just quickly skimmed it with a broom, with no actual care to how much cleaner the floor would become, and said he's done.  What did he do? - He _______ed it / he was ______ing it or: How did he perform this task? - ______ly or: "Clean the floor but don't just ________ it, make me proud!"  I have a few words in my mind but I don't think they fit what I mean or my style of expression: half-ass, skim, slacking...  Much obliged!

I like to use the idiom 'phone it in' in the sense described by :     To fulfill a responsibility with a minimum effort rather than the appropriate level of effort.    For example: 'He used to try his best at this task but at the moment he's really phoning it in.'  However, friends and colleagues do not seem to recognize the idiom. Is there an equivalent idiom that might be more likely to be understood?


Over the years, due to various retcons, Captain America seems to fought in practically every single battle in World War II. Is there a list of the real-life World War II battles Steve Rogers of the 616 comic universe fought in?

In the Marvel universe Steve Rogers was transformed via the super-soldier serum into Captain America. As the formula for the serum died with its creator, America decided to send Captain America in to sort out the Nazis.  How did this change the result of World War 2 in the Marvel universe?


I have this code I am working on create.blade.php I have followed   and  in order to replicate a div. I have managed to clone the div and display. My issue comes when I try removing the added div as it does not work. How do I go about it? I have added the remove function to my script.   $(document).ready(function() {   $(".add").click(function() {     $("#education-clone").clone().appendTo("#edu");   });   $(".remove").click(function() {     $("#education-clone").remove(this);   }); });

Education

         School         <input type="text" class="form-control" name="school[]" placeholder="School/University">

         From         <input type="date" class="form-control" name="school_from[]" placeholder="From">

         To         <input type="date" class="form-control" name="school_to[]" placeholder="To">

         Action         <button class="form-control btn add" type="button">Add</button>

         School         <input type="text" class="form-control" name="school[]" placeholder="School/University">

         From         <input type="date" class="form-control" name="school_from[]" placeholder="From">

         To         <input type="date" class="form-control" name="school_to[]" placeholder="To">

         Action         <button class="form-control btn-danger remove" type="button">Remove</button>

   <button class="btn">Next</button>

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.


I have the following class with auto properties:  class Coordinates {     public Coordinates(int x, int y)     {         X = x * 10;         Y = y * 10;     }      public int X { get; set; }      public int Y { get; set; } }   As you can see from the constructor I need the value to be multiplied by 10. Is there anyway to do it without removing autoproperties?  I tried the following not thinking that it causes recursion and then everything goes fubar  public int X { get {return X;} set{ X *= 10;} }   I would like to assign values to X and Y multiplied by 10.  Coordinates coords = new Coordinates(5, 6); // coords.X = 50 coords.Y = 60 coords.X = 7; // this gives 7 to X but I would like it to be 70.

I would like to know if there is any way to add custom behaviour to the auto property get/set methods.  An obvious case I can think of is wanting every set property method to call on any PropertyChanged event handlers as part of a System.ComponentModel.INotifyPropertyChanged implementation.  This would allow a class to have numerous properties that can be observed, where each property is defined using auto property syntax.  Basically I'm wondering if there is anything similar to either a get/set template or post get/set hook with class scope.  (I know the same end functionality can easily be achieved in slightly more verbose ways - I just hate duplication of a pattern)


I tried two different methods but could not install systemd  1st method from , 2nd method from   Confirmation that systemd is not installed:  edward@computer:~$ file /lib/systemd/systemd /lib/systemd/systemd: ERROR: cannot open `/lib/systemd/systemd' (No such file or directory)   Another confirmation:    I'm following the methods proposed in  (against this question was closed as duplicated to), yet for some reason my system doesn't boot.

Since Mark Shuttleworth decided to  to  in the future, I was wondering if I can install it on my Ubuntu now?


With the given condition, $R$ should be commutative and for every $x$ in $R$, $2x = 0$. I'm trying to first solve this problem for the case where ideal $I$ is generated with only two elements, like $I = < x, y>$. In this case, I found a hint that if we consider $z = x + y + xy$, we can prove $I = < z >$ I know $xz = x$ and $yz = y$. How can I use this information to show $I = < z>$?

Prove that a Boolean ring is a Bezout ring .  Please help me.


Let $m$ be a positive integer. Is there a closed form for the infinite series $\displaystyle\sum_{n=1}^\infty \frac{1}{n(n+1)(n+2)\ldots(n+m)}$?  In the cases $m=1, 2$, one can use a partial fraction decomposition to make the sum telescope. However this seems to become much more difficult for larger $m$ (and I'm not sure whether it continues to telescope). I suspect there is a closed form, but I don't know how one would obtain it.

I have to prove that  $$\sum_{k=1}^\infty \frac{1}{k(k+1)(k+2)\cdots (k+p)}=\dfrac{1}{p!p}$$  How can I do that?


There are some really good discussions of the meaning/ambiguity of the term "natural"  and .  One thing I didn't quite get from those answers: when we say the Snake Lemma, for instance, is "natural", shouldn't we really say it is "functorial"? In other words, it doesn't just associate with each diagram a long exact sequence, it takes maps between diagrams to maps between long exact sequences?

In every book I've looked, the "naturality" of the long exact sequence in homology simply says that every arrow between short exact sequences translates into an arrow between the long exact sequences they induce.   Formally speaking, doesn't this mean the long exact sequence is functorial in the input short exact sequence? Did the term naturality just stick historically, or is there some actual natural transformation whose components are the assignments of long exact sequences to short exact sequences?


I have a Samsung Galaxy Player 4.0 and I haven't used it in ages. With that being said, I forgot my password. When I tried to unlock it, it told me to put in my email, but I forgot my password to that as well.  I want to know if there is a way to reset it, or just figure out the password to my email. Now my device doesn't let me try to put my password in because I tried too many times and failed. Is there a way that I can reset it?

I've read  which states that there is an option to disable the lock using my Google account information. However I did not noticed such an option when I entered my password five times wrong. (Although there was also a 20s or 30s delay to complicate brute force attacks.) I use Android 4.0.3 on a Asus Transformer Prime TF201.  Would factory reset work?


Why when deleting from a USB or an external HDD on mac the occupied space wont be free untill deleted from trash?  Is there a direct way to delete from the drive and freeing the occupied space instantly?

I frequently connect different external USB hard drives and flash drives to my computer and I would like to facilitate deleting files and regaining disk space from them.  If I simply delete the file, it will be kept in a hidden trash folder on the external drive until I empty the Trash. This also forces me to empty my local trash simultaneously while the external disk is still connected to regain the disk space, which is undesirable.  At the moment, the only other "solution" I've found is moving the file to the internal hard drive and then trash it. This is not optimal because I waste time moving files from one drive to another (I regularly deal with 20GB+ VMs).  How can I permanently delete a file from an external drive, bypassing the trash?


Using biblatex with bibtex, I would like to order my references in the bibliography by author name.  This works fine:  \usepackage[backend=bibtex, sorting = nyt, %name, year, title]{biblatex}   However this behaviour also applies to citations in the text, when quoting several authors. for instance:  \parencite{Wang_1976, Albert_2011}   gives      (Albert et al. 2011, Wang et al. 1976)   Where I would like the citation to appear in chronological order. Changing sorting to ynt, solves this issue, but disrupts the ordering in the bibliography instead. I can't get my head around it...  Obs: I use sharelatex.

I am trying to understand how to change the order in which citations appear when I use multiple entries. Unfortunately the BibLatex documentation is not really helpful, its so complicated.  Lets say I have this citation \citep{Smith2003,Black2011,Church2012} I want them to appear (Smith, 2003; Black, 2011; Church, 2012), but I am instead getting (Black, 2011; Church, 2012; Smith, 2003).  I presume it is sorting them alphabetically by default. How do I change this? I don't want to change the order in which they appear in the Bibliography, they're alphabetical and I want them that way. Its the in-citation ordering I want to change.  Is there a way to tell it not to sort them and put them in the order I put them when doing citations with multiple references?


Sometimes the coating will stay on pretty well, other times it almost all falls off.  What is the secret to keeping it on?  Thank you!

I tried pan fried chicken and pre-cooked the chicken sous vide. This meant that the chicken just needed to be crisped once it went in the pan. I dredged in flour then egg and then panko (Japanese bread crumbs). The chicken was cooked perfectly and the crust was really nice, but the two didn't stay together when cut. The breading would shear right off.   I did not dry the chicken after removing from the sous vide, so it was a little damp.   How can I get the breading to adhere better to the chicken? Flour, egg, Panko works great for raw chicken. How can I get it to stick to the pre-cooked stuff?


I recently had a problem after installing Windows 10 which required me to start in Safe Mode to rectify it. Since this I can no longer "restart" and the only screen that comes up is:     Administrator       Your account has been disabled. Please see your system administrator.      OK   When I click "OK", nothing happens, I can't get into another screen, I can not log in as administrator nor as myself as it just doesn't have any other screen options to select.  Is there anything I can do?

I got a brand new Windows 7 machine, installed the operating system, created one account and forgot its password. What can I do?  There is no external CD, the operating system is loaded from somewhere inside the machine.  I already tried to remember passwords and tried all candidates with all possible combinations of caps lock, num lock etc.


I just got awarded the "Tireless" badge on StackOverflow, and have inspected my answers to check if I qualify for the "Unsung Hero" badge. I have written a query , that clearly says that 12/30 accepted answers have zero score. That's both more than 25% and 10. Do I have to wait a day after getting the "Tireless" badge before getting the "Unsung Hero" one?

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 did not know that you could find an answer for that. However, I can only use Excel so far to do it.  How to calculate 3.6! by hand?

From what I know, the factorial function is defined as follows:  $$n! = n(n-1)(n-2) \cdots(3)(2)(1)$$  And $0! = 1$. However,  seems to be saying that you can take the factorial of a fraction, like, for instance, $\frac{1}{2}!$, which they claim is equal to $\frac{1}{2}\sqrt\pi$ due to something called the gamma function. Moreover, they start getting the factorial of negative numbers, like $-\frac{1}{2}! = \sqrt{\pi}$  How is this possible? What is the definition of the factorial of a fraction? What about negative numbers?  I tried researching it on Wikipedia and such, but there doesn't seem to be a clear-cut answer.


I have Ubuntu as my host OS and Windows 10 inside virtualbox.  I want to access windows C: drive in Ubuntu for some reason.  How to do that?

Is it possible to mount a virtual hard disk (VHD, HDD, VDI, VMDK) on Ubuntu? How can this be done?


I'm a Psychology Major intending to take University level Statistics starting in the Fall.   As I'm a mature student, I've been out of school for about 7 years, and it's been at least that long since I've done any Math related work at any level.  I'm wondering if anyone can suggest some decent books that would be an appropriate primer for someone re-entering Math from a Social Science standpoint? Basically, I'm looking for something to give me a head start on getting back into Math after such a long time away from it, in hopes of not failing my Statistics courses ^^;  Thanks!

To give you some background, I have a grasp on the basics of statistics and probability theory and even remember touching Bayes theorem at the university data mining course. But being a few years away from the university made my math got extremely rusty (so much for last-minute pre-exam cramming). While I remember various random basic concepts, there are a lot of gaps in my understanding of them.  What would be a good material (a book, a site, or otherwise equally accessible medium) to revise the fundamentals and go beyond basics? I'd like a book that can be actually read as a book (most statistics books are really dry and are close to being reference material, rather than a book).


I guess everyone must have observed this. Dogs, cats, and most of all insects (including mosquitoes) appear more or less the same.  Why is there so little variation in their offspring, unlike humans, where you rarely find two humans showing even a little resemblence.  Is it the large size of the human genome that allows infinite combination of traits? (seems unlikely, as even small flies like drosophila melanogaster have somewhat large genomes, but show very little variation).

Most animals look almost identical to their peers. To distinguish lions we record the spots on their face; with whales we look at the blemishes on their tail or flukes. In other words, we have to try hard to distinguish one lion from another.  In the case of dogs, we have created many different looking breeds - but within each breed they look the same: one poodle looks very much like the next one.  On the other hand, with humans we have not only the different races (cf. dog breeds), but even within one race no two people are alike. And, not only are the faces different, the body shapes vary equally much. We use face and body shape (and voice) to recognise each other. Most other animals use smell or sound.  I thought the reason for our uniqueness might be that, with civilisation, we are not constrained us to look the same. However, even in hunter-gatherer tribes each person looks different from every other one.  So what is it in human evolution that made us unique in this regard? And, are we unique? I cannot think of any other species with as much variation as ours, but are there others?


I've always wondered this, but reaction attacks such as those given by certain feats and classes, i.e.:   Sentinel (Lets you attack an enemy as a reaction that attacks anybody that hurts your allies in range)   Polearm Master (Lets you attack an enemy as a reaction when they come into your polearm's range)   Mage Slayer (Lets you attack an enemy as a reaction that casts a spell)   These kinds of reaction attacks... I don't think they're technically specified as the same as Opportunity Attacks, but I wanted to see what you guys thought.  It matters specifically because in the feat Sentinel, it specifies that Opportunity Attacks turn the enemy's speed to 0 for the rest of the turn, but it also gives the ability to attack enemies that hurt your allies.  I just wanted to know if these two abilities work collaboratively, or if they're kinda their own thing.    Note: I'm not going to tag this as Rules-as-Written because I want to see if anybody would argue that it should be a house rule that these should be allowed as Opportunity Attacks.

Sentinel   When a creature within 5 feet of you makes an attack against a target other than you (and that target doesn’t have this feat), you can use your reaction to make a melee weapon attack against the attacking creature.   Does it count as an opportunity attack for the purpose of reducing their speed to 0?     When you hit a creature with an opportunity attack, the creature’s speed becomes 0 for the rest of the turn.


It seems simple enough, and by using brute force it's easy to see that $n^n$ will always be slightly larger for any $n \ge 3$. I tried comparing ratios and also using induction, but nothing is conclusive. I would imagine that the epsilon proof would be the correct way to do this but I'm not very familiar with it and I would rather avoid such arduous proofs when I have to solve similar problems in a limited time frame.

How would one prove that  $$(n+1)^{n-1}<n^n \ \forall n>1$$  I have tried several methods such as induction.


This question is two fold.  Firstly, if a phoenix is immortal, then how was it ever born in the first place? Does a phoenix lay eggs like other birds?   Secondly, there is not much information available about Fawkes' origins and early life, except that he was a wild Phoenix until he met Dumbledore.   Where and how did Dumbledore meet Fawkes? Why is it that he was able to form such a strong bond with Fawkes? I do not recollect anything about any other witch or wizard having a phoenix as a pet.

How did Dumbledore find Fawkes. Did Dumbledore have Fawkes even when working as a Transfiguration teacher or acquired it after having Headmaster position. They both have a very strong bond between them. When did Dumbledore gain this. Update: Dumbledore says that Ollivander wrote to him when Harry's wand was purchased; if Dumbledore did not have Fawkes before 1938, he would not know about the two feathers being in the wands, so Fawkes and Dumbledore must have met and bonded before 1938  “My wand's feather came from Fawkes?” Harry said, amazed. "Yes,” said Dumbledore. “Mr. Ollivander wrote to tell me you had bought the second wand, the moment you left his shop four years ago.” -Harry Potter and the Goblet Of Fire, Chapter 36-The Parting Of the Ways.  Update 2: JKR says that Dumbledore was the only owner of Fawkes. So it is to be believed that Fawkes was a wild Phoenix before its bonding with Dumbledore.  Peter Humphreys for BBC Newsround: Who did Fawkes previously belong to and will he play a vital role in the next book? JK Rowling: I am not going to answer about the role in the next books, which probably gives you a big clue, and he has never been owned by anyone but Dumbledore. You will notice that when Harry goes back in the Pensieve in this book, Fawkes is never there, and  no, I am sorry, not in this book, I take that back. When Harry has previously seen the study with a different headmaster he saw it with Dippet and Fawkes was not there then. Fawkes is Dumbledore's possession, not a Hogwarts possession.


Im a bit confused on this subject, I have seen variances in answers I have found and looking for a bit more direction for my application. What I am trying to do is use a PDO method to take data from a form with multiple entries and insert the data into my table I created.  I think I have an understanding of the overall concept but what I would like to do or rather not do is have to create a variable ( $player1 = $_POST['player1'] or similar...) for every input field I have.   Is there a way in my sql statement I can use something like $_POST['player1'] to use the input from the form? I tried doing it as such below, but Im getting this error:  Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) on line 19  line 19 being the values line of the sql statment...  html          <form method='post' action='phpfiles/Sqldata2.php'>             Enter data in for team 1.
             Enter Id: <input type='text' name='id1' maxlength='6'>
             Enter Teamname: <input type='text' name='team1' maxlength='30'>
             Enter city: <input type='text' name='city1' maxlength='30'>
             Enter Bestplayer: <input type='text' name='best1' maxlength='30'>
             Enter Year formed: <input type='number' name='year1' maxlength='4'>
             Enter website: <input type='text' name='website1' maxlength='40'>

              <input type='submit' name='SQLdata' value='Submit Data'>                         </form>   php      <?php      // server and database information     $servername = " n/a  ";     $username = "   n/a  ";     $password = "   n/a  ";     $dbname = "     n/a  ";      if ($_SERVER["REQUEST_METHOD"] == "POST"){          try {             $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);             // set the PDO error mode to exception             $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);              // begin the transaction             $conn->beginTransaction();             // our SQL statememtns             $conn->exec("INSERT INTO teams (id, teamname, city, bestplayer, yearformed, website)             VALUES ($_POST['id1'], $_POST['teamname1'], $_POST['city1'], $_POST['bestplayer1'], $_POST['yearformed1'], $_POST['website1'])");              // commit the transaction             $conn->commit();             echo "New records created successfully";             }         catch(PDOException $e)             {             // roll back the transaction if something failed             $conn->rollback();             echo "Error: " . $e->getMessage();             }          $conn = null;     }         ?>   The error im getting I believe is a syntax error such as that I need some more "" because my sql statment isnt a string? a little lost here and not sure if what Im trying to do is correct...

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I have an Acer Aspire V7 ultrabook and I want to install ubuntu 12.04 or 13.04 in it alongside windows 8.I also have a Kingston USB pen drive in which 4GB space  is free.Please tell me how can I do it.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


Many years ago I read a sci-fi book about a planet that had been colonized by a group of earthlings sent to the planet from a doomed earth, a common theme.  In the book, Earth ended up pulling through troubles and had lost contact with the colony planet.  Earth sent a second expeditionary group out to the colonized planet to lay claim, but the expeditionary group, thinking it was going to have an easy time, met a very resistant and powerful colony.  One of the premises of the book was in the colonized planet's culture, education and smarts were a form of currency. I probably read the book between 1997 and 2000. It was paperback and in English. I bought it from a used bookstore. Does this story sound familiar to anyone?  If so does anyone know the name of the book?  I'd love to read it again.  Thx!

I am looking for the title of a science-fiction book describing a colony (utopia) on another planet that has been established as a social experiment. The inhabitants had been brought up only by robots and therefore work perfectly as a society. I think there is no formal government and people work on what they are interested. If any catastrophe happens, they are able to form groups of specialists who react to the threat. Later there comes a group of outsiders who decide to join and live in the utopia. I am not sure, but author was probably Canadian.


I just went to ELL.SE and saw this on the homescreen:    ^On chrome  I reloaded the page, and it persisted, so I went to Firefox:    Same bug.

According to this post  this should be fixed. But it happened again.  See Image below (link to )  There was also another migrated question () in the list where the name was missing, but it was edited on meta.


If $B$ is an uncountable set and $A$ is a countable set, then  prove that $B$ is similar to $B-A$.  Attempt:    Two sets $A$ and $B$ are called similar $\iff$ thee exists a one to one function $F$ whose domain is the set $A$ and whose range is the set $B$.  $B$ is an uncountable set and $A$ is a countable set, then $B-A$ must also be uncountable and hence, an infinite set.  To prove this, let us suppose $B-A$ is countable. Since, $A$ is countable, hence, $(B-A) \cup A$ should also be countable. But $B \subseteq (B-A) \cup A$ should be countable as well which is a contradiction.   Hence, $B-A$ is an uncountable set as well. Now, we need to show that $(B-A) \sim B$.  How do I move ahead? I think we need to define a one-one onto function from $(B-A) \rightarrow B$ but I am not able to think of such a function.  Thank you for your help.

I am going over my professors answer to the following problem and to be honest I am quite confused :/ Help would be greatly appreciated!     Let $A$ be any uncountable set, and let $B$ be a countable subset of $A$. Prove that $|A| = |A - B|$    The answer key that I am reading right now follows this idea:  It says that $A-B$ is infinite and proceeds to define a new denumerable subset $A-B$ as $C$. Of course since $C$ is countably infinite then we can write $C$ as ${c1,c2,c3...}$   Once we have a set $C$, we know that the union of $C$ and $B$ must be denumerable (from another proof) since $B$ is countable and $C$ is denumerable.  This is where I start to have trouble. The rest of the solution goes like this...  Since the union of $C$ and $B$ is denumerable, there is a bijective function $f$ that maps the union of $C$ and $B$ to $C$ again. The solution then proceeds to define another function $h$ that maps $A$ to $A-B$.   I am just so lost. The thing is I don't even understand the point of constructing a new subset $C$ or defining functions like $f$ or $h$.  So I suppose my question is in general, how would one approach this problem? I am not mathematically inclined unfortunately, and a lot of the steps in almost all of these problems seems arbitrary and random. Help would be really appreciated on this problem and some general ideas on how to solve problems like these!!!  Thank you so very much!


I can't imagine that this hasn't been asked before, but googling doesn't help me find the answer.  Creating a table with 9 columns using the shortcut {*9{l}} works fine:  \documentclass{article} \begin{document} \begin{tabular}{*9{l}} \end{tabular} \end{document}   But when I get into double digits, I get an error:  \documentclass{article} \begin{document} \begin{tabular}{*10{l}} \end{tabular} \end{document}      ! LaTeX Error: Illegal character in array   arg.   How can I use the shortcut {*} with >9 columns?

I am trying to make a table with 10 columns.  For some reason, when I add an 11th column, the table no longer compiles.    Below is, I believe, a minimum working example.  Specifically, the table works with    \begin{tabular}{l*9{c}}   but it does not work with   \begin{tabular}{l*10{c}}   Note that the following ONLY compiles because it is the version with the 9 rather than the 10.  I would like for it to have the 10 so I can insert an extra column.  My tables begin as:  \documentclass{article} \usepackage{array} \begin{document}  \begin{tabular}{l*10{c}}  & (1) & (2) & (3) & (4) & (5) & (6) & (7) & (8) & (9) & (10) \\   \end{tabular}  \end{document}


I have a list of values, 7,7,7,7,7,7,7,7,6,6,6,6,6,6,7,7,7,7,7,8,8,8,8,8,8,8,8,5,5,5,5,5,5,6,6,6,6,6 etc and I need to split the list into the list of list format every time there is a change in value, such that it becomes [[7,7,7,7,7,7,7,7],[6,6,6,6,6,6],[7,7,7,7,7],[8,8,8,8,8,8,8,8],[5,5,5,5,5,5],[6,6,6,6,6]].  I tried a code as follows, however, it told me that there was an unexpected token "for". Is there any other way that's cleaner (one liners)?  for i, n in enumerate(x):     inds = []     if x[i] != x[i-1]:         inds.append(i) list(split_after(x, lambda i: i for i in inds))    Edit: I can't use groupby because it requires me to sort the list, and I'm concurrently using this list to sort another list of lines, and I can't reorder the other list because of how it's sorted to be lines running ordered around my entire surface.

I haven't been able to find an understandable explanation of how to actually use Python's itertools.groupby() function.  What I'm trying to do is this:  Take a list - in this case, the children of an objectified lxml element Divide it into groups based on some criteria Then later iterate over each of these groups separately.  I've reviewed , but I've had trouble trying to apply them beyond a simple list of numbers. So, how do I use of itertools.groupby()?  Is there another technique I should be using?  Pointers to good "prerequisite" reading would also be appreciated.


TDD. I have quite complex coding exercise, do I test private methods if they are very complex?  So my class only exposes one public method, but contains few very complex methods, which should be tested I think?  there is doubt: do I test them or not?

I have read  about how to test private methods. I usually do not test them, because I always thought it's faster to test only public methods that will be called from outside the object. Do you test private methods? Should I always test them?


When I try to access some sharepoint list as embedded website from external website I'm getting this error: "This content cannot be displayed in a frame". To help protect the security of information you enter into this website, the publisher of this content does not allow it to be displayed in a frame. Does any one have any idea what can I do? Thank you all.

We would like to display pages from SharePoint Online in an iframe of a Page hosted somewhere else, e.g. in an Azure Web App:  <iframe src="https://site.sharepoint.com/"></iframe>   When we do this (in Chrome for example), we get the following error:     Refused to display " ⏎                      Home.aspx" in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.   A Page from SharePoint 2013 (on premise) can be displayed in an iframe from a Page hosted on another domain, if the following control is added to the head of the master page:  <WebPartPages:AllowFraming runat="server" />   However if this control is not added to the master-page, then we also get the above mentioned error.  As far as I know there is no possibility to adjust the master-page in a SharePoint Online Team Site. Is that correct?   In a Publishing Site you are allowed to adjust the master-page, or even add a new one. But I can't find anything similar in Team Sites.  Does anybody know if it is somehow possible to configure domains which do not fall under the "X-FRAME-OPTIONS: SAMEORIGIN"-policy in a SharePoint Online environment? Or if there is another possibility to display SharePoint Online content in an iframe on a different domain. I checked google, checked the Site settings and checked the Office 365 admin center, but didn't find anything.


I used owl carousel plugin and bootstrap , what i have done so far is when you reach to last item of owl carousel it going to append a submit button instead of next button via callback i want when click on submit button do something but problem is click function not working although i used on handler but still not working.  $('#btn-submit').on('click',function(){ alert('submit clicked'); });

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.


I am an absolute beginner, and while completing the donut tutorial I have been trying to model this industrial cookie just for fun.    I have modeled the top cookie as a cylinder, beveled the edge and extruded it to create the border, and added a couple of loop cuts to sharpen rounded angles, and I am at this stage:    Now I would like to sculpt the "shield" (and then carve holes and add text), but the center face has not enough resolution. How can I add enough poligons into that face so that sculpt works?

Is there any way of converting the triangle fan found on a cylinder cap into quads.


When will Stack Overflow support retina devices?  Please, please, please at least change the favicon to a high-res version.

Is an HDPI version of stack exchange coming to our retina screens? I would be happy to see support for HDPI.  The first thing to improve is the image uploader. It should be simple to add a selector for the density of the images we upload to avoid displaying huge screen captures in our questions/answers?  See the related question:  for an example of how terrible screen captures can look when taken on an HDPI screen and uploaded without prior processing.  Could you also add a way to redefine the density of current images so we can fix the ones that are currently broken without having to replace the HDPI version of our existing images?   used to perfectly illustrate the problem - I edited all images with <img> tags and hardcoded width/height values).  i.e.    I believe it is better to fix this issue now, while there are few HDPI users rather than later when thousands of posts become disfigured by HDPI screen captures. Currently they really decrease readability and give a very clunky look to the site.  Also let's remember while the Apple retina thing is HDPI, HDPI is not retina. Other screen densities are already out there.  So automatically giving the option to scale to the density of the current display would be the best approach. Reveal other options only when the user requests it.    If you are planing HDPI support what will be the best approach when it comes to serving pages to multiple resolution densities? dynamic reloads (javascript reloading of all available images a the right resolution)? css? everything loaded at *2 resolution, introduction of svg graphics?  Concerning gravatar the solution should be prety simple at the moment replace all calls to  with  for *2 resolution.  Planning ahead will you add support for intermediate resolutions densities (*1.5, *1.75) and for higher ones (*3, *4...)?


I am trying to achieve below table show in the figure, but I couldn't succeed it. I tried the below code.    \begin{table}[] \centering \begin{tabular}{lllllll} Dataset & Model & Evaluation criteria & Rank &  &  &  \\  &  & RMSE & MAPE & MAE & R &  \\ (A) & Proposed &  &  &  &  &  \\  & FN &  &  &  &  &  \\  & NN &  &  &  &  &  \\  & RX &  &  &  &  &  \\ (B) & Proposed &  &  &  &  &  \\  & FN &  &  &  &  &  \\  & NN &  &  &  &  &  \\  & RX &  &  &  &  &  \\ (C) & Proposed &  &  &  &  &  \\  & FN &  &  &  &  &  \\  & NN &  &  &  &  &  \\  & ARX &  &  &  &  &  \\ (D) & Proposed &  &  &  &  &  \\  & FFN &  &  &  &  &  \\  & LNN &  &  &  &  &  \\  & ARX &  &  &  &  &  \end{tabular} \end{table}

When combining multirow and multicolumn in the same cell of a table I am getting extra vertical lines:  \documentclass[plain]{article} \usepackage{multirow} \pagestyle{empty}  \begin{document}  \begin{tabular}{|l|l|l|l|}\hline   \multirow{10}{*}{numeric literals} & \multirow{5}{*}{integers} & in decimal & \verb|8743| \\ \cline{3-4}   & & \multirow{2}{*}{in octal} & \verb|0o7464| \\ \cline{4-4}   & & & \verb|0O103| \\ \cline{3-4}   & & \multirow{2}{*}{in hexadecimal} & \verb|0x5A0FF| \\ \cline{4-4}   & & & \verb|0xE0F2| \\ \cline{2-4}   & \multirow{5}{*}{fractionals} & \multirow{5}{*}{in decimal} & \verb|140.58| \\ \cline{4-4}   & & & \verb|8.04e7| \\ \cline{4-4}   & & & \verb|0.347E+12| \\ \cline{4-4}   & & & \verb|5.47E-12| \\ \cline{4-4}   & & & \verb|47e22| \\ \cline{1-4}   \multicolumn{3}{|l|}{\multirow{3}{*}{char literals}} & \verb|'H'| \\ \cline{4-4}   & & & \verb|'\n'| \\ \cline{4-4}   & & & \verb|'\x65'| \\ \cline{1-4}   \multicolumn{3}{|l|}{\multirow{2}{*}{string literals}} & \verb|"bom dia"| \\ \cline{4-4}   & & & \verb|"ouro preto\nmg"| \\ \cline{1-4} \end{tabular}  \end{document}     Notice the vertical lines in the char literals and string literals cells (which should span three columns). How can they be avoided?


I'm writing a code that finds the desired column in an input sheet and takes the entire column and put it in a different order in an output sheet. Basically I want to take in an Excel file and reorganize it in an output file. The path I've chosen is to find the numerical value of the column and use that to find the cells within each row. I'm getting an error at the line rdrCell = inputSheet.getRow(placeRow+1).getCell(y); is there something wrong with the way I'm trying to get the cell value?  for(Iterator<Cell> cit = idRow.cellIterator(); cit.hasNext(); )             {                 Cell cell = cit.next();                 cell.setCellType(Cell.CELL_TYPE_STRING);                 String chr = "Chr";                 Row rdrRow = null;                 Cell rdrCell = null;                 if(chr.equals(cell.getStringCellValue()))                 {                     int y = cell.getColumnIndex();                     for(int placeRow = 0; placeRow<=rowCounter;placeRow++)                     {                         // error in line below                         rdrCell = inputSheet.getRow(placeRow+1).getCell(y);                         rdrCell.setCellType(Cell.CELL_TYPE_STRING);                         String chrString = rdrCell.getStringCellValue();                         Cell chrCell = outputSheet.createRow(placeRow).createCell(0);                         chrCell.setCellValue(chrString);                     }                  }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


There are many cards that can put multiple permanents onto the battlefield simultaneously, such as , , or .  How do these interact with the following types of abilities?  As [this permanent] enters the battlefield... You may have [this permanent] enter the battlefield as... [This permanent] enters the battlefield with... When [a permanent with certain characteristics] enters the battlefield...   Justification There have been many questions already about particular instances of this situation.  This question is intended to be a canonical question and answer to all questions such as:      Note to moderators: three of these five questions have already been marked as duplicates pointing to this one.  Can we do the same for the remaining two?

I was playing modern with the owner of a shop.  He played a  which he used to bring in 7 lands: 5 basic mountains and 2  cards.  He then claimed that each  triggered 5 times (killing me).  I am doubting this now.    Here is my reason: The two  cards entered at the same time as the other 5 basic lands.  That means when they were on the battlefield and their ability was in effect, the other 5 basic lands were already there too.  That seems too late to trigger a "Enters the Battlefield" effect.  So here is my question.  Am I right or wrong?  If I am wrong, please show me how the enter the battlefield effect can trigger for something that enters the battlefield at the same time as itself.  If I am right, please show me the rules that prove it.  I now have two shop owners that are convinced that this is a legal play.  If it is not legal, I am going to need clear rules citations to convince them.    Side note:  If I am wrong and it is a legal play, then I have a follow up scenario.  Say I have 2  cards and 5 other human cards in my graveyard.  If I play a spell that lets me return all of them to the battlefield at the same time (say ), would the  cards get 6 +1/+1 counters on them?    To me, if the trick that was played on me with  is legal then my  cards should also get the +1/+1 counters.


I have done some css changes in one already hosted website in IIS. but customers are not able to see updated changes unless i personally ask them to press ctrl + F5. Is there any way through which i can handle this issue.

I have noticed that some browsers (in particular, Firefox and ) are very zealous in using cached copies of .css and .js files, even between browser sessions. This leads to a problem when you update one of these files, but the user's browser keeps on using the cached copy. What is the most elegant way of forcing the user's browser to reload the file when it has changed? Ideally, the solution would not force the browser to reload the file on every visit to the page.  I have found  and  suggestion to be useful. It turns out there is a term for this: auto-versioning. I have posted a new answer below which is a combination of my original solution and John's suggestion. Another idea that was suggested by SCdF would be to append a bogus query string to the file. (Some Python code, to automatically use the timestamp as a bogus query string, was .) However, there is some discussion as to whether or not the browser would cache a file with a query string. (Remember, we want the browser to cache the file and use it on future visits. We only want it to fetch the file again when it has changed.)


I'm trying to build a system to show census tract on map. I used  example to import the census tract TIGER shapefile into DB, flatten the data on the column I need and managed to show a map with census tract using GeoServer, OpenLayers and OSM.   Now I need to add interaction where a user can select a census tract and be able to change the fill color. The example I followed creates a ol.Layer.Image layer which, I think, won't work here. I tried using a vector layer with a GeoJSON source from GeoServer but the browser is crashing trying to load 74K rows through JSON. I'm looking at vector tile example  but it doesn't cover dynamic style change from user interaction.  Is it possible to use OpenLayers/GeoServer with what I'm trying to do?  I'm new to these technologies and this is my first experiment with GIS.

I want to show on the map the features of the saved layers from a GeoServer server, but I don't know how to do this...  Like this, but with the dragbox interaction...  I have this code:  var select = new ol.interaction.Select(); mapa.addInteraction(select); var selectedFeatures = select.getFeatures(); var dragBox = new ol.interaction.DragBox({         condition: ol.events.condition.always,         style: new ol.style.Style({             stroke: new ol.style.Stroke({                 color: [0, 0, 255, 1]             })         })     });      mapa.addInteraction(dragBox);      dragBox.on('boxend', function(e) {         if (capaActiva != null) {             var info = [];             var extent = dragBox.getGeometry().getExtent();             var source = capaActiva.getSource();             console.log(source);             var url = source.getGetFeatureInfoUrl(extent, viewResolution, 'EPSG:3857',{'INFO_FORMAT': 'text/plain'});             console.log(url);          } else {             Ext.MessageBox.show({                 title: 'Error',                 msg: 'Check a layer',                 buttonText: {                                             ok: 'Aceptar',                 }             });         }     });


I installed ubuntu 12.04 LTS and it was working properly. I didnt use for one month and now when i boot it the screen becomes blank with a cursor blinking on it. What is the problem?

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


After starting the computer I usually start the web browser fairly soon after start-up. Often I see the title bar flicker briefly and the colour change from Active to Inactive. The browser does not process mouse scroll or keyboard cursor messages. I need to click the browser for it to receive focus and start processing input again.  No other application is running (in the sense of having a button on the Taskbar). When I run Task Manager, nothing obvious suggests itself as the culprit. Is there any 3rd party technical tool or in-built Windows application that can identify which process is capturing focus? Presumably some Windows message like WM_SETFOCUS is involved, so perhaps there is some way to tell Windows to log any processes processing this message?  Windows 8.1

A background process/program steals focus from my currently active application. It disturbs me a lot when I type in an app or control an app using keyboard or play online flash games in full-screen. I want to remove this program from my PC, but I'm unable to detect it. I've analyzed all processes & scanned for viruses. All things are right from this side. I don't want to change focus behavior using registry tweak. Please, help me detecting that app..


When I look at my recently deleted answers I see a list of answers all having zero score.    But some of them have scores.  For instance

Below are the two screenshots. First one shows the number of votes          In above image a post which was deleted shown ) votes. Now in below image which is actual post deleted is having 1 vote.


AFAIK, I am supposed to declare a class(and it's functions) in a header file, and then define them in it's respective .cpp file.  Here is my code.       C1.h   #ifndef C1_H_ #define C1_H_  namespace newspace {  class C1 { public:     void print();             //just a Hello World.     template <typename T1>     T1 power(T1 x, T1 y);     // calculate x^y };  }  #endif       C1.cpp   #include "C1.h" #include<iostream> namespace newspace { void C1::print()                           // print() defined {     std::cout<<"Hello World"<<std::endl; } template <typename T1> T1 C1::power(T1 x, T1 y)  //calculate x^y      // power() defined {     T1 ans=1;     for (T1 i=0;i<y;i++)       {         ans*=x;     }     return ans; } }      main.cpp   #include <iostream> #include "C1.h" using namespace std; int main() {     newspace::C1 obj1;                 // created object obj1     obj1.print();                      // works perfectly     cout<<"Enter two numbers";     int x,y;     cin>>x>>y;     cout<<obj1.power(x,y);             // gives error     return 0; }   The print() function works properly, but the templated function power() does not work and gives the error  undefined reference to `int newspace::C1::power<int>(int, int)'   What am I doing wrong here? what am I supposed to do?

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 have made a pure java app which tells me about number of files in a given directory. Now I set current directory by using the following code:  `File f = new File(".");`   After that I made an installer with its jar file and installed it in my windows 8 and then I add it to the windows right click drop down menu (context menu). When I launch it from the context menu it always tells me about the number of files in the directory where it is actually installed in however I want to know the number of files of that directory from where I am executing it.  So plz help me. I am a novice in this field and I don't want you to confuse me in current directory and the current execution directory. So I write this so long and hoping for a clean answer in very simple words.  Thanks

My code runs inside a JAR file, say foo.jar, and I need to know, in the code, in which folder the running foo.jar is.  So, if foo.jar is in C:\FOO\, I want to get that path no matter what my current working directory is.


This is a snippet from my book.    How did they get from |U|$^2$ = U • V = |U|•|V| |U|/|V| ?

In Multivariable Calculus, the professor said that in order to compute the angle $x$ between two vectors $v$ and $w$, we use the formula: $\cos(x) = \frac{\vec{v} \cdot \vec{w}}{|\vec{v}| \cdot |\vec{w}|}$  He also mentioned "Projection" but I didn't understand much of it. The only thing I got was that we can create a right triangle by drawing a perpendicular line from one vector to the head of the other and compute the angle like that using $\cos$, but I don't understand why we're multiplying vectors, or dividing by their magnitudes…how do those operations make sense?  Also, in the specific example, the result of $\cos(x) = \frac{\vec{v} \cdot \vec{w}}{|\vec{v}| \cdot |\vec{w}|}$ ended up being $1/2 = \pi/2$. Where does $\pi/2$ come from here? I can't understand how we go from $1/2$ to $\pi/2$.


I am trying to prove the following identity: \begin{equation} \frac{1}{n} \sum_{i=0}^{n-m} \frac{n-m\choose i}{n-1 \choose k+i} = \frac{1}{m {m-1 \choose k}}, \end{equation} where $0 \leq k \leq m-1, 1 \leq m \leq n$, and $k,m,n$ are all integer valued. It is straightforward to see that this holds for $m=n$, but I don't see how I can generalize this. I have programmed the functions and verified that it indeed holds for any legal combination of $m, n$ and $k$. A puzzling thing about this identity is that the RHS does not involve $n$ at all. This makes me think that I could rewrite the LHS in some way. Proving this by induction seems difficult as the summand changes. I have also looked for known identities for binomial coefficients and sums of binomial coefficients, but have not figured out how to apply any of those in this case with a binomial coefficient in the denominator. () Any ideas?

Show that $\displaystyle\sum_{i=0}^l \dfrac{{l\choose i}}{{n\choose k + i}} = \dfrac{n+1}{(n-l+1) {n-l\choose k}}$ for all $k,l, n\geq 0$ with $k+l \leq n.$  The $k+l\leq n$ part doesn't seem that important. The claim clearly holds for $n=0,$ and in that case $k$ and $l$ must both be zero. I think the claim can be shown by induction, but I'm not sure how to do so; I'm not sure how to use the inductive hypothesis to prove the inductive step. The sum on the LHS is not always an integer, so finding a combinatorial argument doesn't seem very feasible. For $n = 1,$ we can have $(k,l) = (0,0), (1,0), (0,1),$ and in each case the sum holds. Perhaps multiplying both sides by a number (idk ${n-l\choose k}$) might be useful?


I'm trying to use this command:  mysqldump --opt --hex-blob \     -h source -p xxxx -u user1 \     source_db | \     mysql \     -h target -p yyyy -u user2 \     target_db   So, how can I rewrite it to avoid setting passwords on -p and be asked instead

I'd like to run multiple MySQL queries and save them to specified files. Queries are saved in a bash script, queries.sh, e.g.:  cat queries.sh mysql -u <user> -p <DBname> -e "select Col1 from Table1 where Condition;" > /home/<user>/queries/Col1Table1Cond mysql -u <user> -p <DBname> -e "select Col5 from Table2 where Condition;" > /home/<user>/queries/Col5Table2Cond   Executing the script is not enough, since <user> has to input his password at each query and this is compromising the script flow.


I'm trying to write a command  mytodo to change the current directory to my project directory and saved in /bin/  & changed its permission to executable :  #!/bin/bash cd /vagrant/backup/toDoApp/   Earlier it was working wherever or whenever i run mytodo it changes my directory to  /vagrant/backup/toDoApp/ but now suddenly it stopped working now it doesnt changed my cwd. as i also tried alias but when shutdown or restart machine my alias commands disappears Please help.

I'm trying to write a small script to change the current directory to my project directory:  #!/bin/bash cd /home/tree/projects/java   I saved this file as proj, added execute permission with chmod, and copied it to /usr/bin. When I call it by: proj, it does nothing. What am I doing wrong?


Is there a complete map of all known places in Faerûn? Many of the top-level maps don't have all locations (Helm's hold next to Neverwinter), Phandalin, and generally all of the locations that are marked in the DM maps (that are not on the players maps) are also very hard to find (if you don't know in what adventure to look for) Is there a map with all known locations that either have an adventure taking place there or a dungeon or something similar? For clarification: I'm looking for a spoiler-heavy DM map with the hidden locations, not for a player map.

Is there an official Forgotten Realms map out for D&D 5e yet? Any book or map I can purchase if it is not available online?   As of now, I have the Starter Set which comes with the just the Sword Coast region of Faerun around Neverwinter (The Craggs, Sword Mountains, etc). I would like to know how does it all fit in?  From what I have read up on this topic, from 3.5e to 4e, FR had lot of changes to the geography. And in 5e FR, some event happened (The Sundering) which kind of restored it to 3.5e FR but not fully?


First, state what i know about products of matrices  \begin{align} & (AB)^{-1} = B^{-1} A^{-1} \\ &(AB)^T = B^T A^T \\ & (AB)^{\dagger} = B^{\dagger} A^{\dagger} \end{align} Where $-1$ represents the inverse, $T$ transpose $\dagger$ dagger (which means the complex conjugate and transpose)   Now, I got wonder the complex conjugation of matrices  It seems to me that complex conjugation itself does not change the order of products,   \begin{align} (AB)^{*} = A^* B^* \end{align} Is this statement correct?

Is it true for complex matrices $X,Y$ that $$ (XY)^*=X^* Y^*? $$ where $^*$ refers to complex conjugation.  How can we prove this if so?  Thanks!  Note: I am referring to complex conjugation, not the hermitan transpose. The answer below refers to hermitan tranpose.


I'm trying to loop a list of sObject fields and displaying the fields as column in a table.  In Visualforce, we could bind an sObject field like value="{!Contact[fieldName]}". But I'm unable to make this happen in a Lightning Component.  I'm trying to output my field data like this:  <aura:iteration items="{!v.contactColumns}" var="col"> <td> <ui:outputText value="{!'contact.' + col.fieldName}"></ui:outputText> </td> </aura:iteration>   But it is displaying Empty output, without any value.  Am I doing it wrong in preparing dynamic field value binding for ui:outputText in above code?  Ive even tried using force:outputField without any luck and same empty value output:  <force:outputField value="{!'contact.' + col.fieldName}" />

I want to do simple thing - I want to iterate over list of two objects and use displayColumns as dynamic keys to get values from selectList object:  <aura:attribute name="displayColumns" type="String[]"/> <aura:attribute name="selectList" type="Object[]"/>   <table>     <aura:iteration items="{!v.selectList}" var="elem">     <tr>         <aura:iteration items="{!v.displayColumns}" var="col">             <td>{!elem[col]}</td>         </aura:iteration>     </tr>     </aura:iteration> </table>   In pure JS I would do: elem[col.value], but in lightning compiler returns:      expecting a positive integer, found 'col' at column 6 of expression:   elem[col.value]: Source   Is there any workaround without creating proper object structure in controller?


I have a client with a SQL2016 DB with a 100Gb MDF and a 4Gb LDF. The DB is set to Simple. I can't get it done to shrink the LDF to a minimum. How can I shrink the LDF to a normal level? Does this setup and file sizes effects performance?

This one seems to be a common question in most forums and all over the web, it is asked here in many formats that typically sound like this:  In SQL Server -  What are some reasons the transaction log grows so large? Why is my log file so big? What are some ways to prevent this problem from occurring? What do I do when I get myself on track with the underlying cause and want to put my transaction log file to a healthy size?


Suppos $a_n$ is a real sequence and $a_n \to a$. Define $s_n = \dfrac {a_1 + \cdots + a_n}{n}$. Show that $s_n$ converges to $a$.   I know that this problem has been solved on this website many times, but I wanted to come up with a proof of my own and ask if my proof is correct. If yes, how could it be improved?  My proof:   Fix $\epsilon>0$. There exists some $N$ such that $n \ge N \implies |a_n-a| < \epsilon$. Take any $n \ge N$. We have $$|s_n-a| = \left| \dfrac {a_1 + \cdots + a_n}{n} - a \right| = \dfrac {1}{n} \left|\sum_{k=1}^n (a_k-a) \right| \le \dfrac {1}{n} \sum_{k=1}^n |a_k-a|$$  Now let $A = \sum_{k=1}^{N-1} |a_k-a|$. Then the above is equal to  $$\dfrac {1}{n} \left( A + \sum_{k=N}^n |a_k-a| \right) \le \dfrac An + \dfrac {n-N}{n} \cdot \epsilon  \le  \dfrac An + \dfrac {n}{n} \cdot \epsilon \le \dfrac An + \epsilon$$ Now there exists an $M \ge N$ such that $n \ge M \implies \dfrac An < \epsilon$. Therefore for $n \ge M$, we have $|s_n-a|< 2 \epsilon$ and we are done.

I wanted to prove the following:  if $x_n \to x$ then $y_n \to x$ where $$ y_n = {x_1 + \dots + x_n \over n}$$  Please can you tell me if my proof is correct? My proof is this:  Let $\varepsilon > 0$. Fix $N$ such that $n > N$ implies $|x_n - x| < {\varepsilon \over 2}$.   Then $\left |{1 \over n} \sum_{k=N+1}^{N + n} x_k - x \right | < {\varepsilon \over 2}$. Now let $M$ be such that ${|x_1 + \dots + x_N | \over M} < {\varepsilon \over 2}$ and $M > N$. Then  $$ \left | \sum_{k=1}^M {x_k \over M} - x   \right | \le  \left | \sum_{k=1}^N {x_k \over M}   \right | +  \left | \sum_{k=N+1}^M {x_k \over |M-N|}  - x   \right | < \varepsilon $$ Here the proof is finished. But one can observe:  It is possible that $y_n$ converges even if $x_n$ doesn't: If $x_{2n} = 0$ and $x_{2n + 1} = 1$ then $x_n$ does not converge but $y_n \to {1 \over 2}$.


I need to rename only directories and not files, and I want to do it with rename.  Is there any way to do it?  It says nothing in the manual about differentiating between directories and files.  This command changes everything, no matter directory or files:  rename 's/ /\n/g' *   This command solved my problem:  rename 's/ /\n/g' */   I need a slash behind it.

I have got the directory /home/user/oldname and I want to rename it to /home/user/newname. How can I do this in a terminal?


I have changed my macbook pro operating system to Ubuntu Linux last night. That night the wifi network was recognized but this morning it does not recognizing wifi network at all . Please help. here is what I got running Terminal:  ebmo@ebmo-MacBookPro:~$ nmcli enp1s0f0: unavailable         "Broadcom Limited NetXtreme BCM57765 Gigabit Ethernet PCIe"         ethernet (tg3), 40:6C:8F:52:D5:50, hw, mtu 1500  lo: unmanaged         "lo"         loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536  Use "nmcli device show" to get complete information about known devices and "nmcli connection show" to get an overview on active connection profiles.  Consult nmcli(1) and nmcli-examples(5) manual pages for complete usage details. ebmo@ebmo-MacBookPro:~$ nmcli connection show NAME                UUID                                  TYPE      DEVICE  ENNN                2ee7e18c-80cf-4ea5-8eff-df6343119437  wifi      --      HUAWEI P20 Pro      d39ea4a1-6a84-4bc2-9693-17b4eed1dc5d  wifi      --      Wired connection 1  f61c19a7-d0f2-3270-886b-7673319531df  ethernet  --      ebmo@ebmo-MacBookPro:~$ lshw-c network lshw-c: command not found ebmo@ebmo-MacBookPro:~$ lshw -c Hardware Lister (lshw) - B.02.18 usage: lshw [-format] [-options ...]        lshw -version      -version        print program version (B.02.18)  format can be     -html           output hardware tree as HTML     -xml            output hardware tree as XML     -json           output hardware tree as a JSON object     -short          output hardware paths     -businfo        output bus information  options can be     -class CLASS    only show a certain class of hardware     -C CLASS        same as '-class CLASS'     -c CLASS        same as '-class CLASS'     -disable TEST   disable a test (like pci, isapnp, cpuid, etc. )     -enable TEST    enable a test (like pci, isapnp, cpuid, etc. )     -quiet          don't display status     -sanitize       sanitize output (remove sensitive information like serial numbers, etc.)     -numeric        output numeric IDs (for PCI, USB, etc.)     -notime         exclude volatile attributes (timestamps) from output  ebmo@ebmo-MacBookPro:~$ lshw -c network WARNING: you should run this program as super-user.   *-network                         description: Ethernet interface        product: NetXtreme BCM57765 Gigabit Ethernet PCIe        vendor: Broadcom Inc. and subsidiaries        physical id: 0        bus info: pci@0000:01:00.0        logical name: enp1s0f0        version: 10        serial: 40:6c:8f:52:d5:50        capacity: 1Gbit/s        width: 64 bits        clock: 33MHz        capabilities: bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.137 firmware=57765-v1.37 latency=0 link=no multicast=yes port=twisted pair        resources: irq:16 memory:a0400000-a040ffff memory:a0410000-a041ffff   *-network UNCLAIMED        description: Network controller        product: BCM4331 802.11a/b/g/n        vendor: Broadcom Inc. and subsidiaries        physical id: 0        bus info: pci@0000:02:00.0        version: 02        width: 64 bits        clock: 33MHz        capabilities: bus_master cap_list        configuration: latency=0        resources: memory:a0600000-a0603fff WARNING: output may be incomplete or inaccurate, you should run this program as super-user. ebmo@ebmo-MacBookPro:~$ rfkill list 0: hci0: Bluetooth     Soft blocked: no     Hard blocked: no ebmo@ebmo-MacBookPro:~$

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


I want to install Ubuntu on my new Lenovo 330s.    I thought this would be pretty easy as I have done it before but I am having a lot of trouble particularly at booting the BIOS.  I have an ISO image on a USB drive.  I have tried F1 and F2 and using Recovery > Restart now. Any thoughts?

I have a laptop with Ubuntu installed as the only OS. I also have a USB stick with a Windows 7 installation on it. I want to install Windows from the USB stick on my laptop but when I try to restart the laptop to get access to BIOS, I can't seem to find the command for it, its like it skips everything and just says Ubuntu and then takes me to the login screen.  How do I change the boot priority to USB in Ubuntu?


Although I know the main difference between Deep Copy and Shallow Copy but what I want to ask here is something practical.  I have  NSArray *firstArray = [NSArray arrayWithObjects:@"first", @"second",@"third",  nil]; NSArray *secondArray    = firstArray; secondArray             = nil;  NSLog(@"First Array : %@",firstArray); NSLog(@"Secon Array : %@",secondArray);   Both the firstArray and secondArray has the same reference as seen by putting break point.  Now my question is this, if both have same REFERENCE then why the firstArray does not change if the secondArray is changed.  I am really confused here... Can any one please make me clear.   Thanks in anticipation.

What is the difference between a deep copy and a shallow copy?


Am learning CPP and in the below code snippet, I am expecting 40 as the answer, but getting 30. Can anyone please help to identify what am I doing wrong.  The program may not make sense, but its just for learning.  class Shape {  protected:     int shape = 10; public:      int get() {         return shape;     }     virtual void process() {         shape = 30;     } };  class Rectangle : public Shape {  public:     void process() {         shape = 40;     }  };   class Object : Shape {      Shape m_sh; public:     Object(Shape &sh) {         m_sh = sh;         m_sh.process();     }      int getShape() {         return m_sh.get();     }  };  int main(int argc, char *argv[]) {      Rectangle rect;     Object obj1 = Object(rect);      std::cout << obj1.getShape() << std::endl; // am expecting 40, but getting 30.  }

Someone mentioned it in the IRC as the slicing problem.


The Slack and WebTorrent Desktop apps usually have nice top bar icons but sometimes they appear like so:    Is there a way to solve this problem?

The following is a systray applet icon that appeared in my Unity session after I upgraded to Ubuntu 16.10. Its menu is tall, narrow and empty. What is it?


Suppose one had a pressure chamber of extreme strength, strength enough to hold 100s of MPa worth of pressure inside. So you put some ice cubes in the chamber (regular ice), keeping the temperature low enough it doesn't melt (so you can see the transition I'm curious about). Then you increase the pressure (if there is some kind of gas which can still be a gas or at least supercritical under these conditions so you can keep pressurizing the chamber) up to the point (keeping the temperature in range) where the ice transforms form normal ice into one of the higher-pressure forms of ice. If there were a way to see inside with visible light, would you notice a change in the appearance of the ice? If so, what? For example, consider the diagram here:    It looks that if ice were kept at a temperature of, say, 245 K, and the pressure were raised from normal atmospheric to, say, 220 MPa (though the transition looks to be somewhat lower than that), it will change to "Ice III" (which looks to be one of the lowest-pressure forms of the high-pressure ices). What would that look like? Especially, what would the ice cubes do as you cross the phase boundary, visibly speaking? Would it change color? Would they crack and break from a density change? What would the other forms of high-pressure ice look like, anyways, were it possible to photograph them?

I recently read about different phases of ice on Wikipedia. But I can't find any pictures of the different ice phases. Do they all look alike visually? If you weren't able to measure the pressure and temperature, would you be able to tell one phase from another in any way?


I want ask issue regarding the number of cpu threads that can be read from the os. This question is how to resolve core not showing and not ask how to check core threads. Server spec  Hpe dl360p gen8 Cpu: 2 x E5-2680 v2 Debian Proxmox Hyperthreading enabled On Bios  Threads cpu should be 40 threads from 20 cores, but when I checked from lscpu and cat /proc/cpuinfo  only show 20 threads. Before I rebooted the server, the threads still read 40, and after I rebooted it only read 20 threads. Do you have idea to make all threads show?

I wanted to find out how many cores my system has, so I searched the same question in Google. I got some commands such as the lscpu command. When I tried this command, it gave me the following result:  $ lscpu Architecture:          x86_64 CPU op-mode(s):        32-bit, 64-bit Byte Order:            Little Endian CPU(s):                4 On-line CPU(s) list:   0-3 Thread(s) per core:    1 Core(s) per socket:    4 Socket(s):             1 NUMA node(s):          1 Vendor ID:             GenuineIntel CPU family:            6 Model:                 23 Stepping:              10 CPU MHz:               1998.000 BogoMIPS:              5302.48 Virtualization:        VT-x L1d cache:             32K L1i cache:             32K L2 cache:              2048K NUMA node0 CPU(s):     0-3   In particular, this output shows:   CPU(s): 4 Core(s) per socket: 4 CPU family: 6   Which of those indicates cores of a Linux system?  Is there any other command to tell the number of cores, or am I assuming it is completely wrong?


Is it possible to show an arbitrary image across the console / X11?  In essence, I just want the video output to be the image.  Is there a way to do that?  I would want the console virtual terminals to be disabled as well as X11, so I'd like to just display an image through the video driver some how.  I can disable the console and X11, but don't know how to load an image.  Thanks,  Walter

When I am on the console (the tty, the virtual terminal, which you reach with Ctrl+Alt+F1-6, not a terminal emulator), what options do I have to view images, tiff, whatever that's not text?