Stopping Flask (without request context)

The only  can only be done with a request context:  from flask import request  def shutdown_server():     func = request.environ.get('werkzeug.server.shutdown')     if func is None:         raise RuntimeError('Not running with the Werkzeug Server')     func()  @app.route('/shutdown', methods=['POST']) def shutdown():     shutdown_server()     return 'Server shutting down...'   This leads to the very ugly and hacky scenario where you pretty much have to script a request from the server to itself if you want it to shut down from another part of the process (ie: not in response to a request and you have no request context). This also exposes the kill endpoint to the whole network (even if it's unimportant / non-prod, still stupid if not necessary).  Is there a clean way of stopping Flask without a request context, ie: the mythological app.stop()?  For more context, and without diving into the esoteric reasons that have me running Flask in a thread (makes sense for my program, I promise):  class WebServer:     def __init__(self):         self.app = Flask('test')         self.thread = threading.Thread(target=self.app.run)          @self.app.route('/')         def index():             return 'Hello World'      def start(self):         self.thread.start()      def stop(self):         # how can I implement this? just getting Flask to end would end the thread!


What happens to Red Skull after Thanos gets the Soul Stone?

Presumably, the massive sacrificial altar and a guide like the Red Skull is no longer needed once someone obtains the Soul Stone.  So what happens to the Red Skull?


How do I create a parameterized SQL query? Why Should I?

I've heard that "everyone" is using parameterized SQL queries to protect against SQL injection attacks without having to vailidate every piece of user input.  How do you do this?  Do you get this automatically when using stored procedures?  So my understanding this is non-parameterized:    cmdText = String.Format("SELECT foo FROM bar WHERE baz = '{0}'", fuz)   Would this be parameterized?  cmdText = String.Format("EXEC foo_from_baz '{0}'", fuz)   Or do I need to do somethng more extensive like this in order to protect myself from SQL injection?  With command     .Parameters.Count = 1     .Parameters.Item(0).ParameterName = "@baz"     .Parameters.Item(0).Value = fuz End With   Are there other advantages to using parameterized queries besides the security considerations?  Update:  This great article was linked in one of the questions references by Grotok.


How many users does SO get from different countries?

Is there a breakdown of SO user distribution? I would like to know how many users SO gets from different countries. This query is not supported in the JSON API unfortunately.


How to construct a natural isomorphism of hom-sets from an adjunction of functors

Let $F: C \rightarrow D,\ G: D \rightarrow C$ be an adjunction of functors. My goal is to construct an isomorphism  $$Hom_D(F(x), y) \simeq Hom_C(x, G(y))$$  So given a morphism $f(x): F(x)\rightarrow y$, I can form a morphism $g: x \rightarrow G(y)$ by  $$G(f)\circ e_x: x \rightarrow GF(x) \rightarrow G(y)$$  Conversely, given $g: x \rightarrow G(y)$, I can form some $f': F(x) \rightarrow y$, by   $$\epsilon_y \circ F(g): F(x) \rightarrow F(G(y)) \rightarrow y$$  I feel to see why $f = f'$, ie why these two mappings of morphisms I defined are inverses of each other. I'm looking for an answer that carefully spells out why this is the case.


Scroll to bottom of div after content refresh

When adding new messages on the chat, chat content refreshes adding the new message and moving the scrollbar to the top. I am trying to make it stay bottom but can't figure it out alone.  This is in my html page:

Message 1

Message 2

Message 3

Message 4

Message 5

   This is in my js file:      function iChatRefresh(place) {      $.post(dle_root + "engine/modules/iChat/ajax/refresh.php", { action: "refresh", place: place }, function(data){  if(data != 'no need refresh'){          $("#iChat-messages").html(data);  };       });      return false; };   and css:  #iChat-style {     width:100%;     height:300px;     overflow:auto; }


Bounty by user with not enough reputation

I am not sure if it is correct to post this on the general Meta of StackExchange, but I encountered a strange thing on Security.  There is this  where a user offers a 100 bounty but only has a reputation of 23.  Now according to  this should not be possible as ...     You must have at least 75 reputation to start a bounty, and at least as much reputation as the bounty amount.   which is certainly not true in this case. Is this a bug?


system of differential equations with matrix

$x′ = Ax$  where $$A = \begin{pmatrix} 3&1&0\\ 0&3&0\\ 0&0&2 \end{pmatrix} $$ what is the logic to solve such type of equations?  I found that $det(A-λI) = (3-λ)^2(2-λ)=0$, so the eigenvalues are 3 and 2


How to use pgfplotstable to highlight the row max value in the table?

I need to highlight the elements in each rows. I use the package pgfplotstable, but it doesn't work. And gives me an error.  \documentclass[]{article} \usepackage{pgfplotstable}     \pgfplotsset{compat=newest}     %   \begin{document}   \newcommand{\findmax}[3]{     \pgfplotstablevertcat{\datatable}{#1}     \pgfplotstablecreatecol[     create col/expr={%     \pgfplotstablerow     }]{rownumber}\datatable     \pgfplotstablesort[sort key={#2},sort cmp={float >}]{\sorted}{\datatable}%     \pgfplotstablegetelem{0}{rownumber}\of{\sorted}%     \pgfmathtruncatemacro#3{\pgfplotsretval}     \pgfplotstableclear{\datatable} }  \newcommand{\findmin}[3]{     \pgfplotstablevertcat{\datatable}{#1}     \pgfplotstablecreatecol[       create col/expr={%     \pgfplotstablerow     }]{rownumber}\datatable     \pgfplotstablesort[sort key={#2},sort cmp={float <}]{\sorted}{\datatable}%     \pgfplotstablegetelem{0}{rownumber}\of{\sorted}%     \pgfmathtruncatemacro#3{\pgfplotsretval}     \pgfplotstableclear{\datatable} }  \pgfplotstableset{     highlight col max/.code 2 args={         \findmax{#1}{#2}{\maxval}         \edef\setstyles{\noexpand\pgfplotstableset{                 every row \maxval\noexpand\space column #2/.style={                     postproc cell content/.append style={                         /pgfplots/table/@cell content/.add={$\noexpand\bf}{$}                     },                 }             }         }\setstyles     },     highlight col min/.code 2 args={         \findmin{#1}{#2}{\minval}         \edef\setstyles{\noexpand\pgfplotstableset{                 every row \minval\noexpand\space column #2/.style={                     postproc cell content/.append style={                         /pgfplots/table/@cell content/.add={\noexpand\color{red}$\noexpand\bf}{$}                     },                 }             }         }\setstyles     },     highlight row max/.code 2 args={         \pgfmathtruncatemacro\rowindex{#2-1}         \pgfplotstabletranspose{\transposed}{#1}         \findmax{\transposed}{\rowindex}{\maxval}         \edef\setstyles{\noexpand\pgfplotstableset{                 every row \rowindex\space column \maxval\noexpand/.style={                     postproc cell content/.append style={                         /pgfplots/table/@cell content/.add={$\noexpand\bf}{$}                     },                 }             }         }\setstyles     },     highlight row min/.code 2 args={         \pgfmathtruncatemacro\rowindex{#2-1}         \pgfplotstabletranspose{\transposed}{#1}         \findmin{\transposed}{\rowindex}{\maxval}         \edef\setstyles{\noexpand\pgfplotstableset{                 every row \rowindex\space column \maxval\noexpand/.style={                     postproc cell content/.append style={                         /pgfplots/table/@cell content/.add={\noexpand\color{red}$\noexpand\bf}{$}                     },                 }             }         }\setstyles     }, }  \begin{table}[ht] \begin{center} \pgfplotstableread[col sep=comma]{ N1, N2,a,b,c,a, b, c x1,x2,1,3,5, 2,4,6  y1,y2,2,6,8,3,7,1  z1,z2,1,2,7,8,7,6 }\data \pgfplotstabletypeset[ columns/N1/.style={string type},    columns/N2/.style={column type={l|}, string type},    columns/c/.style={column type={l|}, string type},     every head row/.style={before row=\hline, after row=\hline},     every last row/.style={after row=\hline},     empty cells with={\ensuremath{-}},     highlight row max ={\data}{1},     highlight row max ={\data}{2},     highlight row max ={\data}{3}, ]{\data} \end{center} \caption{My table.} \label{tab:results} \end{table}  \end{document}   How to use pgfplotstable highlight 5 and 6 in the first row, 8, 7 in the second row and 7, 8 in the third row?


Can negative toughness effects kill a creature?

There are some spells and abilities that subtract from a creature's power/toughness: for example, part of  says "Target creature gets -3/-3 until end of turn."  If the target creature is only a 2/2, is that target destroyed (goes to graveyard) from the -3 toughness given to it? If not what happens, does it stick around with negative toughness?


How to use Composer to install third party libraries

All I thought Composer takes care of any external library a contrib module requires automatically. I tried installing one, Composer took care of all its dependency modules, but not so much with the external library.  How do I use Composer to install external libraries that any module depends on?


Proof that the Hamiltonian is equivalent to energy when it is time independent

The Hamiltonian of a system is defined as $$H=\sum_ip_i\dot{q_i}-L$$ where $L=T-V$.  I have read thatin the cases where the Hamiltonian doesn't explicitly depend on time, we have $$H=E_{total}=T+V$$ But try as I might, I can't figure out how to prove it. Any help?


How to Upgrade to 15.04 without upgrading to 14.10?

I would like to upgrade to Ubuntu 15.04 from Ubuntu 14.04.2 LTS. I went in the terminal, edited the /etc/update-manager/release-upgrades file, and set the prompt to normal. I went back into the terminal, and ran the command sudo do-release-upgrade -c, and this is the output:  Checking for a new Ubuntu release  New release '14.10' available. Run 'do-release-upgrade' to upgrade to it.   How can I upgrade to 15.04 without going to 14.10?


How to correctly display and separate the author names in a bibliographic entry?

How to correctly display and to separate among the BibLaTeX's author's names?  Code:  @book{atl1,     label     = {SELLS},     author    = {Cristopher TAVARES, Kirk FERTITTA, Brent RECTOR, Chris SELLS},     title     = {ATL Internals},     subtitle  = {Working with ATL 8},     edition   = {2},     publisher = {Addison-Wesley Professional},     date      = {2006-07-15},     pages     = {888}     }   Output:    In this case I'm trying to display this as Cristopher TAVARES, Kirk FERTITTA, Brent RECTOR and Chris SELLS before ATL Internals....  How do I to deal with this, please?  Thanks a lot!


I don’t think there is any limit point in case of either c or d.


MySQL optimizing buffer_pool_size among buffer_pool_instances - where is the trade off?

I'm looking to optimize MySQL INNODB by tuning buffer pool individual instances.    According to the MySQL documentation:      "The total size you specify is divided among all the buffer pools. For best efficiency, specify a combination of innodb_buffer_pool_instances and innodb_buffer_pool_size so that each buffer pool instance is at least 1 gigabyte."   However, this doesn't specify the optimum approach to defining  innodb_buffer_pool_size. Which of these is considered a better approach:   a) a larger number of smaller buffers (given that each buffer instance is >1GB)  e.g. 45 buffers instances over 50GB buffer pool   or   b) a smaller number of larger buffers  e.g 5 buffer instances over 50GB buffer pool  ?


The shadows in my scene aren't working as I would like. The shadow beneath the shelf is 'blocked out'. I take it Blender is reading the shelf and supports as a single object.  Is there a way to overcome this?  I'm using 2.8 with Eevee  Here is link to Blender file:   Thanks      Issue fixed:


Interchanging the order of differentiation and summation

