I updated my PC to Windows 8 and after that installed Ubuntu 12.10. I have 128 GB SSD now partitioned to 36 GB for Ubuntu and rest for Windows 8. Everything worked well, I installed few programs and downloaded updates for the Ubuntu. Ubuntu asked me to restart in order to updates to work. After that restart the trouble began. Now I can only log in to Ubuntu and all it shows after that, is the background image. Windows works correctly, everything shows up in the grub.  I presume that something went wrong with updates. Is there anything I can do for it or should I just install the whole thing again?  Cheers!

When I login, nothing happens.   I am presented with my desktop wallpaper.    No Dash, no Launcher, nothing.


Problem statement : +++++++++++++++ Given two identical unbiased dice, determine the probability of getting sum as 7. Event  = Sum of dots on the top face of both dice is 7. $E = {(1,6),\ (2,5),\ (3,4),\ (4,3),\ (3,4),\ (5,2),\ (6,1)}$ $|Sample Space|$ = $36$. Hence, $P(E) = 1/6$ I have a doubt here. As the two dice are given identical, why do we have to consider ordered pairs? Shouldn't it be unordered consisting of only 3 possible pairs $\{(1,6),\ (2,5),\ (3,4)\} $? Hence, $|S| = 21$ and $P(E) = 3/21$.

In either case, one coin flip resulted in a head and the other resulted in a tail. Why is {H,T} a different outcome than {T,H}? Is this simply how we've defined an "outcome" in probability?   My main problem with {H,T} being a different outcome than {T,H} is that we apply binomial coefficients (i.e. we count subsets of sets) in some common probability problems. But if we take {H,T} and {T,H} to be different outcomes, then our "sets" are ordered, but sets are by definition unordered...   I feel as though the fact that I'm confused about something so basic means that I am missing something fundamental. Any help or insight whatsoever is greatly appreciated!


I occasionally use my phone to connect to the work network for quick diagnostic purposes. I do not like being connected to it for regular use, as I don't like my phone activity to be traceable by my employer.  Is it possible to remember a WiFi network, but only connect when manually triggered?

I have several WiFi networks setup on my android device. I want most of them to automatically connect, but one specifically I don't want to automatically connect to. I want to manually connect to it only.  I don't want to forget it because I don't want to lose the settings for it.


I'm reading structure in file *stl, but the structure is:  typedef struct {     float x;     float y;     float z; } point; typedef struct  {     point normal_vector; //12 bytes     point p1; //12 bytes     point p2; //12 bytes     point p3; //12 bytes     short int notuse; //2 bytes } triangle;   sizeof(triangle) is 52—12+12+12+12+2+...2 (I don't know where the last 2 comes from?) The size of each unit in file *stl is 50 (not multiple of 4).  How can I reduce the size of structure to read file (from 52 to 50)?  Thank you.

Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?


Why is the pressure on the inside of air flow curvature considered be low pressure and it is considered to be high pressure above?  I read and seen videos that this is the case but I want to know why.  Is it passed on the fact that usually a flow turn is caused by something and the pressure above is greater than that press below it?

What aerodynamic effects actually contribute to producing the lift on an airplane?  I know there's a common belief that lift comes from the Bernoulli effect, where air moving over the wings is at reduced pressure because it's forced to travel further than air flowing under the wings. But I also know that this is wrong, or at best a minor contribution to the actual lift. The thing is, none of the many sources I've seen that discredit the Bernoulli effect explain what's actually going on, so I'm left wondering. Why do airplanes actually fly? Is this something that can be explained or summarized at a level appropriate for someone who isn't trained in fluid dynamics?  (Links to further reading for more detail would also be much appreciated)


I have a very long tables in rows and another in columns, i use  adjustbox package to resize these tables. However, the other tables which are perfect fine get effect, some of them became in big font which different that in the thesis. I need help, as I can not find why the table font size get bigger. This is what I write for long table: \begin{table}[h] \caption{} \label{} \vspace{0.3cm}\centering\begin{adjustbox}{width=\textwidth} \begin{tabular}  \end{tabular} \end{adjustbox}  And this for the regular table: \begin{table}[h] \caption{} \label{} \vspace{0.3cm}\centering \begin{tabular}  \end{tabular} \end{table} \end{table}

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


