I know that we need to dispose of SPSite and SPWeb objects, especially in scenarios where we instantiate them or don't get them from context.   Other than these, which other objects in the SP Object Model should be disposed of?   Should we dispose of objects like SPFarm, SPWebServiceCollection, SPWebService, SPWebApplication, SPList, SPListItem, SPUser, SPGroup and so on? Or we need to dispose of only SPSite and SPWeb? This doesn't seem to be clearly documented. Please help.  Note: Though the below link talks about a few, it doesn't seem to be covering the list, which I have asked.

I need a list of SharePoint objects which need to be disposed.  This is for code analysis purpose. I have got a code review today and want a quick list of the objects to look out for in the code.  UPDATE Here is what to dispose and what not to dispose, if there is anything more to add then kindly advise:-  Dispose the SPWeb obtained by iterating over the Site.AllWebs collection  SPC110201: Dispose created SPSite objects  SPC110203: Dispose SPWeb objects created with SPSite.OpenWeb  SPC110204: Dispose SPSite objects created with SPSite.SelfServiceCreateSite  SPC110205: Dispose SPWeb created by SPLimitedWebPartManager  SPC110211: Dispose SPSite created by SPSiteCollection.Add  SPC110212: Dispose SPSite created by SPSiteCollection[] index operator  SPC110213: Dispose SPWeb created by SPWebCollection.Add  SPC110214: Dispose SPWeb created by SPWebCollection[] index operator  SPC110231: Do not dispose SPListEventProperties.Web  SPC110232: Do not dispose SPWebEventProperties.Web  SPC110233: Do not dispose SPItemEventProperties.Web  SPC110234: Do not dispose SPItemEventProperties.ListItem.Web  SPC110235: Do not dispose SPItemEventProperties.Web.Site  SPC110236: Do not dispose SPItemEventProperties.ListItem.Web.Site  SPC110237: Do not dispose SPFeatureReceiverProperties.Feature.Parent  SPC110241: Do not dispose SPSite.RootWeb  SPC110242: Do not dispose SPWeb.ParentWeb  SPC110243: Do not dispose SPList.ParentWeb  SPC110244: Do not dispose SPSite returned by SPControl.GetContextSite  SPC110245: Do not dispose SPWeb returned by SPControl.GetContextWeb  SPC110246: Do not dispose SPSite returned by SPContext.Current.Site  SPC110247: Do not dispose SPWeb returned by SPContext.Current.Web  SPC110261: Close PublishingWeb created by PublishingWeb.GetPublishingWebs[] index operator  SPC110262: Close PublishingWeb created by PublishingWeb.GetVariation  SPC110263: Close PublishingWeb created by PublishingWebCollection.Add  SPC110281: Dispose SPSite created with UserProfiles.PersonalSite  Reference:


I have Google Sheet connected via Zapier to automatically add a new row to my spreadsheet everyone time someone fills out a satisfaction survey on my website. I have =AVERAGE(F3:F) as the top row to show running averages of numerical values.   Problem is, when Zapier adds a new row, it seems to use the "Insert 1 Above" on Row 3, thus the formula changes automatically to =AVERAGE(F4:F) and the cell outputs #DIV/0! divide by zero error. How to avoid this?

I have this, in D1:  =sum(D3:D)   I want D1 to always be the sum of the rest of column D (D2 is a header)  I sometimes move a row, from eg 8 to 3, and that causes D1 to change to sum(d4:d).    I want D1 to stay as my sum of the column.


In ED definition we need for all $a, b$ not zero then there exist $q$ and $r$ such that $a = bq+r$ with some condition with respect to norm.   Actually I am interested whether $q$ and $r$ are unique in ED or not  Further Questions: 1. Can we define some norm in ED with respect to which q and r are unique    And in how many ways we can define such norms   If it is not possible what algebraic structure like this i.e. ED with uniqueness of q and  r, has some special properties.

Let $R$ be a Euclidean domain in which the quotient and remainder are always unique. Does it follow that the ring $R$ is either a field or a polynomial ring $F[X]$ for some field $F$?