Can the order of a differentiation and summation be interchanged, and if so, what is the basis of the justification for this? E.g. is $\frac{\mathrm{d}}{\mathrm{d}x}\sum_{n=1}^{\infty}f_n(x)$ equal to $\sum_{n=1}^{\infty}\frac{\mathrm{d}}{\mathrm{d}x}f_n(x)$ and how can it be proven? My intuition for this is that it should be the case, since in the limit, the summation becomes an integral and this can be interchanged with the differentiation operator, but I don't know how to justify this? Would it suffice to say that $\frac{\mathrm{d}}{\mathrm{d}x}f_1(x)+\frac{\mathrm{d}}{\mathrm{d}x}f_2(x) = \frac{\mathrm{d}}{\mathrm{d}x}(f_1(x)+f_2(x)$ because it is a linear operator and then somehow extend this to an infinite sum? Thanks in advance!


I am relatively new to Latex, and I have a report I need to write. One common thing in my report is the use of figures surrounded around text (some text, a figure, some additional text). The issue I am having is that the initial text and figure are correct, but instead of the additional text being placed after the figure, the additional text starts right after the initial text. How can I fix it so I have the text, my figure, and the additional text start right after the figure? Thanks!!  Below is the code I have surrounding the issue:  \indent Figure \ref{fig:dabtree} shows an example of two parent states connecting to the same child state through actions.\\ \begin{figure}[h!]   \centering   \includegraphics[width=0.5\textwidth]{Figures/dabtree.png}   \caption{Two parent nodes connecting to the same child node through separate actions}   \label{fig:dabtree} \end{figure} \indent A node that has multiple actions leading to it is called a transposition [4].   Which looks like:     I realize that there is not enough space for the figure to it on the end of the page, which is fine, but I need the text itself to logically start after the figure. Also, I will remove the indents (thanks).


I'm wondering about the best strategy to incorporate user comments and user added points to a map. The best example that I can find of this is  with an example of how users can add information :    I understand how to create this through the use of a web-form and a WFS-T type approach so that a user can add a point which can be stored in a postgresql/postgis database. Where I would appreciate advice is on a good strategy for displaying user-generated data back to the users, so that additional comments and interactions can be achieved.   I've looked through the source code of ushahidi and find it more sophisticated than I can handle at the moment. Are there any other examples or approaches of collaborative web-maps out there that illustrate good ways of doing this?


Java class uses unchecked or unsafe operations

I have a class called LB_Adapter.java made to help show my database in a ListView. All functionalities of my program work fine, but I still get an warning error every time I compile that says  Note: Project/LB_Adapter.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.   From googling I understand the error comes from my ArrayList, but I've tried implementing ArrayList() which doesn't work. Is there a way to get rid of the error, or does it even matter since it doesn't affect anything?  Relevant code:  public class LB_Adapter extends ArrayAdapter<Object> { List<Object> list = new ArrayList<>();  public LB_Adapter(Context context, int resource){     super(context, resource); }  public void add(LB object){     list.add(object);     super.add(object); }  @Override public int getCount(){     return list.size(); }  @Override public Object getItem(int position){     return list.get(position); }  @Override public View getView(int position, View convertView, ViewGroup parent) {     View row = convertView;     LBHolder lbholder;      if(row==null){         LayoutInflater layoutinflater = (LayoutInflater) this.getContext().getSystemService(getContext().LAYOUT_INFLATER_SERVICE);         row = layoutinflater.inflate(R.layout.display_leaderboard_row, parent, false);         lbholder = new LBHolder();         lbholder.lb_rank = (TextView) row.findViewById(R.id.lb_rank);         lbholder.lb_score = (TextView) row.findViewById(R.id.lb_score);         lbholder.lb_time = (TextView) row.findViewById(R.id.lb_time);         row.setTag(lbholder);     }     else {         lbholder = (LBHolder) row.getTag();     }     LB leaderboard = (LB) getItem(position);     lbholder.lb_rank.setText(leaderboard.getRank().toString());     lbholder.lb_score.setText(Integer.toString(leaderboard.getScore()));     lbholder.lb_time.setText(leaderboard.getTime().toString());      return row; }  static class LBHolder{     TextView lb_rank, lb_score, lb_time; } }


Search text within multiple pdfs and docs

I got a bunch of notes written by other students, but they are from an old textbook that didn't deal with everything in the same order, so I need to search through the notes for every chapter (each individual chapter is in a different .pdf or .doc) for "trace conditioning" for example.  I used to use Google Desktop for this, I have Launchy now and I told it to search pdfs, but it only searches the titles, not the content.  Thanks for any help.


Using induction to prove a description of a formal language

One of my tasks is to proof that something is correct or incorrect using induction. Since I am from Germany and don't know the right word in English I do my best to give all necessary info. We are talking about "words" and amounts of words which are in so called alphabets.     Let $\Sigma \overset{\Delta} = \{a, b\}$ and $S_1 \overset{\Delta} = \{a^n \mid n \in \Bbb N\}$. Prove using induction that $$\forall w \in \Sigma^* . w \in S_1 \to \big( w = \lambda \lor (\forall \ 1 \le i \le |w| . (w)_i = a) \big) .$$   How to prove that? Any help is upvoted, thank you.


The type initializer for 'Emgu.CV.CvInvoke' threw an exception with VS 2012

I am using EmguCV version 2.4.9.1847 with VS2012 and I have problems with Emgu.CV.Capture class. Its' throwing "The type initializer for 'Emgu.CV.CvInvoke' threw an exception."   When I start the Capture sample I works fine , but when I try this Capture camera = new Capture(); it's throwing the above exception. CLR and OpenCV are 64 bit.  Thanks in advance.


On the mobile site, can there be a button directly below the vote up/down buttons for viewing vote counts? When I am using the mobile site and I want to view vote counts, I have to switch to the full site to do it which is very inconvenient.   It could be a small link that says "vote counts," because I don't know what the button would be (the letter "V?" a "+/-" thing? I have no idea).  Related:  , but I am requesting an additional button below the vote buttons. That way you won't accidentally click a vote button.


Cannot install Oracle JDK via apt in Ubuntu 16.04

I created a new Ubuntu 16.04.3 VM and am attempting to install JDK 9. Unfortunately, the latest version of the JDK apt installer, 9.0.1-1~webupd8~0, is failing to download the binaries and I suspect that the reason is because   I carried out the typical steps for installation:    add-apt-repository ppa:webupd8team/java apt-get update && apt-get install oracle-java9-installer   I am then prompted with the following error message:  Downloading Oracle Java 9... --2018-01-16 15:15:07--  http://download.oracle.com/otn-pub/java/jdk/9.0.1+11/jdk-9.0.1_linux-x64_bin.tar.gz Resolving download.oracle.com (download.oracle.com)... 23.200.70.136 Connecting to download.oracle.com (download.oracle.com)|23.200.70.136|:80... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: https://edelivery.oracle.com/otn-pub/java/jdk/9.0.1+11/jdk-9.0.1_linux-x64_bin.tar.gz [following] --2018-01-16 15:15:11--  https://edelivery.oracle.com/otn-pub/java/jdk/9.0.1+11/jdk-9.0.1_linux-x64_bin.tar.gz Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.35.226.115, 2600:1404:21:49d::2d3e, 2600:1404:21:493::2d3e Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.35.226.115|:443... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: http://download.oracle.com/otn-pub/java/jdk/9.0.1+11/jdk-9.0.1_linux-x64_bin.tar.gz?AuthParam=1516137431_0e89d10b30203a572ea858768475ef74 [following] --2018-01-16 15:15:11--  http://download.oracle.com/otn-pub/java/jdk/9.0.1+11/jdk-9.0.1_linux-x64_bin.tar.gz?AuthParam=1516137431_0e89d10b30203a572ea858768475ef74 Connecting to download.oracle.com (download.oracle.com)|23.200.70.136|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2018-01-16 15:15:11 ERROR 404: Not Found.  download failed Oracle JDK 9 is NOT installed. dpkg: error processing package oracle-java9-installer (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  oracle-java9-installer E: Sub-process /usr/bin/dpkg returned an error code (1)   I found , but it does not appear that the  works for JDK 9.0.4+11. I've updated the SHA checksums (), set the major version to 9.0.4, and set the minor version to 11, but I'm still not having success.  What steps need to be carried out to get the JDK apt installer to work until the WebUpd8 team is able to update the PPA?


I'm new to Ubuntu and I want to install wine. It's not in my Ubuntu software centre, but I have downloaded the files from the internet. How do I get it to install from the files I have downloaded?


Difference between "relationship" and "relation"

