How can I get a folder or file path through a single WinForm dialog?

UPDATE: It seems I wasn't clear in what my problem was. John Arlen's edit to my title also seems to be causing more of a misunderstanding. The title was changed to "How can I get a folder or file path?" which is not what I'm after. I understand that there is a dialog that works with files and another that works with folders. I know that each of these dialogs can return a path of either a folder or file. I stated that I didn't know exactly how to get a file path, but it didn't help me even if I did know how to do so.  As stated in my original question:     "I'm having the user select a folder or file through some dialog. I don't know whether the path will belong to a folder or a file. Once the user hits the 'Open' button, I want the currently selected directory or file path to be stored in a string."   What I meant here was that I wanted to use some dialog that may or may not exist. I don't know if the user is after a file or folder. The user knows this, but the user does not know the path. This is why a dialog is used. The user will search for the file or folder needed, then click "Open". It makes more sense for a single dialog to be used for this for my needs. I wanted to see if such a dialog existed as my experience with the .NET Framework is limited.  Jared Kells's answer was almost exactly what I was looking for. After reading what he provided, it seems that such a dialog does not exist. I will have to provide my own implementation.  Since coming up with my own implementation will likely be time consuming and difficult, I'm going to do without for now. I'll wait a couple days to choose an answer in the case that someone provides an exceptionally helpful answer.  Thanks to those who contributed even if it wasn't quite what I was after.  ORIGINAL CONTENT:  I'm looking for a way to obtain the file path of a folder or file. I've played around with OpenFileDialog and FolderBrowserDialog without much success. I was able to get the folder paths using FolderBrowserDialog.SelectedPath. Using the OpenFileDialog class, I wasn't able to figure out how to get the file path.  Even if I could figure that out, I'm still in a bind. I'm having the user select a folder or file through some dialog. I don't know whether the path will belong to a folder or a file. Once the user hits the "Open" button, I want the currently selected directory or file path to be stored in a string. It seems like each of those classes I used are stuck with either files or folders.  Is this possible with WinForms dialogs? I'd prefer not having to write my own dialog at this time.


What linux shell command returns a part of a string?

I want to find a linux command that can return a part of the string. In most programming languages, it's the substr() function. Does bash have any command that can be used for this purpose. I want to be able to do something like this... substr "abcdefg" 2 3 - prints cde.    Subsequent similar question:


I need to create custom file extension like myfile.foo  for scripting files how can i configure this ?


Why is the misspelling of "its" (possessive) so widespread?

It happens everywhere: blogs, forums, newspapers, ...   :     “Regrettably, the time President Trump spent sharing sensitive   information with the Russians, was time he did not spend focussing on   Russia’s aggressive behaviour, including its interference in American   and European elections, it’s illegal invasion of Ukraine and   annexation of Crimea,” he said.   Independent   It is so prevalent that even being 100% certain that it should be spelled its, I (as a non native speaker) start to think that it's is an accepted variant.   Am I wrong in thinking that the only correct spelling for the possessive is its? Is it's an accepted spelling somewhere in the Anglosphere? Are people not aware of this, or they do not care? Very often people make this error repeatedly in a single article. Is it simply a very widespread typo? (really, so widespread??) Should I correct people in forums / comments about this?


Prove that If $a$ and $b$ are real numbers with $a  b^2$

Suppose $a$ and $b$ are real numbers. Prove that if $a < b < 0$ then $a^2 > b^2$.   My attempt:   We know that if $x > y$, then $-x < -y$. We also know that if $x > y\ge 0$, then $x^2 > y^2$.   Now consider our example:  Given that  $a < b < 0$  $$\tag1 a<b$$  $$\tag2 -a > -b$$  $$\tag3(-a)^2 > (-b)^2$$  $$\tag4 a^2 > b^2$$  Is it correct? Any suggestions for improvement would be welcome.


I was wanting to initialize some strings at the top of my script with variables that have no yet been set, such as:  str1='I went to ${PLACE} and saw ${EVENT}' str2='If you do ${ACTION} you will ${RESULT}'   and then later on PLACE, EVENT, ACTION, and RESULT will be set. I want to then be able to print my strings out with the variables expanded. Is my only option eval? This seems to work:  eval "echo ${str1}"   is this standard? is there a better way to do this? It would be nice to not run eval considering the variables could be anything.


Story about a crystal radio able to pick up broadcasts from WWII; man tries to save his father/uncle

I'm pretty sure this was a visual story, on TV, but I could have read it and just imagined strong images to go with it.  If I saw it on TV, it'd have been an anthology show, but I've searched and I'm pretty sure it wasn't on any version of The Twilight Zone.  While I'm not strong on details, I remember a man puts together a crystal radio and starts picking up broadcasts from WWII (this is in at least the 1970s).  His Father (or uncle?) or some other older male relative was killed in a Nazi attack and he realizes if he can receive signals from WWII, he can send them, so he sends a signal to the past to warn the Allies of the attack where his relative was killed.  The ending is an image I've had in my head for years, but the way my brain works, I could have just imagined it after reading it (if it was a book, and not on TV).     The man wakes up in a bakery or similar small business with his Father running the place and it turns out he saved his relative, but also, in sending that signal, he changed history so the Nazis won WWII and he and his Father have ID cards on and there are swastikas and other Nazi symbols all around, in and outside of their small business, which is somewhere in America, where the Nazis now rule.


Why does self-closing script not working for ExtJS?

I am following  and tried creating a new page.  It works.  <html>     <head>         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />         <title id='title'>HTML Page setup Tutorial</title>          <!-- ** CSS ** -->         <!-- base library -->         <link rel="stylesheet" type="text/css" href="ext-3.3.1/resources/css/ext-all.css" />          <!-- overrides to base library -->           <!-- ** Javascript ** -->         <!-- ExtJS library: base/adapter -->         <script type="text/javascript" src="ext-3.3.1/adapter/ext/ext-base.js"></script>         <!-- ExtJS library: all widgets -->         <script type="text/javascript" src="ext-3.3.1/ext-all-debug.js"></script>           <!-- overrides to library -->          <!-- extensions -->          <!-- page specific -->          <script type="text/javascript">             // Path to the blank image should point to a valid location on your server             Ext.BLANK_IMAGE_URL = '../../resources/images/default/s.gif';              Ext.onReady(function () {                  console.info('woohoo!!!');              }); //end onReady         </script>      </head>     <body>     </body> </html>   However, if I change the script tag line to use self closing tag, like following, it doesn't work.  <!-- ExtJS library: base/adapter --> <script type="text/javascript" src="ext-3.3.1/adapter/ext/ext-base.js"/>   In Firebug, it complains Ext.EventManager is undefined.  I have two questions   Is it generally a bad idea to use self-closing tag for script?  I have read this  but it sounds to me it's talking about xhtml. I am trying to learn Javascript.  Although I know the way to fix it is to not use self closing tag, I would still like to know why  FireFox think Ext.EventManager is undefined?


Scenario of extending Thread class and implementing Runnable interface

I am new to thread programming in Java and hence this basic question. (I checked, but could not find this question previously asked)  I read that threads can be created either by inheriting the Thread class or by implementing the Runnable interface. I saw a code which had both to the same class.  public class ThreadExample extends Thread implements Runnable { }   I was wondering what kind of situation would want this and if there is any advantage to this, what is it.


What is good practice when preparing a package for CTAN?

I'm thinking of submitting a package to CTAN, and would like some hints which will help keep the path as smooth as possible for me, the CTAN administators, and the final users.  Please tell me what I should take care with in doing this. In particular, the doubts I have are:   I'm not a top-drawer TeXnician, so I don't really understand .dtx and .ins files. Can I get by without them, and is it OK just to submit a zip file containing a flat folder? I'll be preparing the package user documentation (by hand) as a PDF. Should I use a specific document class, or can I, for example, use memoir? How important is it to provide the source LaTeX code for the documentation? If I do provide the documentation source, should I "declare" the prerequisite packages for formatting the manual (as opposed to the prereqs for using the package) as prereqs for the package?


Does the run count, or is it considered a force-out

Scenario: Bases loaded, two out. A ground ball is hit to third base. The runner from third crosses home plate before the runner from second is tagged out on their way to third base. Does the run count?


How can I stop my retina display from taking 2x sized screenshots?

I recently got a retina display MacBook, and all my screenshots (via ⌘ CMD+⇧ SHIFT+3 or ⌘ CMD+⇧ SHIFT+4) end up being twice the size compared to how they appear on-screen. For example, here is a screenshot of the Ask Different logo taken via ⌘⇧4 on a retina MacBook Pro running macOS 10.15.7:  When the file is opened locally in Preview or Quick Look, it appears at the same size as the website's logo. But when uploaded to the web, it displays twice as big. How can I stop this from happening?


A matrix $R$ where $R\neq I$ but $R^7=I$

I'm having trouble trying to find a $2 \times 2$ matrix $R$ in which $R$ is not equal to $I$, but $R^7=I$.  I thought to start with the matrix $$ \begin{bmatrix} \cos x & -\sin x \\ \sin x & \cos x\end{bmatrix}$$ was a good place to start but what I got when trying a sample run on my calculator was that it comes out to the same matrix as $R$. Any suggestions of how I should approach this? Or should I use a very specific value for $x$? The value I used on my calc was $\pi/3$ just to avoid it being equal to the identity matrix.


How to prove $C_1 \|x\|_\infty \leq \|x\| \leq C_2 \|x\|_\infty$?

I want to prove the following theorem (no idea whether it has a name):  Let $V = \mathbb{R}^n$ or $\mathbb{C}^n$ and $\|\cdot\|$ be a norm on $V$. Then, there exist $C_1, C_2 > 0$ such that for all $x \in V$:  $$C_1 \|x\|_\infty \leq \|x\| \leq C_2 \|x\|_\infty$$  I first let $x \neq 0$ (otherwise it would be trivial). Then, I divided by $\|x\|_\infty$ and normalized the vector $x$ such that $\|x\|_\infty = 1$. That left me with  $$C_1 \leq \|x\| \leq C_2$$  but I don't see how this could help me or how I could possibly limit an unknown norm. How can I proceed? Or is this the wrong way anyway? Thanks for any answers.


I'm trying to make regex that catch expressions in brackets but when there's more than one section of brackets, regex stop at first closing. An example will explain it better:  (expr)          #simple, it will catch "(expr)"  (expr1(expr2))  #there is bad cuz it catches "(expr1(expr2)"   and I want ".   (expr1(expr2))"  I'm currently using this "\\((.*?)\\)" but it doesn't give me what I want.


how compile kernel and disable root access?

is it possible to restrict system to have only one root privilege access? only user "lala" and "root" have root access ? im looking for a solution to prevent hacker who hacked system to add new account on system