is there a way to load plugin with ajax? I want to load  plugin which supports initializing with PHP and Shortcode  [quick-chat height="400" room="default" userlist="1" userlist_position="left" smilies="1" send_button="0" loggedin_visible="1" guests_visible="1" avatars="1" counter="1"]   OR  <?php global $quick_chat; if(is_object($quick_chat) && method_exists($quick_chat, 'quick_chat')){     echo $quick_chat->quick_chat(400, 'default', 1, 'left', 0, 0, 1, 1, 1, 1); } ?>      My JS side   key = '1'; jQuery.ajax({     type : 'POST',     url : apfajax.ajaxurl,     data : {         action : 'loadMyChat',         key: key     },     dataType: "json",     success : function(data) {         jQuery("#chatModal").find(".modal-body").html(data.html);     },     error: function(MLHttpRequest, textStatus, errorThrown){             alert(textStatus);     } })      PHP Side   function loadMyChat() {     $key = $_POST['key'];     $count = 1;     $html = 2;     global $quick_chat;      //$ak = $quick_chat->quick_chat();     $ak = $quick_chat->quick_chat('300', 'default', '1', 'left', '0', '0', '1', '1', '1', '1');     die(json_encode(array(         'html' => $ak,         'count' => $count     ))); }      OUTPUT:

LOADING...

   As you see container only includes loading block, where are the other blocks? textarea and history?  Okay, one more interesting point, here is a public function for initialising chat.  public function quick_chat($height = 400, $room = 'default', $userlist = 1, $userlist_position = 'left', $smilies = 1, $send_button = 0, $loggedin_visible = 1, $guests_visible = 1, $avatars = 1, $counter = 1) {     $content = '';     ob_start();      echo '<div class="quick-chat-container" data-quick-chat-id="'.wp_generate_password(12, false, false).'" data-quick-chat-height="'.$height.'" data-quick-chat-room-name="'.$room.'" data-quick-chat-userlist="'.$userlist.'" data-quick-chat-userlist-position="'.$userlist_position.'" data-quick-chat-smilies="'.$smilies.'" data-quick-chat-send-button="'.$send_button.'" data-quick-chat-loggedin-visible="'.$loggedin_visible.'" data-quick-chat-guests-visible="'.$guests_visible.'" data-quick-chat-avatars="'.$avatars.'" data-quick-chat-counter="'.$counter.'">';         echo '
'.__('LOADING...', 'quick-chat').'
';     echo '
';      if(!isset($this->options['hide_linkhome'])){         echo '
'.__('Powered by Quick Chat', 'quick-chat').'
';     }     $content =  ob_get_contents();     ob_end_clean();     return $content; }   judging from this, my script returns everythign corectly. no js is loading or any ajax handlers are set. in my opinion the problem is data-quick-chat-id.  I did small trick like return quick_chat function on page load which is hidden and after my user sets his cookies (user and room) I request my ajax and change this div with ajax returned.  Of course it still does not work, but I didn't change change data-quick-chat-id but that's because I don't know how to change data attribute inside my data.html (returned from my ajax) before I insert it in html.  Am I going in right direction?  Just wanted to update, thanks

I have an AJAX callback function inside my functions.php file, which displays posts in a specific category.  add_action( 'wp_ajax_ajaxified_function', 'ajaxified_function' ); add_action( 'wp_ajax_nopriv_ajaxified_function', 'ajaxified_function' ); function ajaxified_function()  {      $post = get_post($_POST['post_id']);     $feat_image = get_the_post_thumbnail($post->ID);     $desc_values = get_post_custom_values("designation",$post->ID);     $title = current(explode(' ', get_the_title($post->ID)));     if( is_array( $desc_values ) )     {      foreach($desc_values as $key => $value );     }        $email_values = get_post_custom_values("email",$post->ID);     if( is_array( $email_values ) )     {         foreach($email_values as $key => $email_value );     }     echo '
'.$feat_image.'
'.$post->post_.'
'.$post->post_title.'

'.$value.'

Email '.$title.'

'.$post->post_content.'
';      echo '';        echo '

';                 echo do_shortcode('[contact-form-7 id="698" title="Meet The Team Email"]');             echo '

';       die();   }   When I use this its just echoing the shortcode instead of showing the contact form.  I am working on local now. I have a demo which just uses just   You can see a Email link in the biography div. On clicking on that link I want to show a colorbox with the contact form.


Let $f_n(x)=\left(1+\frac{x}{n}\right)^n$. Show that it converges uniformly to $e^x$ on every compact $K\subset \mathbb R$.    This is how I would like to do:  Let $K$ a compact. Let $g_n(x)=\left(1+\frac{x}{n}\right)^n-e^x$. Since $g_n$ is continuous on $K$, it take it's maximum on $K$. Let denote $a_n\in K$ s.t. $|g_n(x)|\leq g_n(a_n)$ for all $n$. Set $b_n=g_n(a_n)$. How can I show that $$\lim_{n\to\infty }b_n=0\ \ ?$$  I tried to show by induction that $(b_n)$ is decreasing, but it looks very complicate. And even if it converge, it looks complicate to show that it converge to $0$ as well.

This is my attempt at a proof:  $\forall x \in \mathbb{R}, \lim_{n \to \infty}(1+\frac{x}{n})^n=\lim_{m \to 0}\frac{log(1+mx)}{m}=\lim_{m \to 0} \frac{x}{1+mx}=x \iff (1+\frac{x}{n})^n \rightarrow e^x$ uniformly.   It follows that $(1+\frac{x}{n})^n e^{-x} \rightarrow 1$ uniformly.   Is this sufficient?


I was doing a problem where you need to find the best K figures to eliminate from N so the number would have the minimum difference between the smallest and highest figure.  #include<bits/stdc++.h>  using namespace std;  int diff(vector <int> x){     sort(x.begin(),x.end());     return x.back()-x[0]; }  int diffMin(vector<int> x,int h,int best){    if(h==0) return diff(x);    else{        for(int a=0;a<x.size();a++){            int y=x[a];            x.erase(x.begin()+a);            best=min(best,diffMin(x,h-1,best));            x.insert(x.begin()+a,y);        }    return best;    } }  int main(){     int n,k;     cin>>n>>k;     vector <int> x;     while(n!=0){         x.push_back(n%10);         n/=10;     }     cout<<diffMin(x,k,10); }   I put it in an evaluator but it said "Caught fatal signal 11(SigSegV )". Could someone explain me why?

I want to clear a element from a vector using the erase method. But the problem here is that the element is not guaranteed to occur only once in the vector. It may be present multiple times and I need to clear all of them. My code is something like this:  void erase(std::vector<int>& myNumbers_in, int number_in) {     std::vector<int>::iterator iter = myNumbers_in.begin();     std::vector<int>::iterator endIter = myNumbers_in.end();     for(; iter != endIter; ++iter)     {         if(*iter == number_in)         {             myNumbers_in.erase(iter);         }     } }  int main(int argc, char* argv[]) {     std::vector<int> myNmbers;     for(int i = 0; i < 2; ++i)     {         myNmbers.push_back(i);         myNmbers.push_back(i);     }      erase(myNmbers, 1);      return 0; }   This code obviously crashes because I am changing the end of the vector while iterating through it. What is the best way to achieve this? I.e. is there any way to do this without iterating through the vector multiple times or creating one more copy of the vector?


I am cooking beans   , after soaking beans in water overnight.   I realized that when i cooked them in morning for 20 minutes in pressure cook, there are very few beans are still as hard as uncooked soaked beans, why these few exceptional beans are not softened ?

I decided I would make baked beans for a BBQ at my MIL's this past weekend. I've never made baked beans but decided that it was time since I love them so much! I found a recipe for Southern Baked Beans (using Navy beans). It was from a food blog.   During the description/commentary of the dish the blogger said they could be made with dried beans but she uses canned to save time. The recipe only mentioned canned beans. I couldn't find anything to tell me the ratio canned:dried beans so I decide a 1:1 ratio would be good. After putting a 24oz bag of beans in a cake pan (the recipe called for 32oz canned beans), I decided that was A LOT of beans so didn't add the remaining 8oz. I rinsed them first then soaked them for 15-18 hours. I rinsed them again and put them in a pot with the rest of the ingredients.   The recipe said to bake them at 350 for about 40 minutes and they should be done. After an hour and a temperature increase to 400, the beans weren't anywhere close to being done. At this point I decided they were probably very old beans. :( I moved them to the stove after another 30 minutes. They boiled on the stove for another 1 1/2 hours and were still rock hard (I kept adding water so they wouldn't boil dry - and this was on medium to medium-low heat).   We left the beans at my MIL's and she cooked them "off and on" (her words) the next day and declared they were done. They are not done. :(  Now that they've been cooked then refrigerated then cooked then refrigerated again, can I attempt to salvage them? I've read that adding 1/8 tsp baking soda per cup of beans will soften them. Is it too late to try this - add the beans, more water, and a small amount of baking soda and cook them a little more? I've put so much effort into these stupid beans I can't just give up! LOL


which is correct between following two sentences: 1. He and I was going to temple. or 2. He and I were going to temple.

I'm writing a resume right now targeted towards a specific company. My girlfriend (a classmate) and I were (see, I don't know if that's the right word, hence this question!) the first from our school to be awarded a scholarship from this company.  Is it more correct to say:     Awarded such and such scholarship in 2011. A classmate and I were the first students from my college to be awarded this scholarship.   Or:     Awarded such and such scholarship in 2011. A classmate and I was the first students from my college to be awarded this scholarship.   The first seems much more correct when spoken, but the rule I've been taught is to take the other person out and use the words that make sense about just you.


Assume there's no visible damage to a bicycle helmet and it's been under normal use (2000-4000 miles/year).  When would you replace it? After 3 years? 5? not at all assuming it seems visibly OK?

OK, I know from the top answer here: , that I should buy a new helmet every 2-3 years, even if it hasn't been in a crash and shows no signs of damage.  But can someone explain to me why this is so? I'm not trying to be a cheapskate, but just want to know why the helmet would degrade just with regular wearing? Do motorcyclists replace their helmets every 2-3 years too?  And don't tell me that this is what the helmet manufacturers recommend. Of course they will say it should be replaced even if there is no visible damage. Reminds me of the adage: "Never ask a barber if you need a haircut".  Appreciate any input/insights you can give.


My browser is Firefox, with 3 open tabs:  tab1-->google.com tab2-->yahoo.com tab3-->msn.com   All of them use port 80, and so does Photoshop:  How does computer know which data belong to which process?

In a web browser that supports having multiple tabs, such as Firefox, do different tabs that go to different website domains use a dedicated port for each domain?.  Or does the browser use a single port for managing all tabs and therefore all domains?.


I would appreciate some advice. We live in the UK but have a sudden requirement to visit Japan (family reasons).  My 4 month old son has a Japanese passport but his UK one will more than likely not be ready in time for the trip.  Would it be allowed for him to fly out of the UK on his Japanese passport, and also return on it, without a UK one?  Would it mean when we fly back to the UK that he is only allowed in as a tourist? Are there any other complications i need to consider?   Searched for the guidance but is hard to find anything. Many Thanks Graham

My son is a UK citizen but holds only a US passport. Will he be able to enter the UK on a one-way ticket? He has his certificate of UK citizenship.  We want to visit family and apply for his UK passport while in Britain. We plan to stay for only a couple of weeks.


I would like to standardize on a directory where normal users would put programs/installs which would be used by other users.  What would be the best practices?  For instance, I could create a /users/shared_binaries/ directory with fairly open permissions.  Is there a convention/best practice for doing something like this?  Assume I don't have any network drive to place them.  Basically, I want a location to share binaries without needing to install in the users' home directory nor have higher access than standard user.

What is the conventional directory to keep shared scripts that might be used by more than one user?  I've read through  of the standard file system hierarchy, but it doesn't seem to recommend a location for storing shared scripts.  Creating a /opt/scripts directory seems like a reasonable option, but I'd like to know if there is a standard UNIX convention for this.


Consider this problem: You are flipping a coin which either heads or tails with equal probabilities. Every time you flip the coin you can end the game or flip once more. This way you flip $N$ times and the coin heads $H$ times. Your goal is to maximize value $H/N$.   Now suppose this simple strategy: Choose a real number $q$ between $0$ and $1$. If at any moment $H/N \geq q$, then end the game, otherwise proceed (until some very high value of $N$ when $H/N$ will be close to $1/2$). My question is: What is the best choice of $q$ ?  If I am right, when $q=1/2$ or $q=1$, then $H/N$ will be $1$ (if the first flip heads) or $1/2$ otherwise. So $H/N = 1/2*1 + 1/2*1/2=3/4$ on average. But it seems that the optimal $q$ is somewhere between these.  Thank you for any help or reference.

You play a game flipping a fair coin.  You may stop after any trial, at which point you are paid in dollars  the percentage of heads flipped.  So if on the first trial you flip a head, you should stop and earn \$100 because you have 100% heads.  If you flip a tail then a head, you could either stop and earn \$50, or continue on, hoping the ratio will exceed 1/2.  This second strategy is superior.  A paper by Medina and Zeilberger () says that it is an unsolved problem to determine if it is better to continue or stop after you have flipped 5 heads in 8 trials: accept \$62.50 or hope for more.  It is easy to simulate this problem and it is clear from even limited experimental data that it is better to continue (perhaps more than 70% chance you'll improve over \$62.50):    My question is basically: Why is this difficult to prove?  Presumably it is not that difficult to write out an expression for the expectation of exceeding 5/8 in terms of the cumulative binomial distribution.  (5 Dec 2013). A paper on this topic was just published:  Olle Häggström, Johan Wästlund. "Rigorous computer analysis of the Chow-Robbins game." (pre-journal ). The American Mathematical Monthly, Vol. 120, No. 10, December 2013. (). From the Abstract:     "In particular, we confirm that with 5 heads and 3 tails, stopping is optimal."


I am running on a laptop with Ubuntu 18.04. Please guide me how to check the history of when my PC was unlocked.

Exist a log where I can look for that information? I want to know last days when my PC automatically locked the screen because was idle.


Is it possible to update a SQL column without actually defining the specific name in the query, but rather using a variable passed through function arguments?   Example  public function ScrubUserContent($db, $DBColunm, $UID, $type) {     if($type == 1){         mysqli_query($db, "UPDATE Users SET $DBColunm = '[ Content Deleted ]' WHERE UserID='$UID'"); // Type 1 updates strings     } elseif($type == 2) {         mysqli_query($db, "UPDATE Users SET $DBColunm = 'default.png' WHERE UserID='$UID'"); // Type 2 updates images     } else {         mysqli_query($db, "UPDATE Users SET $DBColunm = 'Missing Content' WHERE UserID='$UID'"); // Type 3 updates any other content     } }   I know this is possible with PDO & Dynamic SQL, but are there any alternatives?

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


I know that this a likely a relatively elementary problem, but I am a freshman in High School that needs some help.   Let $A$ be an infinite subset of the plane with the property that the distance between any two elements in the set is an integer. Then $A$ is a subset of a line.

Someone posted a question on the notice board at my University's library. I've been thinking about it for a while, but fail to see how it is possible. Could someone verify that this is a valid question and point me in the right direction?  'Given an infinite set of points in a plane, if the distance between any two points is an integer, prove that all these points lie on a straight line.'


Para 5, , by      The Lord so guide thee, manifest himself to thee, help thee, and lead   thee by his Holy Spirit and power, as that thou mayst come undeniably   to experience, and to be satisfied by him about these things. And mind   not so much to know, as to be obedient <445> [sic] and subjected to the   Lord, both in thy heart and in thy conversation also, in the least thing that he makes manifest.    1. What's the subject of the verb mind? How do you determine/deduce this?  2. Does this para reveal what is the least > thing that he makes manifest?

Para 5, , by      If the Lord would show thee but this one   thing, -- that to use "thee" and "thou" to a particular person is   proper language, and Scripture language; and that to say "you," is   improper, and arose from pride, and nourisheth pride, and so is of the   world, and not of the Father; and thou should bow thy spirit to him in   this one thing, thou little thinkest what a work it would make within thee, and how strongly the spirit of darkness would fight against thy   subjection thereto. The Lord lead thee as he seeth good, and give thee   faithfully to follow; for else, if the Lord should lead in any thing,   and thou not follow in that thing, his Spirit would be grieved and   vexed thereby, and thy heart in danger of being hardened by the   deceitfulness of sin.   What is the Lord giving thee faithfully to follow?   The grey claims that the reader thinks little of the significance of stressing 'thee' and 'thou' over 'you'. So I'd guess that the Lord is giving 'thee' this caution? If I'm right, why is there no direct object in the bolded? I recognise grammatical differences in the 1600s, but still want to learn.


They are sent off as a suicide mission toward Vega or somewhere similar, and the AI is supposed to learn from them whatever they discover and return it somehow. They aren't told the truth, naturally. They figure out the nature of the mission, and also rapidly evolve new abilities. Their scientific understanding grows to the point where they figure out how to do FTL travel, and return to Earth, sending a bombardment of "heavy particles" before them that render all atomic fission and explosives inert. They are fairly pissed off at the people who sent them.

The story in question featured, as the vague title suggests, a "space mission" that is really a cover for forcing a bunch of really smart people to be in close proximity to each other for long enough that they can truly evolve their collective intelligence. I recall them developing new maths and, e..g, "farseeing" and eventually figuring out that while there was no planet at the end of their journey as they were told, they were able to construct one for themselves.


I'm not entirely sure how normal this is, but since I was a child, I've been able to produce myself voluntarily a "chill" sensation that seems to start on my head and traverse the rest of my body, being least intense in the feet. Looking around the internet and forums, looks like other people but not everybody also describe this ability. However, unlike other people's reports, I don't see "goose bumps" on my skin, at least there aren't any visibly; it's just the sensation.  Does anybody know if there are any relevant studies or knowledge out there about "voluntary goose bumps"? Is there even a proper name for that?

I can get goosebumps at will, regardless of the environment. Its mostly visible on my arms, and I can feel it on my head. It requires some level of concentration to achieve this.  My questions are : what biological mechanisms are involved in doing this ? Is it common ? Is it useful ?


I have a Seagate 3TB drive with a USB 2.0 interface on it.  I took it out of the case and installed into my PC (SATA). Physically, it’s like any other hard disk drive.   But all that Windows wants to do is format it. Even the Seagate utility “DiscWizard/Extended Capacity Manager” shows a small .34TB partition in the front (none of these are usable in Windows), then 1.66TB unallocated, then .73TB unallocated.  Looks like it’s offering the first 2TB as one unit, and the rest as another. I get that, but why is it unallocated? There’s definitely usable data on there, which I just saw when it was in the enclosure.  I’m on an ASUS F2A85-V PRO FM2 "AMD A85X (Hudson D4) 7 x SATA 6Gb/s USB 3.0 HDMI ATX" motherboard, and my older drive with Windows 7 is legacy, not UEFI.   Windows 7 shows the BIOS mode as “Legacy.” But I thought it wasn’t a requirement to boot via UEFI to use a data drive (non-boot) over 2TB.    I also have a 4TB that I’d love to put in my new big case, but while I’ll risk wiping the 3TB, I won’t play around with the 4TB until I figure this out.

I have a 3TB Seagate Backup Plus Desktop USB 3.0 drive, which works fine when in its enclosure, but when I get it off its enclosure and directly plug it as an internal SATA drive, it's just not properly recognized (it works again when used in the enclosure). My systems’s motherboard is an , which has two SATA 6.0 Gb/s and four SATA 3.0 Gb/s ports.  When used as an internal SATA drive Windows 7 asks if I want to format the drive, as if it didn’t have a proper filesystem, and if I use the DISKMGMT.MSC tool (typing that in the start menu) I get completely wrong information about the drive.  It says the drive has 3 partitions (349,31GB of RAW data and two unassigned partitions of 1698,68GB and 746,52GB). This information is plain wrong, since the drive, when used in the USB enclosure, works as a single NTFS partition (2794,52GB). How come it’s shown as 3 partitions without filesystem when connected through SATA?!  Is Seagate using some proprietary way of storing the data when using the drive in its provided USB 3.0 enclosure? I didn’t use any kind of encryption. I just plugged the drive with USB 3.0 and started using it straight away, since it apparently came pre-formatted with an NTFS filesystem.


I am an Indian citizen. I plan to visit Ireland as a tourist this July, and so I am applying for a short term stay type C visa. From the INIS website (), I need to prove ties to India in the form of 1) a job, 2) education and 3) family.  I have finished my college education and I do not have a job waiting when I return (my aim is to take a gap year). I do, however, have family - my father, who is elderly (but not retired), and who was ill earlier this year. Have other Indians managed to get an Irish tourist visa using only family ties?

How can I prove the immigrant officers that I have significant ties in my home country?  Are there any documents that I need?


that I don't like the answer to because it conflicts with my industry's standards (see bottom of post).  Edit: I asked a new question because I'm looking for an answer, not an alternative (the prior question will likely be forgotten because the original question wasn't addressed), even if that answer is "there is no correct way".    If I have a grocery list that tells me to buy meat and fruit, but I don't know whether I'm buying 1 or more types of each, I may write something along the lines of:  Buy: -meat(s) -fruit(s)   How do I pluralize a word in this fashion that requires a suffix change to become plural?  candy -> candies   It doesn't seem right to use any of the following:  candy(s) candy(ies) cand(y)(ies) cand(y/ies)     Background: I write software, and this type of notation seems common, but I've never run into this type of problem: usually "(s)" after the word works without any problem.  For example: from Microsoft Word:

Sentences constructed with a word written in the singular and parenthetically in the plural are straightforward when that word does not end in -y, e.g.:     List all applicable employee(s).   How does one handle words ending in -y? Is this correct:     I will attend the party(ies).


I tried to create a text file in a bash script.  The echo command spans multiple lines and has some double quotes "".  #!/bin/bash   echo "blabla bla bla bla "blabla"  bla bla " bla bla bla" and so on and so on  bla bla  blu bla  "bla bla bla " bla bla" > /root/bin/bla   There are many double quotes "" in echo command that is undesirable.  And I did   #!/bin/bash   echo 'blabla bla bla bla "blabla"  bla bla " bla bla bla" and so on and so on  bla bla  blu bla  "bla bla bla " bla bla' > /root/bin/bla   I wondered if there are any difference between double quote " and single quote '  Which one has higher priority? Is it just the fact that they are visually different?

I used to use '' and "" (single and double-quotes) interchangeably on the command line, but I recently noticed that '$HOME/some/dir' is not expanded, while "$HOME/some/dir" is. I searched around a little bit and found that "" allows some protection of special characters, while '' allows full protection. So what other characters are protected by '' and not ""?  EDIT: What are practical situations in which these differences might be significant?


The man and info pages can be rather long. I only want information about a specific flag for a command.  Example:  man ls -a  should return information about the a flag for the ls command, maybe something like this.     -a, --all           do not ignore entries starting with .

Suppose I want to know the usage of -i switch in grep command without scrolling. I need the specification just for that command or at least see the screen show that first. So how? As you can say that in general not just for grep -i.


I was going through problems related to distributing n distinguishable objects all into boxes, a in the first, b in the second, c in the third where a+b+c = n. The solutions I've seen usually comes to the form of $\frac{n!}{a!b!c!}$  I am wondering, for this solution to be true,  are the boxes distinguishable or not distinguishable?   If a, b, c etc. are all different , it seems like we would need to multiply the factorial of the number of boxes to $\frac{n!}{a!b!c!...}$ if the boxes are distinguishable? What if we specify, like in the question, that the $a$, $b$ ... objects must go into specific boxes, does that make the boxes distinguishable (and yet per the solution we would suppress the 5! term)?   For , the number of ways to distribute 13 cards to four people is $\frac{52!}{13!^4}$. If I split the deck into 4 specific sets of 13 (and label each set as A, B, C, D), doesn't $\frac{52!}{13!^4}$ include the combination where one person gets A, another gets B, then C, then D, as well as one person getting D, then C, then B, then A (and all other permutations of these four sets). In this case, it seems like the people are distinguishable?   Edit:  With respect to the duplicate, I have some followup questions.   For partitions of all different sizes, why does whether the ordering matter or not not change the solution of $\frac{n!}{n_1!n_2!\dots n_r!}$?     The duplicate states that if the partitions are of equal sizes, then an r! term must be in the denominator to discount for order (I assume this means the r boxes are indistinguishable?). However, in the poker problem I linked above, the number of ways to distribute 13 cards to 4 people was given as $\frac{52!}{13!^4}$ even though I don't think the people were considered distinguishable in that problem. I feel like I'm missing something?

I am looking at this formula  My understanding is that the number of partitions is equal to that formula, but only when the order of the partitions matters. eg, That's right, if you can only have $n_1$ in the first group and $n_2$ in the second group and so on.   My understanding is that if the order of the groups does not matter, then it is the same formula except you add $r!$ to the denominator because you need to account for the different orderings that can achieve that result.  Is that right?


I started with $n = 2k$ , $2^{2k} - 1 = (2^k - 1)(2^k + 1)$, where i go from there...

From "Fundamentals of Number Theory" by William J. LeVeque:     $M_n=2^n-1$.      Show that if $n=rs$, $M_r$ divides $M_n$.   My proof is:     $(M_n=2^n-1)+(n=rs) => (M_{rs}=2^{rs}-1)=>(M_{rs}=(2^r)^s-1)$      $(M_r=2^r-1)=>(M_r+1=2^r)$      $M_{rs}=(M_r+1)^s-1$      In the expansion of $(M_r+1)^s$, all components are of the form $M_rX$, except for the product of all ones. This follows from the combinatorial constraints. Therefore $M_n$ is of the form      $M_n=M_{rs}=M_r(X_1+X_2+...)+1-1$.      Thus $M_r|M_n$.     I have two questions:   1) Is this proof correct/acceptable?  2) In what other ways can this problem be solved? Specifically I am interested in what other kinds of algebraic/logical/mathematical manipulations could be used.  Thanks in advance!


