I need to free space on Windows XP SP3.  Q1) What system folders can be safely delete in case I don't need to have restore points etc?  Q2) Can I delete content from C:\WINDOWS\SoftwareDistribution\Download

One of our Windows 2003 servers has a fairly small C-partition, which is approaching full. I've had a quick look round using  as to where the space has gone, and a fair bit of it seems to be taken up with C:\WINDOWS\SoftwareDistribution\Download  I think this folder is used as a temporary storage for Windows Update, but as all the pending Windows updates have now been installed, is it OK to delete the contents of this folder?


I'm wondering if it's possible to access the information in a .bib file using Lua code in LuaTeX. Basically, I have a function where I'd like to be able to add idiosyncratic custom citation styles for certain works that rely on information other than the standard author/title/year available in most citation packages. I'm also open to a non-Lua way of doing this, but I haven't found any clear answers yet. The goal is to be as parsimonious as possible in terms of not having to duplicate information in multiple .lua/.bib/.tex files. Edit: Upon request, a MWE: We have a .bib that contains the following two entries: @book{yassawi1904,   author={Yassawī, Xoca Aḥmad bin Ibrāḥīm bin Muḥammad bin Iftiḥār},   title={Dīwān-i Ḥikmat},   publisher={Imperatorskaja Universitet},   editor={(anon.)},   address={Kazan},   year={1904} }  @book{yassawi2013,   author={Yassawī, Xoca Aḥmad bin Ibrāḥīm bin Muḥammad bin Iftiḥār},   title={Diwani Hikmet},   publisher={Living Zen Books},   editor={Johnathan Trapman},   address={Glastonbury},   year={2013} }  We want to be able to produce a citation that looks something like this:  This word appears as blah in ed. Kazan (1904), but this seems to be an error for bleh, as reflected in ed. Trapman (2013).  where the first would be based on a function that uses the address, and the latter the name of the editor. Edit: To be clear, I'm not having trouble writing the Lua; just asking if its possible in any way (Lua or not) to write a function that access bib information like this.