How Can I display values of variables in a "PHP contextual filter code" to debug my code?

I have to use PHP code in contextual filter code in a "Arguments/Contextual Filters" of a view:   global $user; $uid=$user->uid;  $pid=db_query("select pid from profile where uid='$uid';")->fetchField();  $equipo=db_query("select field_equipo_proyecto_target_id from field_data_field_equipo_proyecto where entity_id='$uid';")->fetchField();  $num_equipo=db_query("select field_num_equipo_proyecto_value from field_data_field_num_equipo_proyecto where entity_id='$equipo';")->fetchField();;  printf("%02d",intval($num_equipo)); return sprintf("%02d",intval($num_equipo));   I think I have some error because I can´t get a correct value. I would like to know how display variables such as $num_equipo, etc to debug my code easier.


Would someone give a thorough explanation of 1.14 Minecraft's /data modify?

Okay, so I've been searching all over the internet for an explanation of data modify ever since I heard Sethbling passively mention it in one of his videos. The only  thing I could find on it was the wiki and the update log for the 1.14 snapshot. So, I checked these, and they hardly explained it at all. I can get /data modify block 123 20 123... and that's as far as I get.  Minecraft wiki does not at all define clearly what  is (the thing meant to go after coords), nor does it specify what each operation does to what. Operations include (without explanation, and excluding set (which it does explain)): append, insert, merge, and prepend. Then, it has from|value as the next option, which aren't explained either. After this, it just has block/entity and coords/id. So, I know the format (mostly), but I haven't the slightest idea what any of it means. And nothing I've seen on the internet even mentions the command save for Minecraft wiki itself.  Please explain if you know what data modify is. Thanks!


What's the difference between import virtual machines types in Hyper-V 2012?

I was importing a virtual machine to my Hyper-V manager and I got 3 options:  Register the virtual machine in place    Restore the virtual machine in place    Copy the virtual machine   What's the difference between the three options?


It is required to obtain the method of moment estimator and maximum likelihood estimator of a exponential distribution with two parameters

I have the following density:  $f(x)=\frac{1}{\sigma}e^{\frac{-(x-\theta)}{\sigma}}$ where $x>\theta$. It is required to obtain the maximum likelihood estimator and method of moment estimator for $\sigma$ and $\theta$. I have obtained the method of moment estimator by calculating the first and second moment as follows:  $E(X)=\theta+\sigma$, $E(X^2)=2\sigma^2+\theta^2+2\theta\sigma$   After a little simplification, the estimates turned out to be:  $\sigma=\sqrt{E(X^2)-(E(X))^2}$ and $\theta=E(X)-\sigma$.   I am not sure whether my estimates are correct. I have obtained the maximum likelihood estimator and they matched with what textbook calculated but method of moment estimator is something different according to textbook. Please take a moment to check where I was wrong. Thanks in advance.


How to identify a process which has no pid?

I have a process which listen to 2 ports : 45136/tcp and 37208/udp (actually I assume it is the same process). But netstat doesn't return any pid :  netstat -antlp | grep 45136 tcp        0      0 0.0.0.0:45136           0.0.0.0:*           LISTEN      -    Same result with "grep 37208".  I tried lsof too :  lsof -i TCP:45136   But it doesn't return anything.  It's a new installation of squeeze and I really don't know what could be this process. Any idea ?  ANSWER Thanks to your comments I found out what it was. I deinstalled nfs-server nfs-common (after a dkpg --get-selections | grep nfs search) and the unknown process disapeared. Strange though that kernel processes aren't marked in any way.  Thanks again to both of you. ;)


In my program I current have the path "C:\Windows\Microsoft.NET\Framework64\v4.0.30319" hard-coded. I need it to dynamically load DLLs for reflection only.   Is there a registry key or environmental value I could use to avoid hard-coding this?


How can I solve $a^x + b^x = c$ with logarithms?

I am having some trouble solving this equation for $x$: $$a^x + b^x = c.$$ I thought I should use logs but am unable to.


Chi2 test on big uniformly random sample

I expect that, in Python with numpy and scipy,  scipy.stats.chisquare(numpy.bincount(numpy.random.randint(100, size=1000000)))   will return P-value which is very close to 1.   In reality, I constantly get different P-values which are not close to 1 at all. P-values of different runs are scattered from 0 to 1, no matter how many categories I have and how big sample is.  It seems I don't understand something very basic. But what? Is chi2 test applicable here?  If not, how can I test uniformity of pseudo-random values generated by machine? (I know that there are a lot of tests for random number generators. I'm looking for test for uniformity.)  What I didn't understand  Indeed, P-value is distributed uniformly if null-hypothesis is true. Looks obvious when I understood it.  My mistake was that I expected to have P-value to be close to 1. If distribution is really uniform, P-value should be uniformly scattered over [0, 1]. And I should check that P-value greater than some value close to 0. If distribution weren't uniform, I would get values close to 0, since there is very low (close to 0) probability that I would get more extreme results if distribution were uniform.


Beamer: TOC only once before sections with subsections

My presentation consist of multiple sections. Some sections consist of subsection and some not. I want beamer to display the TOC before every subsection and before every section which consists of no other subsection.  Currently, i write in the preamble:  \AtBeginSection[] {     \begin{frame}<beamer>     \frametitle{Inhalt} %     \tableofcontents[currentsection]       \end{frame} }  \AtBeginSubsection[] {     \begin{frame}<beamer>     \frametitle{Inhalt} %     \tableofcontents[currentsubsection]       \end{frame} }   As a result, if a section consist of subsecitons beamer displays the TOC twice before the first subsection in a section, one time for the section and one time for the subsection. That is ugly in my opinion. What can i do?


In an MLB game, Astros' pitcher left the game in top of 5th while the Astros were winning 7-6. They since used a new pitcher in every inning. At the end the Astros won the game 8-6. Which pitcher gets the winning record?


How can you echo a literal '-n' or '-e'?

In Bash (or really any other shell), if I have an arbitrary string that I want to echo, how can I make it so the echo doesn't come out empty if the string is -n, -e, or -E? I would expect something like echo -- -e to work (stopping echo from interpreting any further options), but it doesn't.  Even explicitly specifying a flag doesn't stop it: echo -E -en still gives no output.  Is it possible to be safe when using echo, or do I just have to switch all my echo calls to printf '%s\n'?


Print a message a given number of times, right after system boot (init) in a GUI-less system

I want that for a given number of system boots (say, 1 or 2 system boots), a message will appear.  I will store the message somewhere, maybe in a variable:  message='If you finished testing, make sure to remove the testing application.'!'  Notes:   I use Ubuntu server 16.04 and aim for a solution for GUI-less systems.  The purpose of the code is to have a nice way to remind myself of a certain task, if, for some reason, I didn't recall that it is a good time to do it. I assume I should store the variable somewhere "deeper" than RAM, maybe in a file I'll create for it, maybe another method. I'm not sure. Cron isn't good because it's repetitive, and not for a given number of executions. This is good in case you reboot / turn off / power outage --- you get a reminder for an important task.   Clarification  I tried to describe a case when a user turnes on the machine, and in the moment the primary prompt appears, along with it, will appear the message I mentioned.


Ubuntu One is installed on my MacBook, OS X Lion, and appears to be working fine, other than it does not appear to load automatically at startup.  Please note that Connect automatically when computer starts is selected.  Is there a way to set this up, other than including it as a Login item under the User & Groups in System Preferences? Which is what I have implemented in the interim. (I have Hide ticked so that one does not see the Ubuntu One gui pop up every time one logs in).  But I suspect that there may be a more elegant way of implementing the Ubuntu One start up.


Proving the inequality $\frac{9}4\ + \frac{3abc}4\ \ge ab+bc+ca$

If a,b,c are non-negative real numbers for which holds that $a+b+c=3$ then prove the following inequality:  $$\frac{9}4\ + \frac{3abc}4\ \ge ab+bc+ca$$


Why does sort ignore dollar ($) at beginning of line?

I just got aware that sort seems to ignore dollar characters at the beginning of the line. Why is that? Example:  user@host:~$ cat 5.txt $_a _b $_c user@host:~$ sort 5.txt $_a _b $_c   I have Debian 9.2 Stretch.


We know that the escape velocity of Earth is about 11.2Km/s but what if we give that same velocity to an object at any angle let's just take 30° will it still escape from Earth's gravitational field or not


I am newbie and using Github, I am stucking with this problem, I am trying to push some files to Git and try to use "git push origin master -f" to make some changes, but nothing change. It just say to me Evething up-to-date but when I see to Github, nothing change. I know my question is just a little bit stupid but could you plese help me? Thank you very much.


LaTeX symbol for the Kulkarni-Nomizu product

I would like to know how to type the symbol of  in LaTeX:    I tried to use , but it does not give me anything.


alphabet='abide' >>>alphabet[-1::-1] 'ediba' >>>alphabet[::-1] 'ediba'   Why did this two print out the same thing? Shouldn't the second one be 'aedib'?