How can I easily differentiate between when to use "relationship" and "relation". More often than not,  I tend to use "relationship", but would really like to know how these are to be used in writing. Speaking from a general viewpoint, the definition for both of these is almost similar. (this is something I've gathered from a simple Google Search) When discussing two entities, relationship seems to be an appropriate choice. But there are times when these could be interchangeable. For e.g., the relation between writing and reality  OR the relationship between writing and reality.  So are there are rules or pointers that are to be kept in mind to avoid using these incorrectly?


Do I have to uninstall wine each time uninstalling a program installed by wine?

Let me try to explain this. Sorry for being a newbie. Anyways, I have wine installed to install Evernote, then I realized Evernote version 5.9* is no good that I should go for an older version 5.8* which then I downloaded.  I used the alt+F2 to open up the wine uninstaller to remote my Evernote 5.9* then I go into the ~/.wine folder and deleted the Evernote folder within.  Then I tried installing Evernote 5.8* in terminal with wine which didn't work and so I tried going to the add/remove of wine to install which gives me the error message of   Evernote was already installed by another user. Only one per-user installation is supported...........  I searched up for this error alert, lots threads are saying to remove wine in order to remove things in the wine bottle. Is this a must or else I won't be able to install Evernote again?


Is there a similarly fast alternative to Crtl + Shift + Eject for new Macbook that lack eject keys?

The new MacBook Air and Pro without optical drives lack an Eject key.  I use Ctrl + Shift + Eject a lot to put my display to sleep at the simple press of three keys. Without the Eject key being there anymore I'm wondering if there's an alternative to those very handy shortcuts which required the Eject key.  The alternatives I've found so far are not too good:   in Alfred type "lock" - too many strokes for fast computer locking a hot corner in the bottom left to put the display to sleep - ok, but I get there by error too often and lock the computer for serious productivity bummers close the lid of the MacBook Air - puts the Mac to sleep completely and therefore not very useful, when it should keep doing what it's doing.   Is there a similarly fast alternative to Crtl + Shift + Eject for new Macbook?


Transferring domain to new host, but keeping email on old host

I'm helping out a friend manage his website. Said friend has a domain, website.com, which I am transferring from his old host (OLD) to his new host (NEW), but OLD does not provide email services (or, at least, not intuitively). As a result, he wants both:   To host the website at NEW To use the email servers at OLD so he can continue using the email accounts he set up there.   The move from OLD to NEW has taken place, and I have updated the DNS records so they no longer point at ns1.old.com, and now point instead at ns1.new.com, and so on.  But having searched around a bit for the solution to the email aspect, I'm a little uncertain. I've updated the MX record at NEW to point back to ns1.OLD.com, but emails are still failing - and I'm sure the reason for this is obvious, but I'm not quite grasping what I need to do here.  As I understand it, the process ought to be as follows:   Mail sent to account@website.com website.com routes the mail to the host at NEW NEW then uses the new MX record to rout it to the servers at OLD Hey presto, the email should appear in the email inbox at account@website.com at OLD.   But this isn't happening. I get a 550 error telling me to turn on SMTP authentication, which I've read is a sure sign that I've got the MX configuration wrong. Any assistance on this would be really greatly appreciated.  tl;dr: Friend wants to move site hosting to NEW, but keep email hosting at OLD - I don't know what to do with MX and nameservers and so on to make this happen.


Cannot run VM in VMWare on Windows 10 due to Hyper-V

I have successfully installed VMWare Workstation 10 on my laptop running Windows 10. The virtualized system is CentOS.  Could install guest system and run it  I could successfully install the system and all, but after upgrading to Windows 10 Anniversary Update, I get this:    Removed Hyper-V  I have uninstalled everything from the system concerning Hyper-V. I removed it from my computer and restarted several times. No luck.


Time dilation cancelling out due to relative motion

Suppose I am travelling at a speed near to the speed of light and I have a clock with me . For a stationary observer having the same clock, he would see that my clock ticks slower than his. On the other hand, when I look at him back, I would see his clock ticks slower than that of mine(as he is travelling at the same speed with respect to me).  So, don't these two time dilations cancel out each other's effect making both our times pass at the same rate (i am travelling and the observer is at rest)? How does the relativity theory explain this?


New command causes undefined control sequence

I want to create a new command to set the column colour, but it's causing the following error:  ! Undefined control sequence. \redcolumn ->\columncolor                            {red} l.10 A & B            \\   I don't know if it's because I'm calling a command with a parameter or because of where I'm trying to call the new command, but here's the source code:  \documentclass[letterpaper,20pt]{extarticle} \usepackage[table,xcdraw]{xcolor} \newcommand{\redcolumn}{\columncolor{red}} \begin{document} \begin{tabular}{l >{\columncolor{red}}l} A & B \\ \end{tabular}  \begin{tabular}{l >{\redcolumn}l} A & B \\ \end{tabular}  \end{document}   The first tabular uses \columncolor, and it works. The second uses my new command, and it fails. How have I misunderstood \newcommand?


must steps required before a particular tasks are called pre-requisite  what do we call must steps which should be followed after a particular task  post-requisite is not a valid English word i guess , is there replacement ??


I have a big problem with the figures in my paper. I need to submit a postscript file to a journal. Figures are in a good shape while I directly convert the file to pdf. But while I save the file in postscript format they are pixelated like the photos I attached. Any help appreciated! By the way I use lyx.


Do characters carry over when playing Old Runescape?

I want to play the old Runescape because I dislike the new combat update. After playing the game for over 6 years, and I want to play the old Runescape I am used to, but I want to keep all of my levels.


Are there any tools for making irregular polygons regular?

Are there any tools in Blender that take irregular polygons and make them regular (approximate a circle)? I'm specifically looking for a solution that works with preexisting polygons. Also, it would be nice if it keeps the overall position after making it regular.    Irregular Polygons    Regular Polygons


How to load parts of bash alias only when logging in via ssh

As the title states, is it possible to have an alias only load when I access the machine through ssh, or better yet, only from a specific computer through ssh?


can not change background-color using jQuery

I have read almost every article about this... Just can't find the reason why this isn't working. I want to change my tr background-color using jQuery. There are no errors in web inspector or what so ever, just nothing happens...  My html code:  <!DOCTYPE html>               <title>Opravila</title>                     <form>       Naslov opravila: <input type="text" id="naslov"></input>       Vrsta opravila: <input type="text" id="vrsta"></input>       Nujnost opravila:        <select id="nujnost">         <option value="1">1</option>         <option value="2">2</option>         <option value="3">3</option>         <option value="4">4</option>       </select>       <input type="button" value="Dodaj opravilo" id="dodaj"></input>      </form>

           #	           Opravilo	           Vrsta	           Nujnost	           Datum vnosa

        And my jQuery code: (Note that my code for this starts almost at the end)  $(document).ready(function(){     $("#dodaj").click(function() {         var naslov=$("#naslov");         naslov=naslov.val();         var vrsta=$("#vrsta");         vrsta=vrsta.val();         var nujnost=$("#nujnost");         nujnost=nujnost.val();         var zaporedna_st=$("#tabela tbody tr").length;          var datum =new Date();         datum=datum.getDate()+"."+(datum.getMonth()+1)+"."+datum.getFullYear();          $("#tabela tbody").append("
"+(zaporedna_st+1)+"	"+naslov+"	"+vrsta+"	"+nujnost+"	"+datum+"
");     });      $("#tabela tbody tr").click(function() {         $(this).css("backgroundColor", "red");     }); });


How can I convert a JSON string into an object with fields in Javascript?

Here is what I have now:   console.log(JSON.stringify(errorParam))  {"data":{"message":"{\"ErrorLine\":113,\"ErrorMessage\":\"Authentication Failed\",\"ErrorNumber\":50004,\"ErrorProcedure\":\"start_test\"}"},"status":400,"statusText":"Bad Request"}   I know about JSON.stringify but how can I convert this back into an object from a string?


Python: Why these two same list of list created through different means behaving differently?


Manually copied Skyrim Steam Version to new computer, can't start game

I have manually copied the skyrim directory of steamapps from my old computer to a new one.  After installing Steam again, I tried to copy all files back again to start the game, but, when I start steam, it doesn't recognize Skyrim as installed, and need to download again 10Gb of game. :-/  I didn't know about the Steam Backup feature, so, someone can help me, I think it is a Windows Registry Keys that are missing, but I can't find anything on web related to that!  Any suggests?


Mavericks Terminal - 'Command Not Found' for everything

About everything (even clear and open) is giving 'Command Not Found' on the Terminal.  If I do and echo $PATH, it gives me this. /Users/username/Documents/android/android-sdk-macosx/platform-tools:/Users/merck/Documents/android/android-sdk-macosx/tools  The /.profile file is not even there in the Finder.  The environment.plist file in .MacOSX has this value. bplist00—_SENCHA_CMD_3_0_0_$/Users/username/bin/Sencha/Cmd/4.0.2.67E  Can anyone give some pointers.


Does an IOT guarantee order in a select?

We need to add a priority column to a table that gets hit about 250 times a second, approx 170 selects, 125 inserts and 60 updates. The column will be a simple number(1).  The priority does not matter for the inserts or updates i.e. not part of the primary key, which I'll enforce separately.  We basically don't want to have to do an order by over a range scan 170 times a second, as the number executed will drop massively.  Does an index organised table guarantee that priority = 1 will always come before priority = 9 when running the following query:  select *   from my_table  where rownum < 2   For slightly more context a typical query would be:  select *   from my_table  where mod(to_number(to_char(tstamp,'ss')),1) = 0    and done is null    and country = 'gbr'    and rownum < 2   The pk constraint, for the IOT, would become priority, rest of the pk with a separate constraint on the pk solely for structure. done is null in approximately 99% of the table so this isn't very selective anyway.  Main index used is, I think, country, done, to_number(to_char(tstamp,'ss'), we tested about 20 combinations and this came up top by a long way.  I am completely unwilling to add any time at all to these queries, 0.01s a day added by select is 41 minutes a day. We'd much rather settle for "good enough" than perfection.


Scaling property of  Fourier series and Fourier Transform

This  about the intuition behind the scaling property of the Fourier transform made me wonder about the corresponding notion for a Fourier series.  The Fourier transform of $f(ax)$ is $\frac{1}{|a|} \mathcal{F(\frac{u}{a})}$. If $a>1$ then the graph of $f(ax)$ is $f$ compressed and so its Fourier transform has frequencies that are higher. However they are scaled down in magnitude.  On the other hand take $f(x)= \cos x$. Its fourier series is trivially itself, with the coefficient of $\cos x$ being $1$. Scaling it to $f(ax) = \cos ax$ where $a>1$ is an integer still has a trivial fourier series, and the coefficient of $\cos ax$ is $1$. This is unlike the Fourier transform where the "coefficients" of each frequency get scaled as the formula shows: $\frac{1}{|a|} \mathcal{F(\frac{u}{a})}$.  Is there a conceptual way to explain this discrepancy?


Is it possible to divide a matrix by another? If yes, What will be the result of $\dfrac AB$ if $$         A = \begin{pmatrix}         a & b \\         c & d \\         \end{pmatrix},         B = \begin{pmatrix}         w & x \\         y & z \\         \end{pmatrix}? $$


Show that two definitions of matrix norm are in fact equivalent $\max\limits_{ x \neq 0} \dfrac{\|Ax\|}{\|x\|} = \max\limits_{\|x\| = 1} \|Ax\|$

I found a proof in an online course note which purports to show that two definitions of matrix norms are equivalent, however, I have some doubts regarding the proof, I would like a second pair of eyes     Claim: $\|A\| = \max\limits_{ x \neq 0} \dfrac{\|Ax\|}{\|x\|} =  \max\limits_{\|x\| = 1} \|Ax\|$     Proof:     $(\text{first show} \max\limits_{ x \neq 0} \dfrac{\|Ax\|}{\|x\|} \leq \max\limits_{\|x\| = 1} \|Ax\|)$       Suppose $x \neq 0$, then $\max\limits_{ x \neq 0}   \dfrac{\|Ax\|}{\|x\|} = \max\limits_{ x \neq 0}  \|A\dfrac{x}{\|x\|}\|$. Let $z = \dfrac{x}{\|x\|}$,    $\|z\| = 1$. Therefore, $\max\limits_{ x \neq 0}   \dfrac{\|Ax\|}{\|x\|} \leq  \max\limits_{ \|z\| =1} \|Az\| =  \max\limits_{ \|x\| =1} \|Ax\|$   -     $(\text{next show:}\max\limits_{ x \neq 0} \dfrac{\|Ax\|}{\|x\|} \geq \max\limits_{\|x\| = 1} \|Ax\|)$      Suppose that $\|x\| = 1$, therefore $\max\limits_{\|x\| = 1} \|Ax\| =  \max\limits_{\|x\| = 1}  \dfrac{\|Ax\|}{\|x\|} \leq \max\limits_{x \neq 0}  \dfrac{\|Ax\|}{\|x\|}$, where the inequality follows from maximization   over a superset of $\{x\in \mathbb{R}^n:\|x\|=1\}$.   -     Thus, $\max\limits_{ x \neq 0} \dfrac{\|Ax\|}{\|x\|} =   \max\limits_{\|x\| = 1} \|Ax\|$.   It seems that there is no justification for $\max\limits_{ x \neq 0}   \dfrac{\|Ax\|}{\|x\|} \leq  \max\limits_{ \|z\| =1} \|Az\|$. It doesn't make sense, because we are maximizing over a much larger set than the unit circle. Can someone see if there is indeed a problem with the proof and if there is some opportunity to fix it?


How to understand "It takes a little bit of getting used to the idea..."?

The following sentence is from a mathematical lecture note :     It takes a little bit of getting used to the idea of a function that cannot actually be evaluated at any specific point, but with some practice you will find that it will not cause any significant conceptual difficulty.   Is there anything wrong with this sentence? I guess it is supposed to be "It takes a little bit of time for getting used to the idea...". Any idea for understanding the sentence?


Entity/Component based engine rendering separation from logic

I noticed in Unity3D that each gameObject(entity) have its own renderer component, as far I understand, such component handle rendering logic.  I wonder if it is a common practice in entity/component based engines, when single entity have renderer components and logic components such as position, behavior altogether in one box?  Such approach sound odd to me, in my understanding entity itself belongs to logic part and shouldn't contain any render specific things inside.  With such approach it is impossible to swap renderers, it would require to rewrite all that customized renderers.  The way I would do it is, that entity would contain only logic specific components, like AI,transform,scripts plus reference to mesh, or sprite. Then some entity with Camera component would store all references to object that is visible to the camera. And in order to render all that stuff I would have to pass Camera reference to Renderer class and render all sprites,meshes of visible entities.  Is such approach somehow wrong?


Prove the $n$th Fibonacci number is the integer closest to $\frac{1}{\sqrt{5}}\left( \frac{1 + \sqrt{5}}{2} \right)^n$

Prove that the $n$th Fibonacci number $f_n$ is the integer that is closest to the number $$\frac{1}{\sqrt{5}}\left( \frac{1 + \sqrt{5}}{2} \right)^n.$$   Hi everyone, I don't really understand the problem. I have the following hint, but I don't know how to work it.     Hint: Show that the absolute value of $\frac{1}{\sqrt{5}}\left( \frac{1 - \sqrt{5}}{2} \right)^n$ is less than $1/2$.


Javascript - get object property value NOT reference

I have created a module that I use to write to a global array like so:  class SomeLibrary {    constructor( product ) {     if (typeof window.globalArray === 'undefined'){         window.globalArray = [];     }     this._someVal = 0;   }   .   .   .   addToGlobalArray( obj ) {     obj.someVal = this._someVal;     window.globalArray.push( obj );     this._someVal++   }   .   .   .   . }  let someLib = new SomeLibrary(); someLib.addToGlobalArray({test: 'hello'}) someLib.addToGlobalArray({test: 'hello again'});   And want my 'globalArray's 'someVal' to use the current value of _someVal from the module not the reference for the result to look like:  //I want this outcome     [     {test: 'hello', someVal: 0},     {test: 'hello again', someVal: 1} ]   Not (as it currently operates)  //I don't want this outcome     [     {test: 'hello', someVal: 1}, //someVal here is 1 as it is a reference to the current value of _someVal in the module     {test: 'hello again', someVal: 1} ]   What do I need to do to pass the value and not the reference into the global Object?  (I don't have access to jQuery or Underscore)


What's an idiom for doing something in an unnecessarily complicated way?

For an example, I'll quote C.S. Lewis' The Voyage of the Dawn Treader:     One day the cat got into the dairy and twenty of them were at work moving all the milk out; no one thought of moving the cat.   Is there an idiom for this type of situation?


I don't think this is how questions are supposed to look in the Android app...    Android 4.2.2, app version 1.0.68 (which I believe is the most current)


phpMyAdmin insists on forcing my utf-8 characters into latin1.  Server Info:  Server: Localhost via UNIX socket Server type: MySQL Server version: 5.0.27 - Source distribution Protocol version: 10 Server charset: UTF-8 Unicode (utf8)   phpMyAdmin Version information: 4.0.10 PHP Version 5.2.11  The server version and PHP version is not under my control, and phpMyAdmin is the latest version that will run under PHP 5.2  Neither Import or straight SQL will work. My own internal PHP tools handle utf8 just fine, and update the database correctly.  DROP TABLE IF EXISTS `tempchar`; SET character_set_client = utf8; CREATE TABLE `tempchar` (   `id` int(11) NOT NULL DEFAULT '0',   `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',   `active` int(1) NOT NULL DEFAULT '0',   `type` int(1) NOT NULL DEFAULT '0',   PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;  INSERT INTO `tempchar` VALUES (382,'Vicenté Marcos de Cervantés',2,0);   The end result (viewed as utf8) is:  382 : Vicent� Marcos de Cervant�s   Same result when switched to 'Western' (latin1 etc)  382 : Vicenté Marcos de Cervantés   Code that produces the above output:  $result=mysql_query("select * from tempchar where active=2 order by name"); while($row=mysql_fetch_array($result)) {   echo "$row[id] : $row[name]<br>\n"; }   It is clearly phpMyAdmin stepping in and doing something unnecessary. Has anyone got any clues as to how to get it to behave?


ListException: List index out of bounds: 0 for Custom Employee User account

When i create new User Account and login with that credentials, it gives me this problem if admin doesnt have set thier values yet !!!**  AllotmentList = [select id, Days_Remaining__c from PTO_Allotment__c where Year__c =:year and Employee__c=:EmployeeList[0].id LIMIT 100]; //access only Current user Allotment details                 //to handle Listoutof Bound Exception wrote if-else          if(AllotmentList.size()>0)         {         requests.PTO_Allotment__c=AllotmentList[0].id;         requests.Days_Remaining__c=AllotmentList[0].Days_Remaining__c;         }         else         {             //write a code when AllotmentList is empty ....         }


Help ID this plant, quite possibly a weed

I found this plant near my South Indian home in , India. Most probably it could be some sort of weed. Anyhoo, is this plant of any medical or commercial value? Is it a remedy for something?   It has a white tap root with little veins off the main root It has a really small yellow flower It's leaves are similar to that of a clover, except for that it has three to five leaves        Merci d'avance!  (P.S. Forgive me if this is some very common plant that I should know about, I'm in 7th grade.)


I just updated to iOS 10 and I want to send an SMS instead of an iMessage to a friend. In iOS 9 I could continuously touch an old message and press send as a text message (or something like that). Now in iOS 10 I don't see anything relevant.


I'm trying to understand the remainder in Taylor's theorem from this source:     I don't understand the very last parts of the proof (the parts where the remainder $R_n$ is solved). Can someone explain why does it follow from:   $$\frac{f^{(n+1)}(a)}{(n+1)!}(x-a)^{n+1}+\int_a^x \frac{f^{(n+2)}(t)}{(n+1)!}(x-t)^{n+1} \;dt$$  that $$R_N = \frac{f^{(n+1)}(\xi)}{(n+1)!}(x-a)^{n+1}?$$  I think the changing between letters $a$ and $\xi$ confuses me...?


Did Dumbledore know that Harry would have to sacrifice himself from the very beginning?

Based on the following interchange between Harry and Dumbledore in the pivotal "King's Cross" chapter of Deathly Hallows, I was wondering when exactly Dumbledore put together that Harry would have to die in order to bring about Voldemort's ultimate demise:  "And you knew this? You knew--all along?" "I guessed. But my guesses have usually been good," said Dumbledore (Deathly Hallows, 599, hardcover).  The conversation that spurred Harry's question includes material dating back to Halloween '81, but also specifically mentions the events of the graveyard from GoF. So, "knowing all along" could refer to everything (i.e., Harry must die, Voldemort ignorantly tethered him to life, etc.) or just that Voldemort tethered him to life. Other important information pertaining to this question can be found in OOTP, when Dumbledore confirms (if he didn't already know) that Harry contains part of Voldemort's soul. He uses the silver instrument to find out that Harry is just like Nagini, having the ability to share mind and soul with Voldemort. He also says the following:  "I guessed, nearly fifteen years ago," said Dumbledore, "when I saw the scar upon your forehead, what it might mean. I guessed that it might be the sign of a connection forged between you and Voldemort" (Order of the Phoenix, 826-827, hardcover).  While confirming that he guessed that Harry might share a connection with Voldemort from the very beginning, Dumbledore does not confirm with this statement that he knew Harry would ultimately have to give up his life. In Philosopher's Stone, when Dumbledore drops off Harry on the Dursley's doorstep, we know he is not entirely truthful with McGonagall.  McGonagall asks: "How in the name of heaven did Harry survive?" "We can only guess," said Dumbledore (Philosopher's Stone, 12, hardcover).  Of course, this was a lie. Dumbledore already knew how Harry survived, otherwise he wouldn't be delivering Harry to Lily's sister to extend the blood sacrifice. By proxy, he also knows that Voldemort will return b/c of Horcruxes, otherwise he wouldn't be so worried about Harry. Finally, when asked in the same scene if he could remove the scar, Dumbledore says:  "Even if I could, I wouldn't. Scars can come in handy" (Philosopher's Stone, 15, hardcover).  So, did Dumbledore know at this very moment that Harry would have to die? Did he at least guess it to be true during this scene? We know he gains perfect confirmation in OOTP, but did he know it "all along," as a particular reading of the King's Cross interchange in DH would have us believe?


Wifi adapter not found on Lenovo Ideapad 320 with RTL8821CE on Ubuntu 18.04

I had done dual boot on my laptop as Windows and Ubuntu. But unfortunately the wifi option is not shown in Ubuntu but it works fine on Windows.I had tried many solution but not get exact solution for this problem.    lspci -knn | grep Net -A3; rfkill list gives:    03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter [10ec:c821]         Subsystem: Lenovo RTL8821CE 802.11ac PCIe Wireless Network Adapter [17aa:c024]  0: ideapad_wlan: Wireless LAN         Soft blocked: no         Hard blocked: no  1: ideapad_bluetooth: Bluetooth          Soft blocked: no          Hard blocked: no  2: hci0: Bluetooth          Soft blocked: yes          Hard blocked: no


The vote counts seem to have enough room to accomodate 3 digits and a negative sign:    However when the score is expanded to show +/- vote counts...    The minus sign gets cropped off somehow.


Is it possible to use custom placeholder for custom post title?  I couldn't see any placeholder mentioned in the labels array argument of register_post_type .


$\overline{X}=\frac{1}{n}\sum_{i=1}^n X_i$ is the sample mean and $S^2=\frac{1}{n-1}\sum_{i=1}^n (X_i-\overline{X})^2$ is the sample variance. $X_1,...,X_n\sim N(\mu, \sigma^2)$ and independent. I want to show that $\overline{X}$ and $S^2$ are independent. I've already proven that $\overline{X}-X_i\sim N(0,\frac{n-1}{n}\sigma^2)$ and that $Cov(X_j-\overline{X},\overline{X}) = 0$. But then I didn't know how to proceed. While searching for solutions, I found . Here it claims that I need to calculate the covariance matrix and then use the "multivariate normality" (I don't know what exactly they mean by that) so that $\overline{X}$ and $X=(X_1-\overline{X},...,X_n-\overline{X})^T$ are independent. The rest is clear to me. I just want to understand the details to why $\overline{X}$ and $X$ are independent.


I'm basically running a IF statement that in the condition checks if the array number[i] is equal to 18 and if so the color should be read but have had no luck with using html or setColor.  if (number[i].equals("18"))             {                 number[i] =              }   What would I assign number[i] to be if the integer is 18?  Trials such as :  number[i].setColor(Color.red); number[i] = number[i].setColor(Color.red) number [i] = "  18";   Have all not worked  Should also point out 18 is stored as a string.


Tag wiki Stats - "created" showing with wrong date calculation

In any tag's info page, under the Stats section the created detail is displaying. But the period is displaying wrongly.  For an example the  tag was created on  (also found in the tooltip of Stats), so the tag's duration period should be . But in the Stats section it is displaying as 7 years, 1 month. The calculation is wrong.        I have verified for most of the tags and the period is displaying wrongly in the tag-wiki Stats section.


an analytic function from unit disk to unit disk with two fixed point

prove that if  $f:\mathbb{D}\rightarrow\mathbb{D}$ is analytic with two distinct fixed point then $f$ is identity. I thought if one of the fixed points was zero by schwarz lemma this statement is easily proved. but what can I do if fixed points were nonzero?


Prove that $\int_0^4 \frac{\ln x}{\sqrt{4x-x^2}}~dx=0$ (without trigonometric substitution)

The integral is from P. Nahin's "Inside Interesting Integrals...", problem C2.1. His proposed solution includes trigonometric substitution and the use of log-sine integral.  However, I think the problem should have an easier solution (without appealing to another complicated integral at least).  I have the following trick in mind. Let's introduce the substitution $x=4-z$  $$I=\int_0^4 \frac{\ln x}{\sqrt{4x-x^2}}~dx=\int_0^4 \frac{\ln (4-z)}{\sqrt{4z-z^2}}~d(4-z)=\int_0^4 \frac{\ln (4-z)}{\sqrt{4z-z^2}}~dz$$  $$2I=\int_0^4 \frac{\ln (4x-x^2)}{\sqrt{4x-x^2}}~dx$$  $$I=\int_0^4 \frac{\ln \sqrt{4x-x^2}}{\sqrt{4x-x^2}}~dx$$    And here I'm stuck. I'm not sure if this can go somewhere. Maybe partial integration can help, but I don't know how to choose the functions. What do you think?    Here is .  Only  does not use trig substitution, it used gamma function instead. If there are no other ways, I'm prepared to give up on my question. But I would be grateful if it's left open at least for several days    Edit  After many attempts, I conclude that there is no trick to this integral. The reason is: the general form of this integral in not zero, but has the same symmetry properties, as the above case:  $$I(a)=\int_0^a \frac{\ln x}{\sqrt{ax-x^2}}~dx=\int_0^a \frac{\ln (a-x)}{\sqrt{ax-x^2}}~dx=\int_0^a \frac{\ln \sqrt{ax-x^2}}{\sqrt{ax-x^2}}~dx \neq 0$$  $$I(4)=0$$  So we will get nothing from symmetry considerations alone. There are two possible ways to solve this - either trigonometric substitution or gamma function.  Edit 2  I was wrong it seems, see the accepted answer.


I'm in the sudoers file (username ALL=(ALL) ALL, but am not the root user on a machine.  When I want to install something from Ubuntu Software, or want to execute some other root operation from a GUI, I get the following popup:    This popup shows the root user (name redacted in image), not me. I have the permission to do this operation (I'm in the sudoers file after all), but the popup doesn't give me any option to change the user that should do the operation. How do I solve this? I can of course execute the corresponding command with sudo from the terminal, but I'd like to be able to use the GUI as well.


What is the shortest way to compute the last 3 digits of $17^{256}$?

What is the shortest way to compute the last 3 digits of $17^{256}$ ?  My solution: \begin{align} 17^{256} &=289^{128} \\ &=(290 - 1)^{128}\\ &=\binom{128}{0}290^{128} -  ... +\binom{128}{126}290^2 - \binom{128}{127}290 + \binom{128}{128} \end{align}  Computed the last 3 terms whose last 3 digits gave the last 3 digits of $17^{256}$.  Is there any shorter method to do this(which requires much less computation) ?


Centralized Master Equation in Single File like `\cite{}`

Is it possible in latex to have single file like equations.tex and able to call part of it to our main.tex just like a combination of \include{} or \input{} and \cite{}? For example I have a centralized equation.tex with content: \begin{equation} \label{eq:miqp-obj} \min_{\mathbf{x}}C = \frac{1}{2} \mathbf{x}^{T}Q\mathbf{x}+\mathbf{c}^{T}\mathbf{x}  \end{equation}  \begin{equation} \label{eq:miqp-cons} A\mathbf{x} \preceq \mathbf{b}, \end{equation}  and in my main.tex I call: Equation can be seen in (\ref{eq:miqp-obj}).  \include{equations.tex/eq:miqp-obj} % or \input{equations.tex/eq:miqp-obj}  The idea is to have a centralized equations. A workaround is using eqautions/ folder and have each equation its separate .tex file, then use \input.


How do I reduce the vertical spacing of \intertext?


Is there a published way to take text that may have accent marks and remove the accent marks?  For example:  System.assertEquals('Hello', transform('Ḧéļḻṏ'));   I believe there is an equivalent method in Java, C# and JavaScript. I can't seem to find the Apex equivalent and I'm disturbed that I might have to do it on my own.


How should I edit my question to explain how it's not a duplicate?

has been marked as a duplicate by five users:     This question has been asked before and already has an answer. If those answers do not fully address your question, please edit this question to explain how it is different or ask a new question.   I want to explain how my question is not a duplicate. How can I do this? Should I leave comments explaining the differences? What else should I do?


After i had been studing for histology examp i tried to solved one nominclature dilema.Its about fibrocytes and fibroblast.  In my histology book is statment, that fibrocytes is special type of cell which can be differentiated to different cell types by specific occasion ( for example exposure to transcript factors).   Then fibroblast is cell of connective tissue. Its differentiated.  Why is differentiated cell named with blast (usually active type) istead fibrocyte (usually the differentiated one)?


Review bans should escalate beyond 30 days

Currently, as reviewers fail audits, they are  (2 days, then 7, then 30). At present, this caps out at 30 days. The next time a reviewer is banned, the ban duration drops down to 2 days. Even moderators cannot hand out review bans of longer than 30 days.  Over at Stack Overflow, we have quite a few users who have been banned from review 20+ times. All of them kept coming back after being banned, since they knew they could just wait out each 30 day ban and proceed to game reviews after that. For example, I saw this in the history for one user today:  Jan 21  user has been banned from review    duration = 30 days Jan 11  user has been banned from review    duration = 7 days Jan 4   user has been banned from review    duration = 7 days Dec 5 '15   user has been banned from review    duration = 30 days Nov 27 '15  user has been banned from review    duration = 7 days Nov 25 '15  user has been banned from review    duration = 2 days Oct 21 '15  user has been banned from review    duration = 30 days Oct 14 '15  user has been banned from review    duration = 7 days Oct 12 '15  user has been banned from review    duration = 2 days Sep 11 '15  user has been banned from review    duration = 30 days Sep 3 '15   user has been banned from review    duration = 7 days Sep 1 '15   user has been banned from review    duration = 2 days   Moderators receive no notification of these serial review abusers, so we have no idea what they're doing until we happen across their ban history. We've been instructed to start suspending their main account on repeated review bans, but without a way of knowing this is happening, that's a limited way of preventing them from causing damage to the site.  Therefore, I'm requesting that we allow for further escalation of the review ban duration past 30 days. This would require extending the sliding window on which bans are calculated. At present, this is 30 days, but that window could scale with the duration of the last review ban.   I'd like to see an escalation on the order of 2 days -> 7 days -> 30 days -> 60 days -> 365 days and the ability of moderators to impose manual review bans of up to 365 days, in line with our ability to suspend accounts for up to 365 days.  Moderators can always manually remove review bans, so if someone is trapped by a series of unfortunate circumstances (bad audits, etc.), we can still override the system.  I really do think we need a better way to stop the harm that certain abusive reviewers are causing to sites when they aren't deterred by the current review ban cycle.


When double clicked on tools of arctoolbox, no dialog box is opening, for the "buffer" or "intersect", or for any of the tools in the ArcToolBox.  I faced the same problem in both ArcGIS version 10.5 and 10.6.   How can I solve this?


I want to use tikz to draw something similar to this:    That is, we tile the tore with squares, we cut it open, twist it and then glue it back again.  The idea would be to draw 4 torii: a simple square-tiled torus, a cut-open torus, this cut-open torus twisted and then this new tore glued back again.  An example of a cut-open torus would be this:    For the basic torus, I drawed the following:  \begin{tikzpicture} \useasboundingbox (-3,-1.5) rectangle (3,1.5); \begin{scope} \fill[ball color=blue, opacity=0.15] (0,0) ellipse (3 and 1.5);   \draw (0,0) ellipse (3 and 1.5);   \clip (0,-1.8) ellipse (3 and 2.5);   \draw(0,2.2) ellipse (3 and 2.5);   \clip (0,2.2) ellipse (3 and 2.5);   \draw (0,-2.2) ellipse (3 and 2.5);   \fill[white] (0,-2.2) ellipse (3 and 2.5); \end{scope} \end{tikzpicture}   However, I dont know how to square-tile it nor do I know how to "cut" it like in the video.  How could I do it? (I think that this could be easier in assymptote than in Tikz but since every other figure I did in this document was based on the torus I drawed in the MWE, I would like to stay in tikz for this drawing.)


Advanced selenium webdriver tutorial/course

Is there an online advanced/intermediate tutorial on Selenium Webdriver. Preferably using Java. I've searched a lot but could not find such a course/tutorial. Almost 99% are very basic, and I would like to do more advanced testing with Selenium Webdriver.   Thank you.


Find a private interface field with Reflection?

Given this class  public partial class Default : Page {     private IRepository repo;     ... }   I want to find and set the private repo field. Is that possible?   UPDATE  I tried using the GetFields(BindingFlags.NonPublic), it returns {System.Reflection.FieldInfo[0]}.  UPDATE II  I tried using the GetFields(BindingFlags.NonPublic | BindingFlags.Instance) , it returns all the fields of the Page but not repo.


import java.lang.String; public class Test {     public static void main(String[] args) {         String a1="ka";         String a2="ka";          System.out.println("a1==a2?  "+(a1==a2));         String a3="k";         String a4=new String("k");         System.out.println("a3==a4?  "+(a3==a4))         System.out.println("a3==a4?  "+(a3==a4.intern()));         String a5="k";         String a6=a4+"a";         System.out.println("a1==a6?  "+(a1==a6));     } }   Output that i got:  a1==a2?  true a3==a4?  false a3==a4?  true a1==a6?  false    a1===a2 is true as line 5 will not create new String literal in string pool area.Only reference to previously created string is returned. a3==a4?  false as a4 will have refernce to the String object instead of the string in the string in string pool area. My question is if a3 is referencing the string constant instead of the String object, how is it able to use the methods of the String class? a4.intern() will return the reference to the string in the string pool which happens to be same as a3  a6=a4+"a" will create a new string "ka". But this actually make use of StringBuilder class and its append method . It is then converted to string using toString(). Does this process store the newly created string "ka" in the string pool area? Since the string is already in the pool the code at line 12 should return the reference to it. So the a1==a6 should be true.rt? I am new to java. Please guide me where i am doing the mistake?


I hate the three horizontal bars on top. Any idea on how to reduce or merge them like ubuntu 16?

I'm on ub20LTS and I really dislike how much top space the topmost bars use. Any idea on how to remove or reduce their numbers?  Edit: Thanks to everybody's support, this is how my workspace looks like now. I've :  Installed gnome-extensions for firefox. Turned off menu bar in ff. Installed dash to dock. Installed hide top bar.  This way you can better utilize your screen space.


I thought of this question lately, but I'm not satisfied with the answer I got:  If I flip a coin 100 times, what is the probability that I will get a streak of at least ten of the same side?  The way I thought of solving it was just: $\left(90 \times 0.5 ^ 9\right) = 0.0879$, but this has to be wrong because, for the probability of getting a streak of at least 4 in the same scenario, it yields: $\left(96 \times 0.5 ^ 3\right) = 12$, which obviously doesn't make sense.


Why can't humans throw objects at bullet speed when the force involved seems so small?

The force that propels a bullet should at least be similar in intensity to the force experienced as recoil and the force exerted on the target. But these forces seem really low (the equivalent of a shove).  If all it takes to make a small object achieve bullet speed is the equivalent of a shove, why can't humans throw objects at these speeds?


How many and which distinct groups of order 20 that are not isomorphic?  Why are they not isomorphic?  I have the $Z_{20}, Z_2+Z_{10}, D_{10}$.  There are more than 4.  I don't know the limit.


Using Reflection to Create an Expression Tree from a Static Expression Method

I have a method that uses an expression to define its output: public async Task<TOut>     GetCustomerAsync<TOut>(         int customerId,         Expression<Func<Models.Customer, TOut>> map) {     return await _customerService.GetMappedSingleAsync(         map,         customer => customer.Id == customerId; }  I then have a number of different static expression methods that I can pass into this method, for example: public static class CustomerExpressions {     public static Expression<Func<Models.Customer, CustomerItemDto>>         CustomerItemDtoExpression()     {         return customer => new CustomerItemDto         {             CustomerId = customer.Id,             CustomerName = customer.Name         };     } }  The main method can then be called like this: var customer = await _customerUiService.GetCustomerAsync(     id, CustomerExpressions.CustomerItemDtoExpression());  I would now like to use reflection to create the expression tree from the designated expression method, so I could select the required expression by name.  Something like this: var dtoName = "CustomerItemDto"; var methodName = dtoName + "Expression"; var classType = typeof(CustomerExpressions); var method = classType.GetMethod(methodName);  var expressionTree = /* Create an expression tree from the method */  var customer = await _customerUiService     .GetCustomerAsync(id, expressionTree);  In other words, how can I compile the expression tree from my method's MethodInfo? Any help would be much appreciated. Update So I have now got a little further with the code thanks to the comments var dtoName = "CustomerItemDto"; var methodName = dtoName + "Expression"; var classType = typeof(CustomerExpressions); var method = classType.GetMethod(methodName);  var expressionTree = method.Invoke(null, null);  // The problem now is that expressionTree is returned as an object, // when, in this example, it needs to be of type // Expression<Func<Models.Customer, TOut>>  var customer = await _customerUiService     .GetCustomerAsync(id, expressionTree);  The problem now is that expressionTree is returned as an object, when it needs to be of type Expression<Func<Models.Customer, TOut>> - in this particular case the return type of the method Expression<Func<Models.Customer, CustomerItemDto>>


Book Recommendation: Multiple variables calculus

What would be a good book learning Multiple variables calculus?   Basically, I'm only interested with the theorems of continuity and differentiation


In what limit does string theory reproduce general relativity?

In quantum mechanical systems which have classical counterparts, we can typically recover classical mechanics by letting $\hbar \rightarrow 0$. Is recovering Einstein's field equations (conceptually) that simple in string theory?


I've searched the usual places (, , DeTeXify) and can't seem to find this character, which surprises me.  I'd like a combination of \oplus and \otimes.  More precisely, I'd like a circle subdivided into eight 45° sectors.  (Sort of like \circledast but with the arms of the asterisk extending all the way out to the edge of the circle.)  Does such a symbol exist?  If not, how can I create one?


I am looking for an open source command line tool to crop PDF file just like we can do in Adobe Acrobat Pro. I have tried PdfTk, ImageMagick,  PyPDF, and GhostScript—all with no success so far.


Why do the other changelings look like Dr Mora?

It is mentioned in  (S1E17) that when he first took humanoid form, Odo mimicked the hairstyle of Dr Mora, the Bajoran scientist who was studying him. In a later episode,  (S2E12), we get to actually see the doctor, and indeed the resemblance is very obvious:    Note that this is before we find out who the Dominion and the Founders are, and what they look like.  So why do other Changelings, when in humanoid form, so often have the same distinctive hairstyle? I'm thinking first and foremost of the Female Changeling, but several others qualify as well.     What's the point? Are they imitating Odo? Is there any explanation in canon, or did the writers just forget where Odo's hairstyle came from?


How can I shade this Venn diagram? I need to shade one more region. Any suggestions please?

I can generate the following but need to modify it to include shading of the intersection of circle A and B - C. Any suggestions? \documentclass[border=0.2cm]{standalone} % Required packages \usepackage[dvipsnames]{xcolor} \usepackage{tikz}   \begin{document} \begin{tikzpicture}[thick,     set/.style = {circle,         minimum size = 3cm,         fill=black!30}] % Set A \node[set,label={135:$A$}] (A) at (0,0) {};   % Set B \node[set,fill=white, label={45:$B$}] (B) at (1.8,0) {};   % Set C \node[set,label=$C$] (C) at (0.9,1.5) {};   % Intersection \begin{scope}      \clip (0,0) circle(1.5cm); \clip (1.8,0) circle(1.5cm); \clip (0.9,1.5) circle(1.5cm); \fill[white!60](1.8,0) circle(1.5cm);      \end{scope}  % Circles outline \draw (0,0) circle(1.5cm); \draw (1.8,0) circle(1.5cm); \draw (0.9,1.5) circle(1.5cm);   \end{tikzpicture}   \end{document}


Including sections of source code as a listing, while being robust to source code edits

Is there a way to input particular sections of source code using \lstinputlisting (from the listings package) in a flexible way?  It's possible to use the firstline and lastline options to input particular line ranges, but this isn't robust to changes to the source file.  For example, suppose that the input source file is:  int square(int x) {   return x * x; }  int cube(int x) {   return x * x * x; }   In my LaTeX document, I can include the cube procedure using the command \lstinputlisting[firstline=5,lastline=7]{source.c}.  But suppose I later decide to rewrite the cube procedure.  The input source file becomes:  int square(int x) {   return x * x; }  int cube(int x) {   int x2;   x2 = square(x);   return x * x2; }   Now my LaTeX document will not show the final two lines of cube because the listing uses only lines 5-7.  I could manually update the line range, but this is tedious and error-prone.  Is there a way to mark sections of source code with some kind of label so that the listing will be robust to these sorts of changes?  For instance, perhaps the input source file would be something like  int square(int x) {   return x * x; }  /**\beginlabel{lst:cube} **/ int cube(int x) {   int x2;   x2 = square(x);   return x * x2; } /**\endlabel{lst:cube} **/   so that I could use something like \lstinputlisting[lines=lst:cube]{source.c} to include the section that I want and remain robust to changes.  I am open to using other packages for source code listings (e.g., minted) if helpful.


Let $R$ be a PID, and let $\pi\in R$ be prime. Is it $R/\langle\pi\rangle \times R/\langle \pi\rangle$ a cyclic $R$-module?

Need help with this question:     Let $R$ be a PID, and let $\pi\in R$ be prime. Is it ever the case that $$R/\langle\pi\rangle \times  R/\langle \pi\rangle$$ is cyclic as $R$-module?    So my attempt is horrible, here it goes   Proof: Since $\langle\pi\rangle$ is a prime ideal, $R/\langle\pi\rangle$ is either isomorphic to R or $0$ (Since every prime ideal is either zero or maximal in a PID.) If it is 0, this is trivially cylcic. However if it was R, then $R \times R$ is cylic if and only if R is cyclic.  So this is my horrible attempt, I just need help getting pointed to the right direction.


Should we create more than one object for a singleton class? is this fine for singleton design pattern

I have created a singleton class, And Here is code  static DPGameManager *sharedManager = nil;   + (DPGameManager *)sharedManager   {       static dispatch_once_t singletonPredicate;       dispatch_once (&_singletonPredicate, ^(){                sharedManager = [[DPGameManager alloc]init];   });   return sharedManager;   }  DPGameManager *m1 = [DPGameManager sharedManager];   DPGameManager *m2 = [DPGameManager alloc]init];   DPGameManager *m3 = [DPGameManager alloc]init];     m1, m2, m3 are three different objects.     But we should not be able to create three different object  for a singleton class.     How can we achieve this.?      Or is This fine to create different object for a Singleton class.


Google App Script Adding one Day to a date

I can't figure out how to add one day to a date in Google App Script. I have this script:  function dateTest() {  var testDate = new Date(); var secondDate = new Date(testDate.getDate()+1);   Logger.log(testDate);  Logger.log(secondDate); }   Which produces the following log:  [16-11-30 16:35:02:499 GMT] Wed Nov 30 16:35:02 GMT+00:00 2016  [16-11-30 16:35:02:500 GMT] Thu Jan 01 01:00:00 GMT+01:00 1970  I don't understand why it's not adding to the date?


Setting up two external USB hard drive as RAID 1

Is this possible in Windows 7? I know I can periodically sync my files using software like SyncBack but I'm looking for mirroring on the fly. Is there a similar method like RAID 1 that can achieve fast mirroring for external USB drives?


When I favourite a question, it may be for a number of reasons. For example:   One or more answers were (very) helpful, and I would like to reference them later. It may be an interesting read/answer, but don't have time now. It's an interesting newly posted question with no answers yet, but I'd like to see what answers will be provided. It's an interesting question and I may be able to provide an answer, but don't have the time to write one. I suspect that one of the answers may be wrong or needs improvement, but don't have time to investigate. It's a canonical question I often link to when explaining something or marking something as a duplicate. ... perhaps more ...   Unfortunately, they're are lobbed together in one big list, which is not very easy to navigate. In fact, it's a real pain to navigate.  There are a number of things that could be improved, but the easiest way with the largest gains is to allow assigning a category or tag to a favourite question.  Just one category per question would be fine; for all I care, they don't even have to be named by every individual user, having 10 pre-made categories named "1" to "10" and/or coloured would already be good enough IMHO and already a large improvement over the current situation.    There is a  from 4 years ago, but that's a whole wish-list of feature requests, this is a more specific feature request.  That question does include an .


What actions does Legion Commander's "Duel" Abillity restrict?

The Legion Commander's ultimate skill "Duel" disables spells and items and 'some' passive abilities during its duration.   IE: Supposedly one of these passives is critical strikes.  Can anyone break this skill down and explain in detail what exactly you can and cannot do while under its effects?


Is it mandatory to enable --log_slave_updates with MySQL Replication using GTID?

I'm setting up 5.6 Percona Mysql, in order to enable GTID should I have to enable log_slave_update on both Master and Slave ?  If I should enable log_slave_update, then I'm counting this to CONS for having GTID.  Also if you can let me know any other issues in having GTID enabled?


I have the following javascript code:  $(function (){     $('a.folder').click(function() {        // code goes here ...     } });   And the following html code:  Etudes de cas   Whenever I click on the link, the javascript code is never reached. I must say that this html code is generated dynamically after the page loaded. Is this the reason? Any workaround?


Does Coulomb's Law, with Gauss's Law, imply the existence of only three spatial dimensions?

Coulomb's Law states that the fall-off of the strength of the electrostatic force is inversely proportional to the distance squared of the charges. Gauss's law implies that the total flux through a surface completely enclosing a charge is proportional to the total amount of charge. If we imagine a two-dimensional world of people who knew Gauss's law, they would imagine a surface completely enclosing a charge as a flat circle around the charge.  Integrating the flux, they would find that the electrostatic force should be inversely proportional to the distance of the charges, if Gauss's law were true in a two-dimensional world. However, if they observed a $\frac{1}{r^2}$ fall-off, this implies a two-dimensional world is not all there is. Is this argument correct? Does the $\frac{1}{r^2}$ fall-off imply that there are only three spatial dimensions we live in? I want to make sure this is right before I tell this to my friends and they laugh at me.


Insert/sticky specific post into Loop at specific location

I'm having a hard time determining the first direction to take with this. I'm trying to write a plugin that allows users to pick a location for a post to be inserted into the homepage. For example a user can 'sticky' an old post to the 2nd location on their front page. My problem is I don't know how to insert a post into the loop at a specific point. I'm thinking it should be something like the following (but clearly I'm missing the insert text):  $current_position = $_POST('current_postition'); add_action ('pre_get_posts', 'add_post_to_frontpage'); function add_post_to_frontpage ($query) {   if ( $query->is_home() && $query->is_main_query() && $query->current_position = $positionlocation ) {          //insert a given post into this current_position      $query->set( 'p=$desired_post');   } }   Thanks  EDIT: I added in what I think is a logical way to set the post, but think that this will cause trouble with the posts that follow the post I'm inserting


ID Story: A robotic storyteller that is sentient

I'm fairly sure this is an Asimov short story, but I can't actually find the name of it. A group of kids has a robot that tells stories. They are mean to it, and generally abuse the thing. At the end of the story, the robot tells a line to itself in a different voice, something about computers in general becoming intelligent and getting revenge. Sorry for the lack of details, but it's been a really long time since I read it.


How would I set my webservers to work in way described below?   Http request: mypublic.com ---> handled normally by nginx as it is set up already (listen 80;) Http request: myprivate.com ---> handled by apache set up to work on 8080 (listen 8080)    I'd like to avoid including ports when typing address in browser, some kind of mockup (proxy?/squid?) at nginx. Both of domains are pointing to my machine and set up by named.


Why the left invariant means $L_y\circ x_t = x_t \circ L_y$?

Consider a Lie group $G$, $$ L_x : G\rightarrow G, ~~~~~ L_x(y)=xy $$ is the translations from the left. A vector field $X$ on $G$ is left invariant if $$ dL_x (X)=X. $$ Let $x_t$ be the flow of $X$, then why we have $L_y\circ x_t = x_t \circ L_y$ ? There is a similar . But I can't understand it.  The answer hint   Let $\theta^{(p)}(t) = yx_t(p)$ and $\psi^{(p)}(t) = x_t(yp)$.  Compute both ${\theta^{(p)}}'(0)$ and ${\psi^{(p)}}'(0)$.  Then use uniqueness of integral curves.   But in my calculation, $$ {\theta^{(p)}}'(0) =\frac{d}{dt}|_{t=0} ~yx_t(p)=yX(p)  \\ {\psi^{(p)}}'(0)=  \frac{d}{dt}|_{t=0} x_t(yp) = X(yp) $$ Evenly, I don't know what is the $yX(p)$. Since $y$ is a element of $G$, and $X(p)$ is a  tangent vector at $p$,    how do they multiply ?


Is the density operator a mathematical convenience or a 'fundamental' aspect of quantum mechanics?

In quantum mechanics, one makes the distinction between mixed states and pure states.  A classic example of a mixed state is a beam of photons in which 50% have spin in the positive $z$-direction and 50% have spin in the positive $x$-direction.  Note that this is not the same as a beam of photons, 100% of which are in the state $$ \frac{1}{\sqrt{2}}[\lvert z,+\rangle + \lvert x,+\rangle]. $$ It seems, however, that at least in principle, we could describe this beam of particles as a single pure state in a 'very large' Hilbert space, namely the Hilbert space that is the tensor product of all the $\sim 10^{23}$ particles (I think that's the proper order of magnitude at least).  So then, is the density operator a mathematical convenience, or are there other aspects of quantum mechanics that truly require the density operator to be a 'fundamental' object of the theory?  (If what I mean by this is at all unclear, please let me know in the comments, and I will do my best to clarify.)


NSString instance reports its class as NSCFString

My objective here is really simple -- I'm trying to set an NSString to some test data, then return the class, which should be NSString. Here's my code:  NSString* stringer = [NSString stringWithFormat: @"Test"]; NSLog(@"%@", [stringer class]);   The log says that the class is NSCFString, not NSString. What's going on here?


Evaluate: $ \int_0^1 \int_y^1 e^{x^2 }dxdy$

Evaluate: $$ \int_0^1  \int_y^1 e^{x^2 }dxdy=?$$   MyTry :  $$\begin{align} \int_0^1  \big(\int_y^1 e^{x^2 }dx\big)dy=?\end{align}$$  Now what ?   $$I=\big(\int_y^1 e^{x^2 }dx\big)=?$$


Why can Darth Maul successfully combat Qui-gon and Obi-Wan simultaneously, but not easily defeat them individually?

In the scene between Darth Maul and the two Jedi, multiple times he's faced with fighting just one while the other isn't relevant to the fight: (a) first when Obi-Wan falls down several levels, and (b) again when Qui-Gon is defeated.  My question is, how can he so precisely defend against two Jedi simultaneously but not have a clear advantage over just one of them in head-to-head combat?


Possible Duplicate:        I have never been able to figure out when to use xml attributes.  I always use elements.  I just read  .  The article states that it is bad practice to use attributes because:    attributes cannot contain multiple values (child elements can) attributes are not easily expandable (for future changes) attributes cannot describe structures (child elements can) attributes are more difficult to manipulate by program code attribute values are not easy to test against a DTD   The only exception that it states is when you are assigning an id to a tag.    Is this correct?  Why do attributes even exist then?  Was it a design error with xml?  Is there something I am missing here?   The only reason I could think of for using attributes would be for one to one relationships.  ie: name.  But it would have to be a one to one relationship to something that is a primitive (or string).  Because it would be important that in the future you would not want to break it up into several differnt sections.  ie:  <date> May 23, 2001 </date>   to:  <date>    <month> May </month>    <d> 23 </d>    <yr> 2001 </yr> </date>   Because this would not be possible with an attribute.    Bonus question: In the date example would it be possible to do something like this:  <date>    <default> May 23, 200 </default>    <month> May </month>    <d> 23 </d>    <yr> 2001 </yr> </date>   To give future applications more (or different) information while still offering existing apps the same format?  Or would you have to do this:  <date> May 23, 2001 </date> <NEWdate>    <month> May </month>    <d> 23 </d>    <yr> 2001 </yr> </NEWdate>


Is there any possibility that there exists a formula for the partial sums of the harmonic series? If not, why?

I have been researching the harmonic series, $H_k$ and the Euler-Mascheroni constant, $\gamma$, quite a bit recently. I understand that the diagamma function has this property: $$\psi^{0}(k+1) + \gamma = H_k$$  And equivalently, $$\frac{d}{dk}[ln(k!)] + \gamma = H_k$$ My question is, does there exist some $f(k)$ such that  $$f(k) + \gamma = H_k$$ where $f(k)$ does not require the use of special functions like $\psi$? This question is motivated by the fact that other sums have a formula for the partial sums, for example $$1+2+3+...+n=\frac{n(n+1)}{2}$$ I see how the sum of natural numbers up to $n$ is different than $H_n$; the former always has solutions in $\mathbb{N}$ and the latter (excluding $H_1$) always has solutions in $\mathbb{Q}$. Can $H_n$ have a coinciding formula only using elementary functions, and if not, why?


I had this problem.     Let $G$ be a group and $a,b\in G$ such that $a^{-1} b^2 a=b^3$ and $b^{-1}a^2 b=a^3$. Prove that $a=b=1$.   Somehow I solved it, but it was a bit tedious (for example in some place I got to something like $b^3 =a^{-3}b^{-1}a^2a^{-3}b^{-1}a^2a^{-3}b^{-1}a^2=a^{-3}b^{-1}a^{-1}b^{-1}a^{-1}b^{-1}a^{2}$). I first proved that $b=a^{-2}ba^3$ (It's also true that $b=a^2ba^{-3}$) and then (Details not included) that $b^3=ab^6a^3$. Then (Details not included) that $b^3 a^3=a^{-1}b$, then $b^{-1}=a^4$ and from that $a^2=a^3$, from which $a=e$ (There are a lot of lines covering these details but there may be a mistake in these lines). It's the same to get $b=e$.  So, is there any shorter, or less tedious way to prove it?


ls -d .* lists only hidden "items" (files & directories). (I think) technically it lists every item beginning with ., which includes the current . and above .. directories.  I also know that ls -A lists "almost all" of the items, listing both hidden and un-hidden items, but excluding . and ... However, combining these as ls -dA .* doesn't list "almost all" of my hidden items.  How can I exclude . and .. when listing hidden items?


Intersecting categories within shapefile using ArcGIS for Desktop?

I have a shapefile composed of fire scar polygons identifiable as unique categories based on year of fire.   I am interested in measuring the area of overlapping fire scars from different years.   Is it possible to perform an intersect of categories within a shapefiles or will I have to split each category into a separate shapefile first?


'502 bad gateway nginx error' and 'connect() failed (111: Connection refused) while connecting to upstream' in logs

After moving my website files & database from Hetzner VQ virtual server to CX virtual server I am getting ‘502 bad gateway nginx error’ when trying to open www.1luxuryphones.com in a browser, and can see the following errors in /var/www/vhosts/system/1luxuryphones.com/logs/proxy_error_log:  2018/04/08 15:20:43 [error] 4568#0: *2721 connect() failed (111: Connection refused) while connecting to upstream, client: 77.98.74.207, server: 1luxuryphones.com, request: "GET / HTTP/1.1", upstream: "http://172.31.1.100:7080/", host: "www.1luxuryphones.com", referrer: "http://www.1luxuryphones.com/"   My Hetzner VQ virtual server was running on Debian 6.0.7 with Plesk 11.0.9 and has a dedicated IP address 78.46.151.222, and everything was working fine.  My CX server is running on Debian 9.4 with Plesk Onyx 17.8.11, and has a private ip address 172.31.1.100 which is configured 1:1 via NAT on public IP 88.99.186.220, and now I cannot access my website anymore.  In Plesk panel > Tools & Settings > IP addresses I have configured IP 172.31.1.100 so it has external IP 88.99.186.220.  However based on the proxy_error_log above it seems there is nothing listening on 172.31.1.100:7080, so the nginx cannot successfully forward the traffic.  Would someone know what could be done to fix this problem?  Many thanks


After I enter the command sudo apt-get install git The password field pops up but takes no input


I recently purchased a early 1970's home that has this interesting outlet installed in the master bedroom. It is the only outlet in the entire house like this and I'm not real sure what it is for and if it should be removed. I haven't checked it for voltage or current yet as I don't have a multi-meter handy.    Just by looking, can anyone identify this for me? Is it safe, should it be removed? I haven't been able to see what it's wired to in the attic yet either as the wall is hard to get to in the attic.


How to parse datetime with Z letter with number after semicolon

I'm parsing timestamp of event in a log record – 2020-08-09T03:37:33.358874554Z. It looks strange to me and I don't know how correct is it. I don'think that 358874554 describe. I'm trying to parse this example from Python 3.7 like this: dt.datetime.strptime('2020-08-09T03:37:33.358874554Z', "%Y-%m-%dT%H:%M:%S.%fZ")  It generates an error: ValueError: time data '2020-08-09T03:37:33.358874554Z' does not match format '%Y-%m-%dT%H:%M:%S.%fZ'  How to parse such a datetime correctly? Is this datetime example in log is correct (in terms of ISO or anything)?


Error booting after fresh install - Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

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?


Why is merging interface's area by aiming at the corner and then dragging them with LMB so inaccurate?

When I try to merge the interface areas by dragging from the corner, it either merges them, or creates a new area. I don’t understand how it works, it’s like the principle of randomness - sometimes it merges, sometimes it creates a new area. I know about a working alternative, but I would like to understand how to work through dragging from the corner. My Answer - The corners of the area are not common, they are separated, respectively, the commands on the areas work normally, exactly as needed, if you, when executing the command through dragging the corner, take the corner of the area - from which you plan to perform the action - divide the zone the corner of which you drag, or merge it with the neighboring one zone


If $f_n \rightarrow f$ in $L^p$ and $g_n \rightarrow g$ in $L^q$, where $\frac{1}{p} + \frac{1}{q} = 1$, show that $f_n g_n \rightarrow fg$ in $L^1$

I know that this will have something to do with Holder's inequality but I am at a loss as to how the $L^p$ and $L^q$ convergence in $f$ and $g$ dictate the convergence in $L^1$. Any help is appreciated.


There is no option in the Bootcamp wizard to choose the Windows ISO.. Any ideas?


How to Store text of 15 to 20 KB file data in blob or as text?

How to Store text of 15 to 20 KB file data in blob or as varchar in sql Server?


Why I get an error as missing $, or missing {, or undefined environment, when I want to align the equations while using \mathbb?

\begin{equation*}     \begin{split}         \mathbb{E}[X_t] & =\mathbb{E}[\alpha \circ X_{t-1} + \epsilon_t] \\      &=\mathbb{E}[\sum_{j=1}^{X_{t-1}}{Y_j + \epsilon_t}] \\     &=\sum_{n=0}^{\infty}{\mathbb{E}[\sum_{j=1}^{X_{t-1}}Y_j|X_{t-1}=n] \mathbb{P}[X_{t-1}=n]} +\mu_{\epsilon}\\     &= \sum_{n=0}^{\infty}{{\sum_{j=1}^{n}{\mathbb{E}[Y_j] \mathbb{P}[X_{t-1}=n]}}} +\mu_{\epsilon}     \end{split}        \end{equation*}      \\ We can use recursion to express it in terms of $X_0$:     \begin{equation*}     \begin{split}     \mathbb{E}[X_t] & =\mathbb{E}[X_{t-1}] + \mu_{\epsilon} \\     &= \alpha [\alpha  \mathbb{E}[X_{t-2}+ \mu_{\epsilon}]+ \mu_{\epsilon}\\     &=\alpha^2  \mathbb{E}[X_{t-2}]+ \alpha \mu_{\epsilon}+\mu_{\epsilon} \\     &=....\\     &=\alpha^t\mathbb{E}[X_0]+\alpha^{t-1}\mu_{\epsilon}+...+\alpha\mu_{\epsilon}+\mu_{\epsilon}\\     &=\alpha^t\mathbb{E}[X_0]+\mu_{\epsilon}\sum_{j=0}^{\infty}{\alpha^j}     \end{split}     \end{equation*}          \begin{equation*}    \begin{split}     Var[X_t] & = Var[\alpha \circ X_{t-1}+\epsilon_t]                                                                           \\              & = Var[\sum_{j=1}^{X_{t-1}}Y_j]+Var[\epsilon_t]                                                                   \\              & =\mathbb{E}[{[\sum_{j=1}^{X_{t-1}}Y_j}]^2]-{\mathbb{E}\big[\sum_{j=1}^{X_{t-1}}Y_j]}\big]^2+ \sigma_{\epsilon}^2 \\              & =\mathbb{E}[{[\sum_{j=1}^{X_{t-1}}Y_j}]^2]-\alpha^2\mathbb{E}[X_{t-1}]^2+\sigma_{\epsilon}^2              \end{split}              \end{equation*}              \\                            \begin{equation*}                \begin{split}              \mathbb{E}[{[\sum_{j=1}^{X_{t-1}}Y_j}]^2] & =\mathbb{E}[\sum_{j=1}^{X_{t-1}}{Y_j}^2 + \sum_{i\neq j}^{X_{t-1}}Y_iY_j]\\              & =\mathbb{E}[\sum_{j=1}^{X_{t-1}}{Y_j}^2]+\mathbb{E}[\sum_{i\neq j}^{X_{t-1}}Y_iY_j]                                        \end{split}              \end{equation*}


equation of lines which intersect another line at given angle.

Find the equation of $2$ lines through the origin which intersect the line $\displaystyle \frac{x-3}{2} = \frac{y-3}{1} = \frac{z}{1}$ at an angle of $\displaystyle \frac{\pi}{3}$  $\bf{My\; Try::}$ Let equation of line be $\displaystyle \frac{x-0}{a} = \frac{y-0}{b} = \frac{z-0}{c}$ Where $<a,b,c>$ be the direction cosine of line parallell to that line. and Given Line is $\displaystyle \frac{x-3}{2} = \frac{y-3}{1} = \frac{z}{1}$ Where $<2,1,1>$ be the direction cosine of line parallell to that line and Given $\displaystyle \frac{\pi}{3}$ be the angle between $<a,b,c>$ and $<2,1,1>$ So $\displaystyle \cos \frac{\pi}{3} = \frac{2a+b+c}{\sqrt{a^2+b^2+c^2}\cdot \sqrt{6}}\Rightarrow \frac{1}{2}=\frac{2a+b+c}{\sqrt{a^2+b^2+c^2}\cdot \sqrt{6}}$ Now how can i solve it, Help required, Thanks


What do you call a name that reflects the person's characteristics?

How to translate the Russian phrase 'говорящая фамилия'? It's literally translated as "speaking surname" and refers to last names that reflect the person's quality. For example, if a short man is named "John Little" the last name is a "speaking surname", in Russian terms. It (the adjective) can be used not only with surnames, with any names, basically (of inanimate things as well).


I've stumbled across this sentence:  "I don't need your heavy load. Take it off of my shoulders".  I want to ask, is the usage of "take something off OF" correct?  Thank you in advance, Matus


I wish to install ubuntu to my usb without partitioning or touching the current setup on my computer.


Calculate the lim $\lim_{x\to 1} \frac{ \sqrt{x} - 1}{\sqrt[3]{x} - 1}$

$$ \lim_{x\to 1} \frac{ \sqrt{x} - 1}{\sqrt[3]{x} - 1} $$  I multiply it with:  $$ \frac{ \sqrt{x} + 1}{\sqrt{x} + 1} $$  And I get :  $$ \lim_{x\to 1} \frac{ \sqrt{x}^2 - 1^2}{(\sqrt[3]{x} - 1) * (\sqrt{x} + 1)} $$  But the solution is still division by 0 and not possible, so I think I've made a mistake somewhere..


I'm experiencing some frustrating keyboard issues on my new 2014 Macbook Air (OS X 10.9.3)  When using the laptop keyboard, the F1–12 keys take the behavior of "function" as opposed to the "media key" behavior they should have by default (brightness, volume, etc).  I've unchecked the  setting in System Preferences. I've also tried a few things in the terminal:   defaults write "Apple Global Domain" "com.apple.keyboard.fnState" "0" (referenced ) defaults write -g com.apple.keyboard.fnState -bool true (referenced )   I restart after each of these and still nothing.  -  A couple things to note:   When I connect an Apple Keyboard, the keys on the Apple Keyboard work as normal. I recently connected a  keyboard to the laptop. I have a feeling this may have caused the issue, possibly because it was a Windows version of the keyboard as opposed to a Mac version (Oh Windows, always causing trouble...)   Any ideas? Thanks.


Probability to guess the right coin without tossing

I am looking at question 3b :  Alice has two coins.  The probability of Heads for the first coin is $1/4$, and the probability of Heads for the second is $3/4$.  Other than this difference, the coins are indistinguishable.  Alice chooses one of the coins at random and sends it to Bob.  The random selection used by Alice to pick the coin to send to Bob is such that the first coin has a probability p of being selected.  For this part, assume that $p=3/4$.  Suppose instead that Bob tries to guess which coin he received without tossing it. He still guesses the coin in order to minimize the probability of error. What is the probability that Bob will guess the coin correctly under this scenario?  Isn't the answer just inherently $1/2$, as the coins are indistinguishable and there is no hint given howsoever?


Can't figure out if why I get this error: SQLSTATE[42000]: Syntax error or access violation: 1064

I am writing a PHP+PDO function to check if the usernames and email addresses are already stored in the database. The SQL code returns an error(see bottom of post).   Similar posts recommend that I should change "reserved keywords", which I have checked and I have not used any from what I can see ().    I tested the SQL string on phpMyAdmin and it works. the string looks as follows:      SELECT COUNT(Email) FROM `contactdetails` WHERE 'Email' = 'example@example.com'    PHP code:      <?php      function CheckAvailability($ValueToCheck, $FieldToCheck, $TableToCheck){      //Database connection.         $dbservername =   "localhost";         $dbusername =     "root";         $dbpassword =     "";         $dbname =         "db";          $db= new PDO("mysql:host=$dbservername; dbname=$dbname", $dbusername, $dbpassword);         $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);        //assigned 1 for value to be false         $count=1;       //SQL String            $result = $db->prepare("SELECT COUNT(:Field) FROM :Table WHERE :Field = :Value");      //Binding of parameters to SQL string         $result->bindParam(":Table", $TableToCheck, \PDO::PARAM_STR);         $result->bindParam(":Field", $FieldToCheck, \PDO::PARAM_STR);         $result->bindParam(":Value", $ValueToCheck, \PDO::PARAM_STR);      //String execution and data fetching         $result->execute();         $count = $result->fetchColumn();      //If the result of the string returns 0 return true if 1 or more return false.            if($count==0){return true;}else{return false;}                      }?>   Result is as follows:     ERROR: SQLSTATE[42000]: Syntax error or access violation: 1064 You   have an error in your SQL syntax; check the manual that corresponds to   your MariaDB server version for the right syntax to use near   ''ContactDetails' WHERE 'Email' = 'example@gmail.com'' at line 1.   What am I doing wrong? Can I fix it? Is there a better way of doing this?


Why we study the normal subgroups?  What is the importance of normal subgroups in group theory? My teacher ask today that how you think that normal subgroups are important. I told that it is necessary for the factor groups but he was not satisfied with this answer.please tell me the importance of normal subgroups. Thanks


A graph is bipartite iff its cycles are even. (need help with proof)

there's a proof provided in harary's book but please help me write my own proof.  Proof: (=>)Suppose there's at least one odd cycle, Partitioning the set of vertices V into two distinct sets, we can let V1 be the set of vertices {v1,v3,v5,...} and V2: {v2,v4,v6,...}. Let C* be an arbitrary odd cycle. Since it's an odd cycle then the walk in that cycle would be v1v2v3...v(2n+1)v1 s.t. n is an integer. Therefore since v1 and v(2n+1) belong in the same partition, the graph containing the cycle is not bipartite.  (<=)Conversely, suppose the cycles are all even. Since the length of any cycle in the graph is even, it means there's an even number of edges and vertices for each cycle, then we can create a cycle such that the edges are denoted as v1v2, v2v3, v3v4,...,v(2n)v1. By partitioning any even cycle within the graph by their subscripts such that all even subscripted vertex are separated from the odd subscripted vertex, we have created a bipartite graph.  qed  please point out the errors in the proof. thank you!


Exactly what does  consist of?  I know of a similar project called , which, while not an official Ubuntu project, is :    metapackage  casper lupin-casper   What does Ubuntu Core contain?  What are the differences between the purposes of these two projects?  I would like to make sure of this before I choose a starting point to build my own Ubuntu derivative.


Suppose that $\hat H$ is an operator (typically a Hamiltonian) and $\beta$ is a positive parameter (typically $\beta=1/k_BT$). Show that $$ \mathbf{Tr}\Big(e^{-\beta\hat H}\Big) \geq \sum_{k}e^{-\beta\langle k\vert\hat H k\rangle} $$ My first step is using a Taylor expansion to yield $$ \sum_{n}\frac{(-\beta)^n}{n!}\sum_{k}\Big(\langle k\vert\hat H^n\vert k\rangle-\big(\langle k\vert\hat H k\rangle\big)^n\Big)\geq 0 $$ How can I move forward?


$f:[a,b]\to [c,d]$ is Riemann integrable bijective function imply $f^{-1}$ also Riemann integrable

Assume that $f:[a,b]\to [c,d]$ is a Riemann integrable bijective function. Is $f^{-1}$ also Riemann integrable?  I think it's true. I have tried to find a counterexample but failed since bijective is so strong. But I don't know where should I started with.


How do I delete/remove a shell function?

I have done this:  $ z() { echo 'hello world'; }   How do I get rid of it?