I understand what signed and unsigned int means.But a  signed char doesn't make any sense to me. Also why both signed and unsigned int occupies the same amount of space. Signed int should occupy more space since it can contain both negative and positive numbers. Thanks in advance.

In C/C++, what an unsigned char is used for? How is it different from a regular char?


Prove that if $f,g:[0,1]\rightarrow[0,1]$ - continuous functions and f is strictly increasing then $$\int\limits_0^1f(g(x))dx\leq\int\limits_0^1f(x)dx+\int\limits_0^1g(x)dx.$$  I tried to prove that $f(g(x))\leq f(x)+g(x)$ for all $x\in[0,1]$ but realized that it is wrong. For example, $f(x)=\begin{cases}0,0\leq x< \frac{1}{4}\\2x-\frac{1}{2},\frac{1}{4}\leq x < \frac{3}{4} \\1,\frac{3}{4}\leq x\leq 1\end{cases}$, $g(x)=\frac{3}{4}$ but $f(g(0))=1>0+\frac{3}{4}=f(0)+g(0)$.

Suppose $f(x)$ and $g(x)$ are continuous function from $[0,1]\rightarrow [0,1]$, and $f$ is monotone increasing, then how to prove the following inequality: $$\int_{0}^{1}f(g(x))dx\le\int_{0}^{1}f(x)dx+\int_{0}^{1}g(x)dx$$