I have html table like this:

       1

     and jquery like this:  $(function() {     $("#recommendation tr").mouseenter(function()     {            alert("Yes");     } }   and everything works fine. But when I change html of recommendation with this:   $.post("path/script.php", {dataIn: dataInEncoded}, function(data, status) {     if(status == 'success')     {         $("#recommendation").html(data);         /*(data exactly the same as default html)

                1

         */     } }   Jquery mouseenter suddenly doesn't work (trigger).

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


Just found out that matchAll is not supported by many browser versions.  Is there an ES5 safe alternative for the string.prototype.matchAll method?  const regexp = /(?:\[(.*?)\]\((.*?)\))|([^[]+)/g; const matchedElements = Array.from(value.matchAll(regexp));

I want to match a portion of a string using a  and then access that parenthesized substring:  var myString = "something format_abc"; // I want "abc"  var arr = /(?:^|\s)format_(.*?)(?:\s|$)/.exec(myString);  console.log(arr);     // Prints: [" format_abc", "abc"] .. so far so good. console.log(arr[1]);  // Prints: undefined  (???) console.log(arr[0]);  // Prints: format_undefined (!!!)   What am I doing wrong?    I've discovered that there was nothing wrong with the regular expression code above: the actual string which I was testing against was this:  "date format_%A"   Reporting that "%A" is undefined seems a very strange behaviour, but it is not directly related to this question, so I've opened a new one, .    The issue was that console.log takes its parameters like a printf statement, and since the string I was logging ("%A") had a special value, it was trying to find the value of the next parameter.


I can't find any vestige on how to accept an answer. I had some good answer on my Questions and I must accept 'em, but I can't find where is this feature. Thanks in  advance!

What does it mean to accept an answer? How do I accept an answer, and what are the rules? Can I accept my own self-answer? What are the reputation benefits? Which answer should I accept? Should I upvote the accepted answer? What should I do if none of the answers are suitable?      For more information, see "" in the .


I would like to remove third-party menu bar elements, e.g. a menu left by an application which I have removed from the Applications folder.  I know that I can rearrange the elements if I command-click and drag them. And if they are made by Apple, control-dragging them away from the menu bar removes them. But with third-party elements the control-drag only allows for the rearrangement, but not for the removal.  I am looking for a method valid for any third-party elements, but to be specific, an example is Coppertino VOX music player, which has a menu item to manage the cloud library.  - List item

I have a rogue item on my menu bar from a terrible piece of printer/scanner software. I long ago removed the app, but the button for the app remains in the menu bar.   Is there any central way for me to remove an item from the menu bar? Any plist I can hack? command line trick, etc?  It's the one to the left of the Facebook icon:    (I tried holding Command and dragging it away, but it doesn't seem to respect that convention.)


Let $G$ be a topological group with identity element $e$. Let $f,g: (S^1, (1,0)) \to (G,e)$ be loops in $G$ with base point $e$.  We define $f * g: (S^1, (1,0)) \to (G,e)$ by $$f * g(s) = f(t) \cdot g(t)$$ where $\cdot$ is the group multiplication.  Then $fg$ and$ f*g$ are homotopic.  [Note: $fg$ denotes the "concatenation" of $f$ and $g$, i.e. we first walk the $f$ and then $g$, both at double speed.]  So we need to find a homotopy from $fg$ to $f*g$. I've tried writing down various possible homotopies but none of them worked and I can't seem to figure it out. I appreciate any hint.

Let G be a topological group and let $s_1$ and $s_2$ be loops in G (both loops are based at the identity e of G). Is it true that the loop $s_1s_2$ (where the multiplication is the one of the group structure of G) is equal, in $\pi_1(G,e)$, to the loop $s_1*s_2$ where this product is given by first going around $s_1$ and then $s_2$ (i.e., do we have $[s_1s_2] = [s_1*s_2]$)? If yes, what is the proof for this?


I'm trying to make rice crispy treats but I have no marshmallows, gelatin or eggs What can I do

I'm making rice krispies cakes, but I just realized I'm out of gelatin and marshmallows. My mate suggested mixing normal granulated sugar with some water and it will give me the stickiness I need. Is he right? If not sugared water, what else could I use here?


What labeling settings do I need when I have a polygon layer with several areas that have touching borders. I want labels that follow the border of each object INSIDE itself even if that means that the label is upside down. This is a often used style seen in maps.

I'm using QGIS 2.6.1 and would like to label US state polygons such that each border is lined with the label of its two states. Something like this:        It appears that the current labeling engine only offers the ability to label above, on, or below the line. This results in something that looks more like this:        What I need is options for interior vs exterior labeling. Is there some way that I can achieve this effect? Any tips?


Not sure which of  I have:     ...the  Mini Tower, Desktop, Small Form Factor, or the Ultra Small   Form Factor   but it's probably either the mini tower or desktop.  I can say that the DVD drive is sideways, indicating, at least to me, that the system is at least capable of working horizontally.  Perhaps even preferably?  In any event, provided the system is powered off, I can't imagine it makes a difference either way??  system:  thufir@dur:~$  thufir@dur:~$ sudo dmidecode | grep -A3 '^System Information' System Information     Manufacturer: Dell Inc.     Product Name: OptiPlex 790     Version: 01 thufir@dur:~$    which is perhaps not as  as I'd hoped...

I've noticed on many small PC cases that the hard drives are installed vertically. In midi cases, towers and others of a larger housing, they are in the horizontal position.  What impact on a hard drive does a vertical position have? Does it affect the life? Is it more prone to errors?  (Not of SSDs (solid-state drive), just plain hard drive with all its mechanical parts inside.)


I've already tried the answers from  and  and neither fixed my problem.  In Notepad++ using the Obsidian theme, the syntax highlighting for JSON files disappears; everything is white on black. I could go through and change them manually, but instead I would rather just use the JavaScript style instead (which does work).  I can do this with Language --> JavaScript, but if I close the file and reopen it doesn't stick.   When I try the solutions tagged above it does not work for me because JSON already has an entry and it is using the default JSON style instead of the JavaScript style. I want to override the existing style and use the JavaScript style instead.

In the current version of Notepad++ opening .sql files results in Notepad applying SQL syntax highlighting to it. I'd like Notepad++ to do the same for other extensions as well, is there some setting where I can define this?


जिन खोजा तिन पाइया, गहरे पानी पैठ, मैं बपुरा बूडन डरा, रहा किनारे बैठ।   How can I write this?

I am writing a thesis and have to write some Hindi words using LaTeX. When I use  \usepackage{devanagari}   removed. For example:  {\dn school}    the output generated is     I want output to be like this: स्कूल


I have an SSD as my main Windows drive, with a 640GB 2.5" HDD, partitioned to store programs and user settings, and also to act as backup (it's the only thing I had lying around at the time of building my PC).  The problem is that whenever I install a program, it installs to C:\Program Files [(x86 for the 32 bit programs]\, although I have changed the environment variables. This wouldn't normally be an issue, however every installation program points its shortcut to my 640GB HDD.  The root layout of both drives:   To clarify:   Program files get installed to C:\ Program shortcuts are always pointed to Z:\, my 640GB HDD   Modifying the relevant environment variables doesn't do anything, I looked at , but however it only talks about modifying the registry and environment variables, which I have already done so.  I install to the Z:\ drive if the installation program lets me change the installation path, but however the installation programs sometimes don't let me change this.  Is there a way that I can force every program to install to the relevant location on Z:\, but at the same time move any programs currently installed to the new location? Perhaps I'm missing something here?  My target is to have every program installed on Z:/, with only the core Windows operating system on C:/.  Found ; would it be appropriate to use in my case? I would be able to move the entire Program Files (and its x86 version) to Z:\, without impacting on the performance.*

Windows 7 is installed on my C drive, which is quite small.  I am very tired of instructing new programs to put their files on my larger D drive during installation; I would like to change the default drive.   says that you can use a registry hack, but I am giving Microsoft the benefit of the doubt and naively assuming that a configuration option exists somewhere.  It's 2010... do I really have to hack my registry to make a simple tweak like this?  Also, there's a  that explains how to move the "Users" directory and create a symlink, which could also work.  However, at the moment I have some apps in C:\Program Files, some apps in C:\Program Files (x86), and some apps in the corresponding folders on D:\, so it would be a hassle.  Also, my small OS boot drive is a 10k RPM WD Raptor, and I feel like that probably gives a speed boost to apps installed on it that need to read & write to their directories a bunch.  I wonder if it actually matters.


I'm getting the following error whenever I try to install a package or update.  ubuntu@ip-172-31-60-64:~$ sudo apt-get update Err:1 http://archive.ubuntu.com/ubuntu xenial InRelease Temporary failure resolving 'archive.ubuntu.com' Err:2 http://security.ubuntu.com/ubuntu xenial-security InRelease Temporary failure resolving 'security.ubuntu.com' Err:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease Temporary failure resolving 'archive.ubuntu.com' Err:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease Temporary failure resolving 'archive.ubuntu.com' Reading package lists... Done W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Temporary failure resolving 'archive.ubuntu.com' W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-backports /InRelease  Temporary failure resolving 'archive.ubuntu.com' W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Temporary failure resolving 'security.ubuntu.com' W: Some index files failed to download. They have been ignored, or old ones used instead.   I've seen other answers relating to this problem. But, none of them worked. The instance is running in AWS and the traffic rules are properly set.  Ifconfig output as follows..  ifconfig eth0      Link encap:Ethernet  HWaddr 12:d2:b3:9a:b4:c8       inet addr:172.31.60.64  Bcast:172.31.63.255  Mask:255.255.240.0       inet6 addr: fe80::10d2:b3ff:fe9a:b4c8/64 Scope:Link       UP BROADCAST RUNNING PROMISC MULTICAST  MTU:9001  Metric:1       RX packets:3436 errors:0 dropped:0 overruns:0 frame:0       TX packets:3359 errors:0 dropped:0 overruns:0 carrier:0       collisions:0 txqueuelen:1000       RX bytes:277901 (277.9 KB)  TX bytes:307892 (307.8 KB)  lo        Link encap:Local Loopback       inet addr:127.0.0.1  Mask:255.0.0.0       inet6 addr: ::1/128 Scope:Host       UP LOOPBACK RUNNING  MTU:65536  Metric:1       RX packets:8 errors:0 dropped:0 overruns:0 frame:0       TX packets:8 errors:0 dropped:0 overruns:0 carrier:0       collisions:0 txqueuelen:1       RX bytes:480 (480.0 B)  TX bytes:480 (480.0 B)  tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00       inet addr:10.8.0.1  P-t-P:10.8.0.2  Mask:255.255.255.255       UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1       RX packets:0 errors:0 dropped:0 overruns:0 frame:0       TX packets:0 errors:0 dropped:0 overruns:0 carrier:0       collisions:0 txqueuelen:100       RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)   The nslookup is...  nslookup archive.ubuntu.com ;; connection timed out; no servers could be reached   This question has been marked as duplicate. But, the original question did not resolve my issue.  Contents of /etc/hosts     127.0.0.1 localhost    127.0.1.1 ip-172-31-60-64     # The following lines are desirable for IPv6 capable hosts    ::1 ip6-localhost ip6-loopback    fe00::0 ip6-localnet    ff00::0 ip6-mcastprefix    ff02::1 ip6-allnodes    ff02::2 ip6-allrouters    ff02::3 ip6-allhosts

When I run sudo the terminal is stuck for a few seconds and then outputs an error message. My terminal looks like this:  ubuntu@(none):~$ sudo true sudo: unable to resolve host (none)   What can I do to solve it?


I am self studying, and this question is from Fulton's Algebraic Curves (question 1.50 (b))  1.50∗. Let K be a subfield of a field L. (a) Show that the set of elements of L that are algebraic over K is a subfield of L containing K. (Hint: If $v^n +a_1v^{n−1} +···+a_n = 0$, and $a_n \neq 0$, then $v(v_{n−1} +···) = −a_n$.) (b) Suppose L is module-finite over K, and K ⊂ R ⊂ L. Show that R is a field.  I could do (a) but I cannot do (b). I cannot think of any specific examples, and don't know how to begin the proof.  It seems like there needs to be at least some sort of condition on R (like that it is a subring of L), but that is not given.

This is an exercise in some textbooks.     Let $E$ be an algebraic extension of $F$. Suppose $R$ is ring that contains $F$ and is contained in $E$. Prove that $R$ is a field.   The trouble is really with the inverse of $r$, where $r\in R$. How to prove that $r^{-1}\in R$, in apparent lack of a characterization of $R$.  It occurred to me to use the smallest field containing $R$ ($R$ is easily shown to be an integral domain), that's the field of quotients, and proving that it's $R$ itself, but I don't really know how to proceed.  A not-too-weak, not-too-strong hint will be much appreciated.   Beware $ $ Readers seeking only hints should  beware that there is now a complete answer.


I have been searching SO to find the correct way to use a var as part of a regex . The idea is to get each of the searchable fields on the page and check if the text contains the search term, then if so, replace that portion of the text and wrap it in a styled span. this is the part of the code which is not working correctly, "/\\"+src+"/gi",    $('.srch').each(function () {          var txt = $(this).text(),             src = $('#Srch_Srch_txt').val();          var s = txt.replace("/\\"+src+"/gi", '' + src + '');          $(this).html(s);      })   Thank you in advance, Will.

I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it.  However, I can't figure out how to pass a variable in to a regex.  I can do this already which will replace all the instances of "B" with "A".  "ABABAB".replace(/B/g, "A");   But I want to do something like this:  String.prototype.replaceAll = function(replaceThis, withThis) {     this.replace(/replaceThis/g, withThis); };   But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string?


Class bench is program for Linux,Classbench duty is create packets and generate some rules which they call them filter set.In class bench there is three folder:   trace_generator db_generator  parameter_files   Note: trace_generator's duty is to generate packets, db_generate's duty is create filter set, paremeter_files is like library.  Ok ,Know how to install db_gerater and trace_generator? simple! just go to their path and write "make all".Know If you want to run db_generater you should just type this command   db_generator -bc acl3_seed 10000 2 0.5 -0.1 MyNewFilters10k but when I write that I saw linux terminal does not support this I search and find I have to add this to my bashrc also I typed !/.bashrc but now I do not know what I should add here.  Before that I installed NS2 which is network simulator I wrote something about NS2 in there but now for classbench I do not know what I should add here? By the way acl3_seed in the parameter_files

I have an executable. I want to execute the executable in terminal with name only like other commands.  I can put my executable in /usr/local/bin or I could add its PATH to ~/.bashrc. Both will work.  What is better?  Is there  any difference?


In obstetrics there is a notion of a delivery without labor via c-section under anasthesia. Is there a practice of vaginal delivery under anasthesia?

Assuming a pregnant lady who is in a comatose state is in the hospital and hooked to IV's and such (and under the watchful eye of the doctor), would her body instinctively contract to the degree where she would be fully dilated and be able to deliver a vaginal birth?   I know that in most cases, it would be c-section, no doubt, but this is just a hypothetical question on whether or not it is even possible.     Can a pregnant woman in a coma still be able to give a vaginal birth? Will her body instinctively contract?


I was thinking about the infinite expression:  $$\sqrt{6+\sqrt{6+\sqrt{6+...}}}$$  It seems to me a bit informal or underspecified. You could state it better by defining an infinite series:  $$a_n = \sqrt{6+a_{n-1}}$$  And then ask about $\lim_{n\rightarrow\infty}{a_n}$. But then you have to wonder what $a_0$ is. Although anyway it's not too hard to figure out that if $a_0 \geq -6$, then the limit is 3. I fully understand this is the typical treatment and has been covered before. But where does this $a_0 \geq -6$ come from? Is there a way to evaluate it without making any assumptions like this?  It also dawned on me that maybe you could also define this sequence going "outside-in" instead of "inside-out". For instance:  $$b_n = b_{n-1}^2-6$$  But this seems a bit more unruly. It diverges for values other than $3$ and $-2$.  So I guess my question is: is that original expression just underdefined, and requires a small "leap" to formalize? Or is there a better way to treat that kind of thing strictly? Are there examples of similar expressions where the "informality" is troublesome - like maybe there's more than one way to formalize it that leads to different answers?

(Fitzpatrick Advanced Calculus 2e, Sec. 2.4 #12)  For $c \gt 0$, consider the quadratic equation $x^2 - x - c = 0, x > 0$.  Define the sequence $\{x_n\}$ recursively by fixing $|x_1| \lt c$ and then, if $n$ is an index for which $x_n$ has been defined, defining  $$x_{n+1} = \sqrt{c+x_n}$$  Prove that the sequence $\{x_n\}$ converges monotonically to the solution of the above equation.  Note: The answers below might assume $x_1 \gt 0$, but they still work, as we have $x_3 \gt 0$.    This is being repurposed in an effort to cut down on duplicates, see here: .  and here: .


I like the way contractions operate and I know the difference between "it's" and "its" based on contraction and possession. That is, "it's = it is" and "its" is possessive.   However, there are some sentences when I feel justified in replacing "it is" with its contraction, but for some reason it doesn't sound right nor does it read correctly to me:     The method won't be approved because of how difficult it is to implement.   compared to     The method won't be approved because of how difficult it's to implement.   Is this a correct (or uncommon) usage of the contraction "it's"? Why does it sound awkward when spoken?

I heard this lyric in a song the other day and it just sounded so wrong that I assumed it must be incorrect grammar, but I can't find any specific prohibition that applies.     That's what it's.    That rolls off your tongue with the grace of a moose in a tutu, but I can't figure out why.  There is clearly no problem with ending other sentences with a contraction. These sound fine.     I thought I could, but I can't.   Stop touching that, it will fall off if you don't.   You say that the sky is green, but it isn't.   Also, it sounds just fine if you remove the contraction:     That's what it is.   So what's up with this construction? Should it be avoided?


If $A$ and $B$ are square matrices, and $AB=I$, then I think it is also true that $BA=I$. In fact,  says that this "follows from the associativity of matrix multiplication". I assume there's a nice simple one-line proof, but can't seem to find it. Nothing exotic, here -- assume that the matrices have finite size and their elements are real numbers. This isn't homework (if that matters to you). My last homework assignment was about 45 years ago.

If $A$ and $B$ are square matrices such that $AB = I$, where $I$ is the identity matrix, show that $BA = I$.    I do not understand anything more than the following.   Elementary row operations. Linear dependence. Row reduced forms and their relations with the original matrix.   If the entries of the matrix are not from a mathematical structure which supports commutativity, what can we say about this problem?  P.S.: Please avoid using the transpose and/or inverse of a matrix.


I have an error on Ubuntu 16.04 when I use   sudo apt-get upgrade

OS: Ubuntu 12.04  Accidentally deleted dpkg. Now, packages can't be installed. So, needs an dpkg installer which installs packages.


Can I make a list of people who send me mail in gmail?  If so, How Can I do that?

How can I export a list containing e-mail addresses for everyone that has sent me an e-mail?  I have all of the messages archived.


I am reading a new popular science book where a thought experiment proposed by Albert Einstein is explained.  It is a thought experiment with a light clock. The light clock is emitting light straight into a mirror, the mirror reflects the light and when the light makes the round trip clock-mirror-clock this registers the passage of a certain amount of time, e.g. 1 millionth of a second.  In the first part of the experiment the clock is standing in a train which is not moving so the clock and the mirror are still. As seen in the first picture (below).    In the second part of the thought experiment the train is moving and the book suggests that the light travels a longer distance because the train is moving and therefore it kind of travels on a diagonal as presented in the second picture (below).    Now I disagree with this suggestion. I see no reason for the light to change trajectory or travel a longer distance. I argue that even when the train is moving the first picture still holds true.   There is also one more thing that it seems to me is wrong with that picture. There is no mirror against the clock at t0, no clock against the mirror at t1 and again no mirror against the clock at t2. This placement of the clock and mirror in time is crucial because it results in the longer diagonal path of the light but the clock and the mirror are moving at the same time! So the only illustration that makes sense is one where the clock is always against the mirror.  In the experiment it is said that light travels a longer trajectory with reference to an observer outside of the train standing still beside the railway.  I think that the train travels with reference to the still observer but the light travels with reference to the train. So I argue that regardless of whether the train is moving or not the light travels the same distance for the same time.  After all when it comes to measuring distances the reference is central.  More food for thought: It could just as well be a ping pong (table tennis) ball clock. If you are playing table tennis on a train the ball travels directly along the length of the table while the train is moving, would you suggest that the ball is traveling on a diagonal trajectory? I think not.  Please share all your arguments.

Imagine that a mast of a sailboat is $186,000$ miles long, and the sailboat is moving to the right at a constant $10$ miles per second. If you drop a ball from the top of the mast, the ball will land exactly at the base of the mast. The ball has two components to its velocity. If the experiment is repeated with a pulse of light instead of a ball, then the pulse of light only has one component of velocity. The pulse of light is going directly down at $186,000$ miles per second, but the pulse of light is not going to the right at $10$ miles per second since the speed of light is independent of the speed of the source of light. Therefore, I would assume the pulse of light would miss the base of the mast by $10$ miles. Would the pulse of light actually hit the base of the mast?


What preposition should I use in this phrase?     In spite of the popularity of modern international music, the traditional music still the more significant and precious thing to/for me.    Should I say "to me" or "for me"?

I cannot easily figure out which one is more appropriate to use:     It's important to me.        It's important for me.   Are they the same? If not, what's the difference?


There is an errors when executing,the error as follows.  pccs063@pccs063-System-Product-Name:~$ mongo MongoDB shell version: 2.4.14 connecting to: test Fri May 13 13:03:55.501 Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145 exception: connect failed

I had mongdb installed and evrything was working fine. I wanted to delete the mongodb lock. By mistake the directory /var/lib/mongodb/ got deleted.  So, I uninstalled mongo db and installed again. But now i always keep getting this error:  Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145 exception: connect fail   The error remains same even if I try to login from terminal or rockmongo or my application. I am using ubuntu12.04 and have latest version of mongo.


Last night I had 3 or 4 comments on a post I made at the URL:    Now, when I go back to that question, the short discussion is gone.  Did someone delete them? They were completely appropriate questions relative to my question.

After reading this question:  I think the reason for deleting all comments is when so much of them are rude or offensive.  But this question:  didn't have any rude or flagged comments so why are all comments deleted in it?


When I use "there are:" (with a colon) to introduce a list starting with a singular item, should I use "there is" or "there are"?  According to grammar rules, I should use "there is" if the following item is singular, but in this case the colon introduces a plural group.  For example:     In my room there [is/are]: a bed, 2 chairs, a table, 2 carpets and a wardrobe.

It seems I put a   Bounty assigned by outside party, two lengthy, reference-citing answers, one "-1" (awarded the bounty), one "-2", two others scored "0" and "-2" respectively, the answers suggesting one or the other is correct, 73 comments and no consensus so far - and me, as the asker, lost without a clue what to think of the answers anymore -  this is no longer "Learners' Level" question, so I thought I'd bring it here and hear what the experts have to say.    Original question:  Plurality of verb depending on plurality of list elements  An edit was suggested to my sentence.     There was were an orange, some grapes, two apples and a small pile of cherries on the plate.   In my native language plurality of the verb always follows plurality of the first element on the list. There were an orange,... sounds awkward to me, no matter what follows up. My simple solution was reordering:     There were some grapes, an orange, two apples and a small pile of cherries on the plate.   But that's not the first time I faced this situation and I'd like to know what the rules of grammar say about that - was my editor overzealous or am I trying to copy rules of my language that don't apply in English?    Someone linked a  for negatives, where the situation is more clear-cut ("There is no..."). Same applies to connection with "or" apparently, per accepted answer there. Still, nothing for "and".  It seems there is a consensus that in that if the verb goes after the list, it will be plural.     an orange, some grapes, two apples and a small pile of cherries were on the plate.   There doesn't seem to be clear consensus for:     On the plate { was | were } an orange, some grapes, two apples and a small pile of cherries   Adding more to the confusion is the abbreviated form: "There's"     One last note. In North America, at least, there is a widespread use of using a singular form like "there is" and "there was", without regard for the subject item or items, and this "there is" is often shortened to "there's":           There's three apples on the table!      Could you please clarify this mess?


Suppose Alice, Bob and Carol are playing a number guessing game, in which Alice, Bob and Carol pick a number from $[0, 1]$ sequentially i.e. first Alice then Bob and then Carol. After that, a random number $X$ is drawn from the uniform distribution $U[0, 1]$, and the person whose number is closest to $X$ wins (in terms of absolute differences). Suppose all the three players are smart and want to win, then which number should Alice pick?  An obvious choice seems to be $0.5$, and we can indeed prove that in this case Bob and Carol will have to both pick $0.5$ also - let's say Bob pick any $a<0.5$, then Carol would just pick any $b>0.5$ such that $|b-0.5|<|a-0.5|$ to have a strictly greater probability to win than Bob, which implies Bob wouldn't pick any number other than $0.5$, and thus Carol also has to pick $0.5$ too. So, Alice picking $0.5$ will definitely result in a draw.  My question is, does there exist other choices that can give Alice a strict advantage over Bob and Carol?

Suppose three players play the following game: Player 1 picks a number in $[0,1]$. Then player $2$ picks a number in the same range but different from the number player $1$ picked. Player $3$ also picks a number in the same range but different from the previous two. We then pick a random number in $[0,1]$ uniformly randomly. Whoever has a number closer to the random number we picked wins the game. Assume all players play optimally with the goal of maximizing their probability of winning. If one of them has several optimal choices, they pick one of them at random.  1)If Player 1 chooses zero, what is the best choice for player 2?  2)What is the best choice for player 1?  I have some trouble seeing how this problem is well-defined. For instance, if Player $1$ picks $0$ and Player $2$ picks 1, then I cannot see what the optimal choice would be for the last player since he has to pick different numbers. Can someone help?  EDIT: I now understand better how the problem works, but I still have no idea how to approach this. Can someone give me some hints?


My question may not belong to SuperUser; however, I have come across a URL that crashes (closes, to be precise) Chrome browser unexpectedly. Add %%30%30  to the end of any URL would instantly crash Chrome. In some cases the browser with all opened tabs crashes, so as Chrome, and others only the current tab. How To Reproduce Add %%30%30 like http://domain.com/%%30%30 (Do NOT hover on this link) Hovering on the link, or pasting in address, and hitting enter would crashes Chrome. decodeing %%30%30 using  give us %00. Example http://example.com/%%30%30 So why does Chrome can't handle %00 in URLs? Edit I am using Chrome 45.0.2454.93 on Windows 8 x86 (32-bit); I have tested it as well on Android 5.0.1 Chrome 45.0.2454.84. It seems to have an effect on mobile as well.

When this link (http://a//%%30%30) is clicked in Google Chrome, Chrome breaks and closes all tabs and instances.   But, in some cases I only need to hover over the link, and the tab crashes.  What happens when I hover over this link? I mean, what does Chrome do when a link is hovered over?


I have a .wrapper with dynamically generated content(tasks). Each .task has a data attribute that I'm trying to use for allowing me to make this filterable with preset buttons but it doesn't seem to be working for new incoming data. Only works for the html on the page already on load.

Call Bob

Pay Bills

Ship Package

Buy Groceries

   <button id="filter-urgent">Urgent</button>   <button id="filter-veryurgent">Very Urgent</button>   <button id="filter-canwait">Can Wait</button>
        The problem I'm having is as soon as new tasks come in(from external API in html format with data-type attributes already), all dynamically inserted tasks ignore the filtration.

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


I know the number of files in my \data directory (n). I want to do something like that:  #include <string> #include <fstream> ifstream myFile;  string filename; for(int i=0;i<n;i++) {     filename=//call i'th file from the \data directory     myFile.open(filename);     //do stuff     myFile.close(); }      How can I do that?

How do you iterate through every file/directory recursively in standard C++?


Firstly, sorry if that's a stupid question. I'm kinda noob :P The thing is that "normal" rendering with GPU is slower than rendering in preview. I made sure that the resolution in which I render is the same as in the preview but it's still slower as if it was rendered with CPU.

When I'm using rendered viewport it initially takes a while before rendering starts, but once it does, I can freely move around and rendering a new view happens almost instantaneously. When on the other hand I'm rendering a movie, for each frame Blender takes a significant amount of time before rendering even starts, usually doing the following:  Synchronizing object, Updating images, Updating meshes, Updating Scene BVH, Packing BVH,  Why does it do this? And is it possible to disable this to increase movie rendering speed?


How to check my two disks at startup (they're in BIOS RAID 1)?  I am on Linux Mint 17.2.  computer user # blkid /dev/sda1: UUID="6042-870C" TYPE="vfat"  /dev/sda2: UUID="2ef42e6f-4987-46e5-aca9-872fd70a9f9e" TYPE="ext2"  /dev/sda3: UUID="Oz0elc-zUuh-BAK1-i19b-RZZU-YREm-DxVaNi" TYPE="LVM2_member"  /dev/sdb1: UUID="6042-870C" TYPE="vfat"  /dev/sdb2: UUID="2ef42e6f-4987-46e5-aca9-872fd70a9f9e" TYPE="ext2"  /dev/sdb3: UUID="Oz0elc-zUuh-BAK1-i19b-RZZU-YREm-DxVaNi" TYPE="LVM2_member"  /dev/mapper/mint--vg-root: UUID="98a7a4a2-6e71-4aa9-ab48-5c4fc619c321" TYPE="ext4"  /dev/mapper/mint--vg-swap_1: UUID="b62721cf-7b54-4400-92f0-f8f776566c99" TYPE="swap"

Yesterday, one of our computers dropped to grub shell or honestly, I am unsure what shell it was when we turned on the machine.  It showed that it can't mount the root filesystem or something in this sense, because of inconsistencies.  I ran, I believe:  fsck -fy /dev/sda2   Rebooted and the problem was gone.  Here comes the question part:  I already have in her root's crontab:   @reboot /home/ruzena/Development/bash/fs-check.sh    while the script contains:  #!/bin/bash touch /forcefsck   Thinking about it, I don't know, why I created script file for such a short command, but anyways...  Further, in the file:  /etc/default/rcS   I have defined:   FSCKFIX=yes    So I don't get it. How could the situation even arise?    What should I do to force the root filesystem check (and optionally a fix) at boot?  Or are these two things the maximum, that I can do?  OS: Linux Mint 18.x Cinnamon 64-bit.  fstab:  cat /etc/fstab | grep ext4   shows:   UUID=a121371e-eb12-43a0-a5ae-11af58ad09f4    /    ext4    errors=remount-ro    0    1    grub:   fsck.mode=force    was already added to the grub configuration.


I would like to draw a punchcard in Latex as shown below.  But i just can't find any information how to do this (not even in the manual of tikz). The only thing i can find is information about bubble charts (with x and y axis) I would like to get the data from a csv-file, for example with the command:  \addplot table {table.csv}   Link to my data as .ods-file:   as csv-file (without headers):      Source of that image is the article of Maalej and Robillard: Patterns of knowledge in API reference documentation

Is it possible to create a punchcard so it will look like the same on  with the help of pgfplots?  The data stored in punchcard.dat:  0 Monday 18 1 Monday 67 2 Monday 62 <hour> <day> <commits>


I'm on Ubuntu 17.04 and I recently installed the xdm package by accident, thinking it stands for Xtreme Download Manager. Now I have a black screen on Ubuntu. Before I log in, a window appears and it says:  Welcome to Ubuntu login: password:   After logging in using this black screen, I tried this command:  unity --reset   The problem is, I have lost all of my settings after running this command. And secondly, I see this black screen every time I log in.   What should I do?  Is there a way to fix this problem without removing nvidia? like:  sudo apt-get remove nvidia-*   I also tried these commends:  sudo apt-get install ppa-purge sudo ppa-purge ppa:unity-team/staging  sudo apt-get update sudo apt-get install --reinstall ubuntu-desktop sudo apt-get install unity   Nothing happened!  If it matters, note that in BIOS boot menu I chose legacy mode because I'm using Kali and Ubuntu (dual boot).

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


I have a sequence of numbers  like 1,7,22,45,12,96,21,45,65,36,85,14,51,16,18,17,16....65...     IS there any formula to check whether the sequence is random or not ?   In my case   odd  numbers are not random since previous+2  even numbers are not random  the numbers can be repeated in a sequence but must be far away, we cannot generate the sequence using any formula like  (x+2)^2 -2x like...

Is there a reasonable statistic test one can do to standard random number generators (say, one of those that come built in in Python libs) which shows they are not really random?  (By reasonable I mean to exclude silly things like «generate a looong list and see that it is periodic»)  Later: Notice I am looking for a test that fails on standard generators.


I have 20GB for my Mint-KDE 18 root partition. There is no extra home partition. I am doing nothing special, just Chrome, KRDC, Teamviewer and the partition was half empty. One thing I did was copying in Dolphin from webdavs repo on the internet to my network drive via samba. Nothing was stored on my PC.  Now I got the message that my disk is full. When I open my root or home directory in Dolphin it says 0 MB free.   What is the fastest way via terminal to view my directories and files, biggest first or newest etc?

When administering Linux systems I often find myself struggling to track down the culprit after a partition goes full. I normally use du / | sort -nr but on a large filesystem this takes a long time before any results are returned.  Also, this is usually successful in highlighting the worst offender but I've often found myself resorting to du without the sort in more subtle cases and then had to trawl through the output.  I'd prefer a command line solution which relies on standard Linux commands since I have to administer quite a few systems and installing new software is a hassle (especially when out of disk space!)


Anyone manage to get thumbnails for GIF files working in 18.10? None of the previous methods for adding a custom thumbnailer seemed to work for me like it did in past Ubuntu versions.

Recently I had a bunch of my own scripts for the thumbnails in Nautilus: , , office documents and so on.  Seems like either I’m doing something wrong (thumbnail generation behavior changed), or custom thumbnailes don’t work in latest GNOME at all, even my previous scripts, which worked smoothly on previous versions of Ubuntu.  I’ve done some research, tried to run a simple script (see below) and it didn’t work out.  My test thumbnailer in /usr/share/thumbnailers/z.thumbnailer:  [Thumbnailer Entry] Exec=/home/maximal/thumb.sh %s %i %u %o MimeType=image/webp;image/x-webp   Where /home/maximal/thumb.sh is:  #!/bin/bash echo $0 >> /home/maximal/thumb.log echo $1 >> /home/maximal/thumb.log echo $2 >> /home/maximal/thumb.log echo $3 >> /home/maximal/thumb.log echo $4 >> /home/maximal/thumb.log   Then, when I remove thumbnail cache rm -rf ~/.cache/thumbnails and restart Nautilus nautilus -q, my log file doesn’t contain anything and ~/.cache/thumbnails/fail/gnome-thumbnail-factory contains all the failed thumbs (looks like corrupted/empty PNGs):    So, apparently, Nautilus even didn’t try to execute my thumbnailer script. When I try to run thumb command itself, it works perfectly. For example convert through cwebp|dwebp package:  convert -thumbnail 256x256 file.webp png:file.webp.png   When I wrap this command to a thumbnailer, it looks like it wasn’t even requested to run by Nautilus.  [Thumbnailer Entry] Exec=convert -thumbnail %sx%s %i png:%o MimeType=image/webp;image/x-webp;   Exactly the same situation occurs with other my thumbnailers: audio waveforms, office documents, photoshop files and so on.  Could anyone help?


The problem I'm having is that Visual studio is throwing an error under the code "Random.Next(1,10);" that says:      "an object reference is required for the non-static field, method, or   property 'Random.Next(int, int)' "   So, I looked at answers to other questions with similar phrases. In these examples on Stack Overflow most suggestions said that someone needed to simply make the method or class static. I tried all combinations of this in this code and it did not fix the error in Visual Studio.  Any help is appreciated, Thanks.  using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;   namespace Data_Collector_Course_Assignment {     public class Device     {         // Returns a randoom integer between 1 and 10 as a measurement of an             imaginary object          public int GetMeasurement()         {             int randomInt = Random.Next(1,10);             return randomInt;         }     } }

Consider:  namespace WindowsApplication1 {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }          private void button1_Click(object sender, EventArgs e)         {             //int[] val = { 0, 0};             int val;             if (textBox1.Text == "")             {                 MessageBox.Show("Input any no");             }             else             {                 val = Convert.ToInt32(textBox1.Text);                 Thread ot1 = new Thread(new ParameterizedThreadStart(SumData));                 ot1.Start(val);             }         }          private static void ReadData(object state)         {             System.Windows.Forms.Application.Run();         }          void setTextboxText(int result)         {             if (this.InvokeRequired)             {                 this.Invoke(new IntDelegate(SetTextboxTextSafe), new object[] { result });             }             else             {                 SetTextboxTextSafe(result);             }         }          void SetTextboxTextSafe(int result)         {             label1.Text = result.ToString();         }          private static void SumData(object state)         {             int result;             //int[] icount = (int[])state;             int icount = (int)state;              for (int i = icount; i > 0; i--)             {                 result += i;                 System.Threading.Thread.Sleep(1000);             }             setTextboxText(result);         }          delegate void IntDelegate(int result);          private void button2_Click(object sender, EventArgs e)         {             Application.Exit();         }     } }   Why is this error occurring?     An object reference is required for the nonstatic field, method, or property 'WindowsApplication1.Form1.setTextboxText(int)


I want to change the numbers in my List of Figures from '1, 2, 3' to Fig.1, Fig.2, Fig.3 but I have no real idea how to do that. I found this command but have no idea where to put it in my script or if it even works:  \renewcommand{\cftfignumwidth}{6em} \renewcommand{\cftfigpresnum}{Figure } \listoffigures   Does anyone have an Idea?  This is my code so far:  \documentclass[12pt]{article}  \usepackage[paperheight=29.7cm,paperwidth=21cm,tmargin=25mm,bmargin=25mm,lmargin=35mm,rmargin=25mm,heightrounded]{geometry} \usepackage{graphicx,siunitx,pdflscape} \usepackage{hyperref,amsmath,amssymb,graphicx,wasysym,paralist,textcomp} \usepackage[round]{natbib} \usepackage[nottoc,numbib]{tocbibind} \usepackage{setspace} \usepackage[labelfont=bf]{caption} \renewcommand{\listoffigures}{\begingroup \tocsection \tocfile{\listfigurename}{lof} \endgroup} \renewcommand{\listoftables}{\begingroup \tocsection \tocfile{\listtablename}{lot} \endgroup}  \begin{document}  \newpage \tableofcontents  \newpage \listoffigures \listoftables

I'm using the caption package.  In the List-Of-Figures I get only the numbers, but I also want to have the prefix. It currently looks like that:     List of Figures   1 Caption of Figure 1........1   2 Caption of Figure 2........9     And I want it to look like:     List of Figures   Figure 1: Caption of Figure 1...1   Figure 2: Caption of Figure 2...9     The same format is already used for the captions themselves.


I have recently installed Ubuntu 14.04.1 LTS and I am having trouble using Amazon Instant Video. When I click on a video to play there is no option to play it, it just says that I can play it on a compatible device (kindle, phone,...) is there some package or something that I need to install?  Thanks for any help   I have successfully (I think) implemented the solution below but I still have the same problem.  After following the below I get:  nathan@nathan-S400CA:~$ sudo mkdir /etc/hal/fdi/preprobe    [sudo] password for nathan:      mkdir: cannot create directory ‘/etc/hal/fdi/preprobe’: File exists     nathan@nathan-S400CA:~$ sudo mkdir /etc/hal/fdi/information     mkdir: cannot create directory ‘/etc/hal/fdi/information’: File exists     nathan@nathan-S400CA:~$ /usr/sbin/hald --daemon=yes --verbose=yes     18:56:04.123 [I] hald.c:672: hal 0.5.14     18:56:04.123 [I] hald.c:673: using child timeout 250s     18:56:04.123 [I] hald.c:685: Will daemonize     18:56:04.123 [I] hald.c:686: Becoming a daemon     nathan@nathan-S400CA:~$ rm -rf ~/.adobe

When I went to watch some only episodes of star trek on Amazon Prime, the player would get stuck on updating. I followed the instructions  and doing so actually worked for 3 seconds. It was the oddest thing. Clearly the video was playing and I saw 3 seconds of the episode, but a message came up saying I needed to update my flash player. I tried loading videos over and over again, but no success, not even the 3 seconds. Here is the error message:  Sorry we were unable to stream this video. This is likely because your Flash Player needs to be updated.   I am running Ubuntu 13.04 Raring Ringtail, Firefox 20, and adobe flash-player 11,2,202,280. Apparently Adobe isn't going to make newer versions of flash available for Linux, only security updates.   So has anyone been able to play prime instant videos, and if so, under what circumstances? Is there perhaps an alternative implementation of the flash plugin I can use? Or is the cause of my problem something different altogether?    Problem probably has to do with the version of flash being used. If anyone has gotten Prime to work with an my current version of flash or an open-source/free implementation of it, please do tell. Or if anyone can get videos on amazon to play with any other parameters aside from changing my browser to chrome, please tell me.  This also affects  and other services that employ DRM through Flash.    What hasn't worked:   Using Chrome which has the newest version of flash via ppapi. Amazon Prime strictly prohibits it. Using Chromium has the same issue as using firefox Trying to install Adobe Flash 11,2,202,275. Is not compatible with raring libraries(?).


I was actually returning a float value when I typed , instead of . but it did not give me any error. Then I tried running the below code.  #include<stdio.h> #include<conio.h> int getValue(); int main() {     int a = getValue();     printf("%d", a);     return 0; }  int getValue() {     return 2, 3; }   Now the output is 3, that is it returned the second value. This happened two years ago and was searching for the proper answer since then.  Studying  I came to know that it returns the second value after evaluating, but what does it do with the first one?  I studied the logic of the stack(how the values are pushed and pop internally) but I don't think this have anything to do with it.  Does it processes the two values or do something else?


What is the function of the two resistors arranged in parallel with the transistor? Do they also limit the current to the transistor?    The full circuit is this:

What is the point of R2 in the following diagram:   I get that R1 controls the current to the Base, but what does R2 do?


I am Linux layman. Just entry level and learning. I have an Asus Transformer TF 101 that would like to run Ubuntu or other suitable distro. Don't know how to do it. I need help on indicating me simple, clear, understandable tutorials or documentation on how to do this. All that I found so far is to much abstruse, or improper time consuming for me on this stage. I really want to learn by understanding and doing  not by doing without understanding. Thank you very much. Gerula

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


What is the difference between these two class initializers?   myClass myObject; myClass *myPointer1; myPointer1 = &myObject;  and  myClass *myPointer2 = new myClass;  If the first pointer is just a pointer to a class object, where does the second pointer point to?

Programming language books explain that value types are created on the stack, and reference types are created on the heap, without explaining what these two things are. I haven't read a clear explanation of this.  I understand what a stack is. But,    Where and what are they (physically in a real computer's memory)? To what extent are they controlled by the OS or language run-time? What is their scope? What determines the size of each of them? What makes one faster?


Let $X \subseteq \mathbb{R}$ an uncountable set. So the set of limits points ($X'$) is uncountable.  I understand this intuitively but I don't know how the information "$X$ is uncountable" is useful to get informations about $X'$

This question is taken from problem 4.1.8 of "Real Analysis and Foundations" by Krantz  The question reads:  "Let S be an uncountable subset of $\mathbb{R}$. Prove that S must have infinitely many accumulation points. Must it have uncountably many?"  The first part of the question took some work but ended up coming out pretty smoothly; however, I'm at a complete loss as to how to go about addressing the second problem. Intuitively, I think the answer is yes.  My first attempt was to try to show that a countable number of accumulation points allowed one to order the elements of S in such a way that they are countable (ie prove the contrapositive), but I did not manage to get much further than that.  My second attempt was to show that $S-{s_{1},s_{2}...}$ where $s_{1},s_{2},...$ are countably many accumulation points of S is uncountable and thus must have an accumulation point, so S has an accumulation point that is not one of the countably infinite set. Hence, the number of accumulation points is uncountable.   My question is, is this logic valid? I would have to prove that an uncountable set minus a countable set is uncountable, which shouldn't be too difficult.  Any hints/points in the right direction/outright answers are greatly appreciated.


If $$\tan^2x\tan^2y + \tan^2y\tan^2z + \tan^2z\tan^2x + 2\tan^2x\tan^2y\tan^2z = 1$$ then find    $$\sin^2x + \sin^2y + \sin^2z$$

Problem :   If $\tan^2\alpha \tan^2\beta +\tan^2\beta \tan^2\gamma + \tan^2\gamma \tan^2\alpha + 2\tan^2\alpha \tan^2\beta \tan^2\gamma =1$  Then find the value of $\sin^2\alpha + \sin^2\beta +\sin^2\gamma$    Please suggest how to proceed in such problem.


Is yamato dead? If not what happened to him. We saw him being taken prisoner by Kabuto and then we never see or hear from him again, even with Kabuto defeated we see no mention of him. So what happened to him?

Kabuto used Yamato's power during the war to strengthen the Zetsu army. Will Yamato be rescued? Or will Kabuto kill him after he's done experimenting on him?


I've been looking into accessibility recently and have read mixed articles regarding whether or not the title attributes should be included. It seems that there's a pretty good consensus that adding title attributes mean nothing for SEO but for screen readers and such I wasn't sure.  This is regarding the title attribute, not to be confused with the <title> tag, for example:  Link Title   Doing a quick Google search on "Title Attribute and Accessibility" comes up with a list of conflicting articles on whether it's still a good practice or not. An ideal answer would be one that has links to back up their assertions to the following questions:  Should I still be using the title attribute? Is there ever a case where I should / shouldn't be including the title attribute on anything? Are there any negative effects if I leave the title attribute out?

I think that title almost explains it. What is best for SEO to use in section Recommended products for alt and title attributes of thumb images? Should they maybe be empty? Recomendded products are show on a page where one main product is opened, below main product in slider (as seen in most web shops).


I am trying to convert the below string value to JSON:  var yourmsg =  '{"yourid":{"latlng":[123,456],"data":{"id":2345," name ":" basanta ","status":"Available"}}}';   Please help me out.

Given a string of JSON data, how can I safely turn that string into a JavaScript object?  Obviously I can do this unsafely with something like:  var obj = eval("(" + json + ')');   but that leaves me vulnerable to the JSON string containing other code, which it seems very dangerous to simply eval.


I am just starting out using sed and I intend to use it to extract IP addresses from ping output. Here's what I am trying to achieve exactly:  input text:    ytmti (192.188.2.3) jjggy   desired output:    192.188.2.3   command I am trying:    echo "ytmti (192.188.2.3) jjggy" | sed 's:\((\(192.188.2.3\))\):\2:'    current output:    ytmti 192.188.2.3 jjggy   Note: ytmti and jjggy are really stand-ins for text like Pinging unix.stackexchange.com and with 32 bytes of data:.  I think using awk might be a better solution for parsing ping output, but I would like to get accustomed to sed.

To all the 'sed' doctors out there:  How can you get 'sed' to extract a regular expression it has matched in a  line?   In other words words, I want just the string corresponding to the regular  expression with all the non-matching characters from the containing line stripped away.  I tried using the back-reference feature like below  regular expression to be isolated           gets `inserted`                here                     |                v    sed -n 's/.*\( \).*/\1/p    this works for some expressions like   sed -n 's/.*\(CONFIG_[a-zA-Z0-9_]*\).*/\1/p    which neatly extracts all macro names starting with 'CONFIG_ ....' ( found in some '*.h' file ) and prints them all out line by line             CONFIG_AT91_GPIO           CONFIG_DRIVER_AT91EMAC                    .                    .              CONFIG_USB_ATMEL           CONFIG_USB_OHCI_NEW                    .                  e.t.c.    BUT the above breaks down for something like    sed -n 's/.*\([0-9][0-9]*\).*/\1/p    this always returns single digits like                    7                  9                  .                  .                    6   rather than extracting a contiguous number field such as.                 8908078               89670890                    .                  .                    .                23019                     .                e.t.c.     P.S.: I would be grateful to feedback on how this is achieved in 'sed'.        I know how to do this with 'grep' and 'awk'       I would like to find out if my - albeit limited - understanding of        'sed' has holes in it and if there is way to do this in 'sed' which I       have simply overlooked.


I have the full url in a javascript variable and I want to strip it down to the bare url.  For example:  ,    strip down to:  www.google.com, youtube.com  How would I do this in javascript?  Thanks  This is not similar to the other links as I am doing this within a chrome extension, therefore the only way to get the url is using the chrome extension api which only provides the full url. As such I need to strip the full url

I am using jQuery. How do I get the path of the current URL and assign it to a variable?  Example URL:  http://localhost/menuname.de?foo=bar&amp;number=0


I have a fresh installation of Ubuntu Server 16.04 LTS (Xenial Xerus).  I added this to /etc/network/interfaces to assign an IPv4 address:  auto enp2s0 iface enp2s0 inet static  address 192.168.1.100  netmask 255.255.255.0  gateway 192.168.1.1   However, the interface gets an IPv6, too. I don't know where it is coming from. There shouldn't be any IPv6 in this network, but I can't deny the possibility that some device is trying to assingn IP addresses, which is why I did not enable DHCP.  Now this seems to trigger AAAA instead of A lookups which prevents me from doing an apt-get update:  Cannot initiate the connection to th.archive.ubuntu.com:80 (2001:3c8:9009:81::101:34). - connect (101: Network is unreachable) [IP: 2001:3c8:9009:81::101:34 80]   What to do?

Both apt-get update and upgrade hang:  sudo apt-get update [sudo] password for xxx:  0% [Connecting to archive.ubuntu.com (2001:67c:1360:8001::17)]   I'm able to ping archive.ubuntu.com:  ping archive.ubuntu.com PING archive.ubuntu.com (91.189.88.162) 56(84) bytes of data. 64 bytes from yukinko.canonical.com (91.189.88.162): icmp_seq=1 ttl=50 time=42.2 ms 64 bytes from yukinko.canonical.com (91.189.88.162): icmp_seq=2 ttl=50 time=42.1 ms 64 bytes from yukinko.canonical.com (91.189.88.162): icmp_seq=3 ttl=50 time=42.1 ms ^C --- archive.ubuntu.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2002ms rtt min/avg/max/mdev = 42.169/42.206/42.265/0.240 ms   I checked , and I don't think its the same issue.  Any tips for investigating this further?


I want to create a link , and to force the link anchor using javaScript, i tried the following:-  <a id="ServerSort" href="#" style="text-decoration:underline">   it worked well but the page will loose its current position after clicking on the <a> link.   I need the link to have an href, because i need need the mouse to change the cursor when going over it ?  can anyone advice ?

The following are two methods of building a link that has the sole purpose of running JavaScript code. Which is better, in terms of functionality, page load speed, validation purposes, etc.?    function myJsFunc() {     alert("myJsFunc"); } Run JavaScript Code     or    function myJsFunc() {     alert("myJsFunc"); }  Run JavaScript Code


I downloaded the deb package from  , and tried to install it using this command:  sudo dpkg -i openlierox_0.58.rc3_amd64.deb    but it didn't meet all requirements:  dpkg: dependency problems prevent configuration of openlierox:  openlierox depends on libgd2-xpm (>= 2.0.33); however:   Package libgd2-xpm is not installed.  openlierox depends on libgd2-xpm (>= 2.0.33) | libgd2-noxpm (>= 2.0.33);  however:   Package libgd2-xpm is not installed.   Package libgd2-noxpm is not installed.   I installed package libgd-dev as I thought it would solve the problem, which it didn't, so I tried ignoring it and install it by using this command:  sudo dpkg --ignore-depends=libgd2-xpm -i openlierox_0.58.rc3_amd64.deb    But there is problem when I try to run it, as I get this error:  openlierox: error while loading shared libraries: libgd.so.2: cannot open shared object file: No such file or directory   I think it should be easy to fix by installing the libgd2-xpm package, but I didn't find it in a repository. What should I do, how do I properly install it?

How do I install a .deb file via the command line?


Point in polygon does not appear in my QGIS 2.18.0 (Windows 10).   The tutorials indicate I should find it in Vector -> Analisis Tools -> Point in Polygons, but it is not there.   How should I install it?

I want to count points (1000 of students home) in district polygons with Qgis 2.16. I didn't find the tool in the analysis tools plugin.   Is there another plugin or method I could use to perform this task ?


I am not sure when to stop the composition for an orbit when I come against a fixed point? Thank You ( 1 4 7 2 )(1 2 8 7 6 3)=?

I am trying to learn how to find the product of non-disjoint cycles, as you may have guessed from the title. I have the basic idea, but I do not understand it entirely.  I am trying to find $(1352)(256)$ and $(1634)(1352)$, multiplying from right to left.  Please give me some hints/suggestions.  Thank you.


There are often questions marked as "unanswered" that have already many answers. Does this feature not work, or do "answered" questions have to have an accepted answer?

Why does the "Unanswered Questions" tab show questions that have answers?


NB: unique part = hard disk is not seen by install program. Not broken. Is being protected by manufacturer? How do I go through the protection? (see my answers to comments below for more info)  here what the terminal says with command sudo lsblk -f  NAME   FSTYPE    LABEL    UUID                                 MOUNTPOINT sdb    isw_raid_                                                └─sdb1 isw_raid_                                                sdc                                                             ├─sdc2                                                          ├─sdc5 swap               ce0660bf-7ab3-4967-9a81-0b5bf7397e7e [SWAP] └─sdc1 ext4               f8c8fcf4-ace3-47f6-9415-ffbddfab4fc9 / sda    isw_raid_                                                ├─sda4 vfat      HP_TOOLS D462-EE69                            /media/hp-envy/HP ├─sda2 ntfs      OS       74B41D8FB41D54C8                     /media/hp-envy/OS ├─sda3 ntfs      Recovery 14DC8220DC81FC6C                      └─sda1 ntfs      SYSTEM   8E8618B88618A32F                     /media/hp-envy/SY   original question:   Windows 7 died on HP Envy 6. Ubuntu 16.04 via 'make startup disk' made on another computer Ubuntu tutorial followed The installation stops at 'Installation type' screen:     dia doesn't look like tutorial only flash drive  (/dev/sdc) is pre-shown under 'device' (and nothing  is active in this window) under this window 'device for boot loader installation' there are 2 items:      /dev/sdc    /dev/sda     /sda should be OK (extended hard disk run + enough space) but the install doesn't 'grab' it.  Read on Ask Ubuntu that manufacturers may protect /sda  Failed at restore factory defaults on BIOS. Error message: "insert a Windows boot disk and click Repair your computer."  I don't have a Windows disk (no optical disk drive and no disk). Ask Ubuntu says something about changing values of SATA in BIOS. I don't see any SATA in BIOS.   I see SATA in terminal in when running Try Ubuntu via flash drive.   I don't know how to change SATA.   I know how to copy/paste a command in the terminal.   Sorry if I missed something crucial. Please be kind, I am an old mum born and bred before computers who just got into Linux. It took me a week of study of Linux to get to the point where the flash drive is actually booting.   I must say: I love Linux. I am fed up with Windows, which makes it more and more difficult for non-pro users like me to talk directly to the machine. I refuse Windows 10 and smart phones because of all these apps I can't configure (and which spy on me). I think with a little help from you guys, I can manage to run Linux.

I would like to see a full how-to guide on how to install Ubuntu.


I dont really understand the idea of the prophecy anymore.       Arya killed the Night King   so what was the point of the prophecy? I thought Jon or Dany were the Prince That Was Promised. Can anyone explain?

Who is Azor Azhai? Was Melisandre's entire life a lie? Throughout the show she has put forward:   Stannis Baratheon Daenerys Targaryen Jon Snow   But      Arya Stark ends up to be the one to end the Night King. Clearly she thinks that her purpose is over because she died after the battle, so the Night King isn't coming back anytime soon.    Who is the Prince who was Promised in light of the      NK's death?


how to set attributes for array variable in java(OOP)? attributes of o[] could not be set within the for loop, why? Im trying to set name for o[0], but o[0].name doesnt work. why this happened? Also setter and getter doesnt work either, can you help me explain why can not set attributes in o[]?  import java.util.Scanner;  public class Orders {     private String name;     private double price;     private int quantity;      public void setName(String name){         this.name= name;     }     public String getName(){         return name;     }     public void setPrice(double price){         this.price=price;     }     public double getPrice(){         return price;     }     public int getQuantity(){         return quantity;     }     public void setQuantity(int quantity){         this.quantity=quantity;     }      public static void main(String[] args) {         int num = 0;         double sum=0;         Scanner sc = new Scanner(System.in);         System.out.println("how many rows of order: ");         num = sc.nextInt();         Orders[] o = new Orders[num];          sc.nextLine();          for(int i = 0;i<=o.length;i++){              System.out.println("The name of the product: ");             o[0].name=sc.nextLine();             o[i].setName(sc.nextLine());             System.out.println("Price of product: ");             o[i].setPrice(sc.nextDouble());             System.out.println("Quantity of product: ");             o[i].setQuantity(sc.nextInt());         }         for(Orders a: o){             System.out.println("Name: "+a.getName()+". Price: "+a.getPrice()             +". Quantity :"+a.getQuantity());             double totalprice= a.getQuantity()*a.getPrice();             sum = sum + totalprice;         }          System.out.println("total price: "+sum);     } }

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?


What is the correct format for if then? I tried lots of varieties. Should the format work at the command line when not in a program?  $ if [1==2] then echo "y" fi; > ; -bash: syntax error near unexpected token `;'

I tried using this:  $ if [$a == 1] then { echo 'yes'; } fi;   but I get an error:  -bash: syntax error near unexpected token `}'   What is the correct format?  I tried several with no luck.


I know that my question may be a duplicate, but I couldn't find a solution that worked for me elsewhere on the site.  Here is the MWE :  \documentclass[12pt]{article} \usepackage{graphicx} \begin{document} This is my attempt to import the image into latex. I do not know how so I decided to try all possible cases.  \begin{center} \begin{figure} \includegraphics[scale=0.7]{12.pdf} \end{figure} \end{center} \end{document}   You can get my 12.pdf file there: .   After compiling, I get a PDF file with a page that contains my text, and another contains the image in 12.pdf. The problem is that I want to insert the image right after the words, but there seems to be lot of white space (in the image).  So, how can I get rid of that white space? I'm not a professional TeX user, so the simpler the solution, the better.

I'm inserting an image with a simple:  \includegraphics[height=5cm]{filename.png}   This results in an image that maintains the aspect ratio, and so gives me something like 6cm width. I only really want the left side of the image though, and would like to crop it to 50% width. Is it possible to do this?  If possible, I'd like to do this in a portable way (i.e. something that other authors of this document won't have to install packages for, and something that works with a reasonably old version of pdflatex - our computers at work are in sore need of an upgrade).


Traditionally, you're supposed to have 60 cards in your main deck, and 15 cards in your sideboard.  But let's say that I had 64 cards in my main deck and 15 cards in my sideboard.  For game 2 & 3, could I reduce my main deck to 60 cards and effectively have 4 more cards in my sideboard, or do I have to keep my main deck at 64 cards?

I did some calculation and found out, that my Living End deck (modern) might be better of with 66 cards maindeck. SB still contains of 15 cards. Depending on the match up, I'd like to cut my deck for game two down to the normal 60. The SB than would contain 15+6 = 21 cards. Is this legal?


I have a tree structure such as:  def __init__(self, parent=None, key=None, nodes=[]):     self.parent = parent    # TrieNode value     self.key = key          # char/string value     self.nodes = nodes      # [TrieNode, TrieNode, ....]   Now, I want to get the specific node's children...  I want to yield them one by one in a recursive way...  my code is   def mychildren(self):     for node in self.nodes:         yield node         node.mychildren()   is that correct .... ?  when i write the unit test as   rootnode = TrieNode(None, '') anode = TrieNode(rootnode,'a') bnode = TrieNode(rootnode,'b') rootnode.setchildren([anode, bnode])  acnode = TrieNode(anode, 'c') anode.setchildren([acnode])  for i in rootnode.mychildren():     print i.key   I found I could only get A and B nodes. I could NOT get the acnode which is child node of A node

Recently I wrote a function to generate certain sequences with nontrivial constraints. The problem came with a natural recursive solution. Now it happens that, even for relatively small input, the sequences are several thousands, thus I would prefer to use my algorithm as a generator instead of using it to fill a list with all the sequences.  Here is an example. Suppose we want to compute all the permutations of a string with a recursive function. The following naive algorithm takes an extra argument 'storage' and appends a permutation to it whenever it finds one:  def getPermutations(string, storage, prefix=""):    if len(string) == 1:       storage.append(prefix + string)   # <-----    else:       for i in range(len(string)):          getPermutations(string[:i]+string[i+1:], storage, prefix+string[i])  storage = [] getPermutations("abcd", storage) for permutation in storage: print permutation   (Please don't care about inefficiency, this is only an example.)  Now I want to turn my function into a generator, i.e. to yield a permutation instead of appending it to the storage list:  def getPermutations(string, prefix=""):    if len(string) == 1:       yield prefix + string             # <-----    else:       for i in range(len(string)):          getPermutations(string[:i]+string[i+1:], prefix+string[i])  for permutation in getPermutations("abcd"):    print permutation   This code does not work (the function behaves like an empty generator).  Am I missing something? Is there a way to turn the above recursive algorithm into a generator without replacing it with an iterative one?


I would like to know if the number of divisors for the number in a determined range is odd or even without counting the divisors, I think the question is a little tad fuzzy, thus, I will supply the question with an example . Suppose we have n = 7 and b = 24, Is the number of divisors for b in range 1 to n odd or even ? in our example we have : 1,2,3,4,6 then we have five divisors, so the number is odd, we just omitted the rest divisors { 8, 12, 24 } because they are out of the range . Is there such a method to solve this matter ?  Thank you !

Consider $b,n\in\mathbb{N}$ where $b\leq n$. We want to find the parity (ie. odd or even) of the number of divisors of $n$ that are $\leq b$.  The question is to find a fast algorithm to find that parity.  (ref: this is essentially problem E from ACM-NA regional contest 2013: )  Now the problem is rather easy for $b\geq\frac{n}{2}$, as it boils down to simply checking whether $n$ is a perfect square. However, I can't figure out how to solve for the general case. Obviously, factoring out $n$ is going to be rather slow, but since we are only trying to count the number of divisor, it might not be as hard. The worst case scenario for this problem appeared to be when $b\approx\sqrt{n}$: using the perfect square technique, we can reduce the problem to the case when $b\leq\sqrt{n}$.  I am looking for a polynomial time algorithm, or a proof that it is polynomially reducible from one of the more well-known problem with no known polynomial time solution (or both -  :D). If neither are possible, even any suggestions for a reasonably fast algorithm would be appreciated. Thank you for your help.  (not sure which tag to put, number-theory or elementary-number-theory; while I don't have much background in number theory, I don't mind people answering using advanced number theory as long as they provide references)


I can't allocate more than Xms1G into Minecraft. I've looked at every tutorial and still, I can not allocate more. I have 8gb of ram and a 64-bit operating system. How can I allocate more? I've tried putting Xmx-4G but it crashes and says something about my Java Virtual Machine.

There is a lot of lag when I play Minecraft. I think this is due to the low amount of RAM I've allocated to Minecraft. (495MB)  How do you allocate more RAM to Minecraft?  I checked my other computer (Intel i5 Core) and it had the same amount of RAM allocated to Minecraft. However, Minecraft did not lag on that computer.  After I installed Optifine on this computer, the lag stopped (I don't know why cause I read that Optifine splits the load onto 2 cores, but I have only one core (At least I think so, a sticker on the laptop says Intel CORE i7)).


More specifically, if you fall off of a gargantuan dragon would it get an attack on you while you are falling?

I'm in a D&D4e game right now, and in the current combat there are some flying creatures which may soon be knocked prone by PC #1.  As part of being knocked prone, a flying creature falls to the ground.  As they fall, the creatures may pass within melee range of PC #2 who is currently on the ground.  Would PC #2 get an Opportunity Attack in this scenario, as a creature leaves a square adjacent (elevated by one square) to him?  For reference, here's the "Moving Provokes" clause of the Opportunity Attack rule:     Moving Provokes: If an enemy leaves a square adjacent to you, you can make an opportunity attack against that enemy. However, you can’t make one if the enemy shifts or teleports or is forced to move away by a pull, a push, or a slide.   Are there any other rules that apply to this scenario, which one should be aware of?


My teacher mentioned something about pressure cookers making cooking faster and I was wondering what exactly is the reason behind this?

If you increase the pressure, the boiling temperature increases as well. In the other direction: if you decrease the pressure enough you could even make water boil at 18 dergees C.  However I met this strange thing in my wifes kitchen called "pressure cooker". I don't understand how you can cook things quicker with that. If you increase the pressure inside this tool, you are just increasing the cooking temperature. And thus nothing will even boil.  What did I misunderstand?


I have a binary that creates some files in /tmp/*some folder* and runs them. This same binary deletes these files right after running them. Is there any way to intercept these files?  I can't make the folder read-only, because the binary needs write permissions. I just need a way to either copy the files when they are executed or stop the original binary from deleting them.

I'm trying to debug a program which is not logging the information I need. Fortunately, it does write temporary files which should contain the information. These files are written to a directory like: program/temp/{someGUID} on one of ten machines. Neither {someGUID} nor which machine will contain the temp files is known in advance of the run. After the run is complete, the temporary files are deleted. The time from beginning to end is too fast for manual intervention.  I kick off the runs through a client program, but it is the server which writes the files. I am unable to manipulate the server program and once a run is kicked off I am unable to stop it. I do have root access to the all the machines on which the temp files could be written. I'm running CentOS 6.  Is there a way to allow the server user to write files to the temp directory but not remove them? It would probably crash the run, but it would give me the information I need. Is there a way to copy the contents of the temp folder right after they are written/before they are deleted? Must I install a program for recovery of deleted files?


I am using the sfdx force:source:push plugin, and editing my components in a <aura:component>, that is displayed inside a Lightning Component Tab. When I make markup changes to the component in my local file-system and push via the above command OR in the developer console to my scratch org,   I am not seeing the changes reflected until I log out of the org and reload the app?   I am not seeing any errors in the developer console "Problems" tab? Is there some sort of delay in updating lightning components?   I have disabled the cache in chrome developer tools, to no greater effect.  Sometimes they show immediately, otherwise I am not sure if they have unless I change a text string?

When developing a lightning components in the lightning experience, let's say I make a change to custom_componentController.js. If I want to see these changes in the lightning UI, I have to hard refresh chrome twice in order for my changes to be rendered. Is there a way to break this cache?   I found  which is exactly what I am experiencing but it says it was fixed in all instances.  Has anyone else experienced this as of late or does anyone have a solution?


Let $A \in {M_n}$ and $\left\| {\left| . \right|} \right\|$ be a matrix norm on ${M_n}$.Why does ${\left\| {\left| A \right|} \right\|_2} \le \left\| {\left| A \right|} \right\|_1^{\frac{1}{2}}\left\| {\left| A \right|} \right\|_\infty ^{\frac{1}{2}}$?

With the definition of $ \lVert A \rVert_2$ and $\lVert A \rVert_1$ and $\lVert A \rVert_ \infty$ that is:  \begin{gather} \lVert A\rVert_1 = \max_{j} \sum_{i=1}^m \lvert a_{ij}\rvert\\ \lVert A\rVert_2 = \sqrt{\rho(A^HA)}\\ \lVert A\rVert_\infty = \max_{i} \sum_{j=1}^n \lvert a_{ij}\rvert \end{gather}  prove that:  $$\lVert A \rVert_2^2 \leq  \lVert A \rVert_1 \lVert A \rVert_\infty$$


Suppose you have 2 circles that intersect each other in such a way that each circle passes through the other's center. What is the area between the circle(or common area) i.e. area between the centres of the circles?

If we pick randomly two points inside a circle centred at $O$ with radius $R$, and draw two circles centred at the two points with radius equal to the distance between them, what is the expected area of the intersection of the two cirlces that contain the origin $O$.


char*a = "HELLO"; printf("%s\n",a);   This prints on the screen the word HELLO.  But why doesn't this work when I actually use it in the scan command,i.e.  scanf("%s",a) // Doesnt work. scanf("%c",a) // Doesnt work.   Why do the above two dont work? When I do something like,   char a[50]; scanf("%s",a); // This works.    Why the statements marked as Doesnt work dont work?

Possible Duplicate:          I want to write a function that reverses the given string passed into it. But, I can not. If I supply the doReverse function (see code below) with a character array, my code works well.  I can't figure out why this does not work. I am able to access str[0] in doReverse, but I can't change any value of the array by using a char pointer. Any ideas?  void doReverse(char *str) {     str[0] = 'b'; }  void main(void) {     char *str = "abc";     doReverse(str);     puts(str); }   Update:  I know how to do write a reverse function by passing a character array to it:  void reverse1(char p[]) {     int i, temp, y;      for (i = 0, y = strlen(p); i < y; ++i, --y) {         temp = p[y-1];         p[y-1] = p[i];         p[i] = temp;     } }   But, I want to write another version that gets a char pointer as a parameter.


(Disclaimer: the following might fit better on Worldbuilding - on the one hand, I'm not looking to write a story, but on the other, I don't know enough physics to know whether this is a trivial "no, save it for science fiction". Also could be considered a follow-up to ).   Suppose for a moment that gravity is symmetric with electromagnetism, only with like "charges" attracting rather than repelling, and opposite charges repelling rather than attracting.   At the macro scale, billions of years of opposite gravitational polarities mean a sort of segregation of positively and negatively "charged" particles, which seems a plausible surface explanation for the lack of antigravity in day-to-day life - but, as I said, I don't know the physics well enough (read: at all) to say how well that explanation holds up under closer scrutiny.  At the micro scale, I don't know that we've had the capacity to observe the effects of gravity one way or the other on individual particles (to the extent that "individual particles" makes sense in modern physics), but while I'm on this hypothetical/crackpot bent I'd note that as long as the repulsive force from antigravity is exceeded by an attractive force from one of the other fundamental forces you could have, say, (obviously less stable) "hybrid" atoms, with a corresponding reduction in the observed gravitational force due to that atom.   Averaged over lots* of atoms, and you'd have what appears to be gravity that's significantly weaker than other forces, due to some of it being cancelled out by the mixed-in antigravity particles (presumably both fall off at $1/r^2$, and I'm also assuming there's no catastrophic mutual annihilation as with antimatter).   So. "totally uncharged" is obviously a consistent option. Are there any nonzero magnitudes for charged gravity that would be consistent with observations?   Probably more importantly for physics, but less important from a personal-interest perspective, how would we test this? Or, if this has already been disproved elsewhere, what experiments have we performed to rule this out?  *For experimentally confirmed values of "lots", ideally

Since Newtonian gravity is analogous to electrostatics shouldn't there be something called negative mass? Also, a moving charge generates electric field, but why doesn't a moving mass generate some other field?


Sounds like a simple report, but can someone guide me on how to set up a report where it shows a specific URL and from what previous page or referring URL brought them to the specific URL?  For example, the specific URL could be www.test.com/c2campaign  I want to create a report of all the previous pages that brought people to the above URL.  One thing to note is that www.test.com/c2campaign is not tagged for Google Analytics as it's an external site but all the referring pages are tagged for Google Analytics being our intranet site.  Thanks.

Using Google Analytics, my website has 1000's of visits across a few hundred URLs.   I'm trying to see how users accessed specific paths and where they went to afterwards. Like in behavior flow where you can explore the different interactions, but I need to be able to search for the specific page as its taking me ages to look through all the interactions trying to find specific paths.


CSS code of my body and my footer in this moment: I just can't to fix my footer at the bottom of my page. I read a lot of solutions present of www but any works for me. Thanks for help me! body {   background: #ffffff;   color: #737f85;   font-family: "Tahoma", Tahoma, Arial, sans-serif;   font-size: 100%;   line-height: 25px;   font-weight: 400;   padding: 0; }   .footer-sidebar {   background-color: #ccff66;   margin: 0;   padding: 55px 0 0px;   width: 100%;   height: 100%;   text-align: justify; }

I have a simple 2-column layout with a footer that clears both the right and left div in my markup.  My problem is that I can't get the footer to stay at the bottom of the page in all browsers.  It works if the content pushes the footer down, but that's not always the case.


I got a UK visa last month and visited London for a week. It was my first visit to the United Kingdom. I checked-in online when I was leaving the country and entered my visa number as an additional document. I was surprised after security checks in the airport, there is no passport control and I will not get a "leave stamp" in the passport.  How do I check if my visa information was passed to immigration service? Since I had an electronic check-in via a third-party airline company website, I can not be 100% sure that the company passed the information to theUK immigration services or their website works 100% correctly.  I already read the answer from here   In order to avoid misunderstandings, I am not curious about WHY I do not have leave stamp, my question is: WHERE to check if my departure has been registered?  The proposed duplicate  and its answer appears to be obsolete because "The Data Protection Act 1998 has been replaced by the General Data Protection Regulation (GDPR) and the Data Protection Act 2018. For the latest guidance on data protection law, please see our Guide to the GDPR."

Last year, I traveled to the UK for a conference. Upon entry, my passport was stamped confirming my entry via immigration. Upon my exit, surprisingly (and something I'm been wondering about ever since) I went through no immigration. The direction to board flight led me straight to flight check-in, then we boarded the flight. Below is my entry stamp. Stamped within my Visa stamp, really?  I went to the Netherlands this year, got stamped, in and out. Entering ZA, I got stamped. Even leaving and returning to my home country (Ghana), I got both stamped. I find the stamping a standard procedure/protocol. Yet, with the UK, I left the country without being stamped. I don't know if that was part of the plan or I missed something or what?:  Does the UK have a policy of not stamping when people leave the country? Was that a mistake on my part? Obviously, my stay period has expired, and on paper, I'm "not supposed" to be in the country, but without the UK exit stamp, might that affect my visit or travel visa application to UK one day in the future? Because if stamping is mandatory, and I don't have one, then I will be hot if asked, "How did you leave the country without the stamp?" In this case, those who could have determined if I overstayed or not, was the Airline  More info  My visa was for a stay up to 29/30 days or so. But I stayed only for 7 days Flight used throughout was Emirates and passed through Dubai on transit Origin was South Africa. Destination Airport was Heathrow  For comparison, below is my Netherlands stamps, both in an out.  My Readings/Researches I came , and one of the answers pointed out, its "No real reason now for UK exit stamp." Really? I see a strong reason to, otherwise, stamping me in is of no real reason then. One commentator also added: "A loophole which no doubt has been exploited by some foreigners." No idea how someone will exploit that! And considering , it can lead to some questions.


How do you find reminder of $m^{x}$ divided by $n$ using Euler's and Fermat's little theorem? Can anyone show me step-by-step how to apply  and ?  Example: What is the remainder of $59^{28}$ divided by $7$?  The following is the way I know how to do these types of problems:  $59^{28} = (56+3)^{28}$... since $7|56$ then we are left with  $3^{28} = 3^{2*2*7} = 3^{4*7} = 81^{7} = (77+4)^{7}$... since $7|77$ then we are left with  $4^{7} = 4^3*4^{4} = 64*4^{4} = (63+1)*4^{4}$... since $7|63$ then we are left with  $1*4^{4} = 4^4 = 4^3*4 = 64*4 = (63+1)*4$... since $7|63$ then we are left with 4  Since we are left with just 4, we can just do: $4\mod{7} = 4$   So the remainder is 4!

How do I efficiently compute $a^b\bmod c$:  When $b$ is huge, for instance $5^{844325}\bmod 21$? When $b$ is less than $c$ but it would still be a lot of work to multiply $a$ by itself $b$ times, for instance $5^{69}\bmod 101$? When $(a,c)\ne1$, for instance $6^{103}\bmod 14$?  Are there any other tricks for evaluating exponents in modular arithmetic?  This is being asked in an effort to cut down on duplicates, see  and .


I'm in a class that requires us to use the Alice 3 program. I was running the program just fine earlier today and now it will not make it past the splash screen. I go into the system monitor and it shows that multiple instances of Java are running, with Alice3 running at the top, so why would it suddenly stop loading?  I'm fairly new to Ubuntu, but I don't think I made any significant changes to prompt this...  I reinstalled probably 3 times now, restarting in between, but no luck.  Thanks in advance!

I tried it and the errors are:  Exception in thread "main" java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper at java.desktop/java.awt.Toolkit.newAWTError(Toolkit.java:472) at java.desktop/java.awt.Toolkit.fallbackToLoadClassForAT(Toolkit.java:488) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1608) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) at java.desktop/java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:532) at java.desktop/java.awt.Toolkit.getDefaultToolkit(Toolkit.java:613) at java.desktop/javax.swing.UIManager.getSystemLookAndFeelClassName(UIManager.java:660) at com.cburch.logisim.gui.start.Startup.parseArgs(Startup.java:250) at com.cburch.logisim.Main.main(Main.java:32)   The error seems to be...     Caused by: java.lang.ClassNotFoundException: org.GNOME.Accessibility.AtkWrapper       at  java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)       at   java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)       at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)       at java.base/java.lang.Class.forName0(Native Method)       at java.base/java.lang.Class.forName(Class.java:374)       at java.desktop/java.awt.Toolkit.fallbackToLoadClassForAT(Toolkit.java:485)       ... 14 more     OUTPUT for  apt-cache policy logicsim logisim  logisim:   Installed: 2.7.1~dfsg-1   Candidate: 2.7.1~dfsg-1   Version table:  *** 2.7.1~dfsg-1 500         500 http://in.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages         500 http://in.archive.ubuntu.com/ubuntu bionic/universe i386 Packages         100 /var/lib/dpkg/status N: Unable to locate package logicsim   OUTPUT for update-java-alternatives -l  java-1.11.0-openjdk-amd64      1101       /usr/lib/jvm/java-1.11.0-openjdk-amd64 java-1.8.0-openjdk-amd64       1081       /usr/lib/jvm/java-1.8.0-openjdk-amd64


So I know that it is true for $n = 1$ because $h \ge \log(1)\implies h \ge 0$. I also assume that $n=k$ is true. But how would I prove $h \ge \log_2{k+1}$. I tried to through log laws, but I'm quite stuck.

For a homework assignment, I need to prove that a Binary Tree of $n$ nodes has a height of at least $log(k)$. I started out by testing some trees that were filled at every layer, and checking $log(n)$ against their height:  when $n = 3$ and $h = 1$, $\log(3) = 0.48 \leq h$  when $n = 7$ and $h = 2$, $\log(7) = 0.85 \leq h$  when $n = 15$ and $h = 3$, $\log(15) = 1.18 \leq h$  when $n = 31$ and $h = 4$, $\log(31) = 1.49 \leq h$  By this point, I realized that every layer, $n = n*2+1$ from the previous layer, and obviously the height increases by 1.  To try to follow the trajectory, I plotted it:, and it looks like the 2 lines will never meet.  Unfortunately though, I don't think this actually proves anything.  Can someone point me in the right direction from here?