I know this is a duplicate but I can't understand any of the duplicates.     $\lim_{n \rightarrow \infty} a_n = A$, how to prove if $\lim_{n \rightarrow \infty}a_n=A$, then $\lim_{n \rightarrow \infty}\frac{a_1+...+a_n}{n}=A$?   If $a_n=A$ for all $n$, it would be easy, right? Now what if $A-\epsilon < a_n < A+\epsilon$ for all $n$? You could get that $|\frac{1}{n}\sum_{k=1}^n a_k - A | < \epsilon$. If the limit exists, it is similarly bounded. To avoid saying "if the limit exists", take the limsup, which always exists, and say $|\limsup \frac{1}{n}\sum_{k=1}^n a_k - A | < \epsilon$.  So here's the problem. You only have $|a_n-A|< \epsilon$ for $n \geq N$. What to do? Split it into two cases and work the rest from there: $$\frac{1}{n}\sum_{k=1}^n a_k = \frac{1}{n}\sum_{k=1}^N a_k + \frac{1}{n}\sum_{k=N+1}^n a_k.$$  I know that for large enough k the terms go to zero but what about the terms that are 1 to N? I can't figure out why.

I have this problem I'm working on. Hints are much appreciated (I don't want complete proof):  In a normed vector space, if $ x_n \longrightarrow x $ then  $ z_n = \frac{x_1 + \dots +x_n}{n} \longrightarrow x $   I've been trying adding and subtracting inside the norm... but I don't seem to get anywhere.  Thanks!


I create ad custom post type  register_post_type( 'videos', $args); and custom taxonomy for that  register_taxonomy( 'video_category_categorie', 'videos', $args );  Maximum number of post displayed is 2 per page. Via word press backend in archive-videos. php i write the for displaying the post from a specific taxonomy ( taxonomy item id is 3  )  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;  $args = array( 'post_type' => 'videos','paged' => $paged,'tax_query' => array(     array(     'taxonomy' => 'video_category_categorie',     'field' => 'term_id',     'terms' => 3) ));  $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); echo get_the_title().'<br>'; endwhile; twentyfourteen_paging_nav();   Now i get the result correctly only pst from taxonomy id 3 is displayed.  But the pagination is not correct. it  showing 1 2 3 4 . actually there is 5 post that is in taxonomy id 3 . so the correct pagination is 1 2 3 .  And also when clicking  4 page the page didn’t show any post name .  Please help

I got a paged loop that pulls in 4 posts per page from custom post type. It works great, with the only downside that the pagination wont go over the page/20 everything after that is 404, and the posts_nav_link won't show the next arrow at all. Like the pages just aren't there.  In total there are 119 published posts in the custom post type. If I change posts_per_page to, say 6, then I get access to more of the posts from the end, but it also stops at the page/20.  On the production site the pagination stops at 21, I guess because the live database has more entries.  I got the "Blog pages show at most" setting set to 6.  Here's the loop I'm using:  <?php $paged = get_query_var('paged') ? get_query_var('paged') : 1; $args  = array(     'posts_per_page' => 4,     'orderby'        => 'modified',     'post_type'      => "projekte",     'paged'          => $paged ); $custom_query = new WP_Query($args); $c = 0; while($custom_query->have_posts()) :     $custom_query->the_post();     ?>     <article>...</article>     <?php endwhile; wp_reset_postdata(); // reset the query ?>   I've gone through the functions.php a million times looking for a some limiting get_pre_posts filter but there's nothing I can see.  I also got an error log setup and nothing is returned there, I've tested it that it works.  Any suggestions?


I am a member of Stack Overflow in Portuguese, I cross-posted the exact same question on both sites:   Qual é o modo mais eficiente para implementar GroupBy em Javascript?  On Stack Overflow The first thing that happened was a useless comment asking why followed by a suggestion of a full library to use a single method that I asked and this library doesn't even do what I asked. Another member came and suggested two libraries (which I don't want a full library for a single method) and neither libraries do what I want. I've being trying to implement and I posted as an answer what I managed. Even though it is not really fast, it works pretty well. I instantly got a downvote, the person that downvoted didn't even test or tried to understand what I tried for hours. That is even disrespectful. This is not the first time it happened to me, I tried to ignore them with all my strength. Once I even had to report the comments and a mod cleaned up. On Stack Overflow Portuguese First comment was a member trying to understand what I wanted to do, he as probably not familiar with C# and Linq. Second comment was on my answer, a guy told me that what is really making my method slow is the GetHashCode. No one judged me for what I am trying to do, no one tried to make me swallow a nasty library. Everyone so far tried to understand my question and help me out. After all, Stack Overflow is for members to help each other, isn't it?  I do not believe that I am the only one who feels this way. Stack Overflow was not like this a year ago. What happened? How can we improve the community and stop this hate behavior? Updated Aug 2018 This is now being addressed by the  Thanks everyone in the community that helped me express this feeling and thanks Stack Overflow for creating this code of conduct and new flags. Disclaimer: I feel like a lot of downvotes were by the lack of empathy. I guess it is really hard to communicate when someone reads what you write in a "binary way". Also I've never had the intent to make it sound like SO PT is better than SO, if anyone thought that. It's just that SO PT was a new community, fresh, and people were being nice because of it.

The title is a reference to . We had the good fortune, to start this experiment with a really positive culture and have managed to hang onto it through vast growth and several fairly bitter internal arguments. But that does not guarantee we'll keep it forever. Lately I've had a unscientific feeling that Stack Overflow has been a bit rougher on newbie mistakes. The actual composition of this question was triggered by the comment thread on  (now with pending delete votes, so it is in danger of being 10k only). The  currently has 3 reputation points and has been a member for all of two days. The question bear the obvious (to me, at least) hallmarks of being written by a non-native English speaker with a shaky grasp of the tongue, and it is a rather simplistic question that could be answered fairly easily by Google. Question body:  Sir, I am mc student, I have knowledge in c,c++,J2EE. I want to ask you should I command in Linux with J2EE. Is it worth?  Instead of trying to improve the question, to discern exactly what the OP meant, or explaining how the question should be improved we get this comment thread instead (without wanting to call out these posters in particular, this was just the thread that got be off my duff):  2 Can you elaborate? – Dave McClelland 21 hours ago 1 Absolutely yes! If it can run on your Blu-Ray player, imagine the possibilities it can do on Linux. – The Elite Gentleman 21 hours ago 1 Basically, it's as worth as running Java on any other platform. – Alexander Gessler 21 hours ago 1 @The Elite Gentleman, You can try run it on your sim-card too) – Stas Kurilin 21 hours ago 1 @STas Kurilin, really? What heapspace size must I give? sarcastic laugh – The Elite Gentleman 21 hours ago 1 @The Elite Gentleman I don't know. But there are some) See for details oracle.com/technetwork/java/javacard/overview/… – Stas Kurilin 21 hours ago @The Elite Gentleman, you're absolutely right given a full fledged desktop machine with Linux, Java would run so fast his program could go back in time and rescue whales from extinction. – Quaternion 21 hours ago @Stas Kurlin, if you have a program that runs on a sim-card isn't it hard to get output? I've always found processorless environments problematic. – Quaternion 21 hours ago @Quaternion - It was a joke) I've newer wrote such programs. But, I think there should be some processor. – Stas Kurilin 20 hours ago @Stas Kurlin, I was joking too, but I have to apologize after reading that page you liked to. You can run Java off a smart card... that's crazy and cool. +1 on account of good learning for the day. – Quaternion 20 hours ago @Quaternion Thanks. I heard about this stuff several weeks ago. Java at a sim card is a really cool argument) – Stas Kurilin 20 hours ago @Quaternion, lol, without having to worry about Segmentation Faults along the way. – The Elite Gentleman 19 hours ago  I've been leaving comments on threads like this from time to time, asking them to be a little more forgiving, but that is a drop in the bucket. Nothing flag-worthy here, but not a "nice" as things once were. There is very little effort to understand what the question may really be, nor why to explain why the question has been closed, what other resources exist, or how that decision could be reversed. With a brand new user who probably has a hard time with English. Ouch. Do we need an official re-iteration of "Be nice."? Is there something else we can do to encourage our big city to keep the small-town feel we grew up with?


I bought a Deluxe hosting plan at Godaddy years ago to host my websites. Recently I decided to move one of the websites to a new host, so I have bought a new Deluxe plan for that website (which is a big forum). But since the migration, the website has been much slower than before, and I have received warnings that the resources for my account have been limited.   I realised that on these new Deluxe plans (which they call "with cPanel"), the CPU and Memory (and other) resources are limited (1 CPU core and 512 MB of memory), things never happened with the old Deluxe plans (which they call "Web classic"). (I have never had any resource problems with the other older account, even though I have used it for hosting many websites).   I'm considering cancel the order and move the website to yet another host.  Could you suggest me a hosting service (that you are using or have already used) with good amount of CPU & Memory resources at a reasonable/comparable price?   Thank you in advance for any suggestions!

This is a "catch-all" question designed to serve as an answer for all questions about choosing web hosting.  Pro Webmasters no longer accepts new questions about how to choose hosting.  All future questions pertaining to finding web hosting should be closed as a duplicate of this question. For more information about this policy please see .    How to find web hosting that meets my requirements?  What we're looking for in answers to this question are the basics about web hosting:   What is web hosting? What is the difference between shared, VPS, and dedicated hosting? How does a content delivery network relate to web hosting? Anything else you feel is helpful in finding a web host.   What we do not want is:   Endorsements or recommendations for specific web hosts We do not want your experience or other subjective information (just the facts please)


My teacher asked me a question which is as follow:     There are $1000$ doors numbered $1$ to $1000$, and there are $1000$ men numbered $1$ to $1000$.      Firstly $1$ numbered man goes and open all the doors.      Secondly $2$ numbered man goes and close the doors which are numbered multiple of $2$      Third $3$ numbered man goes and changes the state of doors which are numbered multiple of $3$       For example he closes the door numbered $3$ and opens the door numbered $6$      So after the man numbered $1000$ came back from his work,how many and which doors would be remain opened?   I thought about it for one hour, but couldn't get anything.  My teacher told me that there is a simple & pure mathematical logic behind this  Can you help me with this??

There are 1000 lockers in a high school with 1000 students.  The    problem begins with the first student opening all 1000 lockers; next    the second student closes lockers 2,4,6,8,10 and so on to locker 1000;   the third student changes the state (opens lockers closed, closes    lockers open) on lockers 3,6,9,12,15 and so on; the fourth student    changes the state of lockers 4,8,12,16 and so on. This goes on until    every student has had a turn.      How many lockers will be open at the end?   I worked out this problem by doing it for 10 lockers. The pattern was obvious (1,4,9 remained open).It's easy to then say that 31 lockers remain open at the end. I don't quite understand why only square numbers remain open at the end. Is there some deeper reason?


$ϕ(m · n) = \frac{ϕ(m) · ϕ(n) · gcd(m, n)}{ϕ(gcd(m, n))}$ Deduce from the previous identity that $ϕ(n^k) = n^{k−1}· ϕ(n)$  I know that \begin{eqnarray*} \phi(m) = m \prod_{p \mid m } (1-\frac{1}{p}).  \\ \end{eqnarray*} How can I make use of that? Any help please?