I have a little question about the TOVn flag located in the TIFRn register.  The datasheet says, if the TCNTn counter overflows, then the TOVn flag located in the register TIFRn will be set to 1. (at the same clock cycle the overflow occoured).  The code to handle such event is the following:  /* Check if TOV1 flag is set */ if (TIFR1 & _BV(TOV1)) {     /* Since TOV1 is set, we know we missed an overflow interrupt */      /* Handle the event... */     // ... timer_ovf_cnt++;      /* Prevent ISR to be called, because we already handled the overflow */     TIFR1 = _BV(TOV1); // .. but TOV1 is already set in TIFR1? }   But what confuses me is: why should I set the TOV1 bit when its already set by hardware? Does setting the TOV1 flag in TIFR1 to 1 by user hand disable the timer interrupt? (Even, if the TOV1 flag is already set by hardware?)  EDIT: Found the answer:


printf("%c",3["abcde"]);   How does this statement produces the output d? How the compiler executes this statement? I understand it for an int array where a[5] = 5[a] since *(a+5) = *(5+a). But here a string acts as an index other than a string name(variable name).


What effect would GW150914 have had over a much shorter distance?

In the wake of the recent news of the confirmation of the existence on gravitational waves, I was discussing gravitational waves with a friend, and he asked whether this could potentially lead to some kind of warp drive, and I pretty much immediately dismissed it. However, it got me thinking.   The gravitational waves detected by LIGO were from 2 black holes that merged and released of the order of 3 solar masses of gravitational energy (I apologise if I'm slightly butchering the science here, I'm no physicist), and it caused a "deflection" (again, please excuse, and feel free to correct, any technical ignorance on my part) of a fraction of the width of a proton.  The point of my question is this: if such an unimaginably large output of energy could cause such a tiny "deflection" at a distance of ~1.3 billion light years, what would something like LIGO (or perhaps something more like ESA's eLISA) observe at a distance of only 1 light year?


sudo apt install not working for anything

I installed Ubuntu 18.04(LTS) just yesterday. I am trying to install packages using sudo apt-get install , but I am getting the below error (this example is for 'make') :  Package make is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'make' has no installation candidate  I tried googling it, found something related to mirrors and sources, but not able to figure out what to do. Please help.


How do I list the files that has been modified for a particular commit?

Say I have made a series of commit for a certain project, so when I git log --oneline it produces the following  e61c4fb Wrote the special problem review of related literature. eb584ba Wrote the special problem objectives. 8d2dd52 Added more research papers 72a2d27 Fixed the bug during the removal of parent chromosomes in ga_wknn and saga_wknn d7467df Added as the k in KNN as a parameter in the constructor of each application. 2293f43 Added a simulation result. bdfcf41 Done with adding Introduction Comments   Next I would like to see the files that has been added, modified, deleted in one of those commits. I've tried   git diff  d7467df   but it also show me the modified content for each file, which makes the entire thing long. I only want to see the list files that has been changed, and no contents associated. How do I achieve this?


Is $\sum_\limits{p}^{\infty}\frac{1}{p^{2}}$ irrational where p is prime? How to prove it?


How do I burn a DVD ISO using the terminal?

I have a DVD ISO file and I want to burn through the terminal.  We have many command formats but I am unable to choose the best & safe one. so please give me a best command to burn the ISO through the terminal.


What are the combinations for the mutates berries?

These are the mutations I've already heard of:   Aspear + Leppa = Hondew Chesto + Persim = Kelpsy Iapapa + Mago = Pomeg Oran + Pecha = Qualot Sitrus + Lum = Tamato Hondew + Yache = Petaya Kelpsy + Wacan = Apicot   I wanted to know if there were any others that I don't already have. Help?    Plus... I've gotten these by accident. Do I put one plant on Surprise Mulch and the other on another type or do they both need to be on the Surprise Mulch?


I would like to evaluate the following integral $(a>0)$      $$\int_{-\infty}^{\infty}\frac{\exp\left(-a x^2\right)}{x^2+b^2}dx.$$   I've have tried integration by parts, putting $e^{-ax^2}=u$, but I come across with this integral  $$\int_{-\infty}^{\infty}\exp\left(-a x^2\right)\arctan\left(\frac{x}{b}\right),$$  and I don't know how to do it. Could you help me?


Why does the mouse cursor switch direction over line numbers in programming IDEs?

When you mouse over line numbers in IDEs, such as Visual Studio or Notepad++, the mouse cursor  is flipped horizontally. I can't think of a reason this would be a ubiquitous user interface decision. Line numbers are already set apart from the code by colors or lines, and the cursor flip doesn't prevent the obstruction of the numbers, or make setting breakpoints easier. Does anyone know why this is a common decision?


Cannot understand alternative formula for expectation of x and some constant k

I am given this additional formula for E[X] when X does not take on negative values. I cannot figure out why the second formula is correct. I see why this is correct when X < k (which I assume means that X takes on no value greater than k). I cannot figure out why this is true when k < X


When I connect over ssh to remote hosts everything is just a single font/color. I would like to have colours like I do locally e.g. green for executable and blue for symlinks etc. And such that when I run $ git diff on the ssh host it shows me diff with colours =)


How can I force a migration to not create stub nodes?

I have multiple migrations that rely on one another for entity reference fields.  When I created the queries these migrations I made sure I was only getting the nodes I want.  When an entity id is given and was not previously migrated (because the query did not return it as a result), it creates a stub node.  Then the number of unprocessed nodes for that node migration go into the negatives because more nodes of those types were imported than I had returned in the query.  Now I have to run update migrations because there is a newer version of the legacy database available.  The problem is that because the number of unprocessed went into the negatives, I cannot import any more, it just defaults to 0.  So how do I force entity reference fields to not import if it doesn't exist in the new site?


Error using MakeLowercase in section heading with hyperref package

I seem to be experiencing trouble using \MakeLowercase in a section heading when using the package hyperref. I've arrived at the following MWE:  \documentclass{article}  \usepackage{hyperref}  \begin{document} \section{\MakeLowercase{A}} Blah \end{document}   Attempting to compile this code produces an error. The code compiles if either  \section{\MakeLowercase{A}} or \usepackage{hyperref} is commented out.   I would still like to use \MakeLowercase in a section heading, as well as use \hyperref elsewhere in my document. Is there any way to remedy the situation?   Thank you!


this is the code  when i apply that code application has been stopped occurred this code is to find relative prime in android application development  check and let me know my error  thanks in advance  relative.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String A = num1.getText().toString(); String B = num2.getText().toString(); int val1 = Integer.parseInt(A); int val2 = Integer.parseInt(B); int gcd = 1; // Function to find GCD for relative prime while (val1 != val2) { if (val1 > val2) val1 = val1 - val2; else val2 = val2 - val1; } String ans = String.valueOf(val1); String ans1 = String.valueOf(val2); // function to check and print if // two numbers are co-prime or not if (ans1.equals(1)) { result.setText("Relative Prime"); Toast.makeText(MainActivity.this, "Relative Prime",  Toast.LENGTH_SHORT).show(); } else { result.setText("Not Relative Prime"); Toast.makeText(MainActivity.this, "Not Relative Prime",  Toast.LENGTH_SHORT).show(); } } });   Error LOG  11-22 13:00:21.854 6630-6630/com.example.jasirali.layout_elements E/AndroidRuntime: FATAL EXCEPTION: main     Process: com.example.jasirali.layout_elements, PID: 6630     java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.jasirali.layout_elements/com.example.jasirali.layout_elements.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)         at android.app.ActivityThread.access$800(ActivityThread.java:144)         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)         at android.os.Handler.dispatchMessage(Handler.java:102)         at android.os.Looper.loop(Looper.java:135)         at android.app.ActivityThread.main(ActivityThread.java:5221)         at java.lang.reflect.Method.invoke(Native Method)         at java.lang.reflect.Method.invoke(Method.java:372)         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)      Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference         at com.example.jasirali.layout_elements.MainActivity.onCreate(MainActivity.java:128)         at android.app.Activity.performCreate(Activity.java:5937)         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)          at android.app.ActivityThread.access$800(ActivityThread.java:144)          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)          at android.os.Handler.dispatchMessage(Handler.java:102)          at android.os.Looper.loop(Looper.java:135)          at android.app.ActivityThread.main(ActivityThread.java:5221)          at java.lang.reflect.Method.invoke(Native Method)          at java.lang.reflect.Method.invoke(Method.java:372)          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)


How does extra damage work for critical hits?

I'm a bit confused on how extra damage works for critical hits. Let's take the following example: A thief with sneak attack rolls a crit. I'm under the impression he rolls double his normal attack damage dice AND double his Sneak Attack damage dice. Is this accurate? Another example, I finished DM-ing my first campaign recently. The Giant Spider enemy monster has an melee attack that causes a constitution saving throw. If the player fails, the enemy rolls an additional 2D8 of damage. In this situation, if there was a critical hit, and the player failed their saving throw, would I also roll double dice on the additional damage? Or is that considered a separate attack?


Migrate Windows 10 programs and data to another Windows 10 pc

I have bought a new PC with Windows 10. Is it possible migrate all data and programs from my old laptop to new one? Thanks


If $x,y,z\gt 0$ and $xyz=1$ Then minimum value of $\frac{x^2}{y+z}+\frac{y^2}{z+x}+\frac{z^2}{x+y}$

If $x,y,z\gt 0$ and $xyz=1$ Then find the minimum value of $\displaystyle \frac{x^2}{y+z}+\frac{y^2}{z+x}+\frac{z^2}{x+y}$   $\bf{My\; Try::}$Using Titu's Lemma $$\frac{x^2}{y+z}+\frac{y^2}{z+x}+\frac{z^2}{x+y}\ge \frac{(x+y+z)^2}{2(x+y+z)} = \frac{x+y+z}{2}\ge 3\frac{\sqrt[3]{xyz}}{2} = \frac{3}{2}$$  and equality holds when $$x=y=z=1$$  My question is how can we solve it without the above lemma, like using Jensen's Inequality or other inequality.  Please explain me.  Thanks


Why does "want" catenate with a nominal plus to-infinitive whereas "insist" does not?

Why can't you say:      "I insist you to do that!"     After all, you can say:      "I want you to do that!"   What's the difference between these two verbs, that they need to be used in sentences with different structures?


How do I disable kernel messages while booting?

I enabled the kernel messages a long time ago because I was playing around with Ubuntu. But now I am finished and I want to disable them again, but forgot how to.  /etc/default/grub already contains the line:  #GRUB_TERMINAL=console   (including the hash which disables it).


What are "two-tone" tubular tires called?

What are those old "two-tone"  actually called?-- You know, the ones with the "natural-rubber" color on the sidewalls?


What's the quickest way to find duplicated files?

I found this command used to find duplicated files but it was quite long and made me confused. For example, If i remove -printf "%s\n", nothing came out. Why was that? Besides, why they used xargs -I{} -n1?  Is there any easier way to find duplicated files?  [4a-o07-d1:root/798]#find -not -empty -type f -printf "%s\n" | sort -rn | uniq -d | xargs -I{} -n1 find -type f -size {}c -print0 | xargs -0 md5sum | sort | uniq -w32 --all-repeated=separate 0bee89b07a248e27c83fc3d5951213c1  ./test1.txt 0bee89b07a248e27c83fc3d5951213c1  ./test2.txt


I want to reply to a mod commenting on a locked post. How?

My post was deleted and I want to reply to the mod commenting on it after deletion. How can I do this?


Can toddlers be taught to safely navigate stairs?

We have 14-month twins who are just starting to learn to walk. Our house is a split level townhouse with three short flights of stairs. We have several gates to keep them safe. They're pretty competent at climbing up steps when supervised, but getting down them is a huge worry.   Obviously, we don't want to let them loose on the stairs until we are certain they will be safe. How can we help them learn to climb and descend stairs on their own? What are the signals that they are ready to be alone on the stairs without too much danger?


How can I center all the text vertically in this table?

\documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{multicol}% Agrupamento de colunas em tabelas \usepackage{array} \usepackage{pgfplots} \usepackage{siunitx}  \usepackage{float}  \begin{document}  \begin{table}[h] \centering \caption{} \begin{tabular}{|c|l|l|l|c|} \hline \multicolumn{1}{|c|}{Comportamento elástico}& \multicolumn{ 3}{l|}{Coeficiente de poisson, $\nu$} & 0,42 \\ \cline{ 2- 5} \multicolumn{1}{|c|}{} & \multicolumn{ 3}{l|}{Módulo de elasticidade, E} & 1730 MPa \\ \hline \multicolumn{1}{|c|}{Comportamento plástico} & \multicolumn{ 3}{l|}{Ângulo de fricção interna, $\psi$} & \ang{38,5}\\ \cline{ 2- 5} \multicolumn{1}{|c|}{} & \multicolumn{ 3}{l|}{Ângulo de fluxo interno, $\beta$} & \ang{38,5} \\ \cline{ 2- 5} \multicolumn{1}{|c|}{} & \multicolumn{ 3}{l|}{Rácio de fluxo interno, K} & 1 \\ \cline{ 2- 5} \multicolumn{1}{|c|}{} & \multicolumn{ 3}{l|}{Tensão de rotura à tração, $\sigma_{ut}$} & 32,6 MPa \\ \cline{ 2- 5} \multicolumn{1}{|l|}{} & \multicolumn{ 3}{l|}{Tensão de rotura à compressão, $\sigma_{uc}$} & 56,3 MPa \\ \hline \end{tabular} \end{table}  \end{document}   NEW IMAGE :


If we define a random variable $X \sim N(0,1)$ with $\Phi$ being the cdf of a standard normal, what would $E(\Phi(a+bX))$ be?  I was only able to rewrite $\Phi(a+bX)$ as $P(Z\leq aX+b|X)$ with $Z\sim N(0,1)$.  I could also calculate the cdf of $\Phi(a+bX)$  but it doesn't help with its expectation.  Any help would be greatly appreciated.


Lots of new batteries (for mobile devices, MP3 players, etc) have connectors with 3 pins. I would like to know what is the purpose of this and how should I use these three pins?    They are usually marked as (+) plus, (-) minus, and T.


Let $a$ and $b$ be two positive integers.      If $ab$ divides $a^2+b^2$ then $a=b$.     I can show that $a$ divides $b^2$ and $b$ divides $a^2$ but then I get stuck. Any ideas?


I have all the Skyrim DLCs, and a few mods. I can't do the original quest and I can't do shouts (which is really annoying).   I killed the dragon Dumviir (or something like that) in the quest where the Jarl of Whiterun sends you to kill said dragon. But I can't absorb it's dragon soul.   I killed it and all the guards say "she must be Dragonborn!" and they all look scared, but nothing happens. I have all the unofficial patches (skyrim, dawnguard, hearthfire, dragonborn and high res) and SMPC (aka USKP addon) installed but they didn't fix it.   Has anyone else had similar issues?


How can I make sure that my on-screen colors are consistent?

I designed a mockup on my LG monitor. When I view the same design on another monitor that I own, the colors seem drastically different. I reset both of the monitors to their factory defaults, but still the issue persists. I'm wondering if some of my clients might dislike my designs because of this. What should I do?  How can I make sure that what I design is what my client sees?  Even worse still, I've realized that my laptop is showing different colors too.


I have a stack overflow account and just now(not more than hour ago) each and every question I had ever asked or an answer I had written got down voted.  I would have understood if few of my Q and A being marked down.. but as almost all my activity is marked down I am suspecting something fishy.  I would like an explanation and/or some justification for the act? Can anyone help? Or can I at least know who I Ticked off to get a reaction like this?


Corruption Versus Crimson - Hardmode question

I have been playing this game for awhile now. I have done worlds with Corruption, and worlds with Crimson. I understand the differences between the shadow orbs and crimson hearts. I have destroyed Crimson hearts in one world, fought the associated boss..and then farmed him.  Now, I am ready to enter hard mode. After doing some research I find out that Corruption and Crimson cannot exist in the same world. WIth that being said, you are required to destroy "The Eater of Worlds" in order to enter hard mode, and he only spawns via Corruption shadow orbs.    Since I am stuck in a world with only Crimson, I can destroy crimson hearts all day, but not shadow orbs.    Does this mean that I am never able to turn this world into hardmode? Are worlds only able to be turned into Hardmode when they have Corruption and Shadow orbs?  Thanks!


how to find if a host is a physical server or a virtual server

I am actually trying to find if a given host is a physical server or a virtual machine. I searched on Google but couldn't find any commands or tools. Can anyone here let me know is there is any utility which can tell me if its a physical server or a virtual server.


Can I still export Rock Band 1 songs to Rock Band 2?

I have the physical copies of all rock band games for Xbox 360. I am just wondering if the license to export the rock band 1 songs is still available because I keep going to export the songs and it keeps saying “This item is no longer available.” So I don’t know whether if it is a license expire or a glitch with my game or system. Can someone help me with a possible solution?


Two circles intersect at two points maximum when we want to draw intersecting circles. But there we are solving quadratic equations, what is the argument about the other two missing points?


SEO friendly URL: hyphen vs forward slash

For example, I have a webshop where each product has its unique ID and I want to build SEO friendly URL for a product page.  An old-school way that is mentioned almost in every article looks like this:  where    1111 is ID of the product and is important some_product_name is just for google and users; changing this text to "some_other_product_name" will not have any effect   But some websites (including StackOverflow) uses different format and build URLs like:   So, my question is which URL is better from search engine point of view?  OR ? Is there any reason why forward slash should be used instead of hyphen?  From implementation point of view there is not so much difference. Also, for the end-users they look identical.   UPDATE 2017-03-02 @John Conde: this is not the duplicate. The link that you provided explains how to structure URL if you have hierarchy of entities. I agree that my question looks similar, but in my case I have parts of the URL that will never be part of user's search phrase (i.e., nobody will try to search for "1111", users type in product name).


Is there any way to generalise this problem?

My friend posed this question to me:  I have a glass with 8 litres of water along with one empty 3 litre and an empty 5 litre glass. I have to pour 4 litres of water into his glass in one go. His glass is not calibrated. We do not know how much volume of water it can hold(but it is more than 4). I solved the problem in this way:  $\begin{matrix} 8 & 0 &0 \\ 3&5&0\\ 3&2&3\\ 6&2&0\\ 6&0&2\\ 1&5&2\\ 1&4&3\\ \end{matrix}$  Now I can pour the 4 litres from the 5 litre glass.  My question is that can I generalise this problem?      If I have $V_1$ volume of water in a glass which has a capacity of   $V_1$ along with 2 other glasses of volume $V_2$ and $V_3$ such that   ($V_2$ and $V_3$ $\lt$ $V_1$).My friend needs $V$ volume of water in   one go.   And under what conditions will this generalisation fail?


Meaning of "strong" and "weak" (formulas?) in propositional logic

I was doing some review of propositional logic from Enderton's book. In one section(pg. 26 of the 2nd edition), he explains the idea that given wffs $\sigma_1, \sigma_2, \cdots, \sigma_k$ and $\tau$, one can use truth tables to check whether or not $\{ \sigma_1, \cdots, \sigma_k \} \models \tau$. Then he gives some examples of how one might in an educated way avoid checking all combinations of assignments of the propositional variables used in the sigmas and in $\tau$. This part looks o.k to me.  But then Enderton says "The stronger the antecedent(the expression on the left side), the weaker the conditional." He then gives the examples  \begin{align} (P \wedge Q) &\models P \\ (P \rightarrow R) &\models ((P \wedge Q) \rightarrow R) \\ (((P \wedge Q) \rightarrow R) \rightarrow S) &\models ((P \rightarrow R) \rightarrow S) \end{align} What does he mean by this? Which antecedent is stronger, the first or the third? Maybe a question to start out with is: what do "strong" and "weak" even mean here? Thanks for any help/clarification!  Sincerely,  Vien


$f:[0,1]\to \mathbb{R}$ is a continuous function such that $$\int_0^1 f(x)^2dx=\int_0^1 f(x)^3dx =\int_0^1 f(x)^4dx$$ Find all such $f$ My approach: Clearly $f=0,1$ are solutions (and only possible constant functions). Now let $f$ to be a non constant function. By CS inequality we have, $$\int_0^1 f(x)^2dx \times \int_0^1 f(x)^4dx \ge ( \int_0^1 f(x)^3dx )^2$$ Equality holds here.So $\int_0^t f(x)dx =k \int_0^t f(x)^2dx$ for all $t\in (0,1]$ for some $k$ . I don't know what to do from here 😅 Please help.


Im just curious but is it possible to build a bootable iso of my running 14.04 OS? Like if I could create an iso that upon running again would reinstall? I have to redo my system but I have so many files and shell scripts that I dont want to reinstall from fresh but reinstall the OS im using now.  Could this be possible?


Meta link not showing up on several exchange site profiles

I'm not entirely certain when this occurred, though I'm suspicious that this might have first shown up when the new profiles were introduced. I just can't verify that at all. And since the link is missing from both new and old profiles, I just have to assume it's unrelated. On my most active site, and a few others, things are normal:  StackOverflow:   and Theoretical Computer Science:   are unaffected.  But MathOverflow and Computer Science are affected:      The list of my exchange sites where the Meta link has vanished:   SuperUser (Link is now there! See edit below...) Computer Science Reverse Engineering (Link is now there! More on that below...) Information Security Physics Mathematics MathOverflow Code Review   Notice that this is both new and old profiles. I first observed this on Reverse Engineering. So naturally I typed in the meta site address and navigated to it 'manually'. I posted my observation figuring this had something to with the recent changes (and that it might simply have been moved to some place that was different from every other site). Once I navigated back to the main site profile, the meta link was there! And has been there ever since. This led me to poke around all of my site profiles to see if something was really up, or I was just having some weird dyslexic moment.  I've done a search and nobody else seems to be reporting this by any means that I can find. This might be a feature of some kind, but then why am I seeing the meta link on several other of my exchange site profiles?  Edit: It seems that somebody else attempting to visit the meta profile of a site causes the link to appear, even if I've never attempted it myself. Super User now displays the meta link on my main profile.


I have a list containing 200 items (List A)  In my new list (List B) I want to include a lookup that will pull through the title from List A. OOTB lookup columns are drop downs and as List A continues to grow this isn't going to be fit for purpose so what I want to do have a single line of text that will work like googles search bar and once the user begins typing the title of an Item in List A it will show suggestions.  Does anyone know a way to achieve this without complex coding


I found this formula in a textbook in which the proof to the formula was not given  Ramanujam's formula $$\sqrt{1 +n\sqrt{1 +(n+1)\sqrt{1 + (n+2)\sqrt{1 + (n+3)\sqrt{1 +....\infty}}}}} = n+1$$ Its a great equation andhow do you prove this. its a bit difficult for me and tried different methods to solve this. Iam an undergraduate and I want you to elaborate the method of solving if its complex.


Book about implanting minds in new bodies and a young woman who sells her body to an old woman and wakes up in a new one

I read this book sometime in the early 2000s, and I believe it was published around then too; definitely no later than 2007.  I vaguely remember the cover being minimalist blue with a naked woman's body curled like an embryo. However this was in Australia, so the cover may have been different elsewhere. Or my memory is completely wrong.   I picked this up from the adult sci-fi section in the library, however it may have been YA as I don't remember it being too risque.   Plot points I remember:   I believe the book is set on a future Earth where the rich live in skyscrapers above the clouds of pollution and the poor live down on the ground below the pollution.  The MC is a young woman who is poor, living on the ground working in a factory and making just enough to scrape by.  At the factory where she works there is an explosion and her friend or family member is injured and burned and they don't earn enough to get healed.  In exchange for her friend being healed, the MC sells her young youthful body to a rich older woman who will inhabit her body and be young and strong again.  Part of this exchange was that the MC was to be given a basic cyborg? (I say cyborg, but it may be bio-created) body or the old woman's body in return, I can't quite remember.  The MC's consciousness wakes up in an experimental enhanced body that has an internal AI that communicates with her. I think she also had enhanced senses and strength, and maybe the ability to choose how she looks? As the MC now has an enhanced body that can handle space travel she now has the ability to go to space, and as such the book ends with her in space.


I came across :  #!/bin/sh qemu-system-x86_64 -enable-kvm \                    -m 2G \                    -device virtio-vga,virgl=on \                    -drive file=/home/empty/qemubl/lab.img,format=raw,if=virtio \                    -cpu host \                    -smp 4 \                    -soundhw sb16,es1370 \                    "$@"   What is the role of $@?  I searched man bash for $@ but got Pattern not found.


I don't know why my camera is not working, I am sure it is a software problem, it just shows a black page.   All features are working but it doesn't show anything. It is not working on other apps, like Instagram, as well. The front camera is not working. I have tried the "Reset All Settings" option but there is no change and camera is not working yet.    I upload a photo that is a screenshot when I run camera.    How can I solve this problem?


I'm trying to evaluate the integral $$\int_{-\infty}^{\infty} \chi_{[0,1]}(x-y) \chi_{[0,1]}(y) \, \mathrm{d}y$$ where $\chi_{[0,1]}(x)=1$ is the characteristic function, i.e. equals $1$ for $x \in [0,1]$ and $0$ otherwise. How do I evaluate this integral? So far I've done $$\int_{-\infty}^{\infty} \chi_{[0,1]}(x-y) \chi_{[0,1]}(y) \, \mathrm{d}y = \int_{0}^1 \chi_{[0,1]} (x-y) \, \mathrm{d}y.$$ I've tried substitution but I don't find it yielding anything useful. The answer should be the function $$f(x)= \left\{    \begin{array}{l l}     x & \quad \text{if $x \in [0,1]$}\\     2-x & \quad \text{if $x \in [1,2]$}\\     0 & \quad \text{otherwise.}   \end{array} \right.$$


Possible Duplicate:             Well, I remembered this after having Algebra II a year ago, is it possible that this is a valid proof that $1 = -1$?  $$ 1 = \sqrt{1} = \sqrt{-1\cdot-1} = \sqrt{-1} \cdot \sqrt{-1} = i \cdot i = i^2 = -1 $$  $$ \therefore 1 = -1 $$  So is this actually fully valid? Or can it be disproved?


$2^n-1$ is prime or composite as $n$ is prime or composite [without using induction method]

I have proved this for prime $n$.     I need help to prove $2^n-1$ is composite when $n$ composite     As far I can think - suppose $2^n-1$ is composite but $n$ is prime.  $\\$  Therefore, $1$ divides $$2^n-1=(2-1)(2^{n-1}+2^{n-2}+....+2+1)$$ which means $2^n-1$ is divisible by $1$ and the number itself. Hence $2^{n-1}+2^{n-2}+...+2+1>1$ and it cannot be represented as the product of its factors. Hence $2^n-1$ is prime - a contradiction, hence $n$ is composite.    Am I correct here? I need help. Any help is appreciated.


Limit of $x\left(\left(1 + \frac{1}{x}\right)^x - e\right)$ when $x\to\infty$

I am stuck on how to calculate the following limit: $$\lim_{x\to\infty}x\left(\left(1 + \frac{1}{x}\right)^x - e\right).$$  Definitely, it has to be through l'Hôpital's rule. We know that $\lim_{x\to\infty} (1+(1/x))^x = e$. So, I wrote the above expression as $$\lim_{x\to\infty}\frac{\left(1 + \frac{1}{x}\right)^x - e}{1/x}.$$Both numerator and denominator tend to zero as x tends to infinity. I applied l'Hôpital's rule twice, but I got the limit equal to infinity which is clearly wrong. In the book, it says that the limit should be $-e/2$.  Any help please? Also, in case someone managed to solve it, please tell me which numerator and denominator did you apply your l'Hôpital's rule to in both cases? Thanks a lot  Also, guys can you tell me how to write equations in this forum? Thanks.


Understanding differences between "apt install" and "dpkg -i"

I'm a beginner with Ubuntu, trying to understand how package management works, and I have a few questions. This has occurred whilst I have been trying to install CUDA on my machine, so I will use CUDA as an example, but I am keen to learn about this in general terms.  So, following a tutorial, I have downloaded a file called cuda-repo-ubuntu1804_10.0.130-1_amd64.deb. Then I have run sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb. Finally, I have run sudo apt install cuda.  My first question is: What is the difference between running dpkg -i on a .deb file, and running apt install on a package name? From what I have read, apt uses dpkg underneath, so I am confused as to why both would be used in this case.  My second question is: What is telling my apt the meaning of cuda? I understand how running dpkg on a local file will then install this file, but I don't understand how the name cuda is linked with this .deb file.  My third question is: Let's say there is a newer version of this package, which comes in a file called cuda-repo-ubuntu1804_10.1_amd64.deb. What would happen if I were to run sudo apt upgrade cuda? Would this remove all files for cuda-repo-ubuntu1804_10.0.130-1_amd64.deb and install cuda-repo-ubuntu1804_10.1_amd64.deb?  Thank you.


Why is adding a return statement for the main function in C important?

Why is adding a return statement for the main() function in C important if the programs I make runs the same without it?  Is there a disadvantage in my programs if I omitted the return statement in the main() function?


Is it possible to use Google Maps as basemap in ArcGIS for Deskrop?

I remember using an AddIn Earlier that enabled the use of Google Maps within ArcGIS as basemap but I don’t have it now.  I am out of date here, but is it possible (in ArcGIS 10.3) to do that as a built-in functionality and if not, can someone please point me to any tool that would provide this functionality.  Note: Older answers suggested using  ArcBruTile , but its not realy showing Google Maps, it is however very good in using Bing Maps, OpenStreet ...etc.  Its now ArcGIS 10.3 and I was hoping that someone out there may have developed something new or a workaround to get google maps into ArcGIS for free.


Is there a team meta like in League of Legends for Conquest mode?

I come from League of Legends, there most of the games, but not necessarily all, are composed by:   Top lane: Bruiser / Tank Jungle: Tankish... Mid lane: Mage Bottom lane: Physical Damage Carry Bottom lane: Support   Usually something like that.  And now I want to understand if there is any meta on Smite, is there some team composition that is recommended to follow? How should we pick our team? Do we have/need a full support?  Are there junglers?


Can we disable automatic community wiki conversion for answer edits?

Currently, if a user edits their answer more than a certain number of times, that answer is automatically converted by the system to community wiki status. This trips up many well-meaning and active contributors to the site, and I believe it no longer serves a useful purpose. Therefore, I propose that the system no longer automatically convert answers to community wiki due to a large number of edits.  I know , and this was declined at that time, but the site has changed since then. Suggested edits allow anyone to provide improvements to answers, making the lowering of the reputation threshold for edits on community wiki posts effectively meaningless.  We've also been able to observe the behavior of people in the years since then. We see a decent number of flags and Meta posts from people shocked that the system did this to answers that they've curated, and disappointed with the reputation they've lost as a result. Handling the flags on this and reversing wiki status takes up moderator time that could be better spent elsewhere.  I understand the argument that people should try to make more substantive edits, but is this really that big of a problem? Do we care if someone makes many small tweaks to their answer over time to keep it up to date? We want people to maintain their answers over a long period, and keep them from becoming outdated. Given that few people seem to be aware that the automatic conversion even takes place, it wouldn't even seem to be a good deterrent of this behavior anyway.  I know that only a very small number of people are affected by this, but the harm appears to outweigh any possible good that this feature provides, so I propose that it finally be removed.


lexical_cast strtof strtold lose accuracy?

Here:  #include <iostream> #include <cstdlib> #include <boost/lexical_cast.hpp>  int main(void) {     const char * str = "277499.84";      std::cout << boost::lexical_cast<double>(str) << std::endl;     std::cout << strtof(str, NULL) << std::endl;     std::cout << strtold(str, NULL) << std::endl;     std::cout << atof(str) << std::endl;      return 0; }   output:  277500 277500 277500 277500   Why the output are not 277499.84?


Command line command to auto-kill a command after a certain amount of time

I'd like to automatically kill a command after a certain amount of time.  I have in mind an interface like this:  % constrain 300 ./foo args   Which would run "./foo" with "args" but automatically kill it if it's still running after 5 minutes.  It might be useful to generalize the idea to other constraints, such as autokilling a process if it uses too much memory.  Are there any existing tools that do that, or has anyone written such a thing?  ADDED: Jonathan's solution is precisely what I had in mind and it works like a charm on linux, but I can't get it to work on Mac OSX.  I got rid of the SIGRTMIN which lets it compile fine, but the signal just doesn't get sent to the child process.  Anyone know how to make this work on Mac?  [Added: Note that an update is available from Jonathan that works on Mac and elsewhere.]


7 concerts on 7 days per week - probability that on one day there are two concerts

We consider 7 concerts which can be scheduled throughout a week (7 days). What's the probability that there are at least two concerts on one day if each day is equally probable to be chosen?   Using the inclusion-exclusion principle my approach is as follows:  $$\sum_{k=1}^7{7 \choose k} {13-k \choose7-k}(-1)^{k-1}$$  are all possible ways of scheduling the concerts on 6 days, on 5 days, 4 days and so on...  All possible combinations of scheduling the concerts on all 7 days sum up to: ${13 \choose 7}$. As all combinations are equally probable we have a Laplace Experiment and the probability of having at least two concerts a day is: $$1-\left(\sum_{k=1}^7\frac{{7 \choose k} {13-k \choose7-k}(-1)^{k-1}}{{13 \choose 7}}\right).$$  Is this correct?  I am a little bit confused because the official solution  is: $$1-\left(\sum_{k=1}^7{7 \choose k} \left(1-\frac{k}{7}\right)^7(-1)^{k-1}\right)$$ However, this would imply that the concerts are distinguishable. But in my opinion the question does not clearly mention this because we are only interested in the possibility that at least any two concerts should take place on one day. What do you think? Is my reasoning flawed?


Do I need to fix all 404 in Google Search Console

We are a software manufacturer with a partner based sales model.  In Google Search Console, we are regularly receiving numerous 404 errors. We are unsure, if we need to fix all of these:   Some are genuine typos, do we need to fix them Some are typos on our partners or directory websites Some seem random   Are there Google guidance documents on how which ones of those we need to fix and within what timeframe. Is this dependent on our amount of traffic as well.


What's the term for using the wrong word because it sounds the same?

I was reading about various terms for incorrect words, but they didn't seem to fit.  I saw a post where someone said "what do you like to do when you're board?".  That kind of thing.  Also, would that be considered a mistake in grammar?  I didn't think so, but my friend insists it is.  I'm not sure if there even is a word for that kind of mistake, but was just curious about it.  Thanks!


So what I'm working on right now should be pretty simple. I'm adding an item to an Arraylist, and if the item's name is equal to the name of another item in the Arraylist, it gets rid of one of the items and just adds the numItem value to the other item. So for example, if a player buys "guns", and the numItem variable is set to 1500, it's added to an arraylist. If they input "guns" again, and that numItem is 2500, I want to get rid of one of the elements in the arrayList and just set the numItem of the remaining to 4000.  public void addItem(Item item) {     for(int i = 0; i < this.ownedItems.size(); i++)     {         if(item.getName() == this.ownedItems.get(i).getName())         {             item.setNumItem(item.getNumItem() + this.ownedItems.get(i).getNumItem());             this.ownedItems.remove(this.ownedItems.get(i));         }     }     this.ownedItems.add(item); }


Can i replace 1n4148 with 1n4007 in this circuit (pic Programmer)

I want to conceive a pic programmer i found this circuit but  i didn't find 1n4148 can i remplace it with 1n4001/1n4007 in  this circuit It affects the pic or dysfunction of the system in speed ou current


How to reset an user password without knowing his current password?

A colleague has just resigned. And his account is being used as a build account on our Ubuntu 16.04.6 LTS. Is there any way to reset his password without knowing his current password? I have tried sudo passwd $HIS_USER but it asks for current his current password (not mine). And  The Ubuntu is using LDAP authentication I can't reboot the server into GRUB because I'm working remotely


Finding the first digit of $2015^{2015}$

Can anyone help me find the first digit of $2015^{2015}$?  It is easy to find the last digit but I have no idea for the first digit.


I am looking at a Christmas ale to brew and found this recipe (I am still learning to brew, so I am using malt extracts)  . I am guessing 5 gallons of water and steep the grains for 20 minutes?


.NET - How can you split a "caps" delimited string into an array?

How do I go from this string: "ThisIsMyCapsDelimitedString"  ...to this string: "This Is My Caps Delimited String"  Fewest lines of code in VB.net is preferred but C# is also welcome.  Cheers!


I'm trying to compute: $$\int_{0}^{1}\frac{x^4+1}{x^6+1}dx.$$  I tried to change $x^4$ into $t^2$ or $t$, but it didn't work for me.  Any suggestions?  Thanks!


On Puzzling, I noticed first that there wasn't an option to protect my own questions. I brought this up in chat, and other high-rep users replied that it has disappeared for them too. Not sure if this is just Puzzling, or site wide, but I have just under 16k rep and have had the privilege a while. It's odd it just disappeared. . EDIT: It's all questions, including 24 hour old ones with new user answers.  that has no protect option for me.


I have a simple array with bank holidays:  var bank_holidays = ['06/04/2012','09/04/2012','07/05/2012','04/06/2012','05/06/2012','27/08/2012','25/12/2012','26/12/2012','01/01/2013','29/03/2013','01/04/2013','06/05/2013','27/05/2013'];   I want to do a simple check to see if certain dates exist as part of that array, I have tried:  if('06/04/2012' in bank_holidays) { alert('LOL'); } if(bank_holidays['06/04/2012'] !== undefined) { alert 'LOL'; }   And a few other solutions with no joy, I have also tried replacing all of the forwarded slashes with a simple 'x' in case that was causing issues.  Any recommendations would be much appreciated, thank you!  (edit) Here's a jsFiddle -


For any real numbers $a$ and $b$ and even natural number $n$, Show $x^n+ax+b=0$ has most two solutions for all $x$ in $\mathbb{R}$.   let $f(x)=x^n+ax+b$. Set $f(x)$ and $a$ be $0$, then we have $x^n+b=0$. So $x=\pm b^{1/n}$. $f$ has two solutions. To yeld a contradiction. Now assume that $f$ has more than two solutions. As $f$ is a polynomial on $\mathbb{R}$, it is differentiable on $\mathbb{R}$; thus $f'(x)=nx^{n-1}+a$. Set $f'(x)=0$, then $0=nx^{n-1}+a\Rightarrow x=\left(\frac{-a}{n}\right)^{1/(n-1)}$. At $x=\left(\frac{-a}{n}\right)^{1/(n-1)}$, $f(\left(\frac{-a}{n}\right)^{1/(n-1)})$ is the only extreme value of $f$ which contradicts with $f$ has more than two solutions.    Can someone check this solution? I am not sure right or not. If not right, please give me a hint or suggestion. Thanks


Python regular expression caret not working in multiline mode?

The following piece of code does not match foo2 in the multiline string:  re.match("^foo2", "foo1\nfoo2\nfoo3",re.MULTILINE)   Why is that? The documentation at  says in MULTILINE mode the Caret (^) also matches at the beginning of each line. I've also tried the "raw string" versions with r already, no joy. Using findall also does not help. I'm obviously missing something here..


Starting to learn java,program doesn't work as expected

I am learning java at the moment and I was trying to make a simple program that recieves a username and gives you an opurtunity to change that username...However,the program is always doing the same thing: It doesn't give me a chance to change my username.I am sure that the problem is in the function I made:  public String change (String Accname) {     String chg;     System.out.println("Are you satisfied with this username: "+Accname+"?");     chg=in.nextLine();     if(chg=="yes"||chg=="Yes") {         return Accname;     } else if(chg=="no"||chg=="No") {          System.out.println("What would you want your username to be?");         Accname=in.nextLine();     }     return Accname; }   I wrote this line at the main function:  name.change(username);   (of course,it's not the full code,I gave you the important line). After this line my program gives me the username without an opurtunity to change my username.It's like the program ignores the change function. This problem also happend a while ago in c while i was trying to make a simple program that switches between two numbers.At the end,nothing happens.  If someone could help me,I would really appreciate it!


I am trying to bundle install a Ruby project, the install fails when trying to install a gem and it says: An error occurred while installing pg (1.2.3), and Bundler cannot continue. Make sure that 'gem install pg -v '1.2.3' --source 'https://rubygems.org/'' succeeds before bundling.  I google this error and the Stack Overflow answer tells me to install libpq-dev, I type sudo apt-get install libpq-dev but it tells me that it has unmet dependencies. The following packages have unmet dependencies:  libpq-dev : Depends: libpq5 (= 12.5-0ubuntu0.20.04.1) but 13.0-1.pgdg20.04+1 is to be installed E: Unable to correct problems, you have held broken packages.  I look at the output log (mkmf.log) and it appears to be missing the libpq-fe.h header, from which I assume is from the libpq5 package which I have installed. I use find to see if I have that file anywhere on my system but it finds nothing. (This is the mkmf.log if it is relevant) find_executable: checking for pg_config... -------------------- no  -------------------- find_header: checking for libpq-fe.h... -------------------- no  "gcc -o conftest -I/home/brumo/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/x86_64-linux -I/home/brumo/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/backward -I/home/brumo/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0 -I.    -O3 -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable  -fPIC conftest.c  -L. -L/home/brumo/.rvm/rubies/ruby-2.7.1/lib -Wl,-rpath,/home/brumo/.rvm/rubies/ruby-2.7.1/lib -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic     -Wl,-rpath,'/../lib' -Wl,-rpath,'/../lib' -lruby  -lm   -lc" checked program was: /* begin */ 1: #include "ruby.h" 2:  3: int main(int argc, char **argv) 4: { 5:   return !!argv[argc]; 6: } /* end */  "gcc -E -I/home/brumo/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/x86_64-linux -I/home/brumo/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0/ruby/backward -I/home/brumo/.rvm/rubies/ruby-2.7.1/include/ruby-2.7.0 -I.    -O3 -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable  -fPIC  conftest.c -o conftest.i" conftest.c:3:10: fatal error: libpq-fe.h: No such file or directory     3 | #include <libpq-fe.h>       |          ^~~~~~~~~~~~ compilation terminated. checked program was: /* begin */ 1: #include "ruby.h" 2:  3: #include <libpq-fe.h> /* end */  --------------------  I have reinstalled a bunch of stuff and it doesn't fix anything I basically tried everything I don't know what possibly could be the problem. If the provided information is not sufficient let me know so I can provide whatsoever you may need to help me out.


For example, "drug-free since 2020" - does this mean since the beginning of 2020, or since the end of 2020?


Interesting equation over the naturals with powers

I have an interesting equation over the naturals.  $x^5=y^2+4$  How do I solve it?


This might be a noob question but one just needs to be on the required character level to get the "upgrades" on spells or on the required class levels?  As in eldritch blast upgrades at 5th level character or 5th level warlock?


What happened before the Planck time in the big bang? I have seen a timeline for after the big bang but there is no description of what happened before the Planck time.


Lock Screen With Ads on Samsung Galaxy S5 mini

i've got lock screen, I do not know how I got into the phone, and I do not even know how to fix it, is it a virus? please answer, phone isn't rooted


How to reduce space between two columns under a multicolumn header

I want to make the number and percentage in the last column well aligned to the right in every row. Separating them into two columns is the solution that worked for me because the number and percentage length is not fixed.   I have a very large other table (this is only a small sample) so please try to solve my problem with the way I use (multi columns to separate the number and percentage) without coming with completely new solutions as this way is used in many large tables.   The problem: in my method to achieve the right alignment I want, the space between the number and its percentage is large.   I want to reduce this space (see the red rectangle in the figure below).     The script in ACM conference template (2 columns template):  \documentclass[sigconf]{acmart} \usepackage{amsmath,amssymb,amsfonts} \usepackage{graphicx} \usepackage{xcolor} \usepackage{booktabs} \usepackage{array, makecell}  \usepackage[font={small}]{caption}  \usepackage{multicol}  \usepackage{multirow}  \usepackage{adjustbox}  \usepackage{paralist} \usepackage{mathptmx}  \usepackage[compact]{titlesec} \usepackage{sistyle}  \SIthousandsep{,}  \pagestyle{plain}  \begin{document}  \title{Title}  \begin{abstract} Abstract \end{abstract}  \maketitle \section{Sample}  \begin{table}[!tp]     \centering     \caption{Results}     \label{tab:results}      \begin{adjustbox}{max width=\columnwidth}         \begin{tabular}{llllrr}             \toprule             \thead{Col 1}& \thead{Col 2} & \thead{Col3} &\thead{Col 4} & \multicolumn{2}{r}{\thead{Col 5}} \\             \midrule             \multirow{4}{*}{\texttt{program 1}}&             \multirow{2}{*}{\texttt{dataset 1}} & \multirow{2}{*}{\num{\#\#\#\#\#\#}}              & type 1 & \num{\#\#\#\#\#}&(\#\#.\#\%)\\             \cline{4-6}             & & & type 2  & \num{\#\#\#\#} & (\#\#.\#\#\%)\\              \cline{2-6}              & \multirow{2}{*}{\texttt{dataset 2}} & \multirow{2}{*}{\num{\#\#\#\#}}                 & type 1 & \num{\#\#\#\#}&(\#.\#\%)\\             \cline{4-6}             & & & type 2  & \num{\#\#\#}& (\#\#\.\#\%) \\              \midrule             \multirow{4}{*}{\texttt{program 2}}&             \multirow{2}{*}{\texttt{dataset 1}} & \multirow{2}{*}{\num{\#\#\#}}              & type 1 & \num{\#\#\#}& (\#.\#\%)\\             \cline{4-6}             & & & type 2  & \num{\#\#\#}& (\#.\#\%)\\              \cline{2-6}              & \multirow{2}{*}{\texttt{dataset 2}} & \multirow{2}{*}{\num{\#\#\#}}                   &type 1 & \num{\#\#} & (\#.\#\%)\\             \cline{4-6}             & & & type 2  & \num{\#\#\#\#} & (\#\#\.\#\%) \\             \bottomrule         \end{tabular}     \end{adjustbox} \end{table}  \end{document}   EDIT:   Please note, I just want to reduce the spaces between columns in the last column (which is a multicolumn) (Col 5 in the provided figure).


I've recently started trying to learn C & was doing an exercise that involved creating a recursive factorial function. Why does the following print out an answer of 24?  #include <stdio.h>  int factorial(int n);  int main(void) {     int n = 5;     printf("%d\n", factorial(n));     return 0; }   int factorial(int n) {     if (n <= 1)         return 1;     else         return n * factorial(--n); }   If i change the last line to      return n * factorial(n - 1);   I get the expected 120.  I understand that you can't use n-- b/c it only decreases n after the line is processed but whats wrong with --n & why does it give 24?


Allow all reviewers to see deleted posts they reviewed

So moderators just got . Often, these bans are due to specific very bad reviews, like approving spam or non-answers. It will be common for us to give links to these bad reviews in the ban message that the reviewers will be presented with.  However, many of these reviewers lack the necessary reputation to see deleted posts. If we're banning someone from review for approving spam or non-answers, almost all of the time those posts will be deleted. If we give them links to the reviews they performed, they won't see the now-deleted posts that they approved, and won't have a chance to learn what they did wrong.  As examples of this, I had to actually take a screenshot to show the reviewers  and  the posts that triggered their ban, because they could no longer see them.  I propose that reviewers of any reputation level be able to see posts that they reviewed, even ones that were later deleted, if they are presented with a link to their review. They already saw the post once, so there's no harm in showing it to them again, and reviewers are going to need to see why they made a bad call on a particular review.


What is safer, mysql anti-sqli + xss solution

is this code safe?  $name = htmlspecialchars($mysqli->real_escape_string($_POST["name"]), ENT_QUOTES,"UTF-8");   or should i use this  $name = $mysqli->real_escape_string(htmlspecialchars($_POST["name"], ENT_QUOTES,"UTF-8"));   or it doesn't matter? Thx


Why do these five powerful houses not possess Valyrian Steel Swords?

Back when I asked the question  I didn’t know it would be so important to the current context.     According to the answer there were 13 Valyrian Swords at the beginning of Game of Thrones. The tally now stands at 14 (because Ice was broken into Widow's Wail & Oathkeeper).  A curious thing to note is that the list of which Houses own them doesn’t feature the Martells of Dorne, the Tyrells of Highgarden, the Arryns of the Vale, the Tullys of Riverunn, and most of all the Baratheons of Storms End. These five houses are more powerful & prominent than most of the houses that possess a Valyrian weapon (Tarly, Mormont, Corbray, Harlaw, Celtigar, Hightower, Roxton).     Why don't any of these five powerful houses possess a Valyrian Steel sword?


Problem installing Dolphin-emu, Unmet dependencies

When attempting to install Dolphin-Emu, I have come across a un-met dependences that are preventing the installation. I installed Dolphin-Emu as a PPA, so I could manually install the package. Every time I attempt to install, this is the code that I am using, and the message I get.  $ sudo apt-get install dolphin-emu Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:     The following packages have unmet dependencies:     dolphin-emu : Depends: libstdc++6 (>= 4.9) but 4.8.4-2ubuntu1~14.04 is to be installed E: Unable to correct problems, you have held broken packages.   Any and all help would be appriciated.


Weird shading on mesh after using boolean?

As you can see below, there's some strange, slightly visible shading issues on my mesh. I looked at the normals and they're facing the right way, and I tried using an edge split modifier as well. This started happening after I extruded a circle and used the difference boolean modifier on the mesh. If you know an answer than can help me remove these weird glitches, ty! :)    Edit: Same picture in edit mode.


How would I cut across a plane using a die-like mesh/curve?

I'm in the process of creating a visual model of a product made using 2D CAD software. The .svg which I have imported into blender is the file sent to a laser cutter which would out cut across an acrylic sheet wherever there is a path in order to form the shape.  I was wondering if there is a way of cutting the plane such that the result would be similar to what would be carried out by the laser cutter (imagine the resultant shape being cut out of plane using a knife with runs along the path, if that makes sense)  I've tried to use the Boolean modifier to achieve the effect I am looking for but with limited success. It only seems to cut out a small section of the design for reasons which I do not understand:


If you have an html document that goes like this:

    and I give the "top" div a height of 40px, is there a way to give "rest" div the rest of the height of the body in css. I know it's possible in Javascript like this  function derest(){ var bodyheight = window.getComputedStyle(document.getElementsByTagName('body')[0], null).height;  bodyheight = bodyheight.substring(0, bodyheight.length - 2);  var topheight = window.getComputedStyle(document.getElementById('top'), null).height;  topheight = topheight.substring(0, topheight.length - 2);  restheight = bodyheight - topheight;  document.getElementById("rest").style.height = restheight;  }   but this takes a lot of time, so is there a better way to do this?


What is the difference between "get/got/gotten" and "am/is/was/are/were/be/have or has been" in the (Passive Voice) grammar?  For example:     My computer gets/got/gotten damaged.   and     My computer is/was/has been damaged.   And what about if I mix with them in a sentence? For example:     My computer is got/gotten damaged.   Thanks for reading and being interested of my question :).


"Please do not repeat the mistake" and "Please do not repeat the mistake again"

Please do not repeat the mistake. Please do not repeat the mistake again.  Should the again be omitted? “Repeat” means “do again”. So to “repeat again” means “to do again again”. Is the second sentence grammatically wrong?


Why are Terminals rendered in fixed width blocks

I am trying to understand how terminals work. I am looking at the implementation of Netbeans Terminal plugin. I realize it may not be the ideal candidate but my CPP skills are quite limited. So I figured I'd begin with something I know.   Netbeans Terminal seems assume that a character is one block wide, or atleast that a characters width is in multiples of a block width. (A block here is a just a rectangle with a fixed width & height). If I am not completely wrong Gnome Terminal & Konsole work on similar lines. Needless to say this screws with some fonts, specifically Indic fonts, the fonts of my interest. While, the reason Netbeans was implemented this way could be implementation specific, the real question I am after is why are Terminals implemented in this way in general.  I don't know where to begin, so any reading resources you could suggest would help me a great deal. I did read through TTY demystified, but that doesn't delve in character rendering details.


Hi can anyone help me with css positioning please? I have this layout  And I want the TITLE to be vertically centered, but I don't know how to do it when the higth of its parent can isn't fixed


Why define lightningMessageFields in Lightning Message Service?

I am wondering something. In the XML file of a lightning message channel I can specify lightningMessageFields or I can omit this. Either way messages on the channel function correctly whatever you put into them. Example one with no fields: <LightningMessageChannel xmlns="http://soap.sforce.com/2006/04/metadata">     <masterLabel>TestChannel</masterLabel>     <isExposed>true</isExposed>     <description></description> </LightningMessageChannel>  If i create a payload like this, it works: let message = {request: true}; publish(this.context, TESTCHANNEL, message);  Example two with a field called 'success': <LightningMessageChannel xmlns="http://soap.sforce.com/2006/04/metadata">         <masterLabel>TestChannel</masterLabel>         <isExposed>true</isExposed>         <description></description>         <lightningMessageFields>                <fieldName>success</fieldName>         <description></description>     </lightningMessageFields> </LightningMessageChannel>  The same payload still works: let message = {request: true}; publish(this.context, TESTCHANNEL, message);  So why bother with fields? If any one has any insight into this, Id be very interested. Thanks. Dane


Concatenate video files and add a watermark

I have two different sets of  commands working that I would like to try to combine.  The first command is a basic "concat" command:  ffmpeg -i "concat:file01.mpg|file02.mpg|file03.mpg" -c copy -target pal-dvd newfile.mpg   The second adds a watermark:  ffmpeg -i newfile.mpg -i full_page_watermark.png -filter_complex "overlay=0:0" -target pal-dvd newfilewatermark.mpg   Question:  How would I combine these two commands? Or is it necessary to first create the intermediate file as I am presently doing?


How many solutions does the equation $x_1 + x_2 + x_3 = 11$ have, where $x_1, x_2, x_3$ are nonnegative integers?

Help me understand problems of this type a bit more intuitively.   The solution $C(3+11−1,11)$ seems simple enough, but I got stuck thinking about how many integers you are choosing from within $x_1$, $x_2$, and $x_3$ and I was trying to get an $n$ - as in $C(n+r-1,r)$ - this way. Also, I though the $r$ was 3 since you have $x_1$, $x_2$, $x_3$ choices. Basically, I went wrong at every step. Help!


Cup of water and cup of water with oil on top

the teacher gave me this problem to solve. So i hope you can help me with it. Here is the problem: John poured 150ml ob boiling water in 2 cups made out of polystyrene. Cups are open on the top so heat goes out there. Temperature of the outside air is 20°C. In 1 cup he add 5 mm thick layer of hot oil. He measured starting temperatures and then he measured temperatures again after 10 min. He measured the mass of water and water+oil before and after 10 min.  Here are the resaults:   -cup 1 (only water)  starting temp: 96°C  finnish temp: 64°C  starting mass: 149.4g  finnish mass: 142.42g  -cup 2(with oil on top)  starting temp.: 96°C  finnish temp.:91°C  starting mass: 164.72g  finnish mass: 164.70g  The surface of the both cups is 0.003 m2  Questions: 1.Why did the water covered with oil cooled down slower that the one with no oil? Show with calculations. 2.Why did John use oil with temperature around 100°C and not oil with room temperature? How would the resaults change if he used room temeprature oil? 3. Which other physical values, which are relevant, can you calculate from this informations? Basiccaly i need the physics behing why does this happen.


Character from Harry Potter who gets his "magical powers" late in life?

I stumbled across  from J. K. Rowling the other day while perusing the questions on this site, and came across the following question:     Will there be, or have there been, any "late blooming" students in the school who come into their magic potential as adults, rather than as children? By the way, I loved meeting you, and hearing you speak, when you came to Anderson's in Naperville. I can hardly wait until you tour again.       Ahhh! I loved the event at Anderson's. It was one of my favorites. That is completely true. No, is the answer. In my books, magic almost always shows itself in a person before age 11; however, there is a character who does manage in desperate circumstances to do magic quite late in life, but that is very rare in the world I am writing about.    My question is, which character is J. K. Rowling referring to? I don't seem to recall any characters getting their magical powers late in life (granted, there are characters like Neville whose powers take some time to truly 'mature', but that doesn't sound like what she is referring to).


Ubuntu One Installation error - W:Failed to fetch cdrom://Ubuntu 12.04.2 LTS_Precise

W:Failed to fetch cdrom://Ubunto 12.04.2 LTS_Precise Pangolin_-Release amd64(20130213)/dists/precise/main/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT.apt-get update cannont be used to add new CD-ROMs  W:Failed to fetch cdrom://Ubuntu 12.04.02 LTS_Precise Pangolin_-Release amd64(201302213)/dists/precise/restriced binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT.-get update connot be used to add new CD-ROMs, E:Some index files failed to download they have been ignored, or old ones used instead.   Yes my laptop CD-ROM is not working, and I assume that has something to do with this install not working. I don't want to have to fix my CD-ROM drive to get this to install and my BIOS does not support disabling it...  Any ideas?


Show GML on map (using an example GML file)

How can I show features (from an example file)? I tried many, many ways. This is a different route using a standard GML example file from OpenLayers. Problem : With the shown code example, I don't see any features. There are no error messages. In an Angular / typescript environment I tried also:   let polygonStyle = new Style({   fill: new Fill({     color: "rgba(255, 0, 0, 0.8)"   }),   stroke: new Stroke({     color: "#ffcc33",     width: 10   }) }); let vectorSource = new VectorSource({   format: new WFS({gmlFormat: new GML3() }),   url: 'http://osgis.terragis.net/openlayers/examples/gml/polygon.xml', }); this.vectorLayer = new Vector({   source: vectorSource,   style: [polygonStyle] });  this.map = new Map({   layers: [     new TileLayer({       source: new XYZ({         url: "https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png"       })     }),     this.vectorLayer   ],   view: new View({     center: transform([0.532597, 47.428810], 'EPSG:4326', 'EPSG:3857'),     zoom: 12   }),   target: "map" });


Why my website description and title not showing on google?

When I search my website on google It shows the domain description and title. Why my own title description and domain are not showing?  You can see the second link its show my website description and title but first link is not showing.


Im confused about fire. The way I see it :   Heat creates (kinetic) energy in mass and this creates stronger vibrations of atoms. When those vibrations are strong enough the electrons interact stronger due to electromagnetic forces. This causes the electrons to fly away. This is the creation of a plasma and the direction of most electrons is the direction of the flame. the shape and heat of the flame depends mainly on the amount of electrons and their velocity ( apart from the source of heat and the considered gas and solid material) the electrons move freely ( but not random ) in the flame. there is a chemical reaction going on that usually produces smoke or such. the entropy increases in all the above 6 steps and the process is repeated. the electromagnetic energy is converted into kinetic energy of the electron and conductivity in the plasma (flame). the moving electrons create an electromagnetic field.   That is more or less how I see it. What steps are ok ?  And the main question , why is there light involved ?  I mean why cant we just have kinetic energy of the electrons and a changing magnetic field ? Why are there photons ? If the electrons are in a high energy state why cant they just move faster instead of emitting a photon ???  Why is the light usually visible ? is that because of our structure of air ?  If the light is an electromagnetic wave why does the flame go up ? does that imply all electromagnetic waves go up ?? But electromagnetic waves are not influanced by gravity or buoyancy are they ??  What is the final destiny of the electrons and photons if the heat is gone ??  I am puzzled by this.


C++ inheritance with templates in std::vector

So I have a class Base and a class Derived: public Base.  baseInstance.doSomething() will print Base::doSomething().  derivedInstance.doSomething() will print Derived::doSomething().  Here is the code:  #include "Base.h" #include "Derived.h" #include <vector>  int main(){     Base base;     std::cout<<"Base should do something:\n";     base.doSomething();     Derived derived;     std::cout<<"\nDerived should do something:\n";     derived.doSomething();     std::vector<Base> vec;     vec.push_back(derived);     std::cout<<"\nDerived should do something:\n";     vec[0].doSomething();     return 0; }   Expected output:  Base should do something: Base::doSomething()  Derived should do something: Derived::doSomething()  Derived should do something: Derived::doSomething()   Actual output:  Base should do something: Base::doSomething()  Derived should do something: Derived::doSomething()  Derived should do something: Base::doSomething()   How do I preserve class type in a std::vector?  EDIT: But wouldn't the object slicing leave method implementation alone? And just remove excess fields? And is there a way to circumnavigate this?


Accidentally rm -r /* to my ubuntu cloud server

I've made a huge mistake by running rm -r /* on my ubuntu 16.04. But i managed to cancelled the on going command quickly using ctrl-c. Now all my bash is not working. For example if i type 'ls' in my directory, it will show 'command not found'. it seems that all command is affected and i just can use cd command.   what i found out is that my files at /var/www/html is still intact and not deleted and my web application is still running with minor issues.  I have done the change PATH fix but i found out that my /bin is deleted and my home directory is deleted.  Question 1 : is there any way i can repair my ubuntu 16.04 without losing my files at /var/www/html?  Question 2 : is there any way i can salvage my files at /var/www/html?


Curly brackets in table cell for language manual

I try to make a table for language manual. Could anybody help me to manage curly brackets in the cells of a table?  Like this:    I tried to do it like  but I could't manage it.


How to rename sudoers back to its original naming?

Today I made a big mistake, I run  the command   mv /etc/sudoers{,.bak}   on my ubuntu machine and now sudoers file is missing  This is the message given in terminal wherever I use sudo  sudo: unable to stat /etc/sudoers: No such file or directory sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin   How to make that backup file again back to normal and get back sudo?


How should I budget for ally/third party NPCs in 4e combats?

I've done a few combats recently where the PCs and their enemies were not the only participants in the fight.  I wasn't sure how to budget XP in this case.  In the case of an NPC ally to the PCs, I see two options.     Draw the NPC up as a PC and increase the number of members in the party.    Draw the NPC up as an NPC and take its XP into account when budgeting.   I'm not sure if either option is correct, or if there are others.  But the ambiguity doesn't end there - what about if there's more than one side in the fight and nobody wants to team up?  I'd rather not treat it as one combat budget divided over two factions.  Unless the factions immediately unite, it's going to be an absurdly easy combat.  Would I be better off budgeting for two encounters than happen at the same time, and hoping that no PC gets ganged up on too much?  In general, how is XP budgeting done in complex combats with NPC allies and/or more than two factions?


Prove $\sum_{k= 0}^{n} k \binom{n}{k} = n \cdot 2^{n - 1}$ using the binomial theorem

I'm trying to prove that  \begin{equation} \sum_{k= 0}^{n} k \binom{n}{k} = n \cdot 2^{n - 1} \end{equation}  with the Binomial Theorem.  I know that the B.T. states that  \begin{equation} (x + y)^n =  \sum_{k= 0}^{n} \binom{n}{k} x^{n-k}y^{k}  \end{equation}  The proof that I have tried starts with:  \begin{equation} n \cdot 2^{n-1} =  \end{equation}  Actually I am stucked with this step.


How can keyframes of properties be added to an action?

I tried to add keyframes for the emission value of a material to an action, but couldn't find out how.   Adding keyframes for a object's location works as expected but properties like emission only show up in the Timeline and Curve Editor.  A MaterialAction is created (only visible in the NLA Editor) toggling to edit mode Tab the keyframes are displayed in the time line. This MaterialAction is not accesible from the Action Editor.    EDIT:  Fweebs suggestion to use a driver works unfortunatly only in the 3D-Viewport but not in the BGE. I didn't ask specifically for the BGE because I was hoping for a common solution that works everywhere.      .blendfile


How do I extend the stack trace of an error in JavaScript?

Say I have some code like this:     function a() {     console.log("A is all good");  }  function b() {     console.log("B throws an error");      throw new Error ("I am an error that comes from B");  }  function c() {     console.log("C is all good.");  }   function run() {     try {         a();          b();          c();      } catch(err) {         throw new Error ("An error occur in the run function.");      } }  run();      (Unfortunately Stack Overflow doesn't play very well with stack traces, so my snippet will be a little unclear).  The problem with this code is that when that error throws from run() I lose details of which function it was that cause that error to throw.   How can I include the stack trace of caught error into the thrown error?    Edit: - This question asks specifically about extending an error. While the dupe linked answer provides helpful details - it doesn't contain the specific question (Which I now have an answer for). I'd appreciate reopening the question so I can post my answer.


Cheapest flight/travel from Boston to Los Angeles

How can I find the cheapest flight from Boston to Los Angeles? I am flexible on dates.   Somebody told me they can get a $35 dollar flight on Sprint or other cheap air agencies, from Chicago to Los Angeles. I am trying to find the same thing.  Or, if I can do a part by train/bus and rest by flight but still cheap, that would be wonderful.  Thanks,


How to change language to Turkish but only for terminal

I am using English , but I cannot understand terminal output clearly, so how to change to Turkish only Terminal?  I try  . But I want to Turkish so I add a line  export LANG=tr_TR.utf8 to the end of .bashrc in my home folder. But it does not work