I tried to open this  in Ubuntu 12.0.4. but it suggested to install silverlight.   I searched in Google for this, finally I got Ubuntu not supported to SilverLight, so we need to install MoonLight.  For this, I run the following command:  sudo apt-get install mono-complete   after installing, I refresh the above page. Still it's not working.  How can I fix this?

I want to explain my problem with Images and Links,but I don't have reputations so I posted same question in the following link.    can check it and suggest me. Thanks  I am using Ubuntu 12.04.I tried to open this .I got the page in the following way. I searched some forums, one guy suggested Ubuntu not supported to silverlight so you need to install moonlight.  so I downloaded moonlight from this .I installed in the following way   Open Firefox and drag and drop the file into Firefox.it shows successfully installed.   I reopen Firefox and reopen these same .It showing blank page(white page).like this   How can I fix this, can anyone suggest me  Thanks.


On a recent trip the US, someone explained to me that saying "sorry" meant taking responsibility for causing the loss. Thus you should only say sorry if you intended to fix the situation. (And potentially even had implications for  insurance and litigation).   I'm an Australian - generally when people say "I'm sorry" it means "I can display empathy for your loss and can put myself in your shoes". [implicitly also that no responsibility is taken - nor any effort being made to restore the situation]  My question is: Do English speaking subcultures attach different meanings to the phrase "I'm sorry"?  (This is different to the other questions relating to the meaning of 'sorry' because it considers the legal and restorative implications as well as the geographic context).

Why do people say "I'm sorry" at the beginning of a sentence? For example: "I'm sorry, but I don't care for her one bit." On the same note, I would like to understand the meaning of "thank you very much" at the end of a sentence, thus: "I said I'll take it to go, thank you very much!"  Any light shed will be greatly appreciated.


I'm looking for a good reference that defines the Bondi mass aspect and his relations to Bondi and ADM mass. Googling a bit I've not founded any satisfactory exposition of the subject.  A short explanation of the concept is welcome.

I want to learn some advanced topics in GR, such as . However nearly no textbooks on GR contain this area, such as Wald, MTW, Hawking, Carroll and  Zee's. Can anyone recommend some textbooks or papers giving the elaboration in detail?


Many say it is safe using an AC adapter exceeding the required current. But  says:     a power adapter that can provide more current than the load requires will sometimes work, but if the current difference is very large (say 30 to 50%) be aware that "ripple voltage" on the adapter output may be higher than ideal, and a filtering capacitor may be required to smooth out the DC output voltage of the adapter.   So, is it better to stick closely to the required current? (obviously assuming the specs are reliable)  EDIT: in my case i'm considering  for a 45W load.

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


Let $p(x) = (x + 1)^m - x^m - 1$ and $q(x) = (x^2+x+1)^2$. Coefficients if these polynomials are in $\mathbb{R}$ So, the question is: "For which $m$ p(x) can be divided by $q(x)$ without remainder?". I tried to use this idea: let's simulate GCD's algorithm for $p(x)$ and $q(x)$ and see for which $m$ their gcd is dividable to $q(x)$, but didn't got any intresting results. So, maybe exists a better solution. I'll be very grateful.

Find $n \in N$, such that: $$(x^2+x+1)^2 | x^n+(x+1)^n+1 = P(x)$$  If I let $Q(x) = x^2 + x + 1$, I have that $x^3 \equiv 1$ mod$Q(x)$, so I can work out the cases for remainder of $n$ when divided by $3$ .. But what to do next, because I need $Q^2(x)$ dividing $P(x)$ ? I suppose this could be done with complex zeroes, but is there a faster way ?


I referenced . Herein, suppose that many seats of higher class (eg Premium Economy or Busines Class) are empty after boarding. Also, suppose that the passenger doesn't will to pay anything.   My outright guess is no; a counterargument would be that if everyone  did this, then because there aren't enough such seats, then it wouldn't be fair to the peope who failed to perceive these empty seats.  Yet what would be some arguments in favour? Has this happened? Those empty seats  feel wasteful.

I've read some people writing that they've seen people be caught sitting in First/Business class when they have economy class tickets. This was for international flights on big planes with several hundred passengers.  Is this even possible, or is it improbable that you won't get caught? (At least when food is served)  And are there any consequences that it might entail?  There's no need for a discussion on ethics.


I'm beginner in C# programming and I'm trying to create some graphics effects utilizing Winforms. I've tried to generate simple "plasma effect", however utilization of Paint Event is really frustrating (or I'm just stupid). In my example I have two classes (Form1 and Plasmadraw). In Form1 I have following setup: namespace Plasma_effect { public partial class Form1 : Form { public Form1() { InitializeComponent(); this.Width = 1920; this.Height = 1200; FormBorderStyle = FormBorderStyle.None; WindowState = FormWindowState.Maximized; this.DoubleBuffered = true; }     private void Form1_Paint(object sender, PaintEventArgs e)     {         Plasmadraw plasma = new Plasmadraw();          plasma.Draw(e.Graphics);          Invalidate();     }      private void Form1_Load(object sender, EventArgs e)     {         // Why I can't create instance of Plasmadraw class once here , I have to do it in Paint event ??     }      private void Form1_MouseClick(object sender, MouseEventArgs e)     {         this.Close();     }  And in the Plasmadraw class I have following setup: namespace Plasma_effect { class Plasmadraw {     int y;     int x;     double i;          double pii = 3.1415;      public void Draw(Graphics gfx)     {         // Should I use For loop here in creating the plasma, I managed to create full screen plasma with it, but no animation ?            x = x + 10; // this should increase the value, however the value is not increased         i = i + 1;          if (x == 1920)         {             x = 0;             y = y + 10;         }          if (y == 1200)         {             y = 0;         }              double v = Math.Sin((x * 0.5) + i * 0.001);             double c = v * pii;             double d = c + (2 * pii / 3);             double f = c + (6 * pii / 3);             double r = 255 * Math.Abs(Math.Sin(c));             double g = 255 * Math.Abs(Math.Sin(d));             double b = 255 * Math.Abs(Math.Sin(f));              int r1 = (int)r;             int g1 = (int)g;             int b1 = (int)b;              Color e = Color.FromArgb(r1, g1, b1);              SolidBrush brush = new SolidBrush(e);             Rectangle rect = new Rectangle(x, y, 10, 10);             gfx.FillRectangle(brush, rect);             } }  } Basically I'm trying to create continuous loop where I would have the effect running. The problem is that the program creates just one rectangle and stops after that. What I should do to make it run continuously ? Before I've managed to create some moving effects by basically creating a list of objects (for example sprites) and then using foreach in Paint event to draw them & invalidate(). However I'd like to learn to use some other approach than always using the same (copied) way.

Imagine you want to animate some object on a WinForm. You setup a timer to update the state or model, and override the paint event of the Form. But from there, what's the best way to continually repaint the Form for the animation?   Invalidate the Form as soon as you are done drawing? Setup a second timer and invalidate the form on a regular interval? Perhaps there is a common pattern for this thing? Are there any useful .NET classes to help out?   Each time I need to do this I discover a new method with a new drawback. What are the experiences and recommendations from the SO community?


In a javascript web app I am displaying a rather long table, filled with data coming from firebase, with code like the following. ̧  const dbReference = firebase.database().ref('MyCollection').child('CHD')    dbReference.on('value', function(list) {     list.forEach(function(item) {       itemR = document.createElement('tr'),       itemD = document.createElement('td'),       .... useful code laying out the item inside the table ....     }   }  It works as expected and I end up with my list of items in a table. But I need something more. How can I make the window scroll automatically to a given position. For instance, to have the 157th item in the list to show at the top of the window. I have already searched the net and found some scroll functions that I tried, but with no success.

I have a link on a long HTML page. When I click it, I wish a div on another part of the page to be visible in the window by scrolling into view.  A bit like  EnsureVisible in other languages.  I've checked out scrollTop and scrollTo but they seem like red herrings.  Can anyone help?


Lately, I am trying to build a server that uses Ubuntu Server 12.04.3(64bit) . I am facing problem while wanting to install under a software RAID(RAID 1). My Server spec are as below:  Proccesor: Intel i5-4670 Motherboard： Asus H87M-E V1 RAM: 2X 4GB 1600mhz Hardisk: 2x 2TB WD Red Cavier  I already tried either Software RAID and Hardware RAID. Software RAID can't install bootloader and Hardware RAID won't let me partition. This is my first time directly doing RAID 1 on the OS HDD. Kind of Newbie here. Anyone who had this experience please share. Thank You

How to set up RAID 1 (software, hardware or fake) on Ubuntu 12.04 desktop?


Hot Network Questions are wonderful to discover things one never expected to read about. I was always wondering whether the list seen on the side bar, or the one at  are the same for every Stack Exchange visitor, or whether they are filtered based on some criteria? (logged in or not, most active networks for the user, previous visits to a SE site from HNQ, ...)

, I know that 100 HNQs are sorted by "hotness points", in descending order. However, this order is not used when displaying HNQ in the sidebar on various sites. (Or for the one single HNQ which is displayed in the feed of the mobile apps.) Neither is there enough space to display all the HNQs in the sidebar at once, so only a selection is shown. So how are these picked, and how is the order determined ?  Is it a totally random selection and ordering of the current HNQs? Will all users see the same HNQs on any given page at a particular time? Does number of "hotness points" affect the likeliness that a certain HNQ will be displayed on a page? Will the system rotate the HNQs across different pages so that all can be seen? Are there other factors?


I have a js object from my react app and want to delete a single data. The object is as follows  state = {   data: [] }  const contactData = {   Datas: {     name: "william",     email: "test@test.com",     phoneNumber: "07123456",     addressOne: "street1 ",     addressTwo: "street2",     postCode: "hd1 2rd ",     country: "UK"   } };  const DateAdd = {   ...contactData,   id: new Date() }; const immutate = {   ...state,   data: state.data.concat(DateAdd) };  console.log(immutate);   I able to delete all the data with this method but not a single data  const deleteData = immutate.data.filter(own => own.id !== "generated date");   how would I able to delete like name or email only?  appreciate for your helps.

Say I create an object as follows: let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI",   "regex": "^http://.*" };  How should I remove the property regex to end up with new myObject as follows? let myObject = {   "ircEvent": "PRIVMSG",   "method": "newURI" };


Shouldn't the number of field lines through any surface be infinite if there is a charge present. Or is there a finite number of field lines from a unit charge?

When we're dealing with problems in electrostatics (especially when we use Gauss' law) we often refer to the density of electric , which is inversely proportional to the radius in the case of a single point charge (all field lines are directed radially).   My question may sound dumb, despite the fact that this concept is quite intuitive, but if you think about it there is actually an infinite amount of field lines which we can draw everywhere (one through every point), so speaking of an area where field lines are more "dense" or "sparse" doesn't make much sense to me.  With this in mind, why can we still use such a concept? Why does it really work?


I'm trying to pass formdata through RestTemplate with different datatypes.  MultiValueMap<String, String> map = new MultiValueMap<String, String>(); map..set("app_id", 12); map..set("app_name", "Partner");   But the api I'm hitting throwing Bad request, I tried from postman same request works fine.  Is there any other way I can pass multidatatype request in restemplate formdata?

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


Using Riemann integrals of suitably functions, find the following limit  $$\lim_{n\to \infty}\sum_{k=1}^n \frac{k}{n^2+k^2}$$  Please help me check my method:  Let $$f(x)=\frac{x}{1+x^2}$$ For each n$\in$ $\Bbb N$, let partition $$P_n=({\frac{k}{n}:0\le k\le n})$$ and $$\xi^{(n)}=(\frac{1}{n},\frac{2}{n},...,\frac{n-1}{2n},1)$$ and $||P_n||=\frac{1}{n} \rightarrow 0$  $$\lim_{n\to \infty}\sum_{k=1}^n \frac{k}{n^2+k^2}=\int_0^1 \frac{x}{1+x^2}dx=\frac{1}{2} \ln(1+x^2)|^1_0=\frac{\ln 2}{2}$$  Is there any other methods for this question?

How to find the value of $\lim_{n\to\infty}S(n)$, where $S(n)$ is given by $$S(n)=\displaystyle\sum_{k=1}^{n} \dfrac{k}{n^2+k^2}$$   is unable to calculate it.  This is a question from a questions booklet, and the options for the answer are--  $\begin{align} &A) \dfrac{\pi}{2} \\ &B) \log 2 \\ &C) \dfrac{\pi}{4} \\ &D) \dfrac{1}{2} \log 2 \end{align}$