The third formula on the  states that $$\varphi (mn) = \varphi (m) \varphi (n) \cdot \dfrac{d}{\varphi (d)} $$ where $d = \gcd(m,n)$.  How is this claim justified?  Would we have to use the Chinese Remainder Theorem, as they suggest for proving that $\varphi$ is multiplicative?


May I ask which one is correct  "a spouse of", or "the spouse of". Example: Dana is a/the spouse of Peter. Thanks.

Here's the situation: I meet a friend and I tell her about yesterday:     “Hey, John!”   “Hi, Sarah!”   “How was yesterday's trip?”   “It was great. Karl took me to the countryside to show me his new house. It reminded me of the/a house I rented in Oxford.”    “...a house I rented in Oxford.” indicates one of the (multiple) houses I rented in Oxford? “...the house I rented in Oxford.” indicates I rented only one house in Oxford?


What are the steps to convert $3.2\overline{901234567}$ to an improper fraction?

$$\frac{1}{3}=.33\bar{3}$$    is a rational number, but the $3$ keeps on repeating indefinitely (infinitely?). How is this a ratio if it shows this continuous pattern instead of being a finite ratio?    I understand that $\pi$ is irrational because it extends infinitely without repetition, but I am confused about what makes $1/3=.3333\bar{3}$ rational. It is clearly repeating, but when you apply it to a number, the answers are different: $.33$ and $.3333$ are part of the same concept, $1/3$, yet:  $.33$ and $.3333$ are different numbers:    $.33/2=.165$ and $.3333/2=.16665$, yet they are both part of $1/3$.   How is $1/3=.33\bar{3}$ rational?


I recall that it might have been the second book of a series. It takes place in the future - not sure if in our universe - and there are robots who kill for the government (I think).  Story of a group of escapees from a prison that go to a massive ship and start a community.  The prisoners have tattooed faces.   I remember more the characters:   A lady that absorbs people and becomes them. A young girl who is a genius but has to be pregnant to be balanced. Two people from the prison they kidnapped and took with them.   Also I remember they terraformed the inside of their ship.

I'm looking for a series of books that deals with humans escaping Earth and having a mother ship full of humans who are being sent throughout the universe to different planets. The ship can transform the humans into whatever type of alien the planet holds. One set of sisters is transformed to cow-like aliens and sent to spy on that planet. All the while the group that's taken the mother ship full of human colonizers is trying to evade/escape the government people from Earth.    The 9 or 10 humans who steal the colonizing ship drop a couple of humans (transformed to whatever the indigenous species is) to the planet to spy...the end result is to try and overthrow the Earth government.  The humans that the colonizing ship transform to aliens cannot be turned back into humans ever again so when they take on the assignment to spy they do so knowing that they won't ever be able to be humans again.


Not in the middle of the page, as in margin: 0 auto; I'm talking about in the center as in top to bottom. Thank you in advance!

I want to center a div vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support.
Div to be aligned vertically
   How can I center a div vertically in all major browsers, including Internet Explorer 6?


I have uninstalled the product key from windows server 2016 essentials using cscript.exe c:\windows\system32\slmgr.vbs -upk from a evaluation copy.   I was just wondering if I can use the server without a license without limitations.   Thanks in advanced.   Cheers,  Jack

This is a  about Licensing.    Questions on licensing are off-topic on Server Fault.  If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to.    I have a question regarding software licensing. Can the Server Fault community please help with the following:   How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y?


I have two unsigned 32 bit integers, call them x and y. I want to periodically increment the two uint32's by seemingly random uint32 values. x and y will accumulate and I want them to continue to accumulate until they hit their limit, at which point I want them to start back at 0 + the value they would have had added had they not overflowed.  Assume the code looks like:  //This would be called, say every 5 seconds void increment_vals(uint32_t *x, uint32_t *y, uint32_t x_inc, uint32_t y_inc) {     *x += x_inc;     *y += y_inc;      if (x overflowed || y overflowed)     {         *x = x_inc;         *y = y_inc;     } }   So basically my question is: how do I know when x OR y has overflowed and need to to be reset? Should I just store x and y before incrementing and if the result is less than the original value then it must have overflowed? Is that guaranteed?  Thanks.

I was writing a program in C++ to find all solutions of ab = c, where a, b and c together use all the digits 0-9 exactly once. The program looped over values of a and b, and it ran a digit-counting routine each time on a, b and ab to check if the digits condition was satisfied.  However, spurious solutions can be generated when ab overflows the integer limit. I ended up checking for this using code like:  unsigned long b, c, c_test; ... c_test=c*b;         // Possible overflow if (c_test/b != c) {/* There has been an overflow*/} else c=c_test;      // No overflow   Is there a better way of testing for overflow? I know that some chips have an internal flag that is set when overflow occurs, but I've never seen it accessed through C or C++.    Beware that signed int overflow is undefined behaviour in C and C++, and thus you have to detect it without actually causing it. For signed int overflow before addition, see .


This tune is from R2 episode 23, near 19:20 mark in the version I have, though it is played many times in the series.   The tune plays at 7:15 in this .  Does anyone know which musical piece this is?

In Code Geass season 2 episode 7, there is a song playing at 6:40.This is about the time when Lelouch breaks his phone and throws it away when Kallen calls him. I can't find the song in the OST and I'm pretty sure it has been featured elsewhere in the series as well.  EDIT: I also noticed it play in episode 8 at 12:27.Corrected season number.


Let $f: [0, \infty) \rightarrow \mathbb{R}$ be a continuous differential function on $(0,\infty)$ with $f(0)=0$ and that $f'$ is increasing on $(0,\infty)$. Prove $g(x) = \frac{f(x)}{x}$ is increasing on $(0,\infty)$  My attempt: $f'(x) = \lim_{h \rightarrow 0} \frac{f(x+h)-f(x)}{h}$ Since $f'$ is increasing, we have that $x_1<x_2$ implies that $$\lim_{h \rightarrow 0} \frac{f(x_1+h)-f(x_1)}{h} < \lim_{h \rightarrow 0} \frac{f(x_2+h)-f(x_2)}{h}$$ I'm trying to show that $g(x)=\frac{f(x)}{x}$ is increasing on $(0,\infty)$, which is equivalent to showing that $$\lim_{h \rightarrow 0} \frac{g(x+h)-g(x)}{h}>0$$ So yeah, all I've managed to do is to cleraly understand what I'm working with and what I'm trying to achieve... Help appreciated!

Problem: Suppose $f$ is continuous for $x\ge 0$, differentiable for $x>0$, $f(0)=0$, and $f'$ is monotonically increasing.  Define $g(x)=\frac{f(x)}{x}$ for $x>0$. Prove that $g$ is monotonically increasing.  Source: W. Rudin, Principles of Mathematical Analysis, Chapter 5, exercise 6.


I've spent ages so far fiddling with adjustments and filters in the hope that I can recreate the effect shown in this picture.   I've tried posterising other similar effects, but I want to keep the level of detail in the face as it is kept in this photo.   Thanks in advance :)

I have seen such an effect being used in many places however I haven't figured out how to replicate it via Photoshop.  I have tried desaturating the image, placing it under a layer of solid colour and then lowering the opacity of the colour. I have also tried a couple of blend modes, to no avail. The effect is nowhere near the same.  Can someone please tell me the effect used on these images?


The following image was rendered using 2000 samples.  The render takes about 3 mins and the image looks pretty noisy still, especially the wall of the building. I'm gonna have to render a really long animation so I would prefer to keep the samples less than 2000 so it doesn't take forever to render the whole animation.   I searched online for a solution and tried everything that was suggested in this post: .   It helped some but the noise is still present in the image. I was wondering if there are any other ways to reduce the noise without increasing the sample number (through lighting or maybe using compositor)? Any suggestions are appreciated. Thanks in advance.

I know that this question is a bit old or maybe overdone, but I'm running the latest edition of Blender and when I use the Cycles engine I get really fuzzy results and I can't find a simple, non-compromising solution to the quality.  I don't know exactly what I'm doing wrong here, but I'm sure others share my frustration.  Leaving everything in default settings, I started a new project and switched to the Cycles render.  I duplicated the cube and set colors for two Diffuse BSDF shaders, then went ahead and made walls and a floor all sharing the same diffuse shader.  I made two windows to emit blue light.  The screenshot has gaps between the walls because of the setup:  I'm aware that it's considered very incomplete and many have come to terms with some amount of noise, but is this normal?  Furthermore, with default settings or not, I can't change the amount of noise produced.  Supposedly, using "progressively refine" in the rendering tab should make it refine itself indefinitely, however Cycles only counts to 10 refines and then stops, creating a render which is a pixel-perfect match of the ordinary rendering method when it's completed.  I understand that there are tricks that can be used to reduce noise, but at the cost of extra processing time and usually small quality conflicts, like blurring.  My question essentially boils down to is this Cycles' current limit?


In the Star Trek: Voyager episode "Flashback", Dimitri Valtane is killed. In Star Trek VI: The Undiscovered Country, he is shown to still be alive at the end of the film on board the Excelsior.  Is there an in-universe explanation for this contradiction to canon?

In the Voyager episode , we learn that Tuvok was once a junior science officer aboard Sulu's Excelsior, and that he had been present at the moment of death of Lt. Cmdr. Dmitri Valtane during the events of Star Trek VI: The Undiscovered Country.    If we follow the events as they were presented in "Flashback", then Valtane would have died well before the Excelsior arrived at Khitomer to aid Kirk's Enterprise in the film's climactic battle.  However, at the end of The Undiscovered Country, we see Valtane alive and well on the Enterprise viewscreen (he is the leftmost officer, with the goatee):    In-universe, what is the truth regarding Dmitri Valtane?  Did he survive the events of Star Trek VI or did he perish on the bridge of the Excelsior, only to appear as some kind of...Force ghost?


I'll be traveling to east Europe and for that reason I had to switch to a small compact tripod so that I could carry it easily. The new tripod, when closed, will not exceed 43 cm and it weighs below 1.5 Kg. However, it will be attached to the side of my backpack. (This tripod cannot be converted into a monopod)   However, I'm not sure if carrying it on board would be a problem or not because I have never done that and I have always put my tripod in my luggage and checked it in. But this time I will be traveling with a backpack only as the trip is short.   The other question is that if I check in the tripod, like I put it in its own case (has no protection), would the airline take good care of it?    Edit:   I called the airport police and asked them, but the said they have to see it first to confirm if it can be allowed or not.

I'm traveling by air on Ryanair to UK, then off to Spain.  I don't feel safe putting my tripod in the checked luggage, and I've had problems carrying it in hand luggage.  How do I make sure that my tripod survives the plane trip? I had a tripod stolen from my luggage and don't fancy that happening again.


Let's assume I have a truly random secret $s$ that is 256 bits long, and I want to use SSS with e.g. $(k=4,n=8)$. The normal approach is to set $a_0=s$ and choose $a_1 \ldots a_{k-1}$ randomly, resulting in 256 bit outputs for the points.  My question: Is there any loss in security by splitting $s$ into $k$ slices (in this example 4 slices holding 64 bits each), and using those slices as $a_0 \ldots a_{k-1}$ in the polynomial? I can then reduce p from e.g. 2^256-189 to 2^64-59 and have reduced the size of each point to about 64 bits.