I want to automate personal reading notes generation, I'd like to be able to automatically extract a field's content from a BibTeX entry (other than year or author).  E.g. given a BibTeX entry  @article{einstein05,    author={Albert Einstein},    title={Zur Elektrodynamik bewegter K{\"o}rper},    abstract={Interesting article, which claims that time is relative.},    journal={Annalen der Physik und Chemie},    volume={17},    year={1905},    pages={891--921} }   I want to have a macro in my TeX file (e.g. \citeabstract) that will return the string Interesting article, which claims that time is relative. (the same for DOI, etc.)  I've found the \printfield command that might help me, but I'm not smart enough to know how to use it.  I don't know if it has any influence on the answer, but I'm using BibLaTeX+BibTeX.


Is it “What tools is your team using for collaboration?” or “What tools are your team using for collaboration?”?  My normal tactic would be to rephrase the question as a statement and consider “Your team is using these tools for collaboration” vs. “Your team are using these tools for collaboration”, which seems to suggest that “is” is correct here, but something seems awkward about that.

I'd say Microsoft have a way of bending the rules and I know that McLaren have won the championship. While this sounds strange, I believe it is correct English (sorry, I'm not native).   But when it's a small company, would you still use it this way? Is a company always plural, or are small companies singular? I.e., would you say Bakery Johnson makes fine bread or Bakery Johnson make fine bread? Is it My book seller, Woody's, have moved or is it has moved?


I have two author templates, one for normal users and one for special users. Special users are those with user role 'special', so when someone wants to view their author page, they need to use the template author_special.php  so, if the author we are about to see (for instance, example.com/author/whatever) has the role 'special' the template used will be author_special.php, if the role is not 'special' the template used should be author_normal.php  I tried this in author.php, but it won't work:  <?php if ($author_roles == 'special') {      include (TEMPLATEPATH . '/author_special.php'); } else {     include (TEMPLATEPATH .'/author_normal.php'); } ?>   What should I do?  thanks

I am trying to get the user level of the author that is displayed on an author page (not the current user that is logged in, but the user that is presented on the current author page that I am viewing)  I am using this code  <? get_currentuserinfo() ; global $user_level; if ($user_level >= 4) {      include (TEMPLATEPATH . '/author_1.php'); } else {     include (TEMPLATEPATH .'/author_2.php'); } ?>   I tried to replace $user with $curauth but still no results, it is showing only one template for both.  Any ideas?  thank you


Let $f\colon A\longrightarrow B$ be a finite algebra (B is finite as $A$-module) and let $\mathfrak{p}\in\mathsf{Spec} \, B$ and denote $f^{-1}(\mathfrak{p})=\mathfrak{q}$. Is it true that $B_{\mathfrak{p}}$ is finitely generated as $A_{\mathfrak{q}}$-algebra?

I was having some trouble with the following exercise from Atiyah-Macdonald.     Let $A$ be a subring of $B$ such that $B$ is integral over $A$. Let $\mathfrak{n}$ be a maximal ideal of $B$ and let $\mathfrak{m}=\mathfrak{n} \cap A$ be the corresponding maximal ideal of $A$. Is $B_{\mathfrak{n}}$ integral over $A_{\mathfrak{m}}$?   The book gives a hint which serves as a counter-example. Consider the subring $k[x^{2}-1]$ of $k[x]$ where $k$ is a field, and let $\mathfrak{n}=(x-1)$. I am trying to show that $1/(x+1)$ could not be integral over $k[x^{2}-1]_{\mathfrak{n}^{c}}$.  I have understood why this situation serves as a counterexample. But I am essentially stuck at trying to draw a contradiction. A hint or any help would be great.


I suggested , which was rejected by the Community user due to an edit conflict. However, when I looked at the post, I saw my edit there anyway. Looking at , it appears that the asker's edit in revision 2 had its edit summary comment replaced by mine, and my change rolled into it. I find it highly unlikely that the asker would have done both of those things by hand, and much more likely that the site's software caused this somehow. Is this something that the developers just need to fix, or is there something that someone involved didn't do right that caused this? (This is not a duplicate of , because in that question, the edits didn't end up going through, but in this one, it did, just attributed to the wrong person.)

I have the edit privilege. If I edit a post which has a pending suggested edit, then:  My edit starts from the version resulting from the suggested edit. I'm not notified of that, or even of the existence of the suggested edit. (There's actually a clue, but it's easy to overlook — the edit summary field is pre-filled with the summary from the suggested edit.) The suggested edit is marked as rejected by Community with the message “This edit conflicted with a subsequent edit.” The suggester is not credited in the edit history, my revision combines the suggested edit with my modifications.  This can happen if an edit is suggested while I have the page open: I click on “edit”, and think I'm editing the version that I was just reading, but in fact I'm editing somebody's suggested edits. It also happens if I deliberately visit /posts/12345/edit, which . Examples: a  that I approved and then wanted to ; a  where I . There are two bugs here, but I'm making a single report because they're very closely linked.  I'm not told about the suggestion, so my edit includes content that I'm not aware of, yet is attributed to me. The suggestion is marked as rejected and the suggester is not credited in the edit history, yet the suggested changes are made.


So I updated my laptop from Ubuntu 18.04 to 20.10 and since then I've been having trouble executing the command sudo apt-get update  Please help me out! Thanking you.  Some errors are as follows:  E: The repository 'cdrom://Ubuntu 18.04.3 LTS _Bionic Beaver_ - Release amd64 (20190805) bionic Release' does not have a Release file.   N: Updating from such a repository can't be done securely, and is therefore disabled by default.   N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch http://linux.teamviewer.com/deb/dists/development/InRelease  403  Forbidden [IP: 2600:9000:21f6:a800:1c:3aaa:b100:93a1 80] E: The repository 'http://linux.teamviewer.com/deb development InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ppa.launchpad.net/octave/stable/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.   The output for cat /etc/apt/sources.list is :    Thanking you once again. :)

Every time I try update (using sudo apt-get update) my Ubuntu I get this problem:  W: The repository 'cdrom://Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1) xenial Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: The repository 'ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu xenial Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch cdrom://Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)/dists/xenial/main/binary-amd64/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs E: Failed to fetch cdrom://Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)/dists/xenial/main/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs E: Failed to fetch ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found E: Failed to fetch ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu/dists/xenial/main/binary-i386/Packages  404  Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.   How can I fix it? I use Ubuntu 16.04 LTS


Let $A,B$ be two left $R$-modules. I was wondering if we then can form the tensor product of $A$ and $B$ by the free abelian group on $A \times B$ divided out by the span of the following elements $(a+a',b) -(a,b) - (a',b), (a,b+b')-(a,b)-(a,b')$ and $(ra,b)-(a,rb)$.  In literature the construction is done for $A$ a right $R$ module and $B$ a left $R$ module. I don't see why we should distinguish between those two types.

I was reading about the construction of a tensor product of any right $R$-module $M$ and left $R$-module $N$ over a ring $R$.  Why is it required that $M$ and $N$ be right and left modules, respectively? How does the construction not work otherwise?


Does $\sum _{n=1}^\infty\frac{\left(-1\right)^{\pi \left(n\right)}}{n}$ converge, where $\pi(x)$ is the prime counting function?  The resulting sum should look like $$\frac{1}{1}-\frac{1}{2}+\frac{1}{3}+\frac{1}{4}-\frac{1}{5}-\frac{1}{6}+\frac{1}{7}+\frac{1}{8}+\frac{1}{9}+\frac{1}{10}-\frac{1}{11}-\frac{1}{12}+\frac{1}{13}-\cdots$$  So the sign of each fraction in the sequence switches whenever a prime is reached.

Consider $$\sum_{n=1}^{\infty}\frac{(-1)^{\pi(n)}}{n}$$ where $\pi(n)$ is the number of primes less than or equal to $n$.  Does this sum converge or does it diverge? Are there any results related to this?


When I declare a trigger in my Oracle database project, I'm getting an error, which says:  ERROR at line 1: ORA-04091: table MIHAL277.LEAGUE_GAMES is mutating, trigger/function may not see it ORA-06512: at "MIHAL277.DELETE_UNUSED_GAME", line 4 ORA-04088: error during execution of trigger 'MB358996.DELETE_UNUSED_GAME'   Basically I'm creating an academic project for managing boardgame leagues. So there is a Game table and a League table. There's also a League_Games table, which indicates whether a game is available in a League (i.e if the players in the League play this game). A League can decide to stop 'owning' a game and then it's deleted from the League_Games table. But when it happens I want to run a trigger, which checks out if there are still some Leagues that use the game and if not - delete the entry for the particular game from the Game table.'  My trigger goes like this:  CREATE OR REPLACE TRIGGER delete_unused_game BEFORE DELETE ON League_Games FOR EACH ROW DECLARE    deleted_game_count integer; BEGIN     SELECT COUNT(*)      INTO deleted_game_count      FROM League_Games      WHERE Game_ID = :OLD.Game_ID;     IF deleted_game_count = 0 THEN         DELETE FROM Game         WHERE ID = :OLD.Game_ID;     END IF; END; /   So when I delete an entry from Leage_Games, the error appears. What is wrong with this trigger?

I recently started working on a large complex application, and I've just been assigned a bug due to this error:  ORA-04091: table SCMA.TBL1 is mutating, trigger/function may not see it ORA-06512: at "SCMA.TRG_T1_TBL1_COL1", line 4 ORA-04088: error during execution of trigger 'SCMA.TRG_T1_TBL1_COL1'   The trigger in question looks like       create or replace TRIGGER TRG_T1_TBL1_COL1    BEFORE  INSERT OR UPDATE OF t1_appnt_evnt_id ON TBL1    FOR EACH ROW    WHEN (NEW.t1_prnt_t1_pk is not  null)    DECLARE         v_reassign_count number(20);    BEGIN        select count(t1_pk) INTO v_reassign_count from TBL1               where  t1_appnt_evnt_id=:new.t1_appnt_evnt_id and t1_prnt_t1_pk is not null;        IF (v_reassign_count > 0) THEN            RAISE_APPLICATION_ERROR(-20013, 'Multiple reassignments not allowed');        END IF;    END;   The table has a primary key "t1_pk", an "appointment event id" t1_appnt_evnt_id and another column "t1_prnt_t1_pk" which may or may not contain another row's t1_pk.  It appears the trigger is trying to make sure that nobody else with the same t1_appnt_evnt_id has referred to the same one this row is referring to a referral to another row, if this one is referring to another row.  The comment on the bug report from the DBA says "remove the trigger, and perform the check in the code", but unfortunately they have a proprietary code generation framework layered on top of Hibernate, so I can't even figure out where it actually gets written out, so I'm hoping that there is a way to make this trigger work.  Is there?


I've installed a Citrix client on my laptop and when I now search for it, I see this:    They seem identical, but maybe the title of the programs is different. How can I see the full title of those programs in this search window?

This question has been asked before but that was over 6 years ago and I'm hoping to get a more updated answer.     Basically when I search for an application, if the name is too long it's shortened with an ellipsis (...). I want to know how to change it so that the whole name is displayed. Example:   I hope it's OK to ask for an updated answer.  I'm using Ubuntu 17.10 with GNOME Shell 64-bit.


How would you evaluate the following limit as n goes to infinity?  $$\lim \frac {1}{(1+\frac {1}{n})^n}$$  I would of thought that this would evaluated to be,  $$\lim \frac {1}{(1)^n} = 0 $$  However the correct answer is $$\frac{1}{e}$$

I was wondering if it is possible to get a link to a rigorous proof that  $$\displaystyle \lim_{n\to\infty} \left(1+\frac {x}{n}\right)^n=\exp x$$


Show that $$\sum_{k=2}^\infty (\zeta(k) - 1)$$ converges and find the limit.  (Hint : Deduce that $\zeta(s) = 1 + O(2^{-\sigma})$ where $s = \sigma + it$, $\sigma \geq 2$.)  $\textbf{Proof}$ Let $s = \sigma + it$ with $\sigma \geq 2.$ Then $$\zeta(s) = 1 + \sum_{n \geq 2} \frac{1}{n^s} = 1 + \sum_{n \geq 2} \frac{1}{n^\sigma e^{it \log n}}.$$  Since $s$ is complex and complex number cannot be compared, is it a bit vague to prove $$\zeta(s) = 1 + O(2^{-\sigma}).$$  Even if I ignore the imaginary part, it is not clear why $$\sum_{n \geq 2} \frac{1}{n^\sigma}\leq \frac{C}{2^\sigma}$$ for some constant $C$.

While I was looking at the values of the zeta function for the first natural numbers, I noticed that the sum of the values minus $1$, converge to $1$. Better put: $$\sum_{n=2}^{\infty} \left(\zeta(n)-1\right) = 1 $$ Furthermore, if you use only the even numbers for the zeta function, the sum will converge to $\frac{3}{4}$, or $$\sum_{n=1}^{\infty} \left(\zeta(2n)-1\right) = \frac{3}{4}$$  Leaving $$\sum_{n=2}^{\infty} \left(\zeta(2n-1)-1 \right)= \frac{1}{4}$$  This is probably common knowledge among mathematicians, but I couldn't find much about it on the internet. Is there a proof of this or perhaps even a simple explanation why this is so?


I want to dynamically add events onto elements using jQuery before adding them to the DOM.  The way I have been doing it is the following:  var biggerHTML = '

Click

'; $(body).append(biggerHTML); $('.click').off('click, function); $('.click').on('click, function); // The reason I have the off is because I will be dynamically adding in these a few times. // It may make more sense why I felt like I had to do it when you read the next example.   I couldn't figure a way around unbinding my function from all the 'p' elements with class 'click' before adding the same function to the same selectors. What would happen would be my function would be bounded twice to the first element if I have two of the elements, it would bind three times if I had three elements. So, everytime I clicked, it would run two or three times.  I know I could count the amount of class 'click' in the DOM then when I add my element again, give it an id of count+1 and then bind to the id, but I wanted to find something closer to the following.  var button = '
 Click
'; $(button).on('click', function); var biggerHTML = '
' + button + '
'; $(body).append(biggerHTML);

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.


So this might be wierd question but is there anyway to get the synomposis of a command in the terminal? what I mean by this is that if I write for example find I would like the terminal to write out the Synopsis part of the man page for find. I ofcourse don't want it to simply type everything in, but rather have a "grayed out" suggestion for what to write.  I think this would be extremely helpful for when you forget a specific command and don't want to simple go to the man page.   The redis-cli seems to do something like this... The main part here is that I want it to be inline, i. e. like redis-cli:

I love creating hotkeys to open programs and menus, but sometimes I can't figure out what the command for something is. For instance, it took some Googling to find out that the system monitor is opened with gnome-system-monitor  Is there anyway to figure out the terminal command for any program or menu (such as keyboard shortcuts or display settings) in Ubuntu?


\documentclass[]{phstyle} \usepackage{latexsym,amsfonts,amssymb, undertilde} \usepackage[fleqn]{amsmath} \usepackage{makeidx}  %Preamble  \numberwithin{equation}{chapter} %\renewcommand{\theequation}{\thesection.\arabic{equation}}  \begin{document}  %\include{chapI}   these 2 lines are because the chapters are different tex files  %\include{chap1}  \renewcommand{\thechapter}{\Roman{chapter}}  %\setcounter{chapter}{0} %\renewcommand{\theequation}{\thechapter.\arabic{equation}}  \chapter{Introduction}  \section{Chap I Section1}  \begin{equation} this is equation I.1 \end{equation}  \begin{equation} this is equation I.2 \end{equation}  \section{Chap I Section2}  \begin{equation} this is equation I.3 \end{equation}  \chapter{Chapter 1}  \section{Chap 1 Section 1}  \begin{equation} this is equation 1.1.1 \end{equation}  \begin{equation} this is equation 1.1.2 \end{equation}  \end{document}     I have been typing Chapters 1-5 that contain sections and subsections and equations. The equations were numbered globally, i.e. if I had 3 equations in section 1 of Chap 1, they were numbered 1.1.1, 1.1.2, 1.1.3 and for Section 2, the equations were 1.2.4, 1.2.5, etc.  Recently I had to change Chap 1 and everything in it to Chapter I (roman number) and Chap 2 were renumbered to Chap 1, etc.  My problem is that LaTeX started numbering the equations in Chap I (the other chapters did not have this problem) according to the sections and not globally anymore. That is, the 3 equations in Chap I were I.1, I.2, I.3, and the equations in the second section of Chap I became I.1, I.2, etc instead of I.4, I.5, etc  I needed the prefix to be the chapter and not the sections. I don't understand why there is a change. I have never used \numberwithin in my book  Here are some of my codes  \documentclass[]{phstyle} \usepackage{latexsym,amsfonts,amssymb, undertilde} \usepackage[fleqn]{amsmath}   for the equation numbering in Chap I  \renewcommand{\thechapter}{\Roman{chapter}} \renewcommand{\theequation}{\thechapter.\arabic{equation}} **   Previously when Chap I was Chap 1, ** was  \renewcommand{\theequation}{\thesection.\arabic{equation}}   I have also tried the line below but it didn't work  \renewcommand{\theequation}{I.\arabic{equation}}   Thank you in advance

Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)?  And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering?  \documentclass{book}% for "vice versa" variant, replace `book` with `article`  \begin{document}  \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section`  \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure}  \end{document}   Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class?


I was trying to get confidence interval for $\hat{p}$. However, the estimated p in the population is close to zero. So I am wondering how I can calculate the confidence interval when p is that small? ()  Thanks!

What is the best technique to calculate a confidence interval of a binomial experiment, if your estimate is that $p=0$ (or similarly $p=1$) and sample size is relatively small, for example $n=25$?


I understand the pointer concept (int*), but I cannot understand int& because they give the same result. What does int &data exactly mean?  void add1(int *data){   (*data)++; }  void add2(int &data){   data++; }  int main() {   int i=0;    add1(&i);   printf ("value i = %d\n",i) // show 1    add2(i);   printf ("value i = %d\n",i); // show 2    return 0; }

I know references are syntactic sugar, so code is easier to read and write. But what is the difference between a pointer variable and a reference variable?


I need to forward a dictionary to another function (that I can't change). Both my function and the target function look like this:  def myFunc(arg, **args): def targetFunc(arg, **args):   In my code, I used to call the target function directly:  a = targetFunc(123, aaa=4, bbb=5, ccc=6)   and I have to add another layer to process the extra arguments passed as a dictionary, before forwarding to the target function:  a = myFunc(123, aaa=4, bbb=5, ccc=6)   And now my function receives 123 as arg, and a dictionary:  {'bbb": 5, 'ccc': 6, 'aaa': 4}   as args. The problem is, I can't modify the target function in any way. It may be a function from a package like subprocess.run. I've tried supplying the dictionary directly but Python says  def myFunc(arg, **args):     print(args)     targetFunc(arg, args)  def targetFunc(arg, **args):     print(args)     TypeError: targetFunc() takes 1 positional argument but 2 was given   I can write myFunc in any way. How can I forward this dictionary to the target function, so it receives the same dictionary as its args?  Note: It's possible to construct a string then eval() it, but I don't want to do it that way.

I'd like to call a function in python using a dictionary.  Here is some code:  d = dict(param='test')  def f(param):     print(param)  f(d)   This prints {'param': 'test'} but I'd like it to just print test.  I'd like it to work similarly for more parameters:  d = dict(p1=1, p2=2) def f2(p1, p2):     print(p1, p2) f2(d)   Is this possible?


I think it would be a good idea to have an option for people reviewing suggested edits to leave a comment to the users who suggested the edits.  This would be useful for helping the newer users to learn how to edit better.  Example:   Thanks for the edit, but for next time remove the "I hope it's not a duplicate" as it doesn't add anything to the question   This is more useful for approved/improved edits as you may think the edit improves the question but more should've been done in the edit and you should let the editor know what other things they should look out for to improve for next time.

Possible Duplicate:          Whenever an edit I suggest gets rejected, I don't know unless I get curious and check the page. Is there any way that a notification can be sent out when they are rejected, similar to when badges are earned or when privileges are gained?


I had my old website at the********.in and shifted to a .org domain. I also switched the hosting company. Here's what I did -    I drove all traffic from old site to the new one with 301 permanent redirects using the htaccess. I confirmed the address change successfully in Google Webmasters tools. The redirection works fine.   So the old htaccess is still at my old host for over a month now.   How long do I need to keep that account for the search results to redirect properly? I assume the redirection will break if I close my previous account. Is it safe to do so now that sufficient time has passed and I practically don't see any old address in the search results any more?

I had an old domain that I have deprecated, but 301 redirected all results from it to my new site.  The new site is now receiving a decent amount of traffic, but I don't know if it's 301 redirected from the old site, and doing a site:[old site] still shows several thousand pages indexed.  Since all pages from the old site are 301 redirected, will they ever be removed from the index, as long as the old domain name is active?  As a rule of thumb, somewhere I got 90 days for any significant site changes.  When is it safe to burn the old domain?


We know from the first law of thermodynamics that the amount of energy in the universe is conserved. However, doesn't this law presuppose that the amount of energy in the universe is a finite quantity of Joules?  As David Hume reasoned, all of science depends on inductive generalization. But wouldn't it be a fallacy of hasty generalization to conclude from models and experiments where the quantity of joules are finite and contained by an adiabatic wall that therefore the universe at large is like this?

In popular science books and articles, I keep running into the claim that the total energy of the Universe is zero, "because the positive energy of matter is cancelled out by the negative energy of the gravitational field".  But I can't find anything concrete to substantiate this claim. As a first check, I did a calculation to compute the gravitational potential energy of a sphere of uniform density of radius $R$ using Newton's Laws and threw in $E=mc^2$ for energy of the sphere, and it was by no means obvious that the answer is zero!  So, my questions:   What is the basis for the claim – does one require General Relativity, or can one get it from Newtonian gravity? What conditions do you require in the model, in order for this to work? Could someone please refer me to a good paper about this?


I want to write, compile, and run a simple test.cpp file.  Error when running $ ./test.o:  bash: ./test.o: cannot execute binary file: Exec format error   Results of running $ file ./test.o:  ./test.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped   Results of running $ uname -m is x86_64  From my understanding, I need the same system architecture as the binary executable but they both seem to be the same and yet when I run $ ./test.o I keep receiving that same error. Any ideas?

On AWS Ubuntu Server, I wrote C++ Hello, World program:  #include <iostream> using namespace std;  int main(){         cout<<"Hello, World!"<<endl;         return 0; }   And compiled it:  ubuntu@ip-xxxxx:~/dev/c++$ g++ -c ./test.cc -o out ubuntu@ip-xxxxx:~/dev/c++$ chmod a+x out ubuntu@ip-xxxxx:~/dev/c++$ ./out -bash: ./out: cannot execute binary file: Exec format error ubuntu@ip-xxxxx:~/dev/c++$ file ./out ./out: ELF 64-bit LSB  relocatable, x86-64, version 1 (SYSV), not stripped ubuntu@ip-xxxxx:~/dev/c++$ uname -a Linux ip-xxxxx 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux ubuntu@ip-xxxxx:~/dev/c++$ gcc --version gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4   It seems that architecture x86-64 is the same each other. What is the problem here? Do I have to add more C++ flags?


I have numbers with different digits each into variables, and I would like to write a script which split them into three variables each one using expect tcl. The first variable should contains three digits, the second always 8 digits, and the third one the remaining digits. How could I achieve that?   Ps: The available answers on the platform show how to achieve this with bash.  Numbers:   345653987652   87645625398784  3984737645  4657636359487564

Given a filename in the form someletters_12345_moreleters.ext, I want to extract the 5 digits and put them into a variable.  So to emphasize the point, I have a filename with x number of characters then a five digit sequence surrounded by a single underscore on either side then another set of x number of characters.  I want to take the 5 digit number and put that into a variable.  I am very interested in the number of different ways that this can be accomplished.


" I hurt my knee playing soccer " Is this sentence right? If yes, how come?

I know that expect is used this way:  I expect you to do that.  But I have also seen examples like with verb in its "ing" form:  What to expect working at... I will expect you doing (does not sound right to me)  I would be grateful for explanation.


How to draw the similar Smith-Volterra-Cantor set ()? It is formed basically by removing 4^{-n} from the middle of every interval at level n, starting from the unit interval [0,1]. Here is an image of the Smith-Volterra-Cantor set from wiki:    I did not succeed in making an analog of the codes for Cantor set ().

I am trying to draw a cantor set in LaTeX and I am having issues doing this. I am trying multiple \put commands, but they just go to the right of one another. Does anyone know how to do this?  Any help would be much appreciated.


In many cryptographic protocols design like  one, I have seen the statement 'Choose a Hash function for example: \begin{align} h&:  \{0,1\}^*\times\mathbb G\to\mathbb Z_q^*\\ h_2&:  \{0,1\}^*\times\{0,1\}^*\times\mathbb G\to\mathbb Z_q^*\\ \end{align} in which it takes as input a binary string and a random element of some group and outputs an element of multiplicative group of prime field. How could I construct such a hash function?

In this article , specifically in the section 4.1 of the initialization phase,the following cryptographic hash functions have been chosen: \begin{align} h_1&:   \mathbb G\to\mathbb Z_q^*\\ h_2&:  \{0,1\}^*\times\{0,1\}^*\times\mathbb G\to\mathbb Z_q^*\\ h_3&:  \{0,1\}^*\to\mathbb Z_q^* \end{align} where G is an additive group with order q. Can anyone explain to me what's the meaning of their notations and how to use them for example in SHA algortihm? Or maybe give me a simple example with real inputs?


Let ${x_n}$ be a real sequence such that $\lim_{n\to\infty}(x_{n+1}-x_n)=c$. Then, talk about convergence of the sequence ${\frac{x_n}{n}}$  My try: I did not understand how to proceed. I thought of integers and even integers. The former's seq $\frac{x_n}{n}$ converges to 1 and latter to 2.  So i think, maybe, the sequence should converge to $c$. But i have no clue how to prove it. Any hwlp would be appreciated.

Assume that $$\lim_{n\to\infty}(a_{n+2}-a_{n})=A$$ show that  $\displaystyle \lim_{n\to\infty}\dfrac{a_{n}}{n}$and $\displaystyle\lim_{n\to\infty}\dfrac{a_{n+1}-a_{n}}{n}$ exist and find these limits.  maybe this problem have some methods, Thank you.  since  $$\lim_{n\to\infty}(a_{n+2}-a_{n})=A$$ so there exists $N$, and for $\forall \varepsilon>0$, such $$|a_{n+2}-a_{n}-A|\le\varepsilon$$


What rpm when peddling is the most energy efficient aka least calories burned for the fastest speed?

I have heard that one ought to turn the pedals at 90rpm. However, I do so much slower, especially while standing, and would like to understand the argument behind this number (or any other number). So:  What is the optimal cadence of a cyclist. Why? Does it depend on the terrain? Does it depend if the rider is sitting or standing upright? What are some possible consequences of deviating too much from the proposed number?  Possible duplicate of , but I didn't find there the "whys" except for "it will grind your knees." However, I find riding upright with slow cadance no more demanding than walking up a hill with a backpack.


The space at right side is blank. In text mode editing with MS docx for example, we can fill up space with text.  When a small image is attached for questions or answers some white space at the sides is wasted. If a tight wrap edit can place image alongside text it becomes more readable. Is it possible to include this feature?

Right now as far as I can tell all images have to appear as inline paragraphs, left-aligned with other paragraphs.  For sites like Stack Overflow, it makes sense... images are only used when you want to illustrate something, so the image is sort of like something that they have to stop and "read".    On some of our newer sites, like , images can serve a more decorative function, making questions and answers look awesome and interesting. For example, when somebody asks about trains in Mongolia, an answerer might write an extensive answer and then attach a picture showing them standing in front of a train in Ulan Bator.  For these "decorative" pictures, it makes a lot more sense if they are floated to the right and text wraps around them. Otherwise they interrupt the text and, frankly, look kinda ugly.  I suggest something simple like $[...] instead of ![...].


I've procured myself a Galaxy S3 and I intend to mess with it.  I'd like to have a phone that runs one app and one app only (mine).   I want to disable calling, texting, app installs. Come to think of it, I still want to be able to receive texts, but not send them.  Removing the base apps isn't necessary as long as they're made non-functional in some other way like crashing on startup or something. Outgoing calls or picking up incoming calls is a no-no.  What's the best way to go about disabling these features?   Here's an "artist's" rendition of what I want to see ideally:

All I want is a tablet that only runs one application (developed by me) on startup. Is there a "clean" version of Android that I can use for this? By clean or empty I mean an OS without all the unwanted features.  Basically, my app needs to connect to the Internet, access the camera within my app, and send and receive data from sensors and other external devices.


I've been looking for the solution to this for a while and even tried my own. I'm trying to change Discord to always show my custom message, but when I play games like Rocket league and LoL the game's name goes over my message.   Those are verified games so I can't change the name for those, I also can't change the file now for league because then the client won't work and idk what other files to change if I do change that. If you could help I would appreciate it but seems like there's no solution.

Discord will show what game you're playing, but I don't want it to do that.  Is it possible to make discord not show the game currently being played?


I have created a different init method and would like that to be the designated initializer instead of the standard -init.  How can I prevent client code from instantiating the class using -init?  e.g.  /* everyone must call this */ - (id)initWithInfo:(NSDictionary *)info {   self = [super init];   if (self) {       _info = info;   }    return self; }  /* Don't want anyone to be able to create this using init */

I need to hide (make private) the -init method of my class in Objective-C.  How can I do that?


I'm relatively new to blender and I would like to get this hexagon model to emit rotated toward the face it was emitted from. Here's what I have,   If you are confused about something I said, I can clarify some more.

I'm trying to create a mini-world with (among other things) trees on it. I have created an icosphere, modeled several trees and put them in a group. Next I added a particle system to the sphere, and chose hair. In the "render" section I selected Group and the name of the group I created. As expected the trees show up but they're all oriented in the same direction, while I would like them to pop up just like the default hairs do (along the normal of the individual faces). I tried fiddling with all kinds of settings, had them oriented in all kind of ways (e.g. towards the "north pole"). I also tried using the emitter instead of hair setting but without success as well.


I want to know whats the significance of the ID "0DFm00000007Om6" in the following SOAP WS Stub, I see this is only added for enterprise WSDL Stub endpoints not for partner WSDL Stub endpoints, is it something to differentiate this two?  public class Soap {                  public String endpoint_x = 'https://test.salesforce.com/services/Soap/c/33.0/0DFm00000007Om6';                  public Map<String,String> inputHttpHeaders_x;                  public Map<String,String> outputHttpHeaders_x;                  public String clientCertName_x;                  public String clientCert_x;                  public String clientCertPasswd_x;                  public Integer timeout_x;                  ..............  }

Is that the Organization Id at the end of SOAP service end point URL? I have checked the organization Id in my salesforce account and this Id did not match with it. Please suggest.  0DF90000000DHQR


I know there is a lot of answers on how to integrate with fractions, but I think they are very case specific.  I've tried integration with substitution, but I can't seem to get a useful answer.  I simply want to integrate $\int$$\frac{v}{g+\alpha\cdot v}dv$

How to integrate $$\int \frac{v}{g-kv}\,\mathrm dv$$ it's supposed to be equal to $$ -\frac{v}{k} -\frac{g}{k^2}\ln(g-kv)$$ but I can't get that, I tried a substitution $u=g-kv$ and got close but no right? Any help.


I recently renewed my passport (Brazil). I also have an expired passport, which has my New Zealand visa (permanent resident). I am planning to visit New Zealand.  Since my valid New Zealand visa is in my old/expired passport, do I need to renew/transfer my New Zealand visa or can I simply travel with valid visa in old passport?

I am an Indian national and would like to ask a question about my travel to New Zealand. My old passport contains my New Zealand visitors visa which is still valid for 8 months. Recently my old passport has expired and I got it replaced with a new passport. I am planning to visit my friends there and just wondering can I just travel  New Zealand with visa in my old passport?


Q) Let, $a_{n} \;=\; \left ( 1-\frac{1}{\sqrt{2}} \right ) ... \left ( 1- \frac{1}{\sqrt{n+1}} \right )$ , $n \geq 1$. Then $\lim_{n\rightarrow \infty } a_{n}$  (A) equals $1$  (B) does not exist  (C) equals $\frac{1}{\sqrt{\pi }}$  (D) equals $0$    My Approach :- I am not getting a particular direction or any procedure to simplify $a_{n}$ and find its value when n tends to infinity. So, I tried like this simple way to substitute values and trying to find the limiting value :- $\left ( 1-\frac{1}{\sqrt{1+1}} \right ) * \left ( 1-\frac{1}{\sqrt{2+1}} \right )*\left ( 1-\frac{1}{\sqrt{3+1}} \right )*\left ( 1-\frac{1}{\sqrt{4+1}} \right )*\left ( 1-\frac{1}{\sqrt{5+1}} \right )*\left ( 1-\frac{1}{\sqrt{6+1}} \right )*\left ( 1-\frac{1}{\sqrt{7+1}} \right )*\left ( 1-\frac{1}{\sqrt{8+1}} \right )*.........*\left ( 1-\frac{1}{\sqrt{n+1}}    \right )$     =$(0.293)*(0.423)*(0.5)*(0.553)*(0.622)*(0.647)*(0.667)* ....$ =0.009*...  So, here value is tending to zero. I think option $(D)$ is correct. I have tried like this $\left ( \frac{\sqrt{2}-1}{\sqrt{2}} \right )*\left ( \frac{\sqrt{3}-1}{\sqrt{3}} \right )*\left ( \frac{\sqrt{4}-1}{\sqrt{4}} \right )*.......\left ( \frac{\sqrt{(n+1)}-1}{\sqrt{n+1}} \right )$ = $\left ( \frac{(\sqrt{2}-1)*(\sqrt{3}-1)*(\sqrt{4}-1)*.......*(\sqrt{n+1}-1)}{{\sqrt{(n+1)!}}} \right )$ Now, again I stuck how to simplify further and find the value for which $a_{n}$ converges when $n$ tends to infinity . Please help if there is any procedure to solve this question.

Let $$a_n=\left(1-\dfrac{1}{\sqrt2}\right)\dots \left(1-\dfrac{1}{\sqrt{n+1}}\right),n\ge1$$ Then find $\lim_{n\to \infty} a_n$.   How can I proceed? I am stuck at the first step. Please help.


I'm trying to do click on single item which is gated by Firebase recyclerview adapter by I getting some run time error.   This is my code for ImageViewHolder.class and I'm getting NullPOinter Exception.  This exception is caused on mClickListener so please give me some solution for this problem, I'm not getting proper idea about it.  package com.humbingo.asthanews.Settings;  import android.content.Context; import android.content.Intent; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.widget.Toast;  import com.humbingo.asthanews.R; import com.squareup.picasso.Callback; import com.squareup.picasso.NetworkPolicy; import com.squareup.picasso.Picasso;   public class ImageViewHolder extends RecyclerView.ViewHolder {      private static final String TAG = "Firebase";     private View mView;     public Button shareBtn;     public Context context;     public ImageView imageView;       private ImageViewHolder.ClickListener mClickListener;       public ImageViewHolder(View itemView) {         super(itemView);         mView = itemView;         shareBtn = mView.findViewById(R.id.btnShare);          itemView.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 mClickListener.onItemClick(v, getAdapterPosition());              }         });           itemView.setOnLongClickListener(new View.OnLongClickListener() {             @Override             public boolean onLongClick(View v) {                  mClickListener.onItemLongClick(v, getAdapterPosition());                 return true;             }         });       }       public void setTitle(String title) {         TextView mPostTitle = mView.findViewById(R.id.postTitle);         Log.d(TAG, "This is Title||-- " + title);         mPostTitle.setText(title);     }      public void setDesc(String desc) {         TextView mPostDesc = mView.findViewById(R.id.postDesc);         mPostDesc.setText(desc);         Log.d(TAG, "This is Description||-- " + desc);     }       public void setImage(final Context ctx, final String imageStr) {         imageView = mView.findViewById(R.id.postImg);         // Picasso.with(ctx).load(imageStr).into(imageView);          Picasso.with(ctx).load(imageStr).networkPolicy(NetworkPolicy.OFFLINE).into(imageView, new Callback() {             @Override             public void onSuccess() {               }              @Override             public void onError() {                 Log.e(TAG, "setImage: Error Message ");                 Picasso.with(ctx).load(imageStr).into(imageView);               }         });       }       //Interface to send callbacks...     public interface ClickListener{         public void onItemClick(View view, int position);         public void onItemLongClick(View view, int position);     }      public void setOnClickListener(ImageViewHolder.ClickListener clickListener){         mClickListener = clickListener;     }   }

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?


Is it possible to add / inform clearly new users that the first minutes after they post a question they get 60-90 percent of the brain power people have to offer?  Most often, people post and go away for 1, 2 hours...

I think this should be added to the faq and/or on the /ask page:  Advice to stick around for about 15 minutes after posting. Often this is the time when the fate of a question (or answer) is decided (at least on SO). Close votes are cast, obviously missing information is asked for and improvements are suggested. It's quite an annoyance to look at a 1 minute old question, spend 2 minutes reading it and finding out that a trivial detail is missing for me to be able to provide an answer, commenting about it and then receiving an answer in 2 days when I completely forgot what was the question about.  I think that newbies simply don't expect SO to react so quickly to their questions and don't refresh the page after a couple of minutes. It might be a good idea to suggest doing so.


I'm beginning Pathfinder and I'm curious as to how reliable the information is on that site.    I only ask because occasionally I find it is lacking sources and I know it also has some 3rd party items on the site as well and I don't know if any of that ever seeps into the mechanics.  thank you!

I've seen different references to online manuals for Pathfinder at  and .  What is the difference between these two sites?  Since the core rules are likely to be the same, having a more "official" source of rules seems moot. Are there any distinctive differences in content offered?  e.g.  Does d20PFSRD offer anything that the PRD doesn't (or things that should be paid for), or does Paizo miss out on anything by people using d20PFSRD that they can invest in making new materials?  Is there any real objective reason to use one instead of the other?


I want to connect two Acer notebooks with a single ethernet cable between them for lan gaming.   Connecting them to a router or a switch is not an option due to distance. I found a couple of tutorials by searching for it, but all of them depended on the already extinct Workgoup function on Windows, thus I can't confidently follow the tutorial.   So I would appreciate any help with this, because it doesn't seem as simple as plug the cables in the notebooks.

I've got two systems that are right next to each other, and connected wirelessly to the same router. I want to connect the two of them together with an ethernet cable - both have gig-e and autonegotiation so it should work. I DON'T need the second system to have internet, but I need any specific tweaks to be on that system only.  I do not need to share internet. I need RDP to work, and thats it  The wireless runs on a 192.168.1.x subnet and ICS always runs on a 192.168.0.x subnet so that wouldn't be a problem.  Ideally I want this layout. Can I do this with ICS, or there some other free or open source way?          +---------------------------+           +-----------------------------+      | Laptop 1                  |           | Laptop 2                    |      | Client- mobile            |           | 'server'- stationary system |      |                           <-----+----->                             |      | RDP client                |           | RDP Server                  |      | MUST have wireless access |  ethernet | Runs ICS or similar         |      +---------+-----------------+           | wireless access optional    |                |                             +-----------------------------+                |                |                |                |                |                |                |                +---------------+     wireless to internet


Can you please explain how to add readable text paragraph to background with various colors ? When background and foreground colors match then words or phrases are not distinct. I need readable text on such backgrounds.  Thank you.

Often, I want to write text over a background image. If the background image is bright, I use a dark color for the text, and vice versa. But, often the image has both dark and bright parts. So a dark text is unreadable on the dark parts, and a bright text is unreadable on the bright parts.  I currently use one of several solutions, all of them are imperfect:   Brighten the image and use a dark font, or darken the image and use a white font; the problem is that it reduces the beauty of the background image. Use grey text (as in this question:  ). But grey text often looks unappealing, and is still only barely readable. Use dark text, and try to position it on the bright spots of the image (or vice versa). This takes a lot of time because it requires me to position each word separately.   Are there better solutions to this problem?   In particular: is there an automatic tool that takes an image and a text, and positions the text only on the dark/bright parts of the image?


I am facing weird situation here.   Following routine is called after I close my preference activity.   SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this); String tmp = preferences.getString("unit", "C"); CommonTool.temperatureUnit = tmp;   What it does is, getting the settings that I made from the preference activity and I am storing it to a global variable called CommonTool.temperatureUnit. In this case, value "C" is assigned to it.    Fine by now.  In side the CommonTool class, I have a function which returns a temperature in Celsius or Fahrenheit depends on the user preference, I got from the preference activity.   public static String getCommonTemperature(int celsius) {     int ret;      if (temperatureUnit == "C") {         ret = celsius;     }     else {         ret = (9/5) * celsius + 32;     }      return Integer.toString(ret); }   The thing is.. it keeps fall into else part of it while temperatureUnit contains "C".     Does anyone have any idea? Thanks in advance.

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


Many times my mouse USB suddenly stops working, though the trackpad works just fine. I have to click it to make it work again. I have found the following solution:  sudo bash for i in /sys/bus/usb/devices/*/power/control; do echo on > $i; done   However, I have to execute this script every time the problem occurs. What is the true reason behind it? How can I fix it permanently?  I am using Ubuntu 14.04 LTS.

I don't know how , but somehow automatic power-off of usb devices got accidentally enabled. Now my usb mouse goes off even if it's idle for 2-3 seconds. It's really irritating.  This happened after I installed powertop and powernap. Maybe it has something to do with these two applications.  How can I disable this "feature"?


This is a curiosity from a reading a text that offered no proof. Why is $(C^{1}[0,1], \|\cdot\|_{\infty})$ not Banach?

The space $ C^1[0,1] $- the space of all continuously differentiable functions on $ [0,1]$ is not a Banach space with respect to the sup norm,$ \|.\|_{\infty} $ since the uniform limit of a continuously differentiable function need not be differentiable.  How can I illustate this statement using a counter example? Can I use $ f_{n}=\frac1 n \sin nx $ as a counter example?  Also, is $ C^1[0,1] $ is same as the space given by $ X=\{f\in C^1[0,1]:f(0)=0 \}$. Can I use the same example to show that this is not a Banach space?  More help is appreciated! Thanks!


I have downloaded several apps from google play on my surface but they are no where to be found. I have tried search and poked around download files but nothing. Should it really be this hard? Seems ridiculous.

I want to know where Google Play stores downloaded .apk files. I've heard that Google Play doesn't send you an .apk file and installation is completely online. Is it true?


This is a follow up question to:  I want to know why should we use fit at all when we have fit_transform which is much faster than using fit and transform separately? After all we will always transform the training data after fitting it. Do we have any use of fit all by itself?

I'm a newbie to data science, and I do not understand the difference between the fit and fit_transform methods in scikit-learn. Can anybody explain simply why we might need to transform data? What does it mean, fitting a model on training data and transforming to test data? Does it mean, for example, converting categorical variables into numbers in training and transforming the new feature set onto test data?


Making a rower machine. And i want to make the cable / coil to spin or rotate inside it. Any idea how to make the cable / coil reel. I have made the curve and trying to make spool. I have parented the handle and cable. When the handle is move in X axis or stretch the coil winding up. When release the handle the coil unwinding up. Any suggestion how it works. Thanks.

I have searched everywhere on the web for a way to do this, but I can’t find anything. Someone have any ideas for doing this without using physical simulations? The operation should be this: the red wire passes through the blue object (which is static) and is anchored to the yellow object, which can rotate When the yellow object rotates, the wire wraps around the cylinder in a similar way to a fishing rod.


I have a text file which contains a sequence of price Data. The problem could match any long history of historical data such as Temperature, Air Humidity, Prices, Logfiles, ...      The Head of my history file looks like the following:   If I want to read and process a file too large for memory, I would normally choose the following code:  using (FileStream fs = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) using (BufferedStream bs = new BufferedStream(fs)) using (StreamReader sr = new StreamReader(bs)) {     string line;     while ((line = sr.ReadLine()) != null)     {         // Process Data     } }   In my case a record is created every 1000ms. The most recent data is at the end of the file.  The issue arises when trying to process the most recent data.   Example: I want to generate an average of the last 30 days. It would be most efficient to start at the end of the file and move towards the beginning until the X days threshold is met. The sample code above would read through the whole file which is barely usable in this scenario. A worst-case every time I need to update recent data indicators.  This issue of course applies to any operation where you want to process the last x elements.  Is there a functionality to read from end to start of the file?

I need to process a large file, around 400K lines and 200 M. But sometimes I have to process from bottom up. How can I use iterator (yield return) here? Basically I don't like to load everything in memory. I know it is more efficient to use iterator in .NET.


I am based in india using Reliance, CDMA  For CDMA in India, the frequencies are:  824 - 844 MHz for the uplink (handset to base station)  869 - 889 MHz for the downlink (base station to handset)  20 MHz band for uplink & downlink. carrier freq. is 1.25MHz  since i am interested in purchasing the phone, and the phone does not come cheap , can you guys confirm that it will work in india.  Thanks Nitin

Yes, of course, I want that Ubuntu Phone.   Where is the order now button?


Say I have a list arr and an index i within [0:len(arr)], how do I get all the elements starting from arr[i] up to arr[-1] in a Pythonic way? For example:  arr = 'abcdef'  i = 3   I basically want to get b = 'def' I tried  b = a[i:-1]   but obviously that'll leave out the last element.  Also, my list sometimes has only 1 element, so i = 0. How do I safely treat that edge case? Thank you!

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


Made a code that calculated the amount of negative numbers in an array and shows those numbers. The problem is when the program prints out the number, it changes the number a slight bit, adding or subtracting something like 0.003.  I have absolutely no clue as to what's wrong with it, tried asking my professor; she said she didn't know, so I am here.  float col[10]; ... for (int i = 0; i < 10; ++i)         {             scanf_s("%f", &col[i]);         } ... printf("\n");         printf("There are %d negative numbers\n", ct);         for (int i = 0; i < 10; ++i)         {             if (col[i] < 0)             {                 printf("[%d]=%f ", i, col[i]);             }          } ...   Put in -7786.88, command line printed out -7786.888184. It's fine on integers, just prints out a bunch of zeroes after the dot.

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


Are $\mathbb{C}[x,y]/(x,y)$ and $\mathbb{C}[x,y]/(x-1,y-1)$ isomorphic as $\mathbb{C}[x,y]$-modules?   I think they are cyclic so they are isomorphic, but I'm not sure.

Is it true for a commutative ring $R$ and its ideals $I$ and $J$ that if the quotient $R$-modules $R/I$ and $R/J$ are isomorphic then $I=J$?


I m going to Australia for my studies after few months. I belongs to a Sikh religion. I am deeply religious and I carry a kirpan with me everytime and everywhere. And the airport security do not allow me to carry it with me. So what should I do? How can I overcome this?

I am a religious Sikh from Jalandhar, India. I have not travelled outside of the country for a single time so far. However, my family is pestering me to take them for a jolly holiday trip to a different country.  I have a problem with that. I am deeply religious and I carry the  always with me wherever I go, keeping in line with the tenets of my religion. However, I can foresee that flight security are likely to view the kirpan as a dangerous weapon and will not allow me inside the airplane.   How can I overcome this? Is it possible to excuse me for religious reasons? Is there some tolerant flight/country which will empathize with my religious needs?


A few years ago I switched from Windows to Ubuntu 14.04 LTS for my desktop PC. I installed the Ubuntu operating system (root+home+swap) in the space previously assigned to the C partition, while the other partitions (D,E,F and G) were left undisturbed. Thus the partitions containing the new operating system now have the ext4 file system while the other partitions continue with ntfs. This has been serving my purpose well enough.  Recently, however, for the first time I made several attempts to run fsck on the ntfs partitions of the hard drive, and I received the following message:     fsck from util-linux 2.20.1    fsck: fsck.ntfs: not found    fsck: error 2 while executing fsck.ntfs for /dev/sda5   When I try to run fsck on my external hard drive, which also has ntfs, the message that is returned is:   fsck from util-linux 2.20.1  e2fsck 1.42.9 (4-Feb-2014)  ext2fs_open2: Bad magic number in super-block  fsck.ext2: Superblock invalid, trying backup blocks...  fsck.ext2: Bad magic number in super-block while trying to open /dev/sdb   And:     "The superblock could not be read or does not describe a valid ext2/ext3/ext4 filesystem.  If the device is valid and it really contains an ext2/ext3/ext4 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:     e2fsck -b 8193   or     e2fsck -b 32768 "  Can anybody please throw any light on what is happening and how I can run fsck on ntfs partitions and devices?

On several machines that I've upgraded from Natty to Oneiric, I get an error every boot (one for every NTFS partition):  Serious errors were found while checking the disk drive for /windows/c.  Press I to ignore, S to skip mounting, or M for manual recovery   Following the suggestion in , I ran fsck from the manual recovery shell. I got this output:  fsck from util-linux 2.19.1 fsck: fsck.ntfs: not found fsck: Error 2 while executing fsck.ntfs for /dev/sda1   I can't find fsck.ntfs, and command-not-found doesn't help either. How can I make this error go away?  By the way, I've tried booting into Windows (XP) several times, thinking that Windows would repair the filesystems. But apparently Windows thinks the filesysystems are just fine. And it's odd that all NTFS filesystems are affected.  Also, I can work around this problem by dropping to a recovery shell and issuing mount -a, but for my coworkers' sakes I need unattended boot.


One of the coolest things I've learned about python recently is that a dictionary can take parameters like this: dict(red=3,blue=2,yellow=5)  How could I make a function that takes arguments in the same fashion and pass them to a dictionary? I don't want to declare red, blue, or yellow as individual parameters. Ideally, this would take in named parameters of any kind. I've already tried: def foo(*args):  ...and it doesn't like how the parameters are named. Another thought I had was extending the dictionary definition so I could still use init of the dictionary, but I wouldn't know how to do that either.

In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):


I've an existing StackExchange account with the following myOpenId: sidharth-panwar.myopenid.com  But I'm not able to log in with this account. Whenever I try to log in it gives me the following error message:       No OpenID endpoint found.     I've logged in with a temporary account (using my GMail account). Is it possible to link my GMail account with my myOpenId account so that my profile remains intact?  I've gone through the following threads already before posting:

Janrain has , one of the many OpenID providers. MyOpenID will not be available starting February 1, 2014. (An   hinted at the same but did not set a date for end of service.)   This decision was made by Janrain, and Stack Exchange did not have any part in it. You can still use myOpenID to log in to Stack Exchange, but be aware that any outages in the myOpenID service will mean that you are unable to log in to Stack Exchange until Janrain fixes it – which may take several days, or weeks, or never. After February 1, you will no longer be able to use myOpenID to log in to Stack Exchange. Stack Exchange will not be able to answer any questions about why myOpenID is down or when it will be working again. If you do not have any other login credentials on your account by February 1, you will be locked out, and Stack Exchange will be unlikely to help you recover your account.  To avoid getting locked out of your Stack Exchange account, we strongly suggest that anyone using myOpenID as their primary (or even backup) login add a new login method to their Stack Exchange account.  We're also going to remove the "myOpenID" button from the sign-up/login page soon, in order to discourage new users from signing up using myOpenID.  Here's how to add a new login to your account. You must be logged into your account when you begin. (This information is also available .)  Open up your user profile page (by clicking on your login name at the top of the screen) and click the "my logins" link above the bio box on the right hand side.   You should see a list of all of your logins.  To add a new login, click "add more logins..." at the bottom of the box. Choose the new login from the list and follow the steps to confirm.    If you choose, you can remove your myOpenID login by clicking the same "my logins" link, then clicking "remove" next to myOpenID.  If you are adding a Stack Exchange OpenID, you will receive a confirmation email. You must click the link in the email to confirm your email address before the Stack Exchange OpenID will show up under "my logins". Please make sure that you are already logged into your account when you click the confirmation link; otherwise, you will create a new account that needs to be merged with your old one.    If you encounter any trouble adding logins, or accidentally create a separate account that you would like merged, please fill out our .


The inequality goes like this: $$\sqrt7^{\sqrt5}>\sqrt5^{\sqrt7}$$ I have to prove this without using approximate numbers and I just cannot find out how.

Assuming that $e<y<x$, prove that $ x^y < y^x$.  I think this must be easy, but I can't work it out. Thanks in advance for any kind of help.


I'm having some trouble about crc-calculator with Hexadecimal value. In fact, I have this good code that calculate correctly with ASCII input.  But hexstring that I need to calculate "44007A0004 ... " cannot be converted to ASCII char. How I can change my function to calculate hex input string crc?    public String  CRC_CCITT( int flag,String str)  {             int crc = 0x00;          // initial value            int polynomial = 0x1021;               byte[] bytes = str.getBytes();      switch(flag){       case 1:           crc=0x00;           break;       case 2:           crc=0xFFFF;           break;       case 3:           crc=0x1D0F;           break;        }       for (int index = 0 ; index< bytes.length; index++) {           byte b = bytes[index];           for (int i = 0; i < 8; i++) {               boolean bit = ((b   >> (7-i) & 1) == 1);               boolean c15 = ((crc >> 15    & 1) == 1);               crc <<= 1;               if (c15 ^ bit) crc ^= polynomial;            }       }       crc &= 0xffff;       str = Integer.toHexString(crc);       return str;             }

I am looking for a way to convert a long string (from a dump), that represents hex values into a byte array.  I couldn't have phrased it better than the person that posted .  But to keep it original, I'll phrase it my own way: suppose I have a string "00A0BF" that I would like interpreted as the  byte[] {0x00,0xA0,0xBf}   what should I do?  I am a Java novice and ended up using BigInteger and watching out for leading hex zeros. But I think it is ugly and I am sure I am missing something simple.


I have a doubt related the output of ll command.  When, in my shell, I execute the ll command I obtain this output:  -rwxrwxr-x 1 andrea andrea 104215 ott 15 15:56 atmosfs*   Why I have the * next to the file name atmosfs? What does it means?

I've done an ls -l inside a directory, and my files are displaying like this :   james@nevada:~/development/tools/android-sdk-linux_86/tools$ ll total 9512 drwxr-xr-x 3 james james    4096 2010-05-07 19:48 ./ drwxr-xr-x 6 james james    4096 2010-08-21 20:43 ../ -rwxr-xr-x 1 james james  341773 2010-05-07 19:47 adb* -rwxr-xr-x 1 james james    3636 2010-05-07 19:47 android* -rwxr-xr-x 1 james james    2382 2010-05-07 19:47 apkbuilder* -rwxr-xr-x 1 james james    3265 2010-05-07 19:47 ddms* -rwxr-xr-x 1 james james   89032 2010-05-07 19:47 dmtracedump* -rwxr-xr-x 1 james james    1940 2010-05-07 19:47 draw9patch* -rwxr-xr-x 1 james james 6886136 2010-05-07 19:47 emulator* -rwxr-xr-x 1 james james  478199 2010-05-07 19:47 etc1tool* -rwxr-xr-x 1 james james    1987 2010-05-07 19:47 hierarchyviewer* -rwxr-xr-x 1 james james   23044 2010-05-07 19:47 hprof-conv* -rwxr-xr-x 1 james james    1939 2010-05-07 19:47 layoutopt* drwxr-xr-x 4 james james    4096 2010-05-07 19:48 lib/ -rwxr-xr-x 1 james james   16550 2010-05-07 19:47 mksdcard* -rw-r--r-- 1 james james  205851 2010-05-07 19:48 NOTICE.txt -rw-r--r-- 1 james james      33 2010-05-07 19:47 source.properties -rwxr-xr-x 1 james james 1447936 2010-05-07 19:47 sqlite3* -rwxr-xr-x 1 james james    3044 2010-05-07 19:47 traceview* -rwxr-xr-x 1 james james  187965 2010-05-07 19:47 zipalign*   What does that asterisk mean?  I'm also unable to run a particular file, as follows:   james@nevada:~/development/tools/android-sdk-linux_86/tools$ ./emulator  bash: ./emulator: No such file or directory   EDIT : I'm trying to get Eclipse to use emulator, but it keeps complaining the files does not exist, yet it is here?


I am Brazilian and my fiancé is Filipino. We are planning to go to Brazil from Singapore, and the few cheap flights we found have 3 different stops in 3 different European countries: London, Romania, and Portugal. We are only going to wait in these airports for the next flight. Does it require us a transit visa? We won't dispatch any luggage, just bring hand bags with us.  The flight itinerary is SIN > LGW > OPT > LIS > POA. This is the image:

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


The short- is there any way to use named credential merge fields in the actual named credential callout's endpoint (in the query string)  There is an api that I need to make a callout to in salesforce with an endpoint similar to this:    I didn't want to hard-code the api_id or api_key in my code, so I set up a named credential with the following information:  Name- Test Identity Type:  Named Principal Authentication Protocol: Password Authentication Username    my api_id Password  my_api_key Allow Merge Fields in HTTP Header- checked   Allow Merge Fields in HTTP Body -checked   And here is my code that is saying it is an invalid URI:  Http http = new Http(); HttpRequest req = new HttpRequest(); req.setEndpoint('callout:Test?api_id={!$Credential.Username}&api_key={!$Credential.Password}'); req.setMethod('GET'); HTTPResponse resp = http.send(req);   The api won't let me put the api key or id in the headers; it has to be in the endpoint's query string.  Is this even possible?

I have a named credential as follows:  Name   Test_Credential URL    https://www.somesite.com Identity Type    Named Principal Authentication Protocol    Password Authentication Username   foobar Password   mySomeSiteDeveloperKey Generate Authorization Header   FALSE Allow Merge Fields in HTTP Header    TRUE Allow Merge Fields in HTTP Body     TRUE   The service that I am trying to authenticate against uses URL parameters to pass in the developer key and username. Is there any way to use  to pass those in to the URL?   The Named Credential attributes seem not to get decoded until the request is actually sent, as debugging the endpoint, or headers if I set them per the linked doc, show the un-merged data. I can get the callout to go to the right place, and return the expected error because the auth information is not provided. Anybody know of a "show me my HTTP request" site that I could point to to get a better idea of how this works?  I've tried both of these:  req.setEndpoint('callout:Test_Credential/api/action?id={!$Credential.Password}&account={!$Credential.UserName}');  req.setEndpoint('callout:Test_Credential/api/action' + '?id=' + '{!$Credential.Password}' + '&account=' + '{!$Credential.UserName}');   (Edited to remove the part about $Credential vs. $Test_Credential as I was able to determine that it is the former, and see the merged creds by calling out to .)


question does not answer my question. I have a script that checks the existence of specific environment variables and prints them with their values. Now I want to mask the values of password variables (containing SECRET, PW, PASSWORD, KEY in its name, e.g. CLIENT_SECRET) with ****. Currently I have a script like this: expected_env_vars=("CLIENT_ID" "CLIENT_SECRET" "BACKEND_KEY" "BACKEND_NAME")  suppress_env_vars_with_substring=("SECRET" "PASSWORD" "PW" "KEY")  for env_var in "${expected_env_vars[@]}"; do   if [[ -z "${!env_var}" ]]; then     echo "Environment variable \"$env_var\" not defined"     exit 1   else     # Perform check if an element of $suppress_env_vars_with_substring is substring of $env_var     echo "$env_var=${!env_var}...OK"   fi done  Question  How to check if an array element is substring of a string?

I have a string in Bash: string="My string"  How can I test if it contains another string? if [ $string ?? 'foo' ]; then   echo "It's there!" fi  Where ?? is my unknown operator. Do I use echo and grep? if echo "$string" | grep 'foo'; then   echo "It's there!" fi  That looks a bit clumsy.


I need help proving that if  $g(x)=e^{\langle a,x\rangle }*f(x)$ is convex on $\mathbb{R}^n$ for all $a \in \mathbb{R}^n$, then $f$ is logarithmically convex. One thing I noticed was that if $g$ is log-convex itself, then $f$ is log-convex since then, $\log(g) = \langle a,x\rangle  + \log(f)$, so that $\log(f) = \log(g)-\langle a,x\rangle$. Then $\log(g)$ would be convex, and $-\langle a,x\rangle$  is a linear function so is also convex, and hence their sum is as well. However, I can't seem to prove this either. Other things I thought may be helpful are that $g$ is convex iff its hessian is positive semidefinite, or iff its gradient is monotone, but neither of these have been particularly useful to me.

I read that if we take $f: \mathbb{R} \to (0, +\infty)$, such that for all $a \in \mathbb{R}$, $x \mapsto e^{ax}f(x)$ is convex then $f$ is log-convex (meaning $\log \circ f$ is convex). I did try to prove it, but I couldn't get to the result. However, I also read that if for all $a \in \mathbb{R}$, $x \mapsto e^{ax}f(x)$ is convex then $x \mapsto (f(x))^{a}$ is convex for all $a > 0$. I couldn't find a proof either ... But I managed to prove that if this last condition is verified, then $f$ is log convex. Therefore could you please help me prove one of these two statements (either the first one, which is in fact the result I want in the end, or the second one, which could lead me to the first result) ? Thank you.


I am very confused by getting different results from st_expand (srid 4326). I want to do a search within a bounding box, therefore I pass a point and I'd like to provide distance in meters in order to see if I will get a macht.  So this  query is returning a result:  select "geo_name_cities".* FROM "geo_name_cities" WHERE (name like '%Ischgl%' AND      ST_Expand(ST_GeomFromText('POINT (10.3298112 46.9809071)', 4326),5000) && lonlat)  my assumption here. Make a bounding box of 5000 meters around the point.  Now I increase to 6000m   select "geo_name_cities".* FROM "geo_name_cities" WHERE (name like '%Ischgl%' AND ST_Expand(ST_GeomFromText('POINT (10.3298112 46.9809071)', 4326),6000) && lonlat)   No result. Ok, I might assume that the place is not within this box, fine. BUT when I use 60000m I get a  result again ?????  select "geo_name_cities".* FROM "geo_name_cities" WHERE (name like '%Ischgl%' AND    ST_Expand(ST_GeomFromText('POINT (10.3298112 46.9809071)', 4326),60000) && lonlat)  So I increased the distance steadily but the results are different, how does this come?

I used osm2pgsql to import data into my PostgreSQL database and it put gave me the following 4 tables, planet_osm_point, planet_osm_line, planet_osm_polygon and planet_osm_roads.   I have looked at the schema for osm2pgsql and inside the planet_osm_point table there is a column 'way' of type point. I tried to query it as an array like it says in the documentation here ():     It is possible to access the two component numbers of a point as   though the point were an array with indexes 0 and 1. For example, if   t.p is a point column then SELECT p[0] FROM t retrieves the X   coordinate and UPDATE t SET p[1] = ... changes the Y coordinate. In   the same way, a value of type box or lseg can be treated as an array   of two point values.   Anyone know the correct query the planet_osm tables from osm2pgsql based on long/lat? For example if I wanted to retrieve the information for Big Ben (London) I would query along the lines of:      SELECT * FROM planet_osm_point      WHERE ST_Y(ST_Transform(way, 4326)) = '-0.12'        AND ST_X(ST_Transform(way, 4326)) = '51.5';   There is no error message, it comes out with the table names, but no data is output either. (Its an empty table). What am I doing wrong here?  Perhaps it is too precise, i.e. there are no coordinates that match it exactly? Perhaps I need to try being more general, say 51 < long < 52 and -0.5 < lat < 0. Although this would throw back multiple results so would not be quite as accurate.


After I deleted my Ubuntu partition, I rebooted my computer and I only get a prompt:   grub rescue >   The command ls lists   (hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos1)   I check them one by one:  ls (hd0,msdos5)/ ls (hd0,msdos1)/   But I cannot find the right partition.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


I have large numbers of bank account numbers of different banks. Some bank account numbers start with zero and some have 16 digits. When I paste the data in Excel the leading zeros will be removed and the last digit of 16-digit account number will be zero.  How can I avoid this problem? I tried to put a special character before every account number to make it as text and paste to Excel but when I remove the special character the problem appears again.

I want to add more than 20 digits in an Excel cell.  The current format of the cell is general, it converts the number to an exponential format. I tried with a number format and accounting, but when I enter more than 15 digits it gets converted to 0's.  What are the recommended steps for stopping Excel from converting data to exponential Format for 20 digits when in the general format?     Example: 12345678901234567890   Excel converts it to 1.23457E+19 in general format.  Without using ' before the value, is there any other way to keep value same?


I installed Ubuntu on my Windows 10 laptop (Dell, trying to dual boot) and am unable to start Ubuntu.  On startup I get the following error:  Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)   Steps I've already taken:   Change SATA to ACHI in the BIOS  start from the live DVD to check I'm not running out of space in my boot partition   and I still get the same error.    Any thoughts on next steps to solve this issue?

Upon trying to upgrade from 10.10 to 11.04 all seemed to go well until the restart. This error message is what comes up:  Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)   How do we fix that?


I am trying to make this cool minecraft effect on blender. I've done all the modeling and tracking. In rendered view it looks fine.   But it comes out very weird. I am using blender 2.8 for this project. It has nothing to do with the materials, because I changed them around and tested it out. I have a feeling it has something to do with either the movie clip editor, sequence editor, or the render settings.  I've been trying over and over to fix it. While it renders it looks fine, but as soon as it finishes, it comes out with nothing but rendered shadows, but I have not enabled shadow catcher. I have done research and I don't think it is a common problem. If you can help me, please do.    This was the default setup of the compositing nodes.

I have multiple scenes each with different objects. I want to combine all these scenes in the compositor but when they render, all the objects from each scene overlap each other and are all transparent, so I can see all the objects when some should be hidden behind others.   To join my scenes I'm using a mix node with add.


I couldn't figure this out...  I understand that if Alice is moving relatively to Bob at a high speed, Alice's time elapses slower than Bob's. So when Alice is back to Bob and compares the clock, Alice's shows 10:01 but Bob's shows 10:10, for instance. But if we use Alice as the reference, Bob is moving. So Bob's clock should show 10:01... But there is only one outcome, isn't it? I must have messed up something, but I just couldn't find out what.  Help will be much appreciated.  P.S. I've searched around here and found something called "twin paradox". Is that what this is about? If yes, I can go read more about how people solve twin paradox. Thanks.

Suppose we have two twins travelling away from each other, each twin moving at some speed $v$:    Twin $A$ observes twin $B$’s time to be dilated so his clock runs faster than twin $B$’s clock. But twin $B$ observes twin $A$’s time to be dilated so his clock runs faster than twin $A$’s clock. Each twin thinks their clock is running faster. How can this be? Isn’t this a paradox?


If I had a weightless, indestructible rod that was 1,145,915,590 meters long and I moved it 15° would the end of the rod go faster than the speed of light? (Assuming it's path is unobstructed.)  Calculations: $$arc length=2\pi R\left(\frac{C}{360}\right)$$ The angle is an arbitrary value which I chose to be 15° and the arc length is needed to be $3*10^8$ meters because I want it to move that in one second to exceed the speed of light. $$ 3*10^8=2\pi R\left(\frac{15}{360}\right)$$ $$R=1,145,915,590$$

Is it possible for information (like 1 and 0s) to be transmitted faster than light?   For instance, take a rigid pole of several AU in length. Now say you have a person on each end, and one of them starts pulling and pushing on his/her end.   The person on the opposite end should receive the pushes and pulls instantaneously as no particle is making the full journey.  Would this actually work?


When a user account is removed (either by request or due to violating the network's terms of service), the users of the site lose or gain some reputation because their votes are also removed along with their account details.   From relevant ,     This message means that a user who voted for one of your posts had their account deleted (either by request or due to violating the network's terms of service). As a result, all of their votes were removed, and the reputation you gained or lost from them was undone. The resultant reputation change could be any amount; it could even be a reputation gain if enough of the removed votes were downvotes. All the reputation changes from a single user's deletion are rolled into a single event in the reputation page labelled "User was removed".   But I noticed that when a user account was deleted on one of the sites I participated, I didn't gain or lose any reputation. I know that he has upvoted my answers posts from his comments and messages in the chat rooms.  So, I came to know that votes are not removed in all the cases.  On what basis it is decided when to remove the votes and when to preserve? Does the criteria differ for deletion by the request of users?   Shog9 in an  to there are certain thresholds when the user is involved in voting fraud but my question is about accounts deleted by request also.

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


We have been given a PCAP file and my job is to find:   The user of the host PC tried to access some suspected website whose domain name ends with .top. Use Python (with the help of Regular Expression) to find the susceptible website.  By opening the PCAP file on notepad and doing a Ctrl + F search through it I have already found the correct answer to be:   However this is obviously not the purpose of the assignment as I have to use Python and Regular Expression to return that website  The code I have tried so far is:  import re  pcapfile = open('CyberSecurity2019.pcap', 'rb')  mypattern = re.compile(rb"\S+\.top\b")  x = mypattern.findall(pcapfile.read())  print("x = ", x)   However this is what it returns:  x =  [b"c('_SS','R','20',0,'/');f=_w.top", b'g_triggerElems!==e&&(g_triggerElems[i].isHotSpotDisabled=!1);v=i+1,r=s[i],a=_ge("sc_hst"+v),a.style.left=r.locx+"%",a.style.top', b't=u.getBoundingClientRect(),o=t.width?Math.abs(t.right-t.left):t.width,a=s(u,"paddingLeft");o=o-(a?parseInt(a):0);v=t.height?Math.abs(t.bottom-t.top', b'n=document.getElementById(keyMap.Notification),t;n&&(n.parentNode.removeChild(n),t=document.getElementById("id_h"),t&&(t.style.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'http://p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'http://p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'http://p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'http://p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'http://p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'http://p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'http://p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'http://p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'http://p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'http://p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'http://p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'http://p27dokhpz2n7nvgr.1jw2lx.top', b'http://p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'http://p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'http://p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'http://p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'http://p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'http://p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'http://p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top', b'http://p27dokhpz2n7nvgr.1jw2lx.top', b'p27dokhpz2n7nvgr.1jw2lx.top']   and that goes on and on for a while.  Any help in setting me on the right track would be appreciated.  Thank you

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


Everytime I try to run my app, it runs but then it crashes and I get the same message in my logcat. The odd thing is the 2 lines (I added comments in the code where the lines are it's referring to). it refers to when it crashes I haven't touched them. That's how the code has always been, as i inherited working on this app and that's how it's always been. Here is the logcat message:  java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference         at com.example.gabe.politicianspulse.NewsRvAdapter.onBindViewHolder(NewsRvAdapter.java:43)         at com.example.gabe.politicianspulse.NewsRvAdapter.onBindViewHolder(NewsRvAdapter.java:19)         at     public class NewsRvAdapter extends RecyclerView.Adapter<NewsRvAdapter.MyViewHolder> { //this is line 19 private Context context; private List<NewsItem> newsList;  //default constructor public NewsRvAdapter(){}  public NewsRvAdapter(List<NewsItem> newsList, Context context){     this.newsList = newsList;     this.context = context; } @NonNull @Override public NewsRvAdapter.MyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {     View view;     LayoutInflater layoutInflater = LayoutInflater.from(context);     view = layoutInflater.inflate(R.layout.news_card, viewGroup, false);     final MyViewHolder viewHolder = new MyViewHolder(view);     return viewHolder; }  @Override public void onBindViewHolder(@NonNull final NewsRvAdapter.MyViewHolder myViewHolder, int i) {     myViewHolder.title.setText(newsList.get(i).getTitle());     myViewHolder.description.setText(newsList.get(i).getDescription());//this line 43       myViewHolder.date.setText(newsList.get(i).getDate());      //Load image URL using Picasso     Picasso.get()             .load(newsList.get(i).getImageUrl())             .centerCrop()             .fit()             .into(myViewHolder.photoUrl);      //on click listener that opens url in webview     myViewHolder.photoUrl.setOnClickListener(new View.OnClickListener(){         @Override         public void onClick(View view) {             String link = newsList.get(myViewHolder.getAdapterPosition()).getLink();             Intent intent = new Intent();             intent.setAction(Intent.ACTION_VIEW);             intent.addCategory(Intent.CATEGORY_BROWSABLE);             intent.setData(Uri.parse(link));             intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);             context.startActivity(intent);         }     });      //onclick that opens new activity     myViewHolder.title.setOnClickListener(new View.OnClickListener(){         @Override         public void onClick(View view) {             Intent i = new Intent(context, SingleNews.class);             i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);             i.putExtra("title", newsList.get(myViewHolder.getAdapterPosition()).getTitle());             i.putExtra("urlToImage", newsList.get(myViewHolder.getAdapterPosition()).getImageUrl());             i.putExtra("publishedAt", newsList.get(myViewHolder.getAdapterPosition()).getDate());             i.putExtra("content", newsList.get(myViewHolder.getAdapterPosition()).getContent());             context.startActivity(i);         }     }); }  @Override public int getItemCount() {     return newsList.size(); }  public static class MyViewHolder extends RecyclerView.ViewHolder{     TextView title, description, date;     ImageView photoUrl;     LinearLayout viewContainer;     public MyViewHolder(@NonNull View itemView) {         super(itemView);         title = itemView.findViewById(R.id.news_title);         date = itemView.findViewById(R.id.news_date);         //description = itemView.findViewById(R.id.news_description);         photoUrl = itemView.findViewById(R.id.news_photo);         viewContainer = itemView.findViewById(R.id.newsView_container);     } }   }

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?


6.V The space $L_{\infty}(X,X,\mu)$ is contained in $L_{1}(X,X,\mu)$ if and only if $\mu(X)<\infty$. If $\mu(X)=1$ and $f\in L_{\infty}$ ,then $$||f||_{\infty}=\lim_{p\to \infty}{||f||_{p}}$$   For the first part, if containment is true then $$\because f=1$$ a constant function, is contained in $L_{\infty}$. From our assumption it will also be contained in $L_{1}$.  $$\therefore \int|f|d\mu<\infty$$ $$\int d\mu <\infty$$ $$\mu(X)<\infty$$   Conversly, if $\mu (X)<\infty$.  Let $f\in L_{\infty}$ be an arbitrary element,$$\therefore ||f||_{\infty}<\infty$$ Also, there exists a measurable set $E$ with $\mu(E^{\complement}) =0$ such that for every $$\forall x\in E$$ $$|f(x)|\leq||f||_{\infty}$$ Consider, $$\int|f|d\mu = \int_{E}|f|d\mu + \int_{E^{\complement}}|f|d\mu$$ $$\int|f|d\mu = \int_{E}|f|d\mu + 0$$ $$\int|f|d\mu < \int_{E}||f||_{\infty}d\mu$$ $$\int|f|d\mu < ||f||_{\infty}\int_{E}d\mu$$ $$\int|f|d\mu < ||f||_{\infty}\mu(E)$$ $$\because \mu(E)<\mu(X)<\infty$$ $$\int|f|d\mu < \infty $$ $$\therefore f \in L_{1}$$ Hence,$$L_{\infty}\subset L_{1}$$ For the second part of the question, I was able to show that $$||f||_{p}<||f||_{\infty},$$ using similar steps as used to prove that $||f||_{1} < \infty$, for first part of the question. I think that it might come handy for solving the second part.  But i do not know, how to show that it is a convergent sequence and it converges to $||f||_{\infty}$.

Could someone help me prove that given a finite measure space $(X, \mathcal{M}, \sigma)$ and a measurable function $f:X\to\mathbb{R}$ in $L^\infty$ and some $L^q$, $\displaystyle\lim_{p\to\infty}\|f\|_p=\|f\|_\infty$?    I don't know where to start.


I need to understand some things about direct I/O in C.  I have a toy code that uses direct I/O to write a character array and it works just fine: #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <errno.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <string.h>   #define MSG_SIZE 4500 #define BLOCK_SIZE 4096  int main(int argc, char **argv) {    char thefile[64];   int fd;   int write_success, bytes_to_write, block_size=BLOCK_SIZE;    // set array size to some multiple of BLOCKSIZE:   bytes_to_write = ((MSG_SIZE + block_size - 1)/block_size)*block_size;   char message[bytes_to_write]  __attribute__ ((aligned(BLOCKSIZE)));    memset(message, 0, bytes_to_write);   sprintf(message,"The curfew tolls the knell of parting day");   printf("%s\n", message);    sprintf(thefile, "diotestfile.dat");    if ((fd = open(thefile,O_DIRECT | O_RDWR | O_CREAT, S_IRWXU)) == -1) {           printf("error opening file\n");           exit(1);   }   printf("%s\n", strerror(errno));   write_success = write(fd, message, bytes_to_write);   printf("write succes?  %s\n", strerror(errno));    close(fd);   }  A cat of the output file gives the message.  But I need to be able to do this with a pointer instead an array.  If I redefine message as a pointer, that is, I replace char message[bytes_to_write]  __attribute__ ((aligned(BLOCKSIZE))); memset(message, 0, bytes_to_write);  with   char *__attribute__ ((aligned(BLOCKSIZE))) message;   message = (char *__attribute__ ((aligned(BLOCKSIZE))))calloc(bytes_to_write, sizeof(char));  then the write function returns an error of invalid argument. The things that haven't worked so far are trying several different alignment sizes, casting message to a void pointer in write(), and defining message as char *__attribute__ ((aligned(BLOCKSIZE))) message;  instead of char *__attribute__ ((aligned(BLOCKSIZE))) message;  Anyone see what I'm doing wrong?

I just finished a test as part of a job interview, and one question stumped me, even using Google for reference. I'd like to see what the StackOverflow crew can do with it:  The memset_16aligned function requires a 16-byte aligned pointer passed to it, or it will crash. a) How would you allocate 1024 bytes of memory, and align it to a 16 byte boundary? b) Free the memory after the memset_16aligned has executed.  {        void *mem;    void *ptr;     // answer a) here     memset_16aligned(ptr, 0, 1024);     // answer b) here     }