I play minecraft on my xbox 360, and I can't seem to find a way to choose multiplayer, and fill out server info like on YouTube. Can I only play Java Edition mineplex?

Can players on a PC and an Xbox play together in any way? I.e. can Xbox users connect to a (modfied?) PC server, or vice versa?


A few months ago I wrote a program which simulates how user-defined bodies moved under each other's gravities using Newton's Law of Gravitation. For each body, I calculated the total acceleration from all of the other bodies and moved it accordingly.  I would like to see if this can be done using General Relativity. Presumably, I would have to find each body's effect on spacetime and then calculate the body's acceleration/velocity as it moves over the warped spacetime. In the end, I would like to see if I can recreate Mercury's motion around the Sun, as calculated by Einstein.  If there is no single equation or set of equations which can be used to calculate the motion of a particle under gravity, I would love to see an example of where this has already been implemented.

How would one perform an $N$-body simulation in General Relativity (GR) for something like galaxy formation or galactic dynamics?  Suppose one wants to simulate the rotation curve $v(r)$ for galaxies with an $N$-body simulation, and wants to do it in the framework of GR / the Einstein equations.


When attempting to use any literal strings in formulas I get a Formula parse error and #ERROR! in the column with the formula.  For example:   =IF(D43=“x”,MULTIPLY(E42,2)).     I’ve been told that there is something wrong with the quote marks around the literal string ‘x’. I am using an iPad keyboard.  Any ideas?

I’m trying to get IMPORTRANGE to work for me with no success. I made two simple spreadsheets:  and . In the destination sheet I’m using the import range function:  =importrange(“1-5F1_zz0ZpGj7SfeQhewsCe0CsrA0eyPbjfmUrLBsyk”,”Sheet1!a1:a1”)   I tried already:   Replacing the , with ; Referencing just the key as well as the full URL in the first argument Switching from “ to ‘ With the sheet name and without it   Not sure what else to do.  Any ideas?


I have read msdn article about properties. They show that example of property:  // Declare a Name property of type string:     public string Name     {         get          {            return myName;          }         set          {            myName = value;          }     }   Then they say:      Once the properties are declared, they can be used as if they were   fields of the class.   What would be the difference if they just left:  public string Name;   If I had a field: private string name and wanted to have only getter? Should I declare  public string GetName(){return name;} or should use those properties somehow?    Could somebody tell me what is wrong with that example:   private int age;  public void setAge(int age){    if(age < 100)     this.age = age; }

In C#, what makes a field different from a property, and when should a field be used instead of a property?


I would like to wrap "2cf24dba5fb0a30e26e83b2ac59e29e1b161e5c1fa7425e73043362938b9824" into the frame of lstlisting.  \documentclass[conference]{IEEEtran}  \usepackage{xcolor} \usepackage{amsmath} \usepackage{lmodern} \usepackage{cite} \usepackage{amsmath,amssymb,amsfonts} \usepackage{algorithmic} \usepackage{graphicx} \usepackage{textcomp} \usepackage{listings} \lstset{    basicstyle=\footnotesize,           breakatwhitespace=false,            breaklines=true,                    captionpos=b,                       frame=single,   extendedchars=true,                language=Python,                    numbers=left,       numberstyle=\tiny,                  numbersep=5pt,                     showspaces=false,                   showstringspaces=false,             showtabs=false,                     stepnumber=1,                      tabsize=2,                          title=\lstname,                      belowskip=-1em,   aboveskip=1em,   belowcaptionskip=0em,   columns=fullflexible,   linewidth=8.7cm,   postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{black}\hookrightarrow\space}},   literate={,}{,}1   } \def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em     T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}  \begin{document} \begin{lstlisting} block = {     'previous_hash': "2cf24dba5fb0a30e26e83b2ac59e29e1b161e5c1fa7425e73043362938b9824" } \end{lstlisting} \end{document}

I have a problem with a lstlisting environment. I want to use it for displaying several very long lines that can not be reformatted. Independently of the option breakatwhitespace=true or false my lines are not broken down so that the end is far outside of the printable area.  How to specify that line breaks are allowed at any character? Or is it possible to specify the characters (besides whitespace) that can be used for a line break?  Alternative: inserting a special (not-printed) character that indicates "break line here" - doe something like this exists?  \begin{lstlisting}[] Test1: 33b7a2f7c4cc93c46dd4ee2ed81aa1eb-9409135542c79d1ed50c9fde07fa600a_cce5a2fe76bfbd0c48d79fb43a7106f0_263e9a8711c1400fb2a716a1b820ac9a Test2: 33b7a2f7c4cc93c46dd2423423423423-9409135542c79d1ed50c9fde07fa600a_cce5a2fe76bfbd0c48d79fb43a7106f0_263e9a8711c1400fb2a716a1b820ac9a \end{lstlisting}   Update:  The  works fine. Additionally I found a different approach which works directly with a lstlisting environment:  \begin{lstlisting}[breakatwhitespace=true, literate={\-}{}{0\discretionary{-}{\\}{}}]   ... \end{lstlisting}   It allows to break the lines also at hyphenations. It has some drawbacks especially that the line breaks are looking different from the others in the environment. But may be for others this code may be helpful...  Found here:


The phrase running short of something means when you don't have enough of something, but I want to mention how much of something I am running short of for example I want to buy a pair of shoes the price was around 100$ but I found out that I had only 90$ so needed 10$ now how would I describe it using running short of? "I am running short by 10$ or "I am running short of 10$.

In another  regarding a difference between short on and short of, the  says the following:     ... But this is not always the case. A person can be short on/of money,   but lacking a specific amount, someone can only be €10 short or short   €10. This construction never uses a preposition.   but is that really true? I can see sentences like "I am short of 10 dollars" quite often.


I used to use openssl aes-256-cbc, but the problem I have with this is when I try to decrypt in a different version of the distro it fails, as if it depends also on some internal key or something, instead of depending solely on the password. So I have to keep a different encrypted file for each version of the distro, which is annoying and bad. Any suggestions?

takes a plaintext message + password input and encrypts the plaintext. I want to do this locally on Linux. Is there a one-line command that will compute an encrypted version of my message that I can then email?  My goal is for the receiver to be able to decode the message with nothing but the password.  To be clear, I have no idea what various encryption schemes are (AES, openSSL, RSA, GPG, salt, base64, DES, CBC, reentrant) and not really interested in a research project. I just want a one-line command like  encrypt message.txt -password=secret.txt  which would be decoded like  decrypt message.txt -password=secret.txt    (Yes, I did use google first.  is not showing me anything I understand / think I can use.)


After a minimal install of Ubuntu 18.04, I switched to using NVIDIA's proprietary drivers. Recently, I've noticed that the screen would randomly freeze after boot up. Nothing works, I can't even enter text mode, till I hard reset. Right now it is working fine but I'm typing this after restart. This typically occurs when I'm on Firefox. I can't figure out what might be causing this.

All operating systems freeze sometimes, and Ubuntu is no exception. What should I do to regain control when...   just one program stops responding? nothing at all responds to mouse clicks or key presses? the mouse stops moving entirely? I have an    In what order should I try various solutions before deciding to pull the power plug?  What should I do when starting up Ubuntu fails?  Is there a diagnostic procedure I can follow?


I am trying to dissolve poly from a shapefile with unary_union and at times I am left with a poly that looks like this:  You can see the lingering line geometries left inside of the poly.  I have been able to drill down to the xy coords of the exterior and build a new polygon from that. This has removed the chatter that is shown in the interior of the poly, but using the exterior coords leaves me with a problem detailed in the image below that is a zoom from the red box above:    There are a couple of lines like this that remain in the exterior ring, is there a way that I can remove them?

I know this issue has been addressed before with different software, but how do I do it with Shapely?  I have a polygon with a very small gap on the interior of the shape:    Here is a close up:    The polygon is valid so I can't use the buffer trick, and simplifying the polygon also doesn't work.


I have on occasion accidentally typed this to change to the root directory.  $ cd //   It works fine and I am in the root directory because ls returns same results as if I am on root. But why is this even valid ?

I was working in my terminal, when I misspelled while cd to root (/). Accidentally, I typed // and I got in terminal:  root@weblocalhost://#   When i type pwd, i get response // but when I type ls -s i got same list as in / directory.  When you type more than 2, i.e. /// you get:  root@weblocalhost:/#   Always 1 / except for 2. Is there any difference and what is // for?


Which of the following are possible (semantically and syntactically correct) first-order-logic translation of "Salma loves any class which is harder than every Algorithms class". Is the following translation correct ? and Why ? $\forall x \forall y[[Class(x) \land AlClass(y) \land Harder(x,y)] \to Loves(Salma,x)]$ My prof considered it as a wrong translation.