works by sharing data points on a curve, whereby when you have the required number of data points, you can find the function of the curve and find out the secret, which is effectively f(0).  In the polynomial form of the function, the constant (the coefficient of $x^0$) is the secret information.  Could you treat the coefficients of the other powers of $x$ as secret values as well?  If so, are they just as secure / secret? Or is there some subtlety going on where you need fewer values to get the other coefficients?  It seems that if you had a cubic curve that you could have 4 secrets $S_i$, instead of 3 random numbers and one secret:  $$f(x) = S_1x^3 + S_2x^2+S_3x+S_4$$


I wrote a paper to a journal, which is still under review. Now I need to cite it in another paper that is double-blinded. Is this a problem?

This is my case: I've recently co-authored and sent an article to a journal that follows a double-blind review process, so that reviewers shouldn't be able to know the name of the authors. ---I mean, I (as the corresponding author) am responsible for hiding any authoring information to them.  Now I am writing another paper and I want to cite the article that is under double-blind review.  So, it is not only that I should add the typical "under review" label when citing that article, but moreover I can't give any information about the article that may spoil the double-blind process. For instance, if I add the name of the authors and the name of the journal it was sent to, then I can't include the title of the article (because it could happen that the citing article is sent for reviewing to one of the blind reviewers of the first article, or that it is even published before the first one...).  Anyway... How can/should I cite an article that is under review by a journal that follows a double-blind review process without potentially revealing too much information?? How is this problem usually solved?  I must say that I usually publish pre-prints as technical reports, but I didn't do it this time, in order not to reveal any information that could be accessed by the blind reviewers.  EDIT:  I was thinking about putting this label instead of the title of the cited article: "[Title is omitted to protect the double-blind review process]". But I still have some doubts. If I mention the name of the journal it was sent to, could the article be potentially recognized by the blind reviewers?


I had my first character made for me, which was a big mistake. I am making a new lvl 6 druid/3 fighter/3 , and I'm stuck on this one part.   So if I'm a drow druid/fighter with 2 short sword and 2 dagger, and one great axe, with a eldritch knight martial archetype, I'd calculate using my str?

I'm building my character, a Half-Elf Ranger, and I'm a little confused about how to work out the attack bonus and the damage bonus.  So, please tell me if I've got this right:   I'm proficient with a longbow. That means my attack roll is 1d20 + prof bonus + Dex modifier. The damage roll however is 1d8 + Dex modifier.   I'm just a little confused about working out the numbers (without even going into spells and when to roll for attack, etc.)


I have a JPEG image inside a PDF file, i know that it is a JPEG, because when i open the file with a hex editor i can see JFIF string present in it. How do i extract it into a separate file.  The particular file that i have only has a single image and it is on the first page.  I know that it is possible to use convert from the Image Magic package to convert the image, but this will mean that a double conversion will take place possibly making an image either worse quality or unnecesserily larger size.

Before I started using Ubuntu I used Nitro PDF reader to automatically extract images from PDF files. Is there a PDF reader for Linux that does this?  I would like to be able to extract images faster/easier than when taking a snapshot.


If someone sets up a script that constantly runs something such as  wget http://domain.tld/image.png   from their cloud server or whatever that came with tons of bandwidth and so on for free, could they exhaust your own bandwidth on your server? If so, what would be the solution to stop something like this?  I suppose there does not exist solution given that in this era most web sites use things such as CAPTCHA in order to verify if someone is an actual human being or a robot..  So perhaps this in itself is evidence that there can not be a solution to bandwidth exhausting thieves and etc.

I run a web server (Debian Squeeze on a VPS), and the graphs provided by the hosting company show consistently that around twice as much traffic is incoming to the server compared to the outgoing traffic.  I am a little confused by this, so I would like to run some kind of logging utility on the machine that will not only confirm the upload/download figures, but also split them up by the remote host involved, so I can see if a large proportion of the incoming traffic is from one particular source.  I suspect most of the outgoing traffic goes through Apache, but the incoming traffic may be mostly through Apache or could be dominated by other scripts and cron jobs, so I would prefer a tool that would monitor traffic at the interface level rather than something within Apache.  Ideally I would like a tool that I can leave running for a few days, then come back and get an output of "bytes per remote host" for both incoming and outgoing traffic.  Is this possible with a standard Linux tool and a bit of configuration (if so, how?) or with a specialist program (if so, which?)


I currently have Q4os installed.   What command can I use to install Lubuntu from files on USB? I can't boot install from USB and mini install doesn't have wireless internet installed.

I found that it can be done with loopback as follows  menuentry "Lucid ISO" { loopback loop (hd0,1)/boot/iso/ubuntu-10.04-desktop-i386.iso linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot/iso/ubuntu-10.04-desktop-i386.iso noprompt noeject initrd (loop)/casper/initrd.lz }   But it works only with ubuntu or its derivatives. How it should be written if I want to boot other live images like fedora, cent, opensuse etc. ?  Edit: I found some other entries but all of them are probably debian based.  menuentry "Linux Mint 10 Gnome ISO" {  loopback loop /linuxmint10.iso  linux (loop)/casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.lz iso-scan/filename=/linuxmint10.iso noeject noprompt splash --  initrd (loop)/casper/initrd.lz }  menuentry "DBAN ISO" {  loopback loop /dban.iso  linux (loop)/DBAN.BZI nuke="dwipe" iso-scan/filename=/dban.iso silent -- }   menuentry "Tinycore ISO" {  loopback loop /tinycore.iso  linux (loop)/boot/bzImage --  initrd (loop)/boot/tinycore.gz }   menuentry "SystemRescueCd" {  loopback loop /systemrescuecd.iso  linux (loop)/isolinux/rescuecd isoloop=/systemrescuecd.iso setkmap=us docache dostartx  initrd (loop)/isolinux/initram.igz }   Edit2: How to chainload grub and syslinux from grub2?  Edit3: I want to boot other live images without any removable devices and use grub2 so need menu entries specific to grub2.


Former student in graphic design, I am currently working on personal projects to widen my portfolio. I love to design album covers. I never had clients for that, so I have been re-designing real albums from real artists. I was wondering if I can post these personal projects on my website knowing that these albums actually exist and that my design is not the official one (regarding the artist who originally designed the cover). Would it be even legal?

