How to alter database name from test to test1?
The MySQL manual at  covers this.  Usually I just dump the database and reimport it with a new name. This is not an option for very big databases. Apparently RENAME {DATABASE | SCHEMA} db_name TO new_db_name; .  This needs to work with , which stores things very differently than .
Solving the recurrence $T(n) = \sqrt n T(\sqrt{n}) + \sqrt{n}$ PostgreSQL CPU 100% after configure Wal log shipping hot standby I have configured Hight Avaliabily WAL Log Shipping Hot Standby (SSL) with one node. But after I configure, both hosts (primary and secondary) take 100% CPU usage. The most strange is because I have only one database called &quot;TESTE&quot; with one table called &quot;EXAMPLE&quot; to check if replication was OK. The replication worked perfectly but I don't understand why my CPU takes 100% usage because I don't have any application connect on my cluster. I ran HTOP command and get this results: Image 1 - Primary Server HTOP Info  Image 2 - Secondary Server HTOP info  S.O. version: No LSB modules are available. Distributor ID: Debian Description:    Debian GNU/Linux 10 (buster) Release:        10 Codename:       buster  PostgreSQL version: postgres (PostgreSQL) 12.3 (Debian 12.3-1.pgdg100+1)  Primary server postgres.conf file: max_connections = 100 SSL = on shared_buffers = 2GB work_mem = 10485kb maintenance_work_mem = 512MB dynamic_shared_memory_type = posix effective_io_concurrency = 200 max_worker_processes = 4 max_parallel_maintenance_workers = 2 max_parallel_workers_per_gather = 2 max_parallel_workers = 4 wal_level = replica wal_buffers = 16MB max_wal_size = 200MB min_wal_size = 80MB checkpoint_completion_target = 0.7 archive_mode = on max_wal_senders = 3 wal_keep_segments = 8 hot_standby = on hot_standby_feedback = on random_page_cost = 1.1 effective_cache_size = 6GB default_statistics_target = 100  pg_stat_activity info:  pg_stat_archiver info:  pg_stat_replication info:  If I stop postgres service in both servers the CPU still has 100% usage. Anyone can help me? How do I use a particular font for a small section of text in my document? The standard font packages make global changes to the fonts in my document. What if I want to use a particular font for just a portion of my text?   How do I find the right name of the font? How do I select the font? How do I restrict the scope of the font change?     There are separate answers for different flavors of TeX (quick links): I have a long line of code that I want to break up among multiple lines. What do I use and what is the syntax?  For example, adding a bunch of strings,  e = 'a' + 'b' + 'c' + 'd'   and have it in two lines like this:  e = 'a' + 'b' +     'c' + 'd' Variable with colon dash ${VAR:-} I am using Selenium 2/WebDriver for automation. I have a table and am trying to select a row in it. When the test runs, I can see the row become highlighted as if it is clicked, but then immediately I get the "org.openqa.selenium.StaleElementReferenceException: Element is no longer attached to the DOM" error and the test fails.  The code is the following:  @Test public void rowSelection() throws Exception {     SeleniumHelper helper = new SeleniumHelper();     action = new SeleniumActionHelper(driver);      helper.login();      String testUrl = navigateToUrl("option/listOptions.xhtml");     driver.get(testUrl);      WebElement table = findElementById("tableSection:dataTableWrapped_data");     List&lt;WebElement&gt; allRows = table.findElements(By.tagName("tr"));     for (WebElement row : allRows)         {             List&lt;WebElement&gt; cells = row.findElements(By.tagName("td"));             for (WebElement cell : cells)             {                 WebElement listName = cell.findElement(By.xpath("./* [text()='body_build']"));                 listName.click();             }         } }   I have put a Thread.sleep(2000) in front and after the listName.click() action, but neither has helped. Any help would be greatly appreciated. Console flashes on launching, then closes (ms-windows) Why were there so many spells cast in the movies without saying the words to the spell? From my memory of the last Harry Potter movie I saw, I've seen many wizards cast spells without saying the spell at all.  During the final battle in Hogwarts, many wizards just swung their wands and their enemies were knocked out. I am 100% sure about this!  The most remarkable spells were the ones that emit a green or red beam in the final battle of Harry Potter against Voldemort when they pushed their beams towards each other.  So, the question is, are they cheating? Because, unless there are wordless spells, they must say the words for a spell. Setting background-image using jQuery CSS property How can I explain to a non-native why the plural of a noun isn't used adjectivally? How can I explain to a non-native speaker that while this is correct:     The felling of trees.    And this is also correct:     tree felling   This is not:     *trees felling   To a non-native it seems very reasonable that since many trees are being felled and given that the felling of trees uses the plural, the inverse form would also use the plural and become trees felling.  To a native speaker such as myself, the latter is very obviously wrong, but I couldn't figure out how to formalize this into a rule that a non-native can understand. Ways to evaluate $\int \sec \theta \, \mathrm d \theta$ What is this strange function definition syntax in C? What is the argument selector tracking a defined score (not [score_min=])? What if I want to make a command like this:  execute @e[score_A=10] ~ ~ ~ summon Creeper   So that the entity must have a score of 10 (not less, not more)?  Does it even exist that or a [score_A_max=] argument?  I know about scoreboard players test, but i guess it is not the case to use it. Expectation of the Maximum of iid Gumbel Variables I keep reading in economics journals about a particular result used in random utility models. One version of the result is: if $\epsilon_i \sim_{iid}, $ Gumbel($\mu, 1), \forall i$, then:   $$E[\max_i(\delta_i + \epsilon_i)] = \mu + \gamma + \ln\left(\sum_i \exp\left\{\delta_i \right\} \right),  $$  where $\gamma \approx 0.52277$ is the Euler-Mascheroni constant.  I've checked that this makes sense using R, and it does.  The CDF for the Gumbel$(\mu, 1)$ distribution is:  $$G(\epsilon_i) = \exp(-\exp(-(\epsilon_i - \mu)))$$  I'm trying to find a proof of this and I've had no success.  I've tried to prove it myself but I can't get past a particular step.   Can anyone point me to a proof of this?  If not, maybe I can post my attempted proof up to where I get stuck. Show that any monotone boolean function can be realize by the following connectives. How many characters have appeared in both Marvel and DC comics? The  (the character from Guardians of the Galaxy) says that she has appeared in both Marvel comics as Mantis and DC comics as Willow because her creator "took her with him".     After leaving Marvel Comics, writer Steve Englehart carried Mantis' tale through two other companies before returning to Marvel. In DC Comics' Justice League of America #142, she appears as Willow. Asked where she came from, Willow replies, "This one has come from a place she must not name, to reach a place no man must know." (Mantis refers to herself as "this one").   Are there any other examples of a character appearing in both Marvel and DC comics?  Especially if it's because the original creator has switched companies but still wants to utilize the same character, even under a different name? Multiple Inheritance in java Union of a finite set and a countably infinite set is countably infinite Ok, here is the problem statement:     Prove that if $S$ is any finite set of real numbers, then the union of $S$ and the integers is countably infinite.   This seems pretty obvious to me, knowing that 2 countable sets are countable.  But is there some step by step way to prove this?  Like do I need to prove bijectivity or something?  Thanks! Defining starred versions of commands (* macro) Two columns with different background color and height of whole page I want to create page with two columns with different background color and height of whole page. What I was able to do is two columns with different background color but I can't set proper height and there is small gap between two columns and another gap between top of the page and top of the columns. I want to remove these gaps. Also I want to create vertical line between two columns. Right now I have minipages packed inside \colorbox which allows me to create all four borders but I only want one.   Final effect should look like this:    This is what I figured out for now:  \documentclass{article} \usepackage{blindtext} \usepackage{xcolor} \usepackage{geometry} \geometry{margin=0in}  \begin{document} \noindent \fcolorbox{black}{red}{ \begin{minipage}{.3\textwidth}   test \end{minipage} } \fcolorbox{yellow}{yellow}{ \begin{minipage}{.7\textwidth}   test \end{minipage} } \end{document}