I've setup an SSH server on my Ubuntu desktop at home using a dynamic DNS service (NOIP). I have a wi-fi-only Android tablet running Android version 4.4.2.   Port 22 is forwarded, ufw is disabled currently.  On my tablet I can connect to other SSH servers, such as my college's server. However, I cannot directly connect from my tablet to my desktop; every attempt times out. But I am able to connect to my college's server and then SSH into my desktop from there. I'm also able to SSH into my desktop when I'm at home and I use the desktop's network IP address. I'm able to ping the public IP and receive responses.  But I'm at a loss to explain this behavior. It seems odd that I have to connect through another SSH server. Has anyone experienced a similar issue? Thanks in advance!  edit: adding error  failed to connect to name/ip-address (port 22):   connect failed:ETIMEDOUT(Connection timed out)

I'm trying to setup openssh-server, but I'm having some issues connecting. I changed the port to something non-standard (57757) and then set my router to forward to that port. On my LAN, I'm able to ssh into my machine fine using port 57757, but not able to do so on the WAN.   If I'm outside the LAN, and I try to access my machine by an incorrect port, I immediately get a "connection refused" message. However, with the correct port it just hangs and then timeouts.   What can I try to debug the issue? I tried a traceroute, but it didn't tell me anything useful.  EDIT: I realized that my problem was that my router didn't support accessing it by WAN IP internally. I ssh'd out to a different server and back in and it worked fine.


(Drupal 7 under Linux)  This is clearly a Drupal permissions problem, but I'm baffled. If I   rm -rf styles   and refresh the page causing the error, styles and it's sub-dirs are re-created thus:  drwxr-xr-x 3 www-data www-data 4096 Jan 25 16:07 styles  drwxr-xr-x 3 www-data www-data 4096 Jan 25 16:07 uc_category  drwxrwxr-x 2 www-data www-data 4096 Jan 25 16:07 public   But I still get the error. And I still get it if I  chmod -R 777 styles   Any suggestions?

Today I uploaded my site to the server, and I get errors like the following:     Unable to generate the derived image located at public://styles/sponsor_image/public/TerraThermaSponsorLogo.png.   Image styles cannot generate images. I have tried to set permissions on styles/* folders with chmod -R 775 styles/, and even tried chmod -R 777 styles/. The folder's owner is OK. I don't get what can be wrong.  The directory associated with public:// is sites/default/files, and it is OK.