when I was at design college 2013 we were told (for educational purposes) that we could use images from the net (only photographs) to incorporate into designs for posters, collages, magazine covers, etc, and that we obviously could not make any money from these designs, but that we could use them in our portfolio. Is this true or false? I now have an FB page and, as a recent graduate, want to put up some of these designs on my page. But is that copyright, or is it permissible as an example for work I've done, so long as no money is being made from it? Do I need to state that photography wasn't original? (I'm not even sure now where I got them from!) I usually put a copyright label on my posted works to cover myself, but if the above described is permissible, then do I need to not use that copyright label as its not completely original? (because I have used some photographs from the net which have then been rearranged/edited/etc etc and incorporated into a design).  Any help would be much appreciated! Thanks!


We have wrapper class:  public class Meta {     @AuraEnabled public Integer total;     @AuraEnabled public Integer count;     @AuraEnabled public Integer offset;     @AuraEnabled public String orderBy;     @AuraEnabled public String orderDirection;  }    and I want to loop through all fields dynamically like:  for(String key: Meta.xxxkeySet()){     String value = Meta[key or something]; }   I can add method like returnField(String fieldName) to the wrapper class, but I don't like that I would need to hardcode field names there and more importantly there are different variable types (in this example only Integer, String)(maybe use Object type here?). Did you have similar issue?

Is it possible to access Apex class properties dynamically? While we can create Object's, and assign any other class to an Object, I'm not sure how I can access the properties of these Object's. Can anyone provide some documentation or references to code which would allow me to do this?   Example:  public class XYZ {    public string s1 { get; set; }    public string s2 { get; set; } }  XYZ testXyzObj = new XYZ(); Object obj = testXyzObj;  // Method does not exist or incorrect signature: [Object].get(String) String s1 = obj.get('s1');


I am trying to find a simple factorial of all the preceding odd numbers. If $9$ were to be picked the equation would read $9\times 7\times 5\times 3\times 1$ (only odd numbers can be picked). Would the following fraction work?          $$\dfrac{x!}{2^{\left(\frac{x-1}{2}\right)}\left(\frac{x-1}{2}\right)!}$$

I have this formula which seems to work for the product of the first n odd numbers (I have tested it for all numbers from $1$ to $100$):  $$\prod_{i = 1}^{n} (2i - 1) =  \frac{(2n)!}{2^{n} n!}$$  How can I prove that it holds (or find a counter-example)?


How to determine the Galois correspondence of the extension $\mathbb{Q}(\zeta_{28})/\mathbb{Q}$, where $\zeta_{28}$ is a primitive 28-th root of unity?  It seems that in  only $\mathbb{Q}(\zeta_n)/\mathbb{Q}$ for $n=p^k$ is discussed.

Is there a good general purpose algorithm (batch of theorems) allowing one to determine the intermediate fields between $\mathbb{Q}(\zeta)$ and $\mathbb{Q}$, where $\zeta$ is some primitive root of unity?  Let $p$ be a prime. Consider the case where $\zeta=\zeta_{p}$ is a primitive $p$-th root of unity. Then the Galois extension is cyclic of order $p-1$ and $1,\zeta,\dots,\zeta^{p-1}$ is a $\mathbb{Q}$-basis for the extension. In this case for any subgroup $H$ of $G=\mathbb{Z}/(p-1)$, by considering the sum $$\alpha_H=\sum_{\sigma\in H}\sigma\zeta,$$ we can observe that $\alpha_H$ lies in the fixed field for $H$, and any automorphism $\tau$ not in $H$ (note automorphisms are identified with subgroups of $\mathbb{Z}/(p-1)$ in the natural way), $\tau$ does not fix $\alpha_H$. Therefore we can conclude that $\mathbb{Q}(\alpha_H)$ is the fixed field of $H$.  In this way we can get all of the intermediate fields of $\zeta_p$ for all odd primes $p$.  We also have a theorem that says if we have $n=p^sq^t$, then $$\text{Gal}(\mathbb{Q}(\zeta_n)/\mathbb{Q})\simeq \text{Gal}(\mathbb{Q}(\zeta_{p^s})/\mathbb{Q})\times\text{Gal}(\mathbb{Q}(\zeta_{q^t})/\mathbb{Q}).$$  So what I have yet to understand is  How can one generally find the intermediate fields between $\mathbb{Q}(\zeta_{p^s})$ and $\mathbb{Q}$ for $s\ge 1$? I would like to also understand the case where $p=2, s>1$ though this might turn out to be a separate case.  EDIT: Even the case $n=pq$ is a little murky to me. Even given the isomorphism given by the Chinese Remainder Theorem I don't see a priori how to get all the "product" subfields. My idea is that you can consider the separate subfields under $\text{Gal}(\mathbb{Q}(\zeta_{p})/\mathbb{Q})$ and $\text{Gal}(\mathbb{Q}(\zeta_{q})/\mathbb{Q})$ separately and then consider the pairwise product of the generators of various subfields to see if you get anything new, but my idea is too inchoate.


A class is a collection of sets in which the sets are members of the class. So, may I ask what are the differences between a class and a set (or more precisely a set of sets) by their nature? What motivates mathematicians to give it a separate name?

I know what a set is. I have no idea what a class is.   As best as I can make out, every set is also a class, but a class can be "larger" than any set (a so-called "proper class").  This obviously makes no sense whatsoever, since sets are of unlimited size. It's not like you get up to 25 elements and go "oh, hey, sets are limited to a maximum of 20 elements, so we'll have to call this 25-element thing something else".  Does anybody know what the actual difference between a set and a class is?  Several people have pointed out that you can write paradoxes which involve sets. I get that. But where do classes come into the picture?


I remember that this is something like Cronenberg films. It seems that there the guy accidentally spied on his sister in the shower and saw that she had breast on her back, and then the whole family turned out to be monsters. It seems that the family gathered in the evening for dinner, and then they tried to catch the guy. Monsters were horribly ugly.

I never saw the full film, just a uk trailer, dated maybe about 1990. I thought at the time "I'm gonna watch that" but then the years intervened.  I've had a search through this site but no joy.  What I recall is this kid aged approx eleven is gaping in horror because he learns his parents (step-parents maybe) are shape changing aliens/ demons   They proceed to flip through a few changes while laughing at his reaction, one that stayed in my memory was "you called us butt-heads, well look at this!" and both then change their heads into people with big butts from the neck up.


How to articulate abbreviated words when the original word articulation conflicts the pronunciation of the word?  For example, I would say     A Facebook campaign for Donald Trump   But abbreviating Facebook to FB makes it difficult to keep the articulation intact     A FB campaign for Donald Trump   or      An FB campaign for Donald Trump   Which one is correct?  Second one seems easier to read

99% of the time, I'm clear on when I should use "a" versus "an." There's one case, though, where people & references I respect disagree.  Which of the following would you precede with "a" or "an," and why?   FAQ FUBAR SCUBA   [Note: I've read the questions  and , but the rules given there don't necessarily apply here.]    [Edited to add]  Here's a shorter (and hopefully clearer) version of the question…  In written English, which is correct (and why): "a FAQ" or "an FAQ"?  Some references with differing opinions:   an: the  and  a: the Microsoft Manual of Style for Tech Publications, 3e either: the  and


In remark 5.16.1 the claim is made that if $i\colon X\to \mathbb{P}^r_Y$ is a closed immersion, then $i^*(\mathcal{O}_Y)$ is a very ample invertible sheaf on $X$, but I cannot determine why it is locally of rank 1. I tried to appeal directly to the definition of $i^*(\mathcal{O}(1))$, but wasn't able to make any sort of meaningful progress.

states that if $f:X \rightarrow Y$ is a morphism of ringed space, $G$ is a locally free $O_Y$-module, then $f^*G$ is a locally free $O_X$ module.     Suppose that $G$ is a locally free $O_Y$ module, hence it is a free $O_Y|_U=O_U$ module. We have an induced map  $$f^{-1}(U) \rightarrow U$$ given by restriction of morphism of ringed spaces.   Hence, as $\bigoplus O_U \simeq G|_U$, $f^*:Mod(O_U) \rightarrow Mod(O_{f^{-1}(U)})$ is functorial, $f^*(G|_U) = (f^*G)|_{f^{-1}(U)}$, we have isomoprhism,  $$ \bigoplus O_{f^{-1}(U)} \simeq (f^*G)|_{f^{-1}(U)} $$


I'd like to form a "running sheet" for an event that is likely to change, so I'd like LaTeX to keep track of the calculations for me if the programme changes.  I imagined storing a "start" time, having a counter "duration" set for each section, and using LaTeX to add these two so that the result is still a valid clock time for the start of the next section. This would continue for each element in sequence. For example, 2pm "start", 10 minute intro "duration", leads to a printed time for the next item of 2:10pm (the pm is not necessary). That way, if someone decides they can/cannot give a speech as part of the opening, we don't have the tedious business of changing all of the timings. I also don't want to have to manually ensure that the passing of 60 minutes actually increments the hour.  I've looked at datetime2 and some other packages, and it's not obvious how you would add to the stored date, but I admit that normally I use R for imposing some requirements on date formats. I'd prefer to not have to have an R script to do this and then import the text to a LaTeX doc. Any suggestions to create something like what I describe are welcome.

Based on a given starting time, I'd like to automatically calculate a time table. Based on  I put the following MWE together:  \documentclass{beamer}  \newcount\hours \newcount\minutes  \def\gettime#1:#2\relax#3#4{\def#3{#1}\def#4{#2}}  \newcommand{\add}[2]{%     \expandafter\gettime#1\relax{\hrs}{\mins}%     \expandafter\gettime#2\relax{\addhrs}{\addmins}%     \hours=\hrs\relax%     \advance\hours by \addhrs\relax%     \minutes=\mins\relax%     \advance\minutes by \addmins\relax%     \ifnum\minutes>59\relax%     \advance\minutes by -60\relax%     \advance\hours by 1\relax%     \else%     \ifnum\minutes<0\relax%     \advance\minutes by 60\relax%     \advance\hours by -1\relax%     \fi%     \fi%     \ifnum\hours>23\relax%     \advance\hours by -24\relax%     \else%     \ifnum\hours<0\relax%     \advance\hours by 24\relax%     \fi%     \fi%     \ifnum\minutes<10\relax%     \xdef#1{\number\hours:0\number\minutes}%     \else%     \xdef#1{\number\hours:\number\minutes}%     \fi%     }  \begin{document}         \begin{frame}             \xdef\startTime{09:30}               \begin{tabular}{l l l}                 top1 & \startTime{} -- \add\startTime{01:00}\startTime & \textcolor{red}{01:00}\\                  top2 & \startTime{} -- \add\startTime{00:45}\startTime & \textcolor{red}{00:45}\\                  top3 & \startTime{} -- \add\startTime{00:15}\startTime & \textcolor{red}{00:15}\\                  \hline                 Sum & \textcolor{red}{09:30} -- \startTime             \end{tabular}          \end{frame} \end{document}   Now the question:  How can I insert the red denoted times automatically as well? [In values in the third column are the durations]


I am currently working through Bishops' Pattern Recognition and Machine Learning where the following issue came up.  It is closely related to the unanswered post below, but I wanted to propose a more formal approach.   The confusion arises in Bishops chapter 4, when he introduces logistic regression for a two-class problem where he estimates the posterior $p(C\mid x)$ by ML. Just a few paragraphs above he had shown how to calculate the likelihood for MLE estimates of means and variances of two Gaussian class-conditional distributions. Therefore, the product of the joint distribution accross all samples is calculated and the log-likelihood is then minimized.  Introducing the MLE for logistic regression for the $w$ parameters in the sigmoid $\sigma(w^Tx)$ however, it appears that he only takes the product of the posterior probabilities $p(C=t_i \mid x_i)$ (approximated for members of the exponential family by sigmoids $\sigma(w^Tx)$) and comes up with the logistic cross-entropy loss function $$\ell(w) = \sum_i t_i \log(\sigma(w^Tx))+(1-t_i)\log(1-\sigma(w^Tx)).$$ Then he goes on discussing properties of the function and minimization algorithms.  Now, my problem: Why can he apparently start logistic regression MLE from the product of posteriors $\prod_i p(C=t_i\mid x_i)$? If you like, in the post cited above you can find an (incomplete) motivation for this that I suggested.   Here I wanted to propose a slightly different approach for an answer and ask for your opinion.  Isn't he actually only pararmetrizing the posterior with the sigmoid function? So maybe a more complete derivation of log-reg. MLE could read:  \begin{align} \ell(w)  &= \log\prod_{i=1}^N p(C=1, x_i)^{t_i} \cdot p(C=0, x_i)^{1-t_i}  \\[8pt] &= \log\prod_{i=1}^N p(C=1\mid x_i)^{t_i} \cdot  p(C=0\mid x_i)^{1-t_i}~~p(x_i) \\[8pt] \end{align}  and only then parametrize $p(C\mid x)=\sigma(w^Tx)$ to obtain $$\ell(w) = \sum_i t_i \log(\sigma(w^Tx))+(1-t_i)\log(1-\sigma(w^Tx))+log(p(x_i)).$$  Finally, as the marginal $p(x)$ is not parametrized with $w$ it will not influence the minimum-location w.r.t. $w$.  Intuitively this seems to make some sense, as the log-reg just gives a (linear) discriminant depending on the targets and does not provide (being a probabilistic discriminant) an estimate for the marginal/unparametrized $p(x)$.  Is this a valid starting point for thinking about this?

I am learning logistic regression from The elements of statistical learning: data mining, inference, and prediction, by Trevor Hastie, Robert Tibshirani, Jerome H. Friedman.  Suppose $G$ is a random variable representing response taking class label in $\{1,\ldots,K \}$, and $X$ is a random vector representing predictor taking values in $\mathbb{R}^n$.  After modeling $P(G = k|X = x; \theta), k=1,\ldots,K, x \in \mathbb{R}^n$ by logistic model in , the parameter $\theta$ is estimated from samples $\{(x_i,k_i), i=1,\ldots,N \}$ in section :     Logistic regression models are usually ﬁt by maximum likelihood, using   the conditional likelihood of $G$ given $X$. Since $P(G|X)$ completely   specifies the conditional distribution, the multinomial distribution   is appropriate. The log likelihood for $N$ observations is  $$ℓ(θ) = \sum_{i=1}^N \log P(G = k_i|X = x_i; \theta) $$   My question is how the estimation method is maximum likelihood.   Generally speaking, MLE is to estimate parameter $\theta$ of a single distribution $p(z;\theta)$ from its i.i.d. samples $\{z_i, i=1,\ldots,N \}$ by maximizing $\log p(x_1,\ldots, x_N; \theta) = \sum_{i=1}^N \log p(x_i; \theta) $, the log of joint distribution of the samples.  The estimation for logistic regression as in the quote seems not using MLE, because:   $P(G = k|X = x_i; \theta), i=1,\ldots,N $ are $N$ different distributions, instead of just one distribution as for MLE; in $ℓ(θ) = \sum_{i=1}^N \log P(G = k|X = x_i; \theta) = \log     \prod_{i=1}^N P(G = k|X = x_i; \theta)$, I wonder how to explain that "${ (k_i|x_i), i=1,\ldots,N }$" are independent and therefore $\prod_{i=1}^N P(G = k_i|X = x_i; \theta)$ is their joint distribution, as I don't know how to understand $(k_i|x_i)$ which seems not make sense.   My guess answer is that $\{(x_i,k_i), i=1,\ldots,N \}$ are assumed to be i.i.d. samples of the single distribution for $(X,G)$. So MLE for the distribution of $(X,G)$ is to maximize $$ \log P((x_1,k_1),\ldots,(x_N,k_N))  = \log \prod_{i=1}^N P(x_i,k_i)  $$ $$ = \log \prod_{i=1}^N P(k_i | x_i) P(x_i) = \log \prod_{i=1}^N P(k_i | x_i) + \log \prod_{i=1}^N P(x_i) $$ $P(k_i | x_i)$ is parameterized by $\theta$ as $P(k_i | x_i;\theta$, while $P(x_i)$ is assumed to be independent of $\theta$, so to solve for $\theta$ by MLE for the distribution of $(X,G)$ is equivalent to maximize $\log \prod_{i=1}^N P(k_i | x_i; \theta)$. I wonder if this is a reasonable explanation, and what yours are?  Thanks and regards!


I have noticed a programming style in Embedded C, used for firmware programming:  #define WRITE_REGISTER(reg, value) \         do { \            write_to_register(reg, value); \         } while (0)   How does this do...while (0) help over:  #define WRITE_REGISTER(reg, value) write_to_register(reg, value)

In many C/C++ macros I'm seeing the code of the macro wrapped in what seems like a meaningless do while loop.  Here are examples.  #define FOO(X) do { f(X); g(X); } while (0) #define FOO(X) if (1) { f(X); g(X); } else   I can't see what the do while is doing.  Why not just write this without it?  #define FOO(X) f(X); g(X)


Evaluate $$\displaystyle \lim_{x \to 1} (x-1) \zeta (x)$$  I'm not much familiar with the properties of zeta function. An elementary solution is appreciated. Thanks.

I need prove the following: ($\zeta(s)$ is the Riemann zeta function)  $\displaystyle\lim_{s \to{1+}}{(s-1)\zeta(s)}=1$  I really don't know, I have tried hard, but have obtained nothing for now.


I have two objects: Object One [   { repo: 'edat-ims-github', status: 200 },   { repo: 'edat-ims-github-spa', status: 200 },   { repo: 'test-repo-three', status: 200 } ]  Object Two [   { repo: 'edat-ims-github', status: 200 },   { repo: 'edat-ims-github-spa', status: 200 },   { repo: 'test-repo-one', status: 200 },   { repo: 'test-repo-two', status: 200 },   { repo: 'test-repo-three', status: 200 } ]  I would like to compare both arrays and remove the duplicate objects from the second array so my output looks like: [   { repo: 'test-repo-one', status: 200 },   { repo: 'test-repo-two', status: 200 } ]  I have tried to use ES6 to do this by running this:   const result = objectTwo.filter((obj) => {     return !objectOne.includes(obj);   });  However, result is coming out as: [   { repo: 'edat-ims-github', status: 200 },   { repo: 'edat-ims-github-spa', status: 200 },   { repo: 'test-repo-one', status: 200 },   { repo: 'test-repo-two', status: 200 },   { repo: 'test-repo-three', status: 200 } ]  Could someone please guide me on where I am going wrong and what the most optimal way of achieving this would be? In real life, both arrays have are 10000+ objects. I am not testing equality as both arrays are not the same, I am more testing how to remove duplicates. Thanks :)

A strict equality operator will tell you if two object types are equal. However, is there a way to tell if two objects are equal, much like the hash code value in Java?  Stack Overflow question  is similar to this question, but requires a more academic answer. The scenario above demonstrates why it would be necessary to have one, and I'm wondering if there is any equivalent solution.


In 2nd line here I see 'u001' then 'root', 1st is owner as I understand, but what is 2nd ?  drwx------ 13 u001 u001     4096 jun 21 03:29 .cache drwxr-xr-x 18 u001 root     4096 jun 21 03:30 .config drwxr-xr-x  2 u001 u001     4096 jun 21 02:54 Desktop   How could I change it to u001 ?

When I entered the -al attribute with the  command, I got the following:  anupam@JAZZ:~/blog$ ls -al total 76 drwxrwxr-x 13 anupam anupam 4096 Aug 28 21:45 . drwxr-xr-x 34 anupam anupam 4096 Aug 28 20:52 .. drwxrwxr-x  8 anupam anupam 4096 Aug 28 12:19 app drwxr-xr-x  2 anupam anupam 4096 Aug 28 12:19 bin drwxrwxr-x  5 anupam anupam 4096 Aug 28 12:19 config -rw-rw-r--  1 anupam anupam  154 Aug 28 12:19 config.ru drwxrwxr-x  3 anupam anupam 4096 Aug 28 12:37 db -rw-rw-r--  1 anupam anupam 1339 Aug 28 12:19 Gemfile -rw-rw-r--  1 anupam anupam 2871 Aug 28 12:19 Gemfile.lock drwxrwxr-x  7 anupam anupam 4096 Aug 28 21:45 .git -rw-rw-r--  1 anupam anupam  466 Aug 28 12:19 .gitignore drwxrwxr-x  4 anupam anupam 4096 Aug 28 12:19 lib drwxrwxr-x  2 anupam anupam 4096 Aug 28 12:29 log drwxrwxr-x  2 anupam anupam 4096 Aug 28 12:19 public -rw-rw-r--  1 anupam anupam  249 Aug 28 12:19 Rakefile -rw-rw-r--  1 anupam anupam  478 Aug 28 12:19 README.rdoc drwxrwxr-x  8 anupam anupam 4096 Aug 28 12:19 test drwxrwxr-x  6 anupam anupam 4096 Aug 28 12:33 tmp drwxrwxr-x  3 anupam anupam 4096 Aug 28 12:19 vendor   What does each column mean, and what does the total 76 signify here?


The man page for gnu find states:     Please note that -a when specified implicitly (for example by two tests   appearing without an explicit operator between them) or explicitly  has   higher precedence than -o.  This means that   find . -name afile -o -name bfile -print   will never print afile.   I'm guessing the above expression equates to:   find . -name afile -o -name bfile -a -print   My question is, how does this expression work? and why will afile never be printed?

See below example:  $ ls -1p appledir/ applefile orangedir/ orangefile $ find . -type f -name apple\* ./applefile $ find . -type f -name orange\* ./orangefile $ find . -type f -name apple\* -o -name orange\* ./applefile ./orangedir ./orangefile $ find . -type f \( -name apple\* -o -name orange\* \) ./applefile ./orangefile $    I was surprised to discover I needed the parentheses for this to work as expected; apparently I haven't internalized the rule of precedence by which find evaluates its arguments.  How can I easily predict when I will and when I will not need to use parentheses to explicitly group find primaries?  Put another way, what are the rules by which I can imagine find inserting parentheses into the commands I give it, which will allow me to accurately predict how it will evaluate ungrouped expressions?


Any ideas how to replace:  ..((....))..   With:  ..(...)..   Be aware, it is not a straight up replace of "((" with "(". The expression must determine that the child brace pair being removed is contained directly with the parent pair, with no other content.  Bonus points if anyone can figure out how to function recursively, e.g. "(((...)))" to "(...)"