Consider the following LaTeX manuscript featuring a TikZ picture of an empty node with an attached pinned label.  \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}   \node [draw,pin=x] {}; \end{tikzpicture} \end{document}   The resulting image is                                                                    (This is not quite the image you'd get from the above code: I enhanced the pin's visibility a little, for the reader's convenience.)  I know how to adjust the angle and length of the pin (this is described in section 17.10.3 'The Pin Option' of the TikZ & PGF manual for version 3.0.1a on p. 241), but how can I adjust the position of the lable (angle, distance, and label anchor) with respect to the head of the pin?

I was looking for a possibility to adjust the anchor of the text of a pin. Tikz does not allow this out of the box.   This question was already asked on the mailing list , Sept. 2009 without any reply till today or feature addition to pgf/tikz:  \documentclass[tikz]{standalone}  \begin{document}      \begin{tikzpicture}[          every pin/.style={anchor=west},          every pin edge/.style={anchor=west}]          \node [pin=60:test] at (0,1) {};          \node [pin={[anchor=west]60:test}] at (0,0) {};      \end{tikzpicture}  \end{document}   There is also a question with a suggested workaround here on  by defining an aligned pin style consisting of another node positioned at the end of the pin using \tikzlastnode:  \tikzset{     aligned pin/.style args={[#1,#2]#3:#4}{         pin={[inner sep=0pt,%               pin distance=#2,% new option, default = 3ex               label={[append after command={%                     node[inner sep=0pt,%                         xshift=-0.1cm,% modified, default = 0                         at=(\tikzlastnode.#3),%                         anchor=#1,%                     ]{#4}%                 }%             ]center:{}}%         ]#3:{}}%     } }   In this code, I have added a second unnamed option for pin distance within the square brackets.  MWE using the workaround showing the desired result:  \documentclass[tikz]{standalone}  \tikzset{     aligned pin/.style args={[#1,#2]#3:#4}{         pin={[inner sep=0pt,%             pin distance=#2,% new option, default = 3ex             label={[append after command={%                     node[%                         inner sep=0pt,%                         xshift=-0.1cm,% modified, default = 0                         at=(\tikzlastnode.#3),%                         anchor=#1,%                     ]{#4}%                 }%             ]center:{}}%         ]#3:{}}%     } } \begin{document} \tikz[pin distance=15mm, every pin/.style={fill=blue,text=white}] \node [circle,draw,     aligned pin={[west,3ex]0:X-Value},%     aligned pin={[west,3ex]45:Y-Value},%     aligned pin={[west,3ex]90:Z-Value}] {my circle}; \end{document}     I would like to add further options such as pin edge to adjust the style of the edge. Another addition would be xshift to finetune the position of the text (and yshift).  Is it possible to change the workaround to allow named options with default values if not specified?  Usage could look like this (without using necessarily all options):  node[aligned pin={[pin anchor=west,pin distance=1cm,pin edge={thick}]90:{txt}}]{};   If someone is interested in the implementation of the pin feature in tikz see  and do a textsearch for pin.  Update after answer by Qrrbrbirlbel:  To achieve almost the same result as my MWE use following code  % use preamble from Qrrbrbirlbel answer \begin{document}  \begin{tikzpicture}[every pin/.append style=draw, every pin edge/.style={thick}] \node[c] [ pin={[pin anchor=south west,pin edge pin anchor=south west,pin distance=6ex]90:Z-Value}, pin={[pin anchor=west,pin edge pin anchor=west,pin distance=6ex]45:Y-Value}, pin={[pin anchor=west,pin edge pin anchor=west,pin distance=6ex]0:X-Value} ] at (0,0) {}; \end{tikzpicture}  \end{document}     However, I would like to finetune the text positioning using inner sep=0 and a slight shift:  \newlength{\xshiftlength} \setlength{\xshiftlength}{0.5\widthof{Z}}   Following works:  \tikzset{   pin inner xsep/.style={tikz@pin@post/.append style={inner xsep=#1}} }   Apparently xshift cannot be added in the same way. It shifts more than only the text. How could a pin text xshift be added?


I was inserting some data on the fields of my website then i copy and pasted a string from another text editor(MS Word), then on my console log it recognizes the long single hyphen ( – ) which is the same as at PHP. But then when i execute the query the value from the database becomes different which is this:  `â€“`   This is the filtering that i do but as i said php recognizes it as a long hyphen ( – ) and that's the reason why they can't catch it. My question is why? Or any solution on the DB?      $_raw_data = $_POST['edit_data'];     $_raw_data = preg_replace('/[^A-Za-z0-9\- \'"{},:;[]]/', '', json_encode($_raw_data));     $_raw_data = str_replace("'", "''", $_raw_data);     $_raw_data = json_decode($_raw_data, true);

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I would like to align an equation on the equality sign with a symbol that is inside a \left\{...\rigth\} expression. Like this, \begin{align*} P \left \{ X &\in A \right \} \\ &= P \left \{ X_0 \in B \right \} \end{align*}  But this produces an error "Missing \right.." and the right hand side } from the first line is not displayed.  Why is this so, and is there a work around?

I want to align equations (using the align environment from the amsmath package) inside matching \left( and \right) commands. For example:  \documentclass[a4paper,12pt]{article}  \usepackage{amsmath}  \begin{document}  \begin{align}     a \left( b &= c \right)\\     d \left( e &= f \right) \end{align}  \end{document}   But that code gives this error:     Extra }, or forgotten \right.   The error disappears when I remove the delimiters. Is there a workaround for this?


here is how I do it right now:  public static getConfs(Connection conn, String confNo){     ResultSet rs = null;     try{         rs = conn.createStatement().executeQuery("select col1,col2 from table1");         ... // do something with rs         rs.getStatement().close();         rs = conn.createStatement().executeQuery("select col1,col2 from table2");         ... // do somthing with rs         rs.getStatement().close();         rs = null;     }catch(Exception e){         throw e;     }finally{          if(rs != null){              try{                  rs.getStatement().close();              }catch(SQLException se){                  se.printStackTrace();              }          }     } }   two questions: 1. should I reuse result set variable like that ?  2. is that good to close result set like that ? any smarter way?

Consider the code:  PreparedStatement ps = null; ResultSet rs = null; try {   ps = conn.createStatement(myQueryString);   rs = ps.executeQuery();   // process the results... } catch (java.sql.SQLException e) {   log.error("an error!", e);   throw new MyAppException("I'm sorry. Your query did not work."); } finally {   ps.close();   rs.close(); }   The above does not compile, because both PreparedStatement.close() and ResultSet.close() throw a java.sql.SQLException.  So do I add a try/catch block to the finally clause?  Or move the close statements into the try clause?  Or just not bother calling close?


I am new to ssh-tunneling.  Basically I want to be able to get ssh access to servers in a remote lab (say subnet 1.2.3.X).  I can log into a machine that is visible say 11.22.33.44  I want to be able to log into machines in 1.2.3.X subnet through ssh tunneling, but I am not sure what exactly needs to be done.  Logging into the machines through the machine I can already log into is an option, but I have my development files on my local pc. So I wanted to use the ssh-tunneling.

My question is basically how to turn my existing two steps into one step.  I have a working SSH tunnel set up between two computers using a middleman server like this:  Kubuntu_laptop--->nat_fw--->Debian_Server<--nat_fw<--Kubuntu_desktop   What I do presently is SSH from Kubuntu_laptop to Debian_Server and then from Debian_Server to Kubuntu_desktop. I would like to make that one SSH command, issued on my Kubuntu_laptop in bash that results in my being connected to the Kubuntu_desktop (shell/bash).  The commands I am using now are as follows. Step 1:  me@kubuntu_laptop:~$ ssh -i ~/.ssh/id_rsa admin@debian_server     Step 2:  admin@debian_server:$ ssh -p 1234 -i /home/admin/.ssh/id_rsa admin@localhost    Then I am connected to the kubuntu_desktop via SSH (from kubuntu_laptop).  RSA keys are required for all SSH connections. Password login is disabled all the way around. And notice that the computer user accounts are different at two of the computers.  Regarding the connection for this leg:  Debian_Server<--nat_fw<--Kubuntu_desktop   Here is how it is established:  autossh -M 5234 -N -f -R 1234:localhost:22 user@mydebian.com -p 22   Notice Kubuntu_desktop connects to middleman as user@mydebian.com (not admin@debian_server). But when I connect to Kubuntu_desktop, I connect as admin user.  I cannot change the existing monitoring port (5234) or the remote (- R) port number (1234 in this example). I cannot change the SSH security to allow password logins. I cannot open up any new firewall ports. I can't change user accounts (except on laptop).


In javascript how it's possible to replace all occurrence of &,<,> in a string   I tried this    var str="<>&";  str.replace("&","&amp").replace("<","&lt").replace(">","&gt");   but not able to change even first occurrence

Does anyone know of an easy way to escape HTML from strings in ?  I need to be able to pass an arbitrary string and have it properly escaped for display in an HTML page (preventing JavaScript/HTML injection attacks).  I'm sure it's possible to extend jQuery to do this, but I don't know enough about the framework at the moment to accomplish this.


is it possible to get android socurce code from apk.  i had seen on some tutorial that shows the way to get code from apk just guessting if we can do it really .  please guide they way to do it if possible  i was able to get source code but issue is that when i try to run it in eclipse i see lots of error .

Having an .apk file, is there any way I can get its source code?


Is the ring of entire functions on $\mathbb C$ a UFD ?   I know the irreducible elements are of the form $f(z)=(z-\alpha)g(z),$ where g is a unit in the ring.But I have no idea how to prove or disprove it? Please help.

Am I correct or not? I think that a ring of  in one variable is not a , because there are holomorphic functions with an infinite number of $0$'s, and hence it will have an infinite number of irreducible factors! But I am unable to get a concrete example. Please give some example.


I created a PHP page within my project and I am using node_load() to print data.  I also used these includes in my php page:  include 'modules/node/node.module'; include 'includes/common.inc';   But I get an error about an undefined function, like so:     Call to undefined function cache_get() in   D:\xampp-portable\htdocs\d6\includes\common.inc on line 3321"   So how can I access the 'node load' function in my page?

This is what I have right now:  <?php     define('DRUPAL_ROOT', '/var/www/clients/client1/web15/web');     include_once(DRUPAL_ROOT . '/includes/bootstrap.inc');     drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); //  drupal_flush_all_caches();        $users = views_get_view_result('userlist', 'uid_list');     $i = 0;     foreach ($users as $user) {         $filename = 'sites/default/files/generated_pdfs/individual_pdf_report_' . $user->uid . '.pdf';         generate_employee_pdf($user->uid, $filename);         error_log('Generated ' . $filepath);         $i++;     }     // create object     $zip = new ZipArchive();     // open archive     if ($zip->open("sites/default/files/generated_zips/individual-reports.zip", ZIPARCHIVE::CREATE) !== TRUE) {         die ("Could not open archive");     }     // initialize an iterator     // pass it the directory to be processed     $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator("sites/default/files/generated_pdfs/"));     // iterate over the directory     // add each file found to the archive     foreach ($iterator as $key=>$value) {         $zip->addFile(realpath($key), $value->getFilename()) or die ("ERROR: Could not add file: $key");     }     // close and save archive     $zip->close(); ?>   I'm getting a bunch of errors from the above when run standalone. Works fine in my module. Some of the errors are:  Warning: Invalid argument supplied for foreach() in drupal_depth_first_search() (line 56 of /var/www/clients/client1/web15/web/includes/graph.inc). Warning: Invalid argument supplied for foreach() in _module_build_dependencies() (line 229 of /var/www/clients/client1/web15/web/includes/module.inc). Warning: include_once(sites/all/modules/views_bulk_operations/actions/archive.action.inc): failed to open stream: No such file or directory in views_bulk_operations_load_action_includes() (line 56 of /var/www/clients/client1/web15/web/sites/all/modules/views_bulk_operations/views_bulk_operations.module).


i need help for generating of unlimited strings from keyboard, but this don't work..  Scanner input = new Scanner(System.in);     ArrayList<String> al = new ArrayList<String>();       String check=null;       while(true){           check = input.nextLine();           if(check == "stop") break;           al.add(check);        }       System.out.println(al); }   }

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


Why does Java have these Integer, Character types and classes while they are also adapting C's int, char etc Sometimes when people are creating arrays, they tend to use Integer[] i = {......} rather than int[] i = {....}; what is the difference then?

I need to create a data transfer object, which I will use for storing the records retrieved from database. In this data transfer object, I need to declare a numeric field. For that which one is better - int or Integer  If I am defining the field as Integer, will there be any performance impact because of 'Integer' type if I am going to retrieve more than 2000 records from DB!?  Thanks in advance.


Far from my expertise, but sheer curiosity. I've read that  ("a complexity class consisting of all of the computational problems solvable in polynomial time on a quantum Turing machine with postselection and bounded error") is very powerful.  Still, I don't understand the practical sense of assuming you can decide the value an output qubit takes.  My question: Have post-selection quantum computing experiments been implemented (or is it possible that they will be implemented)?  (And, if the answer is yes: how does post-selection take place in a way that practically enhances your computing power?)

A quantum computer can efficiently solve problems lying in the complexity class . I have seen a claim the one can (potentially, because we don't know whether BQP is a proper subset or equal to PP) increase the efficiency of a quantum computer by applying postselection and that the class of efficiently solvable problems becomes now postBQP = .  What does postselection mean here?


It's a few decades old, about a man interacting with a genie. The genie was not very powerful, and could only grant wishes with a cash value of something like $1.97.  And eventually, the man figures out something he wants he can actually wish for...

As a high school student just starting in science fiction, I read a short story collection in paperback that included this story – not quite a short-short, but not very long either.  I think that it was written by a familiar author, since the collection was one of those “Best Of…” anthologies.    Our hero is a sympathetic young guy trying to get ahead, in love with a beautiful neighbor, but hopeless in love.  He rescues a miniature Minor Deity (and I've forgotten the mechanism – rescued from a cat perhaps?) and gets a wish in return.  The catch is that since this is only a minor deity, the value of the wish is small – and I forget the actual value, perhaps $2.49.  He asks for help winning at the races to help get the girl – and the minor deity says sure, but the payoff can only be $2.49.  How about help rescuing her from a calamity like an earthquake?  Sure, but the total damage can only be $2.49. Other alternatives are discussed, but the value can only be $2.49. Frustrated, our hero thinks about the problem, but the Minor Deity thinks he has a solution.    Later that evening, the girl knocks on the door, he opens it to her welcoming arms, and the night passes.  The next morning, our hero finds a small clipping on the floor, an article stating the latest estimates of the total value of the elements in the human body were… $2.49.  (The whole story was building to that punch line.)


I just made an "Expedite review" request to apple for a major bug yesterday and Apple approved the app in few hours.  Now (Today) I want to request Expedite review again of-course for a major reason.  What is the chance of approval again?  Will that affect my future requests?

If my app is live and users are facing a critical issue, can I upload another build and ask Apple to make it live within a day or two?


Im trying to update to install hevc player in ubuntu but it is not working always i'm getting the same output anybody please help me!!!  sudarsan@sudarsan-Inspiron-3551:~$ sudo apt-get update E: Malformed line 1 in source list /etc/apt/sources.list.d/virtualbox.list (dist) E: The list of sources could not be read.

I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that.  I just tried to upload a screen shot but since I'm new it won't allow me to.  I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following:  COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse)  E: The list of sources could not be read.,  E: The package list of status file could not be parsed or opened.   How do I report bugs?  What can be done about this.  I have searched and everything everyone says to do leads me back to the same line error message.  So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software.


There is a sign outside a shop near us which says 'Parking for loading vehicles only from 7 to 12pm'. Does that mean between 7pm and midnight, or between 7am and noon?   For me 12.00 is neither post-meridian nor ante-meridian, it is either noon or midnight.  Equally when someone says from midnight on the 3rd, do they mean midnight which precedes the 3rd or midnight which ends the 3rd. The precise moment of midnight belongs neither to one day nor the other.  These are crucially important matters as regards flight timetables, and insurance policies. If the policy expires at midnight on the 15th, when exactly is that? It is why many insurance companies now speak of 12.01am on the 22nd or 11.59pm on the 21st.   Should it be insisted that all references to 12.00 state either noon or midnight and how can we express midnight with clarity?

I've read in various places the first minute of a day described as 12:00am.  Now, whilst I personally prefer to use 24h clock notation and therefore don't have this problem as I can simply describe this minute as 00:00, how is one supposed to express this time using am/pm notation?  Is 00:00am common (strange because there is no 00:00pm), or is the least-bad way to say 12:00am (strange IMHO because it seems to imply that the previous hour was 11:00am when it was actually 11:00pm)?


When instantiating a class within the NetBeans GUI Builder, i.e. dragging and dropping a JPanel class – which contains the following simple code – onto a JFrame class, a Null Pointer Exception is returned.      private Scanner openFile(String filename)      {            Scanner inFile = null;         try         {             File file = new File(filename);  // opens log to read from             inFile = new Scanner(file);             }             catch(FileNotFoundException e)              {                 System.exit(1);              }             return inFile;     }   If I modify the code slightly and instantiate the Scanner object in one line, without setting it to Null first, the class can be instantiated within the GUI editor environment (I have to catch the exception elsewhere, of course, to do this because if the Scanner object is left in the try-catch block, its value cannot be returned). It's worth mentioning that this code compiles and executes fine, but was there any technical reason as to why the GUI Builder when instantiating a class  cannot retrieve the return value of the Scanner object, and throws the Null Pointer Exception  as per the IDE logs?  Should I care about this, or is it just a strange bug?

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?


Reproducible example:  \documentclass{letter} \usepackage{lipsum} \usepackage{graphicx} %\usepackage{invoice}   \begin{document} \begin{letter}{} \opening{Muy se\~{n}or nuestro:} \lipsum[34] \includegraphics[width=\columnwidth]{frog.jpg} \lipsum[36-38] \closing{Atentamente le saluda} \end{letter} \end{document}   Removing the % on %\usepackage{invoice} will cause a weirdo first page to print.     Likewise removing \usepackage{graphicx}; \includegraphics{frog.jpg} will remove the weirdo first page.  What's going on?

I try to create an invoice with a logo in the background. But I get a strange result when I use graphicx and invoice in the same document. Here is my minimal example:  \documentclass{scrlttr2}  \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage{graphicx} \usepackage{invoice}  \begin{document} % foobar \end{document}   It builds fine with pdflatex, but the resulting PDF file has this on it's first page:     [2007/09/09] [2010/03/01] [2010/12/02] [2010/09/13] [2007/11/11]   [2007/09/09] [2007/09/09] [2010/03/01] [2010/03/01] [2010/12/02]   [2007/09/09] [2007/09/09][2010/03/01] [2010/01/28] [2007/09/29]   [2007/10/02] [2007/11/11] [2009/07/12]   After this, a page break happens and the expected output begins. The footer is also on the first page (where the dates are) and the second page (the first with actual content) has no footer. Starting with the third page, everything seems fine.  Is this a bug in either invoice or graphicx?  Update: This only happens with pdflatex, the DVI output does not show the dates.


I don't know if my title is descriptive enough, but that is my problem. In justified paragraph some text will be splitted, like 'descriptive' become 'des-criptive' and the 'criptive' part is on the next line, I hope you understand.  Please  file for better example, I've included the lyx, tex, and pdf output. I don't want the text to be splitted, can I adjust some settings so it behave just like the default behaviour on LO Writer, Ms. Word, or another WYSIWYG text editor?  I'm using LyX on Linux.

Sometimes, assume our document contain many long words, TeX may generate some hyphenation at the end of line. But it really hinder our smooth reading. Although I know we can add the hyphenation rule at the preamble. It can't reduce hyphenation number but effect the hyphenation position. It is said that microtype package can give us more compact output. But it require expert level to tuning the parameter.


Hi to everyone and thanks in advance for your time reading this question.  Im kinda new on this SEO stuff and there is something that I can't figure out how it works despite all the readings that I did.  I've developed a new website which allows users to add recommendations for every kind of bussiness, places, professionals, etc, so other people can see if travel to X place is worth it for example.  From what I've read so far (and from what I've understood, which are actually two different things haha) its important to make user and search engines friendly URLs and have proper keywords, title and h1 tags.  (I've read this post  and a few more)  That's not a problem because I can do that on server-side code, but what I actually don't understand is how Google shows pages that collect info from databases on his search results.  Lets put an example just to detail this a little bit more.  If we go to Google and search for "abercruz paginas amarillas" google show us a link that send us to a page from "paginasamarillas.com" which has all the details about that store.  Instead if we go to Google and type, "abercruz yousug" (which is my page) nothing shows up. I know that it could take a few days to Google to index my page but I don't understand HOW could Google "search" into my database (or page, or whatever) to end with the correct URL which shows the details of that Commerce   If someone could explain me that or help me a little bit understanding how to rank content that is generated from a database I will very grateful.  Thanks again!

What are the best ways to improve a site's position in the Google search results?


How many even integers lying between 1 to 10000 having distinct digit??

How many $4$ digit even numbers have all $4$ digits distinct ?   This question has been asked if we replace even with positive.   I was solving this Problem like: For first position $1-9$ (No $0$) for next $0-9$ (leaving out the digit which has been choose) for next $0-9$ (leaving out $2$ digits), but on last digit I get stuck. From what I should choose. Will it be $0, 2, 4, 6, 8$, because number needs to be even? How should I solve it?


I was google-ing and came across this question. Till now I don't have any solution.  Let $f$ be a double differentiable function on $(1,\infty)$. Let $M_0=\sup_{x\in R}|f(x)|$, $M_1=\sup_{x\in R}|f'(x)|$ and $M_2=\sup_{x\in R}|f''(x)|$. Prove that $M_1^2\leq 4M_0M_2$.  The only ideas that are striking me are Mean Value Theorem and Taylor's Theorem. How can this be solved?

Let $f:\mathbb{R} \to \mathbb{R}$ be a twice differentiable function. And let  $$\eqalign{   & M_0  = \sup \left|f(x)\right|  \cr                & M_1  = \sup \left|\frac{d}{dx} f(x) \right|  \cr                & M_2  = \sup \left|\frac{d^2}{dx^2} f(x) \right| \cr }$$ Prove that  $$M_1 ^2  \leqslant 4M_0 M_2$$ I can not think how I can relate these values in some inequality )=


I have two css files. One is GIT ignored and other is not.  I want to confirm which one is ignored and which one is not.  I can use following command to check if files are ignored.  git status --ignored  How to check for a specific file?

I am getting my feet wet with Git and have the following issue:  My project source tree:  / | +--src/ +----refs/ +----... | +--vendor/ +----...   I have code (currently MEF) in my vendor branch that I will compile there and then move the references into /src/refs which is where the project picks them up from.  My issue is that I have my .gitignore set to ignore *.dll and *.pdb.  I can do a git add -f bar.dll to force the addition of the ignored file which is ok, the problem is I can not figure out to list what files exist that are ignored.  I want to list the ignored files to make sure that I don't forget to add them.  I have read the man page on git ls-files and can not make it work. It seems to me that git ls-files --exclude-standard -i should do what I want.  What am I missing?


$$(\vec{a}+\vec{b})\cdot[(\vec{b}+\vec{c})\times(\vec{c}+\vec{a})]=2\vec{a}\cdot(\vec{b}\times\vec{c})$$   Is there an option to prove it using the properties of dot and cross product? or do I need to take a general vectors to show it? can I use vectors in $\mathbb{R}^2$

$$ [(\vec{a}+\vec{b})\times(\vec{b}+\vec{c})]\cdot(\vec{c}+\vec{a})=2\vec{c}\cdot(\vec{b}\times\vec{a})$$  I'm supposed to prove that this is true for all vectors $a,b,c$, but I keep getting $4(\vec{a}\times \vec{b})\cdot \vec{c}=0$, which is obviously not true.   Seems to me like there is a mistake in the problem, that it should be $\vec{a}\times\vec{b}$ instead of $\vec{b}\times\vec{a}$. Or I'm doing it wrong?  I'm using facts that $\vec{a}\times\vec{a}=0$ and $[\vec{a},\vec{b},\vec{c}]=[\vec{c},\vec{b},\vec{a}]=-[\vec{b},\vec{a},\vec{c}]$.


I have the following cron job command running once daily on my NAS device:  find /nfs/rpiggott/complete -mtime +45 -exec rm {} \;   I am wondering if there is a way to pipe a list that will result in the cron sending an e-mail to me showing what file it delete and / or any errors experienced.

How can I make crontab email me with the output of its jobs? I have MAILTO=redacted@yahoo.com.au above the jobs, but it doesn't work.  I know I need to use something like Postfix or Sendmail but for the life of me I cannot find out how to achieve this. I've searched and searched for a simple guide on setting up Postfix but they're all insanely complicated and expect you to be setting up a whole server to send and receive email and to know all the terms (like, what is a domain name for outgoing emails?).  All I want to do is have crontab email me. Why is this so difficult??  Additional Info:  My crontab file looks like this:  MAILTO=redacted@yahoo.com.au 1 0 * * * ~/Desktop/toskymesh.sh 59 6 * * * ~/Desktop/tooptus.sh 0 3 * * * snapraid sync   More Additional Info:  The output of ps -ef | grep '[s]endmail'  root 6840 1370 0 10:26 ? 00:00:00 sendmail: MTA: accepting connections   I know for sure cron is working, but I'm testing the mail command with echo Test | mail -s Test redacted@yahoo.com.au anyway.


my question is:  Let $f\in S(\mathbb{R})$, with $f(0)=0$, then there exists $g\in S(\mathbb{R})$ such that:  $$ f(x)=xg(x)\;\text{ for all }\;x\in \mathbb{R}.$$  I need to prove this.

I am seeing the Schwartz Space for the first time today and I have trouble understanding the following argument:  Given that $f \in S({\mathbb{R}})$ with $f(x_0) = 0$  Taylor's theorem  tells us that we can find a function $g \in C^\infty(\mathbb{R})$ such that \begin{equation} f(x) = g(x)(x - x_0) \end{equation} Hence, for $x \neq x_0$ we can write $g(x)$ as \begin{equation} g(x) = (x - x_0)^{-1} f(x) \end{equation} According to my notes, from this it should be clear that $g \in S(\mathbb{R})$, but how can I see this immediately ? In order to derive this I think would need to direvtly go via the definition, i.e. show for each $k,m = 0,1,2, \dots$ there exist constants $c_{k,m}$ such that \begin{equation} \sup_x |x^k g^{(m)}(x)| \leq c_{k,m} \end{equation}  or is there a shorter way to infer this ? By "shorter" I mean for example a statement that somehow the constants that bound $f$ are also bounds on $g$, probably with some amendment.  Edit: Does it maybe have to do with the fact that $f$, being smooth, has a Tayler expansion and so \begin{equation} g(x) = \sum^\infty_{n = 1} \frac{f^{(n)}(x_0)}{n!}(x - x_0)^{n-1} \quad (\text{note } f(x_0)) = 0 \end{equation}  Thanks for your help!


Suppose there are two users, say Bob and John who made comments on my post.  There is a situation I would like to address both of them in a single comment. However I can address them by @Bob and @John, but only typing the second person name (in this case John) manually, i.e. autocomplete will not popup.  The autocomplete will only show the first person name (in this case Bob) automatically but not the second person name.  Can the popup be displayed for the second user as well?

Now this is probably a surprise to many since I always see thousands of comments like :  @Sarfraz, @balpha just told you they did in the first comment he wrote. Also, allowing only one Stack Overflow user to be logged in per IP address would be problematic for networks with shared IPs.  What's surprising is that apparently the notification will trigger only for Sarfraz and not for balpha. As you can see from the :  Only one person can be replied to at a time in a comment. The first one in the string wins.  I propose to increase the limit to let's say 3 or 5 people; it won't hurt (never seen that feature being abused) and especially many people believe it already works that way.


How would one systematically obtain the formula for $$ 1^k+2^k+3^k+\cdots+(n-1)^k+n^k$$ for a fixed positive integer exponent k? I am aware of the formulas $$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}\quad ,\quad\sum_{i=0}^n i = \frac{n(n+1)}{2}\quad,\quad\sum_{i=0}^n i^3 = \left(\frac{n(n+1)}{2}\right)^2$$ i.e. when values of k are 1, 2 and 3. Using these can I use induction to proceed with the original sum?

I have been wanting to understand how to find the sum of this series.   $$1^p + 2^p + 3^p +{\dots} + n^p$$  I am familiar with Gauss' diagonalised adding trick for the sum of the first $n$ natural numbers.  I can prove the formulas for  $$\begin{align}   \sum_{1}^{n} k^2 &= \frac{n(n+1)(2n+1)}{6}\\  \sum_{1}^{n} k^3 &= \frac{n^2(n+1)^2}{4}\\ \sum_{1}^{n} k^4 &= \frac{n(n+1)(2n+1)(3n^2+3n-1)}{30} \\ \end{align}$$  With mathematical induction. But, beyond that even proofs with mathematical induction are difficult.  I'm interested in learning the theory and the proof behind Faulhaber's formula. What is the knowledge required to understand this proof ?