Is it possible to write a regular expression that matches a nested pattern that occurs an unknown number of times? For example, can a regular expression match an opening and closing brace when there are an unknown number of open/close braces nested within the outer braces?  For example:  public MyMethod() {   if (test)   {     // More { }   }    // More { } } // End   Should match:  {   if (test)   {     // More { }   }    // More { } }


I'm trying to write a code that tumbles a picturebox when pressed Space key. If we hold the key, the picturebox will enter to a loop like this  What should I use?

I have an image with two points, aligned something like this:  |----------------| |                | |    .           | |                | |          .     | |                | |----------------|   I have both X, Y coordinates for both points and I need to rotate the image X degrees so it looks like this instead:  |----------------| |                | |                | |    .     .     | |                | |                | |----------------|   Basically so they align next to eachother, what's the math for this? (A code example in C# would be even better but not required)


I'm retrieving some value form the RealTime database but every time it shows null pointer exception. actually i want to access all data from a child and also got new update on data when data changed via Database. My code is this, and in this code i want to append value in Text View but showing null pointer exception. please resolve my issue.   db=FirebaseDatabase.getInstance();         dr=db.getReference().child("us");        dr.addValueEventListener(new ValueEventListener() {             @Override             public void onDataChange(@NonNull DataSnapshot dataSnapshot) {                 for (DataSnapshot postSnapshot : dataSnapshot.getChildren()) {                     txtMsg.append((CharSequence) postSnapshot.child("name").getValue());                 }             }              @Override             public void onCancelled(@NonNull DatabaseError databaseError) {              }         });   and my LogCat is:  0.481 31984-32018/com.thebhakti E/GED: Failed to get GED Log Buf, err(0) 09-02 16:51:11.891 31984-32036/com.thebhakti E/NativeCrypto: ssl=0xb7352a78 cert_verify_callback x509_store_ctx=0xa0aa11d0 arg=0x0 09-02 16:51:11.891 31984-32036/com.thebhakti E/NativeCrypto: ssl=0xb7352a78 cert_verify_callback calling verifyCertificateChain authMethod=ECDHE_RSA 09-02 16:51:14.579 31984-31984/com.thebhakti E/AndroidRuntime: FATAL EXCEPTION: main                                                                Process: com.thebhakti, PID: 31984                                                                java.lang.NullPointerException: Attempt to invoke interface method 'int java.lang.CharSequence.length()' on a null object reference                                                                    at android.widget.TextView.append(TextView.java:3643)                                                                    at com.thebhakti.RealtimeMain$2.onDataChange(RealtimeMain.java:71)                                                                    at com.google.android.gms.internal.firebase_database.zzfc.zza(Unknown Source)                                                                    at com.google.android.gms.internal.firebase_database.zzgx.zzdr(Unknown Source)                                                                    at com.google.android.gms.internal.firebase_database.zzhd.run(Unknown Source)                                                                    at android.os.Handler.handleCallback(Handler.java:815)                                                                    at android.os.Handler.dispatchMessage(Handler.java:104)                                                                    at android.os.Looper.loop(Looper.java:194)                                                                    at android.app.ActivityThread.main(ActivityThread.java:5643)                                                                    at java.lang.reflect.Method.invoke(Native Method)                                                                    at java.lang.reflect.Method.invoke(Method.java:372)                                                                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)                                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

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?


i need to check style.width with an js if statement. But it is not working. How can i do that? My if code: if (document.getElementById("XXX").style.width == "100%") {  }

Suppose that I have a <div> that I wish to center in the browser's display (viewport). To do so, I need to calculate the width and height of the <div> element.   What should I use? Please include information on browser compatibility.


I have few files under a particular directory. These are the files  idex.1.ebwt  idex.2.ebwt  idex.3.ebwt  idex.4.ebwt  idex.rev.1.ebwt  idex.rev.2.ebwt   I want to change the names of the file from idex to index keeping the rest of the name same. Basically I want to replace idex with index  Any one line command?

I'm trying to find certain files with the name "stringx" and replace the name (but not the extension) with "stringy". So basically for stringx.txt and stingx.cs, I'd want stringy.txt and stringy.cs. I've attempted to test my rename command regex using following, but it returns no results:  rename -n 'stringx./s/\*$stringy./\/' stringx.*   I'm running csh under Centos. I can see that my regex is probably not correct, but I can't see any results to verify this. I can see that there are files that are named stringx. with the following:  find ./ -name 'stringx.*'


My stored procedure has the following code:  WHERE tag IN (@InValue)   I want to send a list of tags as an input parameter  EXEC dbo.TestSelect @InValue = '''Test1'',''Test2'',''Test3'''   am I close?

How do I parameterize a query containing an IN clause with a variable number of arguments, like this one?  SELECT * FROM Tags  WHERE Name IN ('ruby','rails','scruffy','rubyonrails') ORDER BY Count DESC   In this query, the number of arguments could be anywhere from 1 to 5.  I would prefer not to use a dedicated stored procedure for this (or XML), but if there is some elegant way specific to , I am open to that.


I've made  about this, but I think it deserves a feature-request now - we've been getting a lot of use of the spoiler syntax on gaming. The spoiler box is great but it could really use some sort of message telling viewers it's a spoiler, otherwise it looks like a badly-formatted answer on first glance - especially for users unfamiliar with SE sites, the kind of users we also cater for and try to draw. I think having some sort of "SPOILER - hover over this to reveal text" message is important. If this is technically too difficult, maybe just add it as a small-font red message just above the block. Mockup time!

I have to admit, I didn't even know spoilers were supported until today, but really bugs me that spoilers just look like empty block quotes before you mouse over them.   Is this a spoiler or just a long empty block quote? I can't tell right away, so it would be really nice if there was some indication of which one it was so I didn't have to push my mouse all the way over to it. What can I say, I'm incredibly lazy.  vs.         I suppose the author should include something that says 'Spoilers below:', but it would be nice if there was some other indication of what it was.


My code won't compile with my jobname.bib file. It says Biber reported the following issues (biblatex)  with 'UniEconomicSocialCouncil2009': (biblatex)  - Entry 'UniEconomicSocialCouncil2009' (textest.bib): Invalid format '2009' of date field 'date' - ignoring. However it will compile file without it. I asked a question here  and answer I accepted gave me some settings to put into my VSCode LaTeX workshop setup to make it work (pdflatex + biblatex + pdfLateX x 2). It worked initially. Now it does not work. This is strange because I have not changed anything in the bib file. I singled out one for the purpose tests. Now it has issues with the date as well. \documentclass{article} \usepackage[style=authoryear-comp]{biblatex} \addbibresource{\jobname.bib}  \begin{filecontents}{\jobname.bib}    @InProceedings{UniEconomicSocialCouncil2009,    author      = {{United Nations. Economic Commission for Africa} and {United Nations. Economic and Social Council}},    title       = {The transport situaiton in {A}frica},    publisher   = {UN. ECA},    date        = {2009},    eventdate   = {2009-10-13/2009-10-15},    eventtitle  = {UN. ECA committee on Trade, Regional Cooperation and Integration (6th Session: 2009, Oct. 13-15: Addis Ababa, Ethiopia)},    location    = {Addis Ababa, Ethiopia},    shortauthor = {UNECA and UNESC},    url         = {http://hdl.handle.net/10855/3252},   } \end{filecontents}  \begin{document}  \cite{UniEconomicSocialCouncil2009}  \printbibliography \end{document}

I'm having exactly the same issue as , also using Biber 2.14, albeit I didn't upgrade, downgrade, change TexLive version, change encoding or (seemingly) do anything. It's like Biber suddenly quit parsing dates on me.  Whether the bibfile is encoded in ASCII or UTF-8 makes no difference. Whether the date is a short format or the full YYYY-MM-DD makes no difference. I'm not sure what else to test.  Here's a MWE and the associated .blg file:  \begin{filecontents}{mwe.bib}     @Article{JD2020,         author       = {John Doe},         title        = {A Title},         date         = {2020-01-01},         %date       = {2020}         journaltitle = {Journal},     } \end{filecontents}  \documentclass{article} \usepackage{biblatex} \addbibresource{mwe.bib}  \begin{document}     test\autocite{JD2020}     \printbibliography \end{document}   [1] Config.pm:304> INFO - This is Biber 2.14 [1] Config.pm:307> INFO - Logfile is 'mwe.blg' [154] biber-darwin:322> INFO - === Thu Apr 30, 2020, 11:04:33 [185] Biber.pm:415> INFO - Reading 'mwe.bcf' [354] Biber.pm:943> INFO - Found 1 citekeys in bib section 0 [384] Biber.pm:4256> INFO - Processing section 0 [385] Utils.pm:75> INFO - Globbing data source 'mwe.bib' [385] Utils.pm:91> INFO - Globbed data source 'mwe.bib' to mwe.bib [401] Biber.pm:4455> INFO - Looking for bibtex format file 'mwe.bib' for section 0 [402] bibtex.pm:1653> INFO - LaTeX decoding ... [406] bibtex.pm:1471> INFO - Found BibTeX data source 'mwe.bib' [437] Utils.pm:304> WARN - Entry 'JD2020' (mwe.bib): Invalid format '2020-01-01' of date field 'date' - ignoring [457] UCollate.pm:68> INFO - Overriding locale 'en-US' defaults 'normalization = NFD' with 'normalization = prenormalized' [457] UCollate.pm:68> INFO - Overriding locale 'en-US' defaults 'variable = shifted' with 'variable = non-ignorable' [457] Biber.pm:4084> INFO - Sorting list 'nty/global//global/global' of type 'entry' with template 'nty' and locale 'en-US' [457] Biber.pm:4090> INFO - No sort tailoring available for locale 'en-US' [461] bbl.pm:652> INFO - Writing 'mwe.bbl' with encoding 'UTF-8' [463] bbl.pm:755> INFO - Output to mwe.bbl [463] Biber.pm:128> INFO - WARNINGS: 1   The \printbibliography output actually looks like this: [1] John Doe. “A Title”. In: Journal ().  In my actual thesis, all the dates are gone from the pdf output.


There are   and  that talk about cash flowing in and out of ETFs. The last link also hints at what that might mean, but I want to know more in detail. If they are exchange traded, how/when are new units added? I presume capital gain isnt what is meant when "Inflow" is used.

Due to various reasons, an ETF, even an index ETF might trade at a value lower that the value of its underlying securities.  In such a situation, can the company managing the ETF actually buy from the market and convert the ETF units back to raw shares and cash them out?


I'm trying to set a new password on a router using paramiko. In Ubuntu terminal it looks like that:  admin:~$ ssh admin@IP_address IP_address's password: password You logged in: router command line : router_1>set_password Changing admin's password type old password : type new password : retype new password :   So when I'm trying to do the same with python as soon as it comes to set password   import paramiko ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect(hostname='IPaddress', username='admin', password='password') stdin, stdout, stderr = ssh.exec_command(command='set_password')   it pops out a window or a line asking to input old password  Is it possible to input thous passwords automatically ?

I'm trying to run an interactive command through paramiko.  The cmd execution tries to prompt for a password but I do not know how to supply the password through paramiko's exec_command and the execution hangs.  Is there a way to send values to the terminal if a cmd execution expects input interactively?  ssh = paramiko.SSHClient() ssh.connect(server, username=username, password=password) ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("psql -U factory -d factory -f /tmp/data.sql")   Does anyone know how this can addressed? Thank you.


I am writing an application in JavaScript using Appcelerator's Titanium development platform to deploy to the Android mobile platform. I am trying to perform an INSERT to an SQLite database.  The strings whenever they have a single quote or an apostrophe entered by a user breaks the insert query. What am I doing wrong?     var db = Ti.Database.install('db/kewGarden.sqlite', 'kewGarden');    var driveByData = {     "notes" : $.row3.getValue() // User entered string };  driveByData = JSON.stringify(driveByData);  dbLib.saveRecording(saveDriveByDetailsSuccess, saveDriveByDetailsError,  {     ref_id : newdriveById,     tableName : tableName,     data : driveByData });  saveRecording : function(onSuccessCallback, onErrorCallback, options) {     var strReplaceData = options.data.replace("'", "\'");      db.execute("INSERT INTO g_temp  (ref_id, table_name, data, site) VALUES (" + options.ref_id + ",'" + options.tableName + "','" + strReplaceData + "','" + options.site + "')");        },   The docs for this database are here:

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 tried to restrict user by editing sudoers file M ALL=!/bin/su. I am able to restrict sudo su - but not sudo -i.

Ref:   My Ubuntu user account name "user-3121" with type as "Administrator". There is one more account named "admin" with type as "Administrator". How can I be sure whether or not "admin" can login as me or otherwise view my files in "user-3121"?  I discussed this with the other user and we have tried to modify /etc/sudoers to protect my files:  Cmnd_Alias   SHELLS = /bin/sh,/bin/bash,/bin/ksh, /usr/bin/x11/passwd  Cmnd_Alias   SU = /usr/bin/su,/bin/su,/usr/bin/gksudo,/usr/bin/sudo,/usr/bin/su bash,/usr/bin/sudo /bin/bash,/usr/sbin/visudo  Cmnd_Alias   PASS = /usr/bin/passwd root,/bin/* * root,/bin/* * sysadmin,/bin/* * /home/sysadmin,/usr/bin/passwd  Cmnd_Alias      EDIT= /bin/* /etc/sudoers,/bin/* sudoers,/bin/* /etc/passwd,/bin/* passwd,/bin/* /etc/group,/bin/* group,/bin/* /etc/shadow,/bin/* shadow,/*/*/[a-z]* /etc/sudoers,/*/*/[a-z]* /etc/passwd,/*/*/[a-z]* /etc/group,/*/*/[a-z]* /etc/shadow,/*/*/[a-z]* sudoers,/*/*/[a-z]* passwd,/*/*/[a-z]* group,/*/*/[a-z]* shadow  Cmnd_Alias   CMDS = /usr/sbin/userdel * sysadmin,/usr/sbin/userdel sysadmin,/usr/sbin/deluser * sysadmin,/usr/sbin/deluser sysadmin  root    ALL=(ALL) ALL, !CMDS  %admin ALL=(ALL) ALL, !SHELLS, !SU, !CMDS, !PASS, !EDIT %sudo  ALL=(ALL) ALL,!SHELLS, !SU, !CMDS, !PASS, !EDIT  admin ALL=(ALL) ALL administrator ALL=(ALL) ALL   If "admin" can still read my data, how do I prevent that?  Also how does this configuration work, it allows "user-3121" to run some sudo commands, but it doesn't actually mention "user-3121" anywhere?  P.S. I'm the only person who knows the password for the "root" user, so that I can log in as root using the "su" command.


Perhaps an easy question for some: Given I have a univariate regression setting... $$y = b_1*x + e$$ ... with $e$ being the normally distributed error (standard normal dist.). $x$ is also a random variable which follows a standard normal distribution. How do I find the conditional expectation of x given y? $$E(x|y)$$

The Pearson correlation coefficient of x and y is the same, whether you compute pearson(x, y) or pearson(y, x). This suggests that doing a linear regression of y given x or x given y should be the same, but I don't think that's the case.   Can someone shed light on when the relationship is not symmetric, and how that relates to the Pearson correlation coefficient (which I always think of as summarizing the best fit line)?


In recent years, people build huge neural networks with millions of parameters to learn.  I have seen many discussions about gradient based training, but not too much for Newton's Method / Quasi Newton Method.   Is that true Newton's Method / Quasi Newton Method are not widely used in deep neutral network training?   Is this because the Hessian is too large, so even an approximation of that such as BFGS would not work? But the gradient can be weakly approximated in different way?  Any review papers about the optimization methods used in deep learning neural network?

When training a neural network using the back-propagation algorithm, the gradient descent method is used to determine the weight updates. My question is: Rather than using gradient descent method to slowly locate the minimum point with respect to a certain weight, why don't we just set the derivative $\frac{d(\text{Error})}{dw}=0$, and find the value of weight $w$ which minimizes the error? Also, why are we sure that the error function in back-propagation will be a minimum? Can't it turn out the error function is a maximum instead? Is there a specific property of the squashing functions that guarantees that a network with any number of hidden nodes with arbitrary weights and input vectors will always give an error function that has some minima?


I know the $\frac{QV}{2}$ & $QV$ stuff but I want the logic. You would say it's due to the resistance that the work gets converted to heat. But, why is it that exactly half the value of work done by the battery no matter what the $emf$ of the battery or the capacitance of the capacitor be? Why is it so precisely half the work done by the battery?

For a simple circuit with a battery supplying a voltage $V$ to a capacitor, let us assume that the charge on the capacitor is $Q$. Now, the work done by the battery or the energy supplied is given by the relation:  $$W=QV$$  But the energy stored in the capacitor is given by:  $$U = \tfrac12 QV$$  The value of $Q$ as well as that of $V$ should be the same in both the equations.  Now my question is, where is the other half of the energy that the battery supplied?


What's the combinational interpretation of the identity $\sum\limits_{k=r}^{n} {k \choose r }={{n+1} \choose r+1}$?

I have to prove that:     $$\sum_{k=0}^{n} {{m+k} \choose{m}} = { m+n+1 \choose m+1 }$$   I tried to open up the right side with Pascal's definition that: $$ { n \choose k} = {n-1 \choose {k}} + {n-1 \choose {k-1}}$$  Here is what I came up with, and I am sure it is wrong because it does not equal the left side:  $$ {m+n+1 \choose m+1} = {m+n \choose m+1} + {m+n \choose m} = ... ={m+n \choose m+1} + {m+n-1 \choose m} + {m+n-2 \choose m-1} + ... + {m \choose m+1} = \sum_{k=0}^{n} {m+k \choose m+k-n+1 }  $$  Which, again, probably is wrong because it is not equal $\sum_{k=0}^{n} { m+k \choose m}$. Any help is appreciated


Here I am, trying to display an equation that takes way too long for one line, so I called multline.   \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{geometry} \usepackage{amssymb,amsmath} \usepackage{amsfonts} \geometry{a4paper}   \begin{document} \begin{multline} S_E=\int \mathrm{d}t \left[\frac{(f'\dot{\xi})^2}{2} \int \mathrm{d}x(\phi_0+1)^2+\frac{f^2}{2}\int \mathrm{d}x \phi'^2\\ + \int \mathrm{d}x (\psi^2-1)^2(\psi^2-\delta_1) + \frac{1}{\gamma+\psi^2}\left[\left(f^2(\phi_0^2+1)-2f(\phi_0+1)\right)^2-\frac{\delta_2{4}(f(\phi_0+1)-3)(f(\phi_0+1))^2\right]\right] \\ \label{actionrescale} \end{multline} \end{document}   However, if I called \begin{equation} and \end{equation} instead of \begin{multline} and \end{multline} the equation would show up just fine (or at least as much of it that could fit on the resulting pdf file). What exactly is wrong with this document?

I have a very large equation that I need to write in multiple lines, but multiline is not working between parenthesis.  This is my LaTeX code:  \begin{multline}   e^{-y \lambda_n}    \left(    -\frac{1}{2} \cosh\left(y \lambda_n\right) \text{csch}\left(H \lambda_n\right) e^{(H  +  y) \lambda_n} \int_0^H \frac{\rho  e^{  -  K_2 \lambda_n}}{\lambda_n}\left(\hb_n(K_2,t)  -  \gb_n(K_2,t)\right) \, \dd K_2  +  \\   \frac{1}{4} \left(e^{2 y \lambda_n}  +  1\right) \left(\coth \left(H \lambda_n\right)  -  1\right) \int_0^H \frac{\rho  e^{K_1 \lambda_n}}{\lambda_n}\left(\gb_n(K_1,t)  -  \hb_n(K_1,t)\right) \, \dd K_1  +  \\   \frac{1}{2} \int_0^y \frac{\rho  e^{K_1 \lambda_n}}{\lambda_n}\left(\gb_n(K_1,t)  -  \hb_n(K_1,t)\right) \, \dd K_1  +  \\   \frac{1}{2} e^{2 y \lambda_n} \int_0^y \frac{\rho  e^{  -  K_2 \lambda_n}}{\lambda_n}\left(\hb_n(K_2,t)  -  \gb_n(K_2,t)\right) \, \dd K_2   \right) \end{multline}


I got a div that has margins and inside it, I got 2 other divs: One on top and one below it. I want the div below the top div to fill the empty space to the margin of the main div.  Here's my structure:

   CSS:  .main {     width: 90px;     height: 30vh;     min-height: 225px;     margin: 0;     margin-left: 5px;     margin-top: 25px;     margin-bottom: 25px; }   .main div's height resizes by viewheight. .top div is a form which has an height of 220px. .bottom div should fill the empty space between the .top and margin-bottom.    I've tried everyhing I know. If I try vh or %, it overflows the margin-bottom once I resize the browser. If I fix it to the bottom, it overflows the .top div. Top div has transparent elements and I can't hide the .bottom div under the top div.  My guess is that somehow I need to get the distance from the .top div to the margin-bottom and set it as height for the .bottom div. But I've looked for solutions for over an hour and nothing.  And no. This question is not a duplicate of the ones under the title. I'm looking for compatibility too. Flexbox and Js is not good.

I am working on a web application where I want the content to fill the height of the entire screen.  The page has a header, which contains a logo, and account information. This could be an arbitrary height. I want the content div to fill the rest of the page to the bottom.  I have a header div and a content div. At the moment I am using a table for the layout like so:  CSS and HTML    #page {     height: 100%; width: 100% }  #tdcontent {     height: 100%; }  #content {     overflow: auto; /* or overflow: hidden; */ }

...

...

     The entire height of the page is filled, and no scrolling is required.  For anything inside the content div, setting top: 0; will put it right underneath the header. Sometimes the content will be a real table, with its height set to 100%. Putting header inside content will not allow this to work.  Is there a way to achieve the same effect without using the table?  Update:  Elements inside the content div will have heights set to percentages as well. So something at 100% inside the div will fill it to the bottom. As will two elements at 50%.  Update 2:  For instance, if the header takes up 20% of the screen's height, a table specified at 50% inside #content would take up 40% of the screen space. So far, wrapping the entire thing in a table is the only thing that works.


I know I'm probably missing something really obvious, but I've tried   display: block; and margin: 0 auto;, and the inner div is not centering horizontally within my parent div?    .row-fluid-wrapper.row-depth-1.row-number-3 {   display: block;   margin: 0 auto;   text-align: center;   border: 1px solid red; }  .row-fluid {   width: 100%;   display: block;   margin: 0 auto; }  .row-fluid [class*="span"] {   margin: 0 auto;   border: 1px solid blue;   display: block;   float: left;   min-height: 28px;   margin-left: .2%;   box-sizing: border-box;   height: 150px; }  .row-fluid .span4 {   width: 31.914893614%; }

Col 1

Text.

Col 2

Text.

Col 3

Text

     As you can see, the blue divs are more left aligned than being in the middle.

How can I horizontally center a
 within another
 using CSS?

Foo foo


I want to create the table as shown in the Image.

I need some help on  putting a vertical line in the second part of the table, I don't know how to do it since the tabularx I declared does need to have that only in the second part. The code I used is:  \begin{tabularx}{\linewidth}{|XX|} \hline \multicolumn{2}{|c|}{\textbf{title name}}\\ \hline something: & else \\ something: & else \\ something: & else \\ \hline \multicolumn{2}{|c|}{bla bla blah}\\ \hline title text: & description 1 \\ title text: & description 1 \\ \hline \end{tabularx}   And the render of the table looks like this:    I just need a \vline between title text and description (it I use \vline it works only for the first line but the description text and sometimes the title, are few lines long).


What's with trigonometry? When I learned it, we were told to just use a calculator, which does make my life easier, but I do want to know, how does one calculate a trigonometric function by hand. Is there a certain function or equation to use? I'm honestly just curious.

In school, we just started learning about trigonometry, and I was wondering: is there a way to find the sine, cosine, tangent, cosecant, secant, and cotangent of a single angle without using a calculator?  Sometimes I don't feel right when I can't do things out myself and let a machine do it when I can't.  Or, if you could redirect me to a place that explains how to do it, please do so.  My dad said there isn't, but I just had to make sure.  Thanks.


I have created a new html element, and inserted it onto a node. However it doesn't have any listeners registered on the class name 'edit-expense-category' because of this. My code for registering this class name on page load is as follows:   $(".edit-expense-category").click(function () {    // function related stuff });   What I'd like to know is once I have another element created dynamically using the class name above, how do I register this element with a listener as well?

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 need a proof based book to study theory of probability and statistics. I have read that one of the best is Mood & Graybill. I just want that it is proof-based, rigurous, and it talks about probability, statistics, and statistical inference.

I know people love to close duplicates so I am not asking for a reference to start learning statistics (as ).   I have a doctorate in mathematics but never learned statistics. What is the shortest route to the equivalent knowledge to a top notch BS statistics degree and how do I measure when I have achieved that.   If a list of books would suffice (assuming I do the exercises lets say), that's terrific. Yes, I expect working out problems to be an implicit part of learning it but I want to fast track as much as realistically possible. I am not looking for an insanely rigorous treatment unless that is part of what statistical majors generally learn.


I'm getting the following error while running the program in IntelliJ IDE. It's a simple program which takes input from cmd and prints it. When i run it through cmd it works fine but dosen't work on intelliJ     Exception in thread "main" java.lang.NullPointerException at   revArr.main(revArr.java:6)   public class revArr {     public static void main(String[] args)     {         // Using Console to input data from user         String name = System.console().readLine();          System.out.println(name);     } }

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?


I use the ssh-keygen -t rsa to generate the RSA key pairs. I see that in the id_rsa.pub file, I see the username and the hostname.  But I want to know that what elements will affects the key pairs. For example, if I change the host ip, need I regenerate the key pairs? And the hostname? or even I reinstall the operating system?  When should I regenerate the key pairs?

Recently, I've changed my VPS operating system from CentOS to Ubuntu. Unfortunately since then I can't connect to my VPS. The following message comes again and again (screenshot attached).  Why this is happening and how can I solve that?


I have an input where the user introduces a number, integer or float. I would like to know it the number is correct, for example, check that the input 2r is not correct. My first approach was to use parseFloat, but it does not complain about that:  parseFloat('2r')   // returns 2   Actually, this is the expected behaviour according to the    How do you check that 2r is wrong?

I'm hoping there's something in the same conceptual space as the old VB6 IsNumeric() function?


I can only login to server as a non-root user. How can I make ssh login password-less?

I have two servers. Both servers are in CentOS 5.6. I want to SSH from Server 1 to Server 2 using a private key I have (OpenSSH SSH-2 Private Key).  I don't know how to do it over unix. But what I did on windows using Putty was to feed my OpenSSH private key to putty-gen and generate a private key in PPK format.   However, I would be creating a bash script from server 1 that will execute some commands on server 2 via SSH.   How do I SSH to Server 2 using my private key file from Server 1?


Got a problem with my code,have problem to call from database. private void isUser() {     final String userEnteredUsername=regUsername.getEditText().getText().toString().trim();     final String userEnteredPassword=regPassword.getEditText().getText().toString().trim();      DatabaseReference reference=FirebaseDatabase.getInstance().getReference("users");     Query checkUser=reference.orderByChild("username").equalTo(userEnteredUsername);     checkUser.addListenerForSingleValueEvent(new ValueEventListener() {         @Override         public void onDataChange(@NonNull DataSnapshot snapshot) {             if(snapshot.exists()){                  regUsername.setError(null);                 regUsername.setErrorEnabled(false);                  String passwordFromDb=snapshot.child(userEnteredUsername).child("password").getValue(String.class);                  if(passwordFromDb.equals(userEnteredPassword)){                      regPassword.setError(null);                     regPassword.setErrorEnabled(false);                      String nameFromDb=snapshot.child(userEnteredUsername).child("name").getValue(String.class);                     String usernameFromDb=snapshot.child(userEnteredUsername).child("username").getValue(String.class);                     String phoneNoFromDb=snapshot.child(userEnteredUsername).child("phoneNo").getValue(String.class);                     String emailFromDb=snapshot.child(userEnteredUsername).child("email").getValue(String.class);                      Intent intent = new Intent(getApplicationContext(),MainActivity.class);                     Toast.makeText(getApplicationContext(),"Welcome",Toast.LENGTH_SHORT).show();                      intent.putExtra("name",nameFromDb);                     intent.putExtra("username",usernameFromDb);                     intent.putExtra("email",emailFromDb);                     intent.putExtra("phoneNo",phoneNoFromDb);                     intent.putExtra("password",passwordFromDb);                     startActivity(intent);                 }                 else {                     regPassword.setError("Wrong Password");                     regPassword.requestFocus();                 }             }             else{                 regUsername.setError("No such User Exist");                 regUsername.requestFocus();             }         }          @Override         public void onCancelled(@NonNull DatabaseError error) {}     }); }   2020-10-08 11:12:44.273 14309-14309/com.example.auditapp E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.auditapp, PID: 14309 java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference at com.example.auditapp.SignIn$3.onDataChange(SignIn.java:96) at com.google.firebase.database.Query$1.onDataChange(Query.java:179) at com.google.firebase.database.core.ValueEventRegistration.fireEvent(ValueEventRegistration.java:75) at com.google.firebase.database.core.view.DataEvent.fire(DataEvent.java:63) at com.google.firebase.database.core.view.EventRaiser$1.run(EventRaiser.java:55) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:237) at android.app.ActivityThread.main(ActivityThread.java:7860) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)


Is there a way to sort this on the frequency (Descending/Ascending)?  public static void main(String[] args) { Map <String, Data> map = new HashMap <String, Data>();  String [] variables={"variable1", "variable2", "variable3", "variable4", "variable4", "variable1","variable1"}; int Concreteness=5;//for this example every variable will have the same cncreteness  for(int i=0; i<variables.length;i++) {     Data variable_exists=map.get(variables[i]);      if(variable_exists!=null)     variable_exists.setFrecuency(variable_exists.getFrecuency()+1);     else     map.put(variables[i], new Data(Concreteness,1));  }  for (Map.Entry<String, Data> entry : map.entrySet())  { System.out.println("variable = " + entry.getKey() + ", Frecuency = " + entry.getValue().getFrecuency()+ ", Concreteness = " + entry.getValue().getConcreteness()); } }   the output for this example would be   variable = variable4, Frecuency = 2, Concreteness = 5  variable = variable1, Frecuency = 3, Concreteness = 5  variable = variable2, Frecuency = 1, Concreteness = 5  variable = variable3, Frecuency = 1, Concreteness = 5  and here is the Data class i used  public class Data {     private int frecuency;     private int Concreteness;      Data (int Concreteness, int frecuency)     {     setFrecuency(frecuency);     setConcreteness(Concreteness);     }     public int getFrecuency()     {     return frecuency;     }      public void setFrecuency(int frecuenxy)     {     this.frecuency = frecuenxy;     }      public int getConcreteness()     {     return Concreteness;     }      public void setConcreteness(int Concreteness)     {     this.Concreteness = Concreteness;     } }

I am relatively new to Java, and often find that I need to sort a Map<Key, Value> on the values.  Since the values are not unique, I find myself converting the keySet into an array, and sorting that array through array sort with a custom comparator that sorts on the value associated with the key.  Is there an easier way?


I have a ubuntu 14.04 PC with various packages installed, I need to convert my system to a bootable iso so that I can boot it from some other device and install similar filesystem and kernel to other PC.

Say I have two systems A and B.  I have installed Ubuntu 12.04 on system A and need same set of settings in system B, for which I am thinking to make a bootable iso from System A(creating as a backup). so that I can make Live USB from the generated iso and boot the System B which will be now the replica of System A.  Could you please tell is there any method or tool in doing this process?


We know that,  $$\begin{align} a&=\frac{\mathrm dv}{\mathrm dt}\\[3pt] &=\frac{\mathrm dv}{\mathrm dx}\cdot\frac{\mathrm dx}{\mathrm dt}\\[3pt] &=v\cdot~\frac{\mathrm dv}{\mathrm dx} \end{align}$$  According to this equation, whenever velocity is $0$, acceleration becomes $0$ as well.   However, we know that this is not always the case.   For example, when we throw a ball upwards, at its maximum height, its velocity becomes $0$ but the acceleration is non-zero ($g$ downwards).  Can someone please help me understand what is wrong in my approach?

We all know $a = \frac{\mathrm{d}v}{\mathrm{d}t}$. A little application of the chain rule leads to the relation $$a=v\frac{\mathrm{d}v}{\mathrm{d}x}$$ But the above equation shows that $a=0$ whenever $v=0$. And this must be wrong, as when we throw something vertically from the earth surface it stops and then returns due to gravity. There is always an acceleration in the downward direction.  I have come up with two possible ways to solve this problem:   We know that $v = \frac{\mathrm{d}x}{\mathrm{d}t}$, so whenever $v=0$ then $\mathrm{d}x=0$ (i.e. no displacement in that infinitely small time). Also, $$a = \frac{\mathrm{d}v}{\mathrm{d}t} = \frac{\mathrm{d}v}{\mathrm{d}x}\frac{\mathrm{d}x}{\mathrm{d}t}$$ only if $\mathrm{d}x$ is not equal to $0$, as multiplying both numerator and denominator with $0$ will make it $0/0$ (undefined). Or multiplying by $0/0$ is not equivalent to multiplying by $1$.  Now since $\mathrm{d}x=0$ whenever $v=0$, therefore we can not write $a = v\frac{\mathrm{d}v}{\mathrm{d}x}$ when $v=0$. If we plot a $v$-$x$ curve for the motion, whenever $v=0$, as explained, $\mathrm{d}x=0$. Therefore, at that instant $\frac{\mathrm{d}v}{\mathrm{d}x}$ (the slope of the $v$-$x$ curve) will be not defined (as $\mathrm{d}x=0$), therefore the equation $a = v\frac{\mathrm{d}v}{\mathrm{d}x}$ will be undefined and we cannot determine acceleration at that instant with the $v$-$x$ curve.   Now that actually means that by plotting $v$-$x$ curve we lose information about acceleration of the particle when $v=0$.   I want a method to find the acceleration at that point using $v$-$x$ curve. Also a explanation for this defect of the $v$-$x$ curve.  Also I would like to add that so far no physics book (that I had read) has explained this before writing this relation. Also they do not mention that this will not work for $v=0$.     I would like to add the situation where I observed this: when you throw something vertically upward with velocity such that it reaches to a height 10 then the v-x curve will be-   the slope of above curve is clearly not defined at x=10(or the instant where velocity is 0) But we know that there was a constant acceleration throughout the flight. Then how can we find acceleration at that instant??? Also assume that we only have v-x curve. Or if we cannot then why??


I need information about the following font. From a first look I thought it is commercial, is it? Also what are math fonts that can fit well with it?  I appreciate your suggestions.    EDIT:  I see the following in Document Properties:

Is it possible to identify the font used in a specific document/picture?  Answers to this question should identify:   Possible methods to do this (perhaps one answer per method) and adequately describe how to use it (as opposed to merely stating it); Ways of finding the identified fonts, if possible (free or not); and Any prerequisites associated with the method used, if required (for example, "In order to use method X, your document has to be in format Y").   This question is meant as an FAQ, based on an . Its aim is to facilitate the community with the general procedures involved in font identification. Similar cases are solved on a per-usage basis on 's  tag.


Please help me with this limit without using L'Hôpital's rule. I would by happy if you use simple solving. Thank you as much as I can ;).   $$\lim_{x\to0}{{\frac{\ln(\cos(-5x))}{\ln(\cos(-3x))}}}$$

now I am evaluating limits of functions, but i dont know how to start to solve this limit. It is possible without L Hopital's rule?  $\lim_{x\to0}{{\frac{\ln(\cos(4x))}{\ln(\cos(3x))}}}$?


I've been trying to customize my android. Found a cool set of buttons but one problem. The app store says it is "not available in (my) country" I have tried spoofing the GPS but that did not work. Does anyone have an idea about how to spoof cell towers or IP addresses to get around the lock out?  I  have surfed through the "duplicate" questions and tried all of those suggestions to no avail.  Best I can tell the problem is the cell towers. But there should still be a way to hack this.

I'm travelling to country X. I want to install an application which isn't available in my country, but is available in country X; but I prefer to download and install it in advance, while the data connection is still cheap.  Unfortunately, the Play Stores does not allow me to install this app. Is there any way to circumvent this limitation?


I'm getting a small difference in horizontal alignment when using the two ways of placing an image as shown in my code below. I know it doesn't look like there's much point in what I've done, but this is just a minimal example showing the problem.  Anyone know why this happens? Or how to fix it?  Thanks for any help.  \documentclass{article} \usepackage{graphicx,caption}  \newcommand{\scalebar}[1]{\includegraphics[width=0.5\textwidth]{#1} }   \begin{document}  \begin{figure}[!hptb] \centering \includegraphics[width=0.5\textwidth]{image} \caption{} \label{normalImage} \end{figure}  \begin{figure}[!hptb] \centering \scalebar{{image}} \caption{} \label{imageFromCommand} \end{figure}  \end{document}

I see that the code in many packages and examples contains percent signs % at the end of (many) lines. What are they used for? Do they affect the parsing of those lines?