In my MVC project I have a form to upload a file. If I use Google Chrome, Firefox or Opera to upload a file, I get only the file name like Inventory_June_2013.xlsx.   When I use IE8 to upload a file, I get a file name like  C:\Documents and Settings\gornel\My Documents\Inventory_June_2013.xlsx.  How to fix this?  UPD This is my File.cs  using System; using System.ComponentModel.DataAnnotations; namespace Argussite.SupplierService.Core.Domain { public class File : Entity {     public const int ContentTypeLength = 100;     public const int FileNameLength = 100;     public const int StorageNameLength = 100;      protected File()     {}      public File(string name, string contentType, long fileSize)     {         Name = name;         ContentType = contentType;         FileSize = fileSize;         StorageName = Guid.NewGuid().ToString("D");         UploadTime = DateTime.Now;     }      [Required, MaxLength(FileNameLength)]     public string Name { get; set; }      [Required, MaxLength(ContentTypeLength)]     public string ContentType { get; set; }      public long FileSize { get; set; }      [Required, MaxLength(StorageNameLength)]     public string StorageName { get; set; }      public DateTime UploadTime { get; set; } } }   And it's code from controller  public ActionResult UploadFile(Guid eventId, HttpPostedFileBase file)     {         //...         var document = new File(file.FileName, file.ContentType, file.ContentLength);         @event.FileId = document.Id;         @event.ActualDate = document.UploadTime;          Context.Files.Add(document);          file.SaveAs(GetFilePath(document.StorageName));          Register(new DocumentUploadedNotification(@event, @event.DocumentType, document, UrlBuilder));          return RedirectToAction("Details", "Suppliers", new { id = @event.SupplierId });     }   I use class HttpPostedFileBase and property FileName.

When I upload a file to a site using the ASP:File control the FileName property is different in IE and Firefox.  In Firefox, it just provides the name of the file, but IE provides the full path to the file.  I have worked around this by adding the code:  Dim FileName As String = file.FileName If FileName.LastIndexOf("\") > 0 Then     FileName = FileName.Substring(FileName.LastIndexOf("\") + 1) End If   But I'm not sure why that would be different between the different browsers.  Does anyone know the reason for this?  Thanks.


Let G be a group and p and q be primes. Suppose |G| = pq and has only one subgroup of order p and only one subgroup of order q. Prove that G is cyclic.

$G$ is a Group of order $pq$, if $G$ has exactly one subgroup of order $p$ and another with order $q$, then $G$ is cyclic ($p,q$ are prime)  Here's what I have so far, I'm not sure if it is correct.  Let $H, K$ be subgroups of $G$ $|H| = p$  $|K| = q$   We know that by Lagrange's Theorem:  $\forall a \in H : |a|=p$ where $a \neq e$ $\Rightarrow H = <a>$  Similarly: $\forall a \in K : K = <a>$  We also know that: $\forall a \in G : |a| | pq \Rightarrow |a| = p$ or $|a| = q$   $|a| = p \Rightarrow a \in H$ since there is exactly one subgroup of order $p$  $|a| = q \Rightarrow a \in K$ for similar reasons  This means every element in $G$ is either in $H$ or $K$, which are both cyclic. That means $G$ is cyclic.  What am I missing here? Have I made any mistakes and/or is the proof incomplete?


I'm trying to have a simple app that lets you pick some files and does some logic with them. I've created the interface via the JFrame Palette builder incorporated in IntelliJ IDEA.  public class App extends JFrame implements ActionListener { JPanel panelComponent; private JButton buttonFolder; private JTextPane textPane; private JPanel myPanel; private JButton buttonCreatePackage; private JTextField textFieldFolder; private JLabel nameFolderUnderContentLabel; private JButton buttonAdd; private JPanel panelList; private JScrollPane scrollPane; private JPanel consolePanel; private JScrollPane tableScrollPane; private JTable table1;    }  This is how my App class looks, it being the main point of the application. None of the fields are defined with the "new" initialiser, because IntelliJ does this automatically for me, if I click the see the usages of a component (see the following screenshot):   So, I have my App that extends JFrame, my JButtons that are initialised and binded by the IDE, and I start it like this:    public static void main(String[] args) {     SwingUtilities.invokeLater(() -> {             myApp = new App();             myApp.setVisible(true);             control = true;             myApp.initViews();             myApp.document = (StyledDocument) myApp.textPane.getDocument();             myApp.buttonCreatePackage.setEnabled(false);             myApp.documentWriter = new DocumentWriter(myApp.document);             myApp.setContentPane(myApp.myPanel);         worker.execute();     }); }   What happens, inside the initViews method I'm setting listeners, but it throws a NullPointerException. Inside the method it just looks like this:   buttonFolder.addActionListener(e -> {         //code   }  The exception:  Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException  Clicking on the error, it points me to the line where I set the actionListener on the buttonFolder.  My theory is that somehow there's a collision between the initial thread of the app, the EDT thread where the GUI should be done/edited, and the creation of components between them.  I've checked if the initViews is called on the EDT thread, and the answer is yes. I've tried initialising the views in a Swing worker to explicitly force it on the EDT thread, but it did not work. I've also tried postponing the adding of listeners and such for 200-400ms to give the GUI to init, and i've had no success.  Looking forward to any input, Thank you.

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I first ran across this problem in reading William Blake's the Tiger many years ago.  In the first stanza "eye" is obviously meant to rhyme with "symmetry."  Recently I ran across the same jarring rhyme in Andrew Marvell's To His Coy Mistress, the word "try" (line 27) is meant to rhyme with "virginity."  In both cases, in modern American English this is like reconciling a long "i" with a long "e".  I don't buy the explanation that this was just poetic license on the party of either of these poets. I'm sure that in their time they would have not have accepted such a rattling dissonance.  When I learn a poem I read it aloud, but I'm at a loss how to pronounce this. I doubt the answer is either/or, but rather somewhere in between.  Can anybody come up with a likely way of reconciling these two vowels, with an example of how to pronounce it?

First published in Songs of Experience in 1794, the first stanza of the poem “The Tyger” by William Blake is:     Tyger! Tyger! burning bright   In the forests of the night,   What immortal hand or eye   Could frame thy fearful symmetry?   It is easy to guess that  in those years that was the way tiger used to be written.  On the other hand, symmetry  is not a rhyme for  bright, night, eye by today’s  usual pronunciation.  Was it ever a rhyme?


Let $k$ be a field and $\phi: k^*\rightarrow X$ be a morphism to a variety $X$. My questions are: 1.When $X$ quasiprojective, why $\phi$ can be extended to $\bar\phi:\mathbb P^1\rightarrow \overline X$ where $\overline X$ is the closure of $X$ in $\mathbb P^n$? 2.Why $\overline{\phi(k^*)}-\phi(k^*)$ must be equal to $lim_{x\rightarrow 0}\phi(x)$ or $lim_{x\rightarrow\infty}\phi(x)$? (I'm also not really sure where do we take the closure for $\phi(k^*)$. in $X$ or in $\mathbb P^n$?) 3.Why $\phi$ is proper if and only if these limits do not exist in $X$?

EDITED: In the context of defining the Hilbert-Mumford criterion for stability in moduli problems, we need to extend the morphism of varieties $\lambda_x:k^*\rightarrow X$, (where $X$ is a quasi projective variety and $k^*$ is seen as an algebraic group) to a morphism defined in $\mathbb{P}^1$.  We identify $a\in k^*$ with $[1:a]\in\mathbb{P}^1$. So we want to extend the morphism to $[0:1]$ and $[1:0]$. It seems that the extension always exist in this context. The answers I'm finding involucrate schemes and the valuation criterion for properness.  Is there simpler answer in the context of varieties?  Thank you so much.


I have Ubuntu 18.10 installed and I am running out of space. I have unallocated space of 7 GB which I want to add to Ubuntu. Please guide me on how to achieve it.

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


(This question is different and has not any answers in stackoverflow. I tried all of ways) I have a table with this structure. CREATE TABLE IF NOT EXISTS `bank` (   `code` int(4) UNSIGNED NOT NULL DEFAULT '0',   `name` char(30) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8;  And data is this:  I need convert to readable text. (This data is Arabic) I tried many ways and convert to utf8 and anything. But I can't. My .SQL file content: -- phpMyAdmin SQL Dump -- version 4.0.0 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Aug 01, 2020 at 10:53 AM -- Server version: 6.0.0-alpha-community-nt-debug -- PHP Version: 5.6.35  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00";   /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */;  -- -- Database: `banks` --  -- --------------------------------------------------------  -- -- Table structure for table `bank` --  CREATE TABLE IF NOT EXISTS `bank` (   `code` int(4) unsigned NOT NULL DEFAULT '0',   `name` char(30) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1;  -- -- Dumping data for table `bank` --  INSERT INTO `bank` (`code`, `name`) VALUES (1, 'ÂíäÏå'), (2, 'ÇÞÊÕÇÏ äæíä'), (3, 'ÇäÕÇÑ'), (4, 'ÇíÑÇä Òãíä'), (5, 'ÇÑÓíÇä'), (6, 'ÇÓÇÑÇÏ'), (7, 'ÓÊ ÈÇä˜'), (8, 'ÊÌÇÑÊ'), (9, 'ÊæÓÚå ÊÚÇæä'), (10, 'ÊæÓÚå ÕÇÏÑÇÊ ÇíÑÇä'), (11, 'Í˜ãÊ ÇíÑÇäíÇä'), (12, 'ÎÇæÑãíÇäå'), (13, 'Ïí'), (14, 'ÑÓÇáÊ'), (15, 'ÑÝÇå'), (16, 'ÓÇãÇä'), (17, 'Óå'), (18, 'ÓÑãÇíå'), (19, 'ÓíäÇ'), (20, 'ÔåÑ'), (21, 'ÕÇÏÑÇÊ'), (22, 'ÕäÚÊ æ ãÚÏä'), (23, 'ÞæÇãíä'), (24, '˜ÇÑÂÝÑíä'), (25, '˜ÔÇæÑÒí'), (26, 'ÑÏÔÑí'), (28, 'ãáÊ'), (29, 'ãáí'), (30, 'ãÓ˜ä'), (31, 'ãåÑ');  /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;  The above code is my exported SQL file by PHPMyAdmin 4.0. I import this file in my localhost MySQL server and I want to show in a PHP file. But I can't read original content.

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I noticed Python comes with built-in methods such as .upper() or lower() and these two are part of the string object.  "a string".upper() "A STRING".lower()   What confuses me is that some functions are not called on an object, for example the function type  type("a string")   So in this case, is "type" considered a method or just a stand-alone function which is built into the language?

I know that python has a len() function that is used to determine the size of a string, but I was wondering why it's not a method of the string object.  Update  Ok, I realized I was embarrassingly mistaken. __len__() is actually a method of a string object. It just seems weird to see object oriented code in Python using the len function on string objects. Furthermore, it's also weird to see __len__ as the name instead of just len.


Matrix multiplication is defined as:     Let $A$ be a $n \times m$ matrix and $B$ a $m\times p$ matrix, the product $AB$ is defined as a matrix of size $n\times p$ such that $(AB)_i,_j = \sum\limits_{k=1}^mA_i,_kB_k,_j$.   For what good reason did mathematicians define it like this?

If I multiply two numbers, say $3$ and $5$, I know it means add $3$ to itself $5$ times or add $5$ to itself $3$ times.    But If I multiply two matrices, what does it mean ?  I mean I can't think it in terms of repetitive addition.       What is the intuitive way of thinking about multiplication of matrices?


<TextView     android:id="@+id/longitude_val"     android:layout_width="wrap_content"     android:layout_height="14dp"     android:text="Lattitude"     app:layout_constraintBottom_toBottomOf="parent"     app:layout_constraintHorizontal_bias="0.194"     app:layout_constraintLeft_toLeftOf="parent"     app:layout_constraintRight_toRightOf="parent"     app:layout_constraintTop_toTopOf="parent"     app:layout_constraintVertical_bias="0.373" />   Hi I am very confused, why i am getting error on findviewbyId I am doing as following longitude_val=(TextView) longitude_val.findViewById(R.id.longitude_val);


I just noticed that Windows wants to update my network driver (see below).  I do NOT want this update. This driver version was already on my system, and I had to roll back to an earlier version to fix miracast.  How do I get this driver suppressed.... forever?

It seems that the recent Synaptics driver update for Synaptics SMBus TouchPad on Windows 10 (build 100049) somehow doesn't see my middle-button. Uninstalling, and installing an older driver for Windows 8.1 from the HP site (my machine is HP EliteBook 8570w) restores the middle button functionality.    Few days later, the driver updates itself again, and I lose the middle-button.  I realize I'm running unsupported software, but is it possible to prevent updating this particular driver, without either disabling updates altogether or preventing other drivers from updating?


In C# want to do something like this:  StringBuilder strBuilder = new StringBuilder(); strBuilder.append("123");   And then some code  //Outputs 321 (works for any text value)

I've just had to write a string reverse function in C# 2.0 (i.e. LINQ not available) and came up with this:  public string Reverse(string text) {     char[] cArray = text.ToCharArray();     string reverse = String.Empty;     for (int i = cArray.Length - 1; i > -1; i--)     {         reverse += cArray[i];     }     return reverse; }   Personally I'm not crazy about the function and am convinced that there's a better way to do it. Is there?


I am currently attempting to repair a laptop that experiences total system lock ups at random intervals, with a frequency of every few days.  Total lock up here is defined as no response to user input - Ctrl+alt+delete, no task manager, no Alt + F4, no smooth shutdown, display in a frozen state, no recovery if left alone  In this case, I am not asking for suggestions as to the cause, (as much as I appreciate any input offered) - I am asking for general advice in how to identify the cause of freezing, such as tools, logs and programs that may be able to trace the problem.     While the system in question here is a Windows 10 laptop, I believe it may be worth including wider suggestions for other operating systems and their versions, as future readers of this question might benefit from this.

I built a desktop computer a couple years back with the following specs:  CPU: Intel  Yorkfield 2.5GHz 6 MB L2 Cache LGA 775 95W Quad-Core Processor BX80580Q9300 Motherboard:  LGA 775 NVIDIA nForce 680i SLI ATX Intel Motherboard Video Card: Two  GeForce 8600GT SCC 256 MB 128-bit GDDR3 PCI Express x16 SLI Supported Video Card PSU: SeaSonic S12 Energy Plus  ATX12V V2.3 / EPS12V V2.91 SLI Certified CrossFire Ready 80 PLUS Certified Active PFC Power Supply Memory: Two G.SKILL 4 GB (2 x 2 GB) 240-Pin DDR2 SDRAM DDR2 800 (PC2 6400) Dual Channel Kit Desktop Memory   Since its inception, the machine has periodically locked up, the regularity having varied over the years from once a day to once a month. Typically, lockups happen once every few days. By "lockup" I mean my computer just freezes. The screen locks up, I can't move the mouse. Hitting keys on my keyboard that normally turn LEDs on or off on the keyboard (such as Caps Lock) no longer turn the LEDs on or off. If there was music playing at the time of the lockup, noise keeps coming out of the speakers, but it's just the current frequency/note that plays indefinitely. There is no BSOD. When such a lockup occurs I have to do a hard reboot by either turning off the computer or hitting the reset button. I have the most recent version of the NVIDIA hardware drivers, and update them semi-regularly, but that hasn't seemed to help. I am currently using Windows 7 x64, but was previously using Windows Server 2003 x64 and having the same lockup issues. My guess is that it's somehow video driver or motherboard related, but I don't know how to go about diagnosing this problem to narrow down which of the two is the culprit.  Additional information re: cooling Regarding cooling... I've not installed any after-market cooling systems aside from two regular fans I scavenged from an older computer. The fan atop the CPU is the one that shipped with it. One of the two scavenged fans I added it located at the bottom tower of the corner, in an attempt to create some airflow from front to back. The second fan is pointed directly at the two video cards.  SpeedFan installation and readings Per studiohack's suggestion, I installed , which provided the following temperature readings:  GPU: 63C GPU: 65C System: 76C CPU: 64C AUX: 36C Core 0: 78C Core 1: 76C Core 2: 79C Core 3: 79C   Update #3: Another Lockup :-( Well, I had another lockup last night. :-( SpeedFan reported the CPU temp at 38 C when it happened, and there was no spike in temperature leading up to the freeze. One thing I notice is that the freeze seems more likely to happen if I am watching a video. In fact, of the last 5 freezes over the past month, 4 of them have been while watching a video on Flickr. Not necessarily the same video, but a video nevertheless. I don't know if this is just coincidence or if it means anything. (As an aside, each night before bedtime my 2 year old daughter sits on my lap and watches some home videos on Flickr and, in the last month, has learned the phrase, "Uh oh, computer broke.")  Update #4: MemTest86 and 3DMark06 Test Results: Per suggestions in the comments, I ran the MemTest86 overnight and it cycled through the 8 GB of memory 5 times without error. I also ran the 3DMark06 test without a problem (see my scores at ). So... what now? :-) Any further suggestions on what to check? Is there some way to get a stack trace or something when the computer locks like that? Resolution I have never did figure out the particular problems, but based on the suggestions here and elsewhere, I'm presuming it was a motherboard issue. In any event, I recently upgraded my system, buying a new motherbeard, PSU, CPU, and RAM, and that new rig has been working splendidly the past several weeks. I am using the same graphic cards as in the old setup, so I think it's safe to reason that they weren't the cause of the problem.


I'm relatively new in StackOverflow, even though my account is 2 years old, I started actively contributing to site a few months ago.  I'm trying to do my best and while doing it, hoping to learn more than I currently know.  Today, for the first time, most of my answers were serially upvoted by someone/something I don't know.   And felt worried about it, I thought that this will negatively affect my account standing by creating an indication that I used a sockpuppet (I think that's what it's called)  Those reputation bonuses were reversed by the automatic mechanism a few moments ago, however, the upvotes and the "Serial upvoting reversed" event is still visible.   I'm acting incredibly picky while building my reputation anywhere just like any serious minded person would do. Now that "Serial upvoting reversed" message stands there, giving false signals to my profile visitors that I'm cheating rather than working my hands. This is a terrible feeling.  Even though I can't prove it, I never tried to gain reputation by chicanery.  What I would like to know is, if there's a serial upvote incident like that happening, how should we react to it?   Can we file an abuse report to somewhere?

I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause.  During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected".     What does this mean, and what caused it?  Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers?  Is there any way to earn it back?


I am fully aware that there may be many misunderstandings in the following. However, in recent lectures we covered the Schwarzschild solution, and after some interesting mathematics we reached equations for $\frac{dr}{dt}$ and $\frac{dr}{d\tau}$. As far as I know, using the standard coordinates the former of these is the radial velocity of an object as seen in the frame of an observer at infinity, and the latter is the radial velocity in the frame of an object falling into the black hole. These equations could then be integrated, which in the case of $\frac{dr}{dt}$ gave the following solution:  $$\frac{ct}{Rs}\:=\:const.\:-\frac{2}{3}\left(\frac{r}{R_s}\right)^{\frac{3}{2}}-\left(\frac{2r}{R_s}\right)^{\frac{1}{2}}+\ln\left|\frac{\left(\frac{r}{R_s}\right)^{\frac{1}{2}}+1}{\left(\frac{r}{R_s}\right)^{\frac{1}{2}}-1}\right|$$  Giving a relationship between the time taken for the object to fall, as measured by an observer at infinity, and the radial coordinate of the in-falling object. Our lecturer was careful to point out that there is a logarithmic singularity in this relationship as $r \rightarrow R_ s$  - in other words, the in-falling object never reaches the Schwarzschild radius to an outside observer, as it would take an infinite amount of time to do so.   Now, while I think I understand the maths, and also understand that in the frame of the in-falling object, there is no such singularity at $R_s$ and it crosses the event horizon without noticing anything, I am struggling to get my head around how the above equation doesn't have very important consequences.   Say the observer at infinity is us on Earth. If, from Earth, it takes an infinite amount of time for objects to fall into the black hole, how does the mass of a black hole increase to such huge numbers as is found in the centers of galaxies? Surely these supermassive black holes weren't entirely formed at once from some huge star? Does the mass that it gains from in-falling matter just sort of accumulate near the event horizon, and won't this effect start to change the dynamics of the problem dramatically?  Another related problem is how do mergers work if black holes in proximity with each-other should in theory take infinitely long to merge from our perspective? Does the gravitational radiation they release somehow peter out once they get too close for time to pass at any reasonable rate for us? Or are we somehow sure that they really have merged in our frame, and somehow avoided this time singularity entirely?

One thing I know about black holes is that an object gets closer to the event horizon, gravitation time dilation make it move more slower from an outside perspective, so that it looks like it take an infinite amount of time for the object to reach the event horizon. It seems like a similar process should slow the formation of the black hole itself: As the star collapses, its gravitational time dilation make itself collapse more slowly. This make me wonder, are what astronomers claim to be black holes really black holes, or are they stars that progressively make themselves more similar to one without actually reaching the stage of having an event horizon?  EDIT: Contemplating one answer, I realize the question is ambiguous. What does finite time mean in general relativity. Here is a less ambiguous question: Is there a connected solution of 3+1 dimensional general relativity with one space-like slice not have a singularity, and another space-like slice having one.


I don't want a WYSIWYG Markdown editor. I wouldn't mind if the app allows me to edit the file, as long as it renders it separately.  I know that Markdown is easy to read without rendering it but I often want to check to make sure my document looks right before uploading it to GitHub, so it would be nice to have an app to view Markdown documents.

Is there any text editor with support for  () which can be used to write questions or answers while you are offline?


During some code investigating, I found a html submit button like this:  <button class="btn btn-primary">Create new aicraft</button>   I know somewhere there is javascript code that handeles the button click event. How can I find that javascript code?

I have a page where some event listeners are attached to input boxes and select boxes. Is there a way to find out which event listeners are observing a particular DOM node and for what event?  Events are attached using:    Event.observe; DOM's addEventListener; As element attribute element.onclick.


I was studying gravity and from my previous knowledge of circular motion. i know centrifugal forces balance the force so in gravity sun pull giving centripetal force and and inertia gives centrifugal force. so where the case of elliptical orbits arise?

This might be a completely wrong question, but this is bothering me since many days ago. Given the mass (Sun) curves the space around it, gravitation is the result of such curved space (Correct me if I am wrong, source: A Documentary film). Given any point on a circle with center same as center of the mass, curvature in the space should be equal (Intuition).   Planets rotate around the Sun because of the curve in the space they should follow a circular path and the distance between planet and Sun should be at a distance.  Given the fact that earth has a elliptical orbit around the sun, and the distance between Earth and Sun varies according to position of the earth. Why do we have a elliptical orbit not a circular orbit.


Today in my mathematical quantum theory lecture our professor told us without any explanation, that if $f\in L^1(\mathbb{R}) \cap C^1(\mathbb{R})$ and $f'\in L^1(\mathbb{R})$ it follows that $f\in C_{\infty}=\{f\in C(\mathbb{R})\mid \lim_{R\to\infty} \sup_{∣∣x∣∣>R} ∣f(x)∣=0\}$, where we consider $R$ as a radius. Is there an easy way to see that? For me it is not quite obvious. What informations do I get from the conditions that tell me, that this kind of functions are vanishing at infinity?


I'm looking at potentially adding a Stone of Good Luck to my character's possession, but I'm not 100% certain on how it works or if it's worth getting.  The stone's description says:      While this polished agate is on your person, you gain a +1 bonus to   ability checks and saving throws. (DMG p.205)   I am uncertain if this +1 bonus is also applied to all of my skills, or if it is only applied to ability checks.

The Ranger's Favored Enemy feature gives Advantage to Intelligence checks when trying to remember information about your enemy. Does that count when making an Intelligence (History) check, for example?   My instinct says yes, but to my surprise the majority opinion seems to be that it only counts when making pure Intelligence checks.    Are not all skills checks Ability Checks by RAW? Does the Favored Enemy apply when using the skills associated with Intelligence?


Let $R$ be a ring, and let $I, J\subset R$ be two ideals of $R$. Given $n\in \mathbb{N}$, is it true that $(I\cap J)^n=I^n\cap J^n$ ?  I've shown that the inclusion $(I\cap J)^n\subset I^n\cap J^n$ is true, and I'm trying to find a counterexample to the opposite inclusion. I've tried with some rings but I did not find a counterexample.

In  the OP raised the following question:   Let $R$ be a commutative noetherian ring and $\mathfrak p,\mathfrak q \in \operatorname{Spec}(R)$. Is it true that $(\mathfrak p\cap \mathfrak q)^2=\mathfrak p^2 \cap \mathfrak q^2$?  Obviously, we always have $(\mathfrak p\cap \mathfrak q)^2 \subseteq \mathfrak p^2 \cap \mathfrak q^2$ and there is no reason to think that, in general, the converse holds.   What remained unsolved in that topic is to     Give an example of prime ideals $\mathfrak p,\mathfrak q$ (in a noetherian ring) such that $$(\mathfrak p\cap \mathfrak q)^2 \neq \mathfrak p^2 \cap \mathfrak q^2.$$   Edit. It would be nice to have such an example for $R$ a noetherian integral domain.


On my road bike with Shimano RX100 combined brake/shifters I noticed that the shifter for the front chainring no longer clicks and so fails to keep the chain on the shifted-to outer chainring. Instead, it moves back to the inner chain ring. I haven't looked closely yet, but do the symptoms sound familiar to anyone? I am somewhat reluctant to disassemble the shifter.

When it is warm outside my front derailleur works just fine. But when it gets colder (40F) the lever on the handle bar does not catch and I can move it without any resistance the whole way without the derailleur shifting.  Update: The wire is not moving and the shifter is a Shimano Deore.  Any idea what can cause that and how to fix it?


I noticed that  about the change of fonts was once featured in Meta, but now, it seems that it is no longer featured. How long do Meta posts stay featured?  I'm not asking about the technical reason why the post is no longer featured, which is what  is asking about. Instead, what I'm asking is why the SE team chose to remove the  tag from the post and when they remove the tag from posts. Those are not answered there.

I've found that the Meta (moderator only) tag  is automatically  by the  user. So, I want to know when and why is the tag  is removed by this user?  Is there any mechanism for this removal or is there simply a specified time period after which the  is automatically removed by the Community user?


Conservation of energy is, usually, a $\textbf{first order}$ non linear differential equation, generally written as  $$ \frac{m\dot{q}^2}{2} +V(q) = cte. $$  Taking the derivative yields the usual equation of motion.  $$ m\ddot{q} + V'(q) = 0 $$  (The $\dot{q}$ term vanishes.) Which is a $\textbf{second order}$ ODE. Since the non linear term $\dot{q}^2$ vanishes, this is easier to solve. There are hints for a kind of duality between first order and second order equations.  The same system could be described by Lagrange's equations  $$ \frac{d}{dt}\left(\frac{\partial L}{\partial\dot{x}}\right) = \frac{\partial L}{\partial x} $$  or Hamilton's equations,  $$ \frac{dp}{dt} = -\frac{\partial H}{\partial q}\quad ,\quad \frac{dq}{dt} =\frac{\partial H}{\partial p} $$  Again, there is the same hint about duality. Lagrange's equations are second order, and Hamilton's equations are first order. $\textbf{Is this the same duality as before?}$ Or is it a coincidence?

I'm reading a proof about Lagrangian => Hamiltonian and one part of it just doesn't make sense to me.  The Lagrangian is written $L(q, \dot q, t)$, and is convex in $\dot q$, and then the Hamiltonian is defined via the Legendre transform  $$H(p,q,t) = \max_{\dot q} [p \cdot \dot q - L(q, \dot q, t)]$$  Under the right conditions there exists a function $\dot Q (p,q,t)$ such that  $$H(p,q,t) = p \cdot \dot Q(p,q,t) - L(q, \dot Q(p,q,t), t)$$  i.e. when some $\dot Q(p,q,t)$ satisfies $p = \frac{\partial L}{\partial \dot q}\rvert_{(q, \dot Q(p,q,t), t)} = \frac{\partial L}{\partial \dot q}(q, \dot Q(p,q,t), t)$  (Finding this function is usually called "inverting p")  By taking partials in the $p$ variable and using the relationship, we can obtain the relationship  $$\dot Q = \frac{\partial H}{\partial p}$$  Because of the notation I chose, I get the strong urge to say $\dot q = \frac{\partial H}{\partial p}$  , and in fact this is what the textbook does. But have we proved this?    In other words, how can we deduce that  $$q'(t) = \frac{\partial H}{\partial p}(p(t), q'(t), t)$$ for any differentiable vector valued function $q$? (or maybe there are more conditions we need on $q$? Here  $$p(t) = \frac{\partial L}{\partial \dot q}(q(t), q'(t), t)$$ according to Lagrange's equations.


For the past couple of weeks something was installed on my pc. Either a virus or a bloatware that came alongside another software and I did not notice it. It shows custom system tray notifications (not the default windows 10 ones) about software needing update. If I click Update Now Windows will prompt me if I trust the Fast Download Media software.  Where did this software come from? I am unable to find it in the apps settings to uninstall it. How do I remove it?

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


I have created a class library MultipleConfigFiles, which has a method getConfigData. This method reads data from config files.      public class Class1     {       public string getConfigData()       {         string configData = ConfigurationManager.AppSettings["key"].ToString();         return configData;       }     }   Now I have a console application ConsoleAppConfig, in which I have given the reference of the class library.In the main method, I have created a object for the library class and called the method.  static void Main(string[] args)         {             Class1 c = new Class1();             string data = c.getConfigData();             Console.Write(data);             }   This console application has 2 different config files dev.config and prod.config. In the main App.config file , I have used configSource to map the appropriate config file.  <appSettings configSource="dev.config" />   Dev.config file looks like this:  <?xml version="1.0" encoding="utf-8" ?> <appSettings>     <add key="key" value="dev" /> </appSettings>   Till here it is working fine.That is, when I run the console app, the method returns dev.  Now,I have created a MSTest project for this class library.  public class Class1Tests     {         [TestMethod()]         public void getConfigDataTest()         {             Class1 obj = new Class1();             var result = obj.getConfigData();                         }     }   Now the problem is, when I run this test, it throws an error saying "An exception of type 'System.NullReferenceException' occurred in MultipleConfigFiles.dll but was not handled in user code. Additional information: Object reference not set to an instance of an object."  Since the config files are in ConsoleApplication , the method is not able to read the appsetting variables from there. Is there any way I can maintain the configuration files globally so that both of them use individually , or is there any better way to handle this.    Any inputs are appreciated.Thanks.

I am unit testing a .NET application (.exe) that uses an app.config file to load configuration properties.  The unit test application itself does not have an app.config file.    When I try to unit test a method that utilizes any of the configuration properties, they return null.  I'm assuming this is because the unit test application is not going to load in the target application's app.config.  Is there a way to override this or do I have to write a script to copy the contents of the target app.config to a local app.config?     post kind-of asks this question but the author is really looking at it from a different angle than I am.  EDIT: I should mention that I'm using VS08 Team System for my unit tests.


So I need to build dynamically  a set of Actions with a foreach, something like this:  Action<object[]> actions; int index = -1; foreach(var item in itemCollection) {     actionsParametersArray[++index] = aParameter;     actions += x => Console.WriteLine(index);     actions += x => DoAction((int)actionsParametersArray[index]);     actionsParametersArray[++index] = otherParameter;     actions += x => DoOtherAction((MyCustomClass)actionsParametersArray[index]); }   The problem is that when the actions get called they ALL use the last index value, f.i. if there are 10 items in itemCollection, all actions will try to take actionsParametersArray[19] as their parameter.  I thought that I read somewhere that types as int are always passed by value, but it seems that the value are be passed as reference so the last value of index is the only one that are working in all cases. So I supposed that was the error. Therefore, I thought that if I defined a new variable inside the block it will pass the variable to "value":  int parIndex = -1; foreach(var item in itemCollection) {     int index;     actionsParametersArray[++parIndex] = aParameter;     index = parIndex;     actions += x => DoAction((int)actionsParametersArray[index]);     actionsParametersArray[++parIndex] = otherParameter;     index = parIndex;     actions += x => DoOtherAction((MyCustomClass)actionsParametersArray[index]); }   It doesn't work either, it's the same but it just take the last value of one iteration (in this case, the parameter indexes would be 1, 3, 5...).  It only works if I create a new variable for each new Action (I've also read ), which is not the ideal solution, honestly, since I have several iterations and actions per iteration... I'd need a lot of variables.  Are there any other solution to this?

I met an interesting issue about C#. I have code like below.  List<Func<int>> actions = new List<Func<int>>();  int variable = 0; while (variable < 5) {     actions.Add(() => variable * 2);     ++ variable; }  foreach (var act in actions) {     Console.WriteLine(act.Invoke()); }   I expect it to output 0, 2, 4, 6, 8. However, it actually outputs five 10s.  It seems that it is due to all actions referring to one captured variable. As a result, when they get invoked, they all have same output.  Is there a way to work round this limit to have each action instance have its own captured variable?


I am using a template to write my  thesis and I got something like that which is shown in the image when it automatically generates list of figures. How can I fix that? I am also enclosing the part which I believe is the source of problem in the class file.    \newcommand\listoffigures{% \if@twocolumn   \@restonecoltrue\onecolumn \else   \@restonecolfalse \fi \chapter{\listfigurename}% \vspace{10pt}   \@mkboth{\MakeUppercase\listfigurename}%           {\MakeUppercase\listfigurename}% \@starttoc{lof}% \if@restonecol\twocolumn\fi }   All the packages I use is:  \usepackage{subfigure} \usepackage{graphicx} \usepackage{epsfig} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{verbatim} \usepackage{array}  \usepackage{setspace} \usepackage{balance} \usepackage{picins} \usepackage{eqparbox} \usepackage[export]{adjustbox}   There is also something defined like this on the beginning of the latex class file that I am using.    \def\ext@figure{lof}   Please show me which parts do I need to change in order to give some space between figure names and the explanations? I am good at programming but no clue about latex at all. Please state which parts do I need to change clearly.  A working example of the template for thesis can be downloaded from below:    (I have edited the post according to the comments)  Thanks

Following minimal document:  \documentclass{report}  \begin{document} \renewcommand*\thechapter{\Roman{chapter}} \tableofcontents \setcounter{chapter}{6} % Problem starts at chapter 7 \chapter{Seven} \chapter{Eight} \section{Eight-one} \section{Eight-two} \end{document}   yields this output (cut to size for your convenience):    Clearly, the chapter (and section) headings hang into the chapter (section) numbers. For the previous chapter numbers, this isn’t a problem since all chapter titles are aligned to the same column and the numbers I–VI are sufficiently narrow.  (The same happens regardless of document type, I’m actually using scrreprt with the same result.)  How can I prevent this?


Setup: Microsoft SQL Server 2012, and we have 3 production servers(prod1, prod2, prod3) with AlwaysOn.  We recently added a new database and the new database was added to our Availability Group(named SQG01) on servers prod1, prod3.  For whatever reason the new database was not added on prod2.  All other existing databases on prod1,2,3 are all setup and running correctly.  Before adding the new database to the AG on prod2, should I do a restore to "catch up" the new database on prod2 so that it's at least close to the other 2.  We do nightly backups of our production(for restoring to dev/qa environments), so I would use the previous night and it shouldn't miss too many records.  Or should I just add it in and let AlwaysOn sync it up.  I'm not too familiar with AlwaysOn.

I've installed and successfully configured our SQL Server 2012 AlwaysOn 2-node servers for our new "Intranet" that is coming out. I've gotten AlwaysOn working great, and our Front End servers for the Intranet will be using SharePoint 2013. The glitch is that SharePoint 2013 is configured to add databases automatically to our SQL Server 2012 back end, but NOT to AlwaysOn. In reading about this and in contacting Microsoft MSDN support, the default answer is "you must manually find, select, back-up and then add those new databases individually to get them into AlwaysOn."   But wait; that can be quite a task, constantly checking the SQL Server back-end servers to see what databases were created, then having to add them into AlwaysOn, 7/24!   I'm looking for a script or process that will check for new databases, back those new databases up in FULL mode, (for being added to AlwaysOn, of course) then add those databases to AlwaysOn, all automatically. Or have this run every...1-2 hours? (without user intervention)  What I've come up with so far is this script that actually identifies the newly-added databases, (not yet in AlwaysOn), and then backs them up to a shared location. My next task is to find those newly-added databases and through the various processes needed, get them added to AlwaysOn. This will involve some sort of looping action, I imagine. I'm not a T-SQL/scripting guru; is there any solution or script that I might access that would do this? (add databases to AlwaysOn automatically)?   Please advise, I'm sure I'm not the first person to have this issue. I have seen previous posts on various Internet Sites (including this one!) , and the solution is either incorrect, or states something like "sure, go ahead and just script that!". Thanks, but I need just a little more detail there.  Thanks again,   -Allen  DECLARE @name VARCHAR(50) -- database name   DECLARE @path VARCHAR(256) -- path for backup files   DECLARE @fileName VARCHAR(256) -- filename for backup    -- specify database backup directory SET @path = '\\atel-web-be2\backups\'    DECLARE db_cursor CURSOR FOR   select name from sys.databases where group_database_id is null and replica_id is null      and name not in('master','model','msdb','tempdb')  OPEN db_cursor    FETCH NEXT FROM db_cursor INTO @name    WHILE @@FETCH_STATUS = 0    BEGIN        SET @fileName = @path + @name + '.BAK'       BACKUP DATABASE @name TO DISK = @fileName        FETCH NEXT FROM db_cursor INTO @name    END   CLOSE db_cursor    DEALLOCATE db_cursor


If I want to add all of the members who belong to the supplemental group web_users to the apache group (as an additional supplemental group) can I just add web_users group to the apache group?  Or do I have to recurse through the members of web_users and do a usermod -G apache $USER on each one?

I tried finding this on here, but couldn't so sorry if it's a duplicate.  Say I have 2 groups and a user: group1, group2, user1 with the following structure: group1 is a member of group 2, user1 is a member of group1  Now say I have the following files with relevant permissions  file1 root:group1 660 file2 root:group2 660   Now when I log into user1, I'm able to edit file1, but not edit file2. Short of adding user1 to group2, is there any way of doing this? or is there no way?  I'm using Ubuntu btw.


When I parse an empty string from a textview, it says unknown int "" when I already set a conditional if that takes that case. Code as below.   else if (naqaBoolean) {                     int i;                     int durasiHaidh = 24;                     int tempohSebenar = 0;                     for (i = 1; i < 17; i++){                         TextView tvStatus = findViewById(getResources().getIdentifier("status" + i, "id", MainActivity.this.getPackageName()));                         TextView tvTempoh = findViewById(getResources().getIdentifier("tempoh" + i, "id", MainActivity.this.getPackageName()));                         TextView tvMenstruasi = findViewById(getResources().getIdentifier("menstruasi" + i, "id", MainActivity.this.getPackageName()));                         int hariIni = 0;                         String text = (String.valueOf(tvTempoh.getText()));                         if(text == "Seharian"){                             hariIni = 24;                         } else if (text == "-"){                             hariIni = 0;                         } else if (text == ""){                             hariIni = 0;                         } else {                             hariIni = Integer.parseInt((String) tvTempoh.getText());                         }                              tempohSebenar = tempohSebenar + hariIni;                     }                      Toast.makeText(getApplicationContext(), tempohSebenar, Toast.LENGTH_SHORT).show();                 }

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


I bought a new D-Link 3G modem and it said it supports Linux. But after I installed it, I still can't make the device work on Ubuntu 13.10.   I used the .deb file from the D-link modem 3g_modem_connect_DWM156_amd64.deb (from the modem itself) but I was unable to configure it. I searched the Internet, they use dlinkusbmodem.deb file, which is a file from 1 year ago. Even after I dpkg it, I still don't know how to proceed.  I've used every method in the askubuntu, it don't work with this file version.

I am running Ubuntu 13.10, 32-bit.  I had every time need to go terminal to "eject" the windows driver CD,nor gone to disk & eject windows driver CD to make the d-link dwm-156 gsm modem functioning through network manager.  It seems that usb mode switch is not working.  But on my friend's computer with ubuntu 14.04 ,usb mode switch is working and i can connect d-link dwm-156 to mobile broadband through network manager as soon as i get in.  Is there any way to make usb mode switch to eject the windows driver CD of d-link dwm-156 in my ubuntu 13.10,32-bit at start up?   The lsusb output is Bus 002 Device 013: ID 2001:a706 D-Link Corp before ejecting the CD (modem as storage device of windows driver).  The lsusb output is Bus 002 Device 005: ID 2001:7d01 D-Link Corp after ejecting the CD (as modem).   I don't want to use the driver in the CD,as i need to send sms & find the data usage.


Towards the end of the final episode of Game of Thrones Jon is talking with the remaining Starks and says to Bran "I'm sorry I wasn't there for you" but what does he mean? The only time Jon could have done anything to protect Bran was the 'Hold the door' moment and being pushed out if the tower window by Jaime so what was he referencing?

In the Game of Thrones Season 8 finale before leaving for      The Wall (or whatever it is right now)   Jon apologises to Bran and says:     I am sorry I wasn't there when you needed me.   To which Bran replies"     You were exactly where you were supposed to be.   What is Jon apologising for and what does Bran mean exactly?


My server has 62 GB RAM but now i can see only 716 MB RAM is free. Below is the output of free -lh command               total       used       free     shared    buffers     cached Mem:           62G        62G       716M       277M       415M        52G Low:           62G        62G       716M High:           0B         0B         0B -/+ buffers/cache:       9.8G        53G Swap:          15G        16M        15G   From the above output i can see that only 716 MB is free out of 62GB but when i see the process using top -o RES command as shown below(sorted in descending order of RES) only glassfish is consuming 5 GB ram and rest of the other processes are in MB's. if we add up the memory of all this processes then it will not reach to 62GB. My question is then now which processes  are consuming more memory and why the top command is not showing theses processes??  top - 04:20:33 up 5 days, 15:46,  2 users,  load average: 0.00, 0.00, 0.02 Tasks: 272 total,   1 running, 271 sleeping,   0 stopped,   0 zombie %Cpu(s):  0.1 us,  0.1 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st MiB Mem:  64431.17+total, 63715.67+used,  715.496 free,  415.574 buffers MiB Swap: 16380.99+total,   16.984 used, 16364.01+free. 53273.82+cached Mem    PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND 18640 glassfish+20   0 20.284g 5.399g  59.9m S   0.0  8.6  48:56.94 java  2750 h+        20   0 20.294g 954.7m  19.8m S   0.0  1.5   3:06.16 java  7837 h+        20   0 20.294g 899.9m  20.0m S   0.0  1.4   0:20.89 java  2088 tomcat6   20   0 5641.2m 493.9m  20.7m S   0.0  0.8   3:59.54 java  2166 mirth     20   0 6572.8m 375.2m  21.7m S   0.0  0.6   7:26.73 java  1307 oj        20   0 20.670g 308.1m  19.5m S   0.3  0.5  10:28.15 java 31903 postgres  20   0  384.2m  77.4m  76.0m S   0.0  0.1   0:00.25 postgres  1799 rabbitmq  20   0 2167.9m  69.2m   4.0m S   0.7  0.1  47:14.13 beam.smp  6622 postgres  20   0  386.0m  36.8m  34.0m S   0.0  0.1   0:00.50 postgres  1668 postgres  20   0  384.2m  32.7m  31.4m S   0.0  0.1   0:19.87 postgres  2234 h+        20   0  318.3m  23.8m   3.8m S   0.0  0.0   0:17.42 beam.smp  7857 postgres  20   0  385.3m  15.5m  13.2m S   0.0  0.0   0:00.33 postgres 31904 postgres  20   0  384.2m  12.1m  10.7m S   0.0  0.0   0:00.49 postgres  8089 postgres  20   0  385.2m  10.9m   8.9m S   0.0  0.0   0:00.00 postgres  8090 postgres  20   0  385.2m  10.9m   8.9m S   0.0  0.0   0:00.00 postgres  8091 postgres  20   0  385.2m  10.9m   8.9m S   0.0  0.0   0:00.00 postgres  8092 postgres  20   0  385.2m  10.9m   8.9m S   0.0  0.0   0:00.00 postgres  7919 postgres  20   0  385.2m  10.8m   8.8m S   0.0  0.0   0:00.00 postgres  8088 postgres  20   0  385.2m  10.8m   8.8m S   0.0  0.0   0:00.00 postgres  7920 postgres  20   0  385.2m  10.8m   8.8m S   0.0  0.0   0:00.00 postgres  8093 postgres  20   0  385.2m  10.8m   8.8m S   0.0  0.0   0:00.00 postgres  8094 postgres  20   0  385.2m  10.8m   8.8m S   0.0  0.0   0:00.00 postgres   573 syslog    20   0  250.0m  10.3m   2.3m S   0.0  0.0   0:01.98 rsyslogd 31902 postgres  20   0  384.7m   8.0m   6.3m S   0.0  0.0   0:01.63 postgres 31905 postgres  20   0  384.8m   7.3m   5.6m S   0.0  0.0   0:00.23 postgres 16662 root      20   0  103.2m   6.6m   5.5m S   0.0  0.0   0:00.06 sshd  5064 root      20   0  103.2m   6.5m   5.5m S   0.0  0.0   0:00.03 sshd  5301 root      20   0  103.2m   6.5m   5.5m S   0.0  0.0   0:00.01 sshd 20529 root      20   0  103.2m   6.4m   5.4m S   0.0  0.0   0:00.05 sshd 16813 b+        20   0   21.9m   6.4m   3.3m S   0.0  0.0   0:00.19 bash  5380 b+        20   0   21.0m   5.4m   3.2m S   0.0  0.0   0:00.05 bash  1190 root      20   0   59.9m   4.8m   4.7m S   0.0  0.0   0:00.02 sshd 16812 b+        20   0  103.2m   4.7m   3.7m S   0.0  0.0   0:00.29 sshd 20618 b+        20   0  103.2m   4.7m   3.6m S   0.0  0.0   0:00.12 sshd 31906 postgres  20   0  103.5m   4.6m   2.3m S   0.0  0.0   0:00.42 postgres  2340 ntp       20   0   30.7m   4.3m   3.7m S   0.0  0.0   0:23.77 ntpd

The output of free -m is:                       total    used    free    shared  buffers  cached Mem:                  595      482     112         0       63     324 -/+ buffers/cache:              93     501 swap:                   0        0       0   Which value of used memory is correct, 482 or 93?


problem about doing it online , it works  fine in localhost   i have this code  its prints the specific div by div id       function printDiv(divID) {         //Get the HTML of div         var divElements = document.getElementById(divID).innerHTML;          //Get the HTML of whole page         var oldPage = document.body.innerHTML;          //Reset the page's HTML with div's HTML only         document.body.innerHTML ="<title> </title>"+divElements + "";          //Print Page         window.print();          //Restore orignal HTML         document.body.innerHTML = oldPage; }   it works beautiful in my localhost   but when i upload the file to my onlinehost it show like this picture    can someone help me what is the error  ?

How do I print the indicated div (without manually disabling all other content on the page)?  I want to avoid a new preview dialog, so creating a new window with this content is not useful.  The page contains a couple of tables, one of them contains the div I want to print - the table is styled with visual styles for the web, that should not show in print.


Is this possible to have negative number of reputations? What happens if you have zero reputations and someone downvotes one of your asked questions?

On Stack Exchange, users may gain a certain level of reputation.  What does reputation do? How can a user gain or lose reputation?   See also   in the Help Center  - Maximum amount of votes a user can use in a day and reputation requirements to vote.  - How to get an exact overview of the actions that got you your reputation.  - A full list of all privileges granted at each reputation level on all sites.


In Animal Crossing: New Leaf, I woke up Cyrus. But then he went back to sleep! HELP! I went into the shop, and he had woken up! But when I came back, he was sleeping again :( Is something wrong with my game?

Reese's boyfriend seems to constantly be asleep. When I try and talk to him, she warns me that he's been hard at work all night, but I can't actually enter the shop at night.   Is there any way to talk to him or any benefit for doing so? I've tried to talk to him daily for a week (thinking it was something akin to talking to Sable) but I've had no luck. Trying to come in after-hours doesn't work.


I would be traveling to the US on an H1B for the first time next month. My fiancee and I traveled together on B1/B2 a few months back. She has a 10 year valid B1/B2 visa. Therefore we are planning to travel together this time. We are not planning on getting married any time soon. Her plan would be to spend some time and come back in a few months time.   I have read in many forums about the question on "intent to immigrate" at the port of entry. Will it be a problem for us to enter, if she is viewed as planning to stay with me forever. She would be definitely returning back to India.  But I am scared: in case the officer is not convinced, will it lead to problems?  Or am I over thinking the situation?  Please share your suggestions and experiences.  Thanks

How can I prove the immigrant officers that I have significant ties in my home country?  Are there any documents that I need?


I recently updated to Ubuntu 18.04.1. Nautilus file manager has no Nautilus shell icon to allow me to access root files as in the attached pic from . How do I get the Nautilus shell icon, or link, on Nautilus file manager?

On Ubuntu 17.10 there's no longer link to root partition in sidebar, called "Computer" on earlier Ubuntu versions. Is there any way to add "Computer" item to Nautilus sidebar?


I am in the middle of doing this question however have reached an issue. To find maximum power transfer I understand the equation is P=I^2RL However the answer I get is 2.4w the answer should be 50W  The Answer i get for R2 is 15 ohms. Any help would be appreciated

As we know the power equations are P=VI, P=V2/R or P=I2*R.   My question is: how I can increase the power by increasing and decreasing the resistance?  In the formula P=V2/R, if I want to increase the power I have to reduce the resistance value as much as I can, but if I decrease the R in the other formula P=I^2*R the power will decrease.   If we have R= small value in first formula, the power will increase regardless of voltage and the amount of R. In the second formula the power will decrease regardless of current, how?   I hope my question is clear:)


I've started learning Unix (coming from the windows world) and was wondering if I can create other users in the Unix with the same powers as the root user and # on their shell prompts?

I've created a new user by using "User Accounts" in "System Settings". How do I grant rights so that this new user can have the same level of access as root?


I stumbled upon the following statement     Let $p>2$ and let $f$ be an entire function (i.e. holomorphic on the whole $\mathbb{C}$), and assume that $f'-1$ is in $L^p(\mathbb{C})$. Then $f'\equiv 1$   To me, it looks like the author is suggesting a statement of the form:     There exists no integrable, non-zero, entire function.   (as I presume that the $p>2$ doesn't play any role here... Or maybe it does?)  But I cannot seem to find/prove this. The only thing that has come to my mind, which could be helpful, is Liouville's theorem, but this doesn't seem to be enough, as I can think of examples of $C^\infty$ functions that are unbounded and yet integrable. Or maybe Green's theorem for the complex plane?  I must admit, I am not very confident with the subject at the moment, as I had my Complex Analysis class more than two years ago.  Does someone have a solution or a reference for this?  Thank you in advance

Suppose $f$ is entire and    $$\iint_\mathbb{C}|f(z)|^2dxdy < \infty$$Prove that $f\equiv 0.$   So far I have:  Suppose $f$ is bounded.  Then $f$ is constant by virtue of Liouville and so the conclusion is obvious.  Thus, assume $f$ non-bounded.  Then  $$\Big|\iint_\mathbb{C}f^2(z)dA\Big| \leq \iint_\mathbb{C}|f(z)|^2dxdy < \infty$$ We can parameterize \begin{align*} \iint_\mathbb{C}f^2(z)dA &= \int_0^{\infty}\int_0^{2\pi}f^2(re^{i\theta})\;d\theta\;rdr \\ &= \int_0^{\infty}\int_0^{2\pi}f^2(re^{i\theta})\;ire^{i\theta}[-i\frac{1}{r}e^{-i\theta}]d\theta\;rdr \\ &= \int_0^{\infty}\oint_{C_R}f^2(z)\;[-i\frac{1}{z}]dz\;rdr \\ &= \int_0^{\infty}2\pi r dr\frac{1}{2\pi i}\oint_{C_R}\frac{f^2(z)}{z}dz \\ \\ &= 2\pi f^2(0)\int_0^\infty rdr  \end{align*}  Whence f(0) = 0.  And I have no idea where to go from there.  The "entire" bit seems to suggest Liouville but I have already dealt with the bounded case.  Please advise ...


My console is been flooded with rsyslog messages. These are messages that come from a remote server:     Message from syslogd@MSAN-RSPAE_O1A0F at Mar  3 11:07:13 ...  rOT1[291]: 17/03/03 11:07:13 minor alarm occurred for service-id 703 mac-idx 17 (service affecting) : VPLS Duplicate MAC address, mac:00-A0-12-6F-4B-80,dup-port:ntio-1:sfp:7,dup-vlan:703,port:nta:xfp:1,vlan:703,cvlan:0,,   I'am trying to stop these messages to be printed to the console. Already tried changing the config file /etc/rsyslog.conf  #kern.*                                                 /dev/console   to  .*                                                      /dev/null   and restarting the rsyslogd after  sudo service rsyslog restart   Already tried the:  sudo dmesg -n0   And until now, the messages keep appearing in the console of all users.  How to disable them once and for all?

I'm using Centos 6, rsyslog logging. Console is flooded with kernel messages.  Klogd is not running (I'm using rsyslog) Rsyslog config does not direct anything to the console Even tried stopping rsyslog altogether  Still something is flooding my console with kernel log messages. What it is and how do I make it stop? Update: These are the messages generated by the kernel (hardware, iptables, etc.), stuff that goes out of /proc/kmsg, like this:  Shorewall:pub2loc:DROP:IN=br0 OUT= MAC=xxx SRC=xxx DST=xxx LEN=60 TOS=0x00 PREC=0x00 TTL=128 ID=15731 DF PROTO=TCP SPT=63767 DPT=3493 WINDOW=8192 RES=0x00 SYN URGP=0


For a customer I would like to implement SPF for a lot of domains they own, but most of the IP's are the same. I would like to create something like for example Google, so I can use the include: record : _spf.google.com ~all  What to do to make this work right?

This is a  about setting up .     I have an office with many computers that share a single external ip (I'm unsure if the address is static or dynamic). Each computer connects to our mail server via IMAP using outlook. Email is sent and received by those computers, and some users send and receive email on their mobile phones as well.  I am using  to generate an SPF record and I'm unsure about some of the fields in the wizard, specifically:   Enter any other domains who may send or relay mail for this domain Enter any IP addresses in CIDR format for netblocks that originate or relay mail for this domain Enter any other hosts which can send or relay mail for this domain How stringent should SPF-aware MTA's treat this?   the first few questions i'm fairly certain about... hope i have given enough info.


Let  $Q$ be the quaternion group where $|\operatorname{Aut}(Q)|=24$ and consists of elements  $\phi$ with $\phi(i)\in \left \{ \pm i, \pm j,\pm k \right \}$ and  $\phi(j)\in \left \{ \pm i, \pm j,\pm k \right \}\setminus \left \{ \pm\phi(i)\right \}$.  Prove that $\operatorname{Aut}(Q)$ contains no element of order $6$, and so $\operatorname{Aut}(Q)\simeq S_{4}$.  Any help is appreciated.  I have seen the other posts, but I am not sure how to approach this proof showing $\operatorname{Aut}(Q)$ contains no element of order $6$, then to conclude that it is isomorphic to $S_4$. There is a link in another post, that refers to no element of order $6$, but unable to be accessed.

Let $Q_8$ be the quaternion group. How do we determine the automorphism group $Aut(Q_8)$ of $Q_8$ algebraically? I searched for this problem on internet. I found some geometric proofs that $Aut(Q_8)$ is isomorphic to the rotation group of a cube, hence it is isomorphic to the symmetric group $S_4$. I would like to know an algebraic proof that $Aut(Q_8)$ is isomorphic to $S_4$.


Please help with this contradiction.   $e^{i\pi}=-1$ $e^{i2\pi}=1$ $\ln(1)=i2\pi$ $0=i2\pi$

What's wrong with this : $$e^{i\pi} = -1$$ $$\therefore e^{2i\pi} = 1$$ $$\therefore \log \left( e^{2i\pi} \right ) = \log(1) = 0$$ $$\therefore 2i\pi = 0$$


I'm using the below code to split a string based on spaces, unless that space happens inside quotation marks. How can I remove the quotation marks from the final result?  var txt = "PROGRAM \"My ETABS\" VERSION \"9.7.4\"";  string[] split = Regex.Matches(txt, "(\\w+|\".*?\")")                       .Cast<Match>()                       .Select(m => m.Value)                       .ToArray();   Now I have this:  PROGRAM "My ETABS" VERSION "9.7.4"   But I want this:  PROGRAM   My ETABS VERSION  9.7.4

I would like to use the .Net Regex.Split method to split this input string into an array. It must split on whitespace unless it is enclosed in a quote.  Input:  Here is "my string"    it has "six  matches"  Expected output:   Here is my string it has six  matches   What pattern do I need? Also do I need to specify any RegexOptions?


I have an interesting question. I have class model:  class Patient(models.Model):     separation = models.ForeignKey(Separation, blank=True,                                    null=True, default=None)     number_card = models.IntegerField(default=0)   I can write:  patient = Patient() patient.name = 'Saney'   But what should I do if I don't know what property I must changed. For example, the name of property what must changed come in the variable " property='name' ". But if I write next code:  patient.property = 'Saney'   python doesn't understand that I mean that I want write 'Saney' into patient.name and not to patient.property. And when I try to testing some thing, for example:   patient.'name'= 'Saney'   python of course gave an error...)

Suppose I have a python object x and a string s, how do I set the attribute s on x? So:  >>> x = SomeObject() >>> attr = 'myAttr' >>> # magic goes here >>> x.myAttr 'magic'   What's the magic? The goal of this, incidentally, is to cache calls to x.__getattr__().


As the title says,  I would like detecting right clicks.  I have already tried spawning a slime that teleports to the player's head but I don't know how I would build the syntax. How can I do this?

Is there a way so that I make make it when I left click/right click with a certain item it applies an effect? I know that you can apply attributes to wearing armor and things but I want it so when you use the item it applies an effect on your player.  For example, let's say I want something so that when I right click with a certain item (let's say an iron ingot that was given to me) I'll then have a jump boost for 10 seconds. So kinda like a potion in a way.  Is this possible with command blocks/commands/any mods?


Let $V$ be an inner product space over $\mathbb{R}$ or $\mathbb{C}$, and let $e_1, e_2, \dots, e_n$ be a collection of vectors in $V$, not necessarily orthonormal. (Here, $n$ has nothing to do with the dimension of $V$.) Let $\langle\cdot,\cdot\rangle$ denote the inner product in $V$, and form the $n \times n$ matrix $A$ with entries $\langle e_i, e_j\rangle$ (where $i, j = 1, \dots, n$). Are the vectors $e_i$ linearly independent if and only if the matrix $A$ is nonsingular?   My thoughts on the problem so far. Let $F$ be $\mathbb{R}$ or $\mathbb{C}$ and $f$ the linear map $F^n \to V$ which sends the $i$th standard basis vector to $e_i$. I want to show that, if $v \in F^n$ is nonzero, then $Av$ is nonzero. I've observed that $v^t Av = \langle f(v), f(v)\rangle$ (which is positive). But I don't know what to do next. Can someone help me out?

Given a set of vectors $v_1 \cdots v_n$, the $n\times n$ Gram matrix $G$ is defined as $G_{i,j}=v_i \cdot v_j$  Due to symmetry in the dot product, $G$ is Hermitian.  I'm trying to remember why $|G|=0$ iff the set of vectors are not linearly independent.


Trying to learn Apex and i'm stuck with triggers. I have three objects:  Jet__c and field Total_flied_hours_on_jet__c; Customer__c and field Total_Flied_Hours__c; Booking__c - Junction object and field  Status__c;  I want to whrite a triger when we creating a record on Booking__c, automatically set booking Status__c if Customer__с.Total_Flied_Hours__c >= Jet__c.Total_flied_hours_on_jet__c. My Trigger: trigger BookingTrigger on Booking__c (before insert) {     if(Trigger.isBefore){         if(Trigger.isInsert){             BookingTriggerHendler.bookingApproval (Trigger.new);         }     } }  My Booking Trigger Hendler: public class BookingTriggerHendler {      public static void bookingApproval (List<Booking__c> newList) {         for(Booking__c bookingStatus : newList){             if(bookingStatus.Customer__r.Total_Flied_Hours__c >= bookingStatus.Jet__r.Total_flied_hours_on_jet__c) {                 bookingStatus.Status__c = 'Automatically Approved';             }         } }  I dont know how to get record Ids, and put them in to the map <Id , sObject>. Pls help me

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, navigate to the  tag. This question and answer is owned by the community! If you can improve it and make it more useful, you're welcome to edit it. I am building a trigger, a unit test, or other Apex code. I'm working with sObject records, and trying to access related record information. For example, I might have a structure like this: Account a = new Account(Name = 'Test'); insert a;  Opportunity o = new Opportunity(Name = 'Donation', AccountId = a.Id); insert o;  System.assertEquals(o.Account.Name, 'Test', 'Correct Account associated'); // Assertion fails!  Or, in a trigger, I might be aiming for something like this: trigger ContactTrigger on Contact (after insert) {     for (Contact c : Trigger.new) {         if (c.Account.Name == 'Test') {             // Take some action here         }      } }  Why doesn't this work? Why am I getting null values, or NullPointerExceptions?


I'm trying to set a shell variable to $PWD - the path from were the script is executed. This is what I have, setenv.sh:  #!/bin/bash export WORK_AREA=$PWD      #also tried "$PWD", $(pwd), `pwd`   But when I run from the shell  > ./setenv.sh > echo $WORK_AREA   WORK_AREA has no value

I have multiple Amazon EC2 accounts and want to quickly be able to switch variables, such as $EC2_HOME, using a script.  I have have a shell script set up like this:  #!/bin/sh export EC2_HOME=/home/me/.ec2 echo $EC2_HOME   When I run the script I know that EC2_HOME is set, but I thought that using export would make the variable stick around after the script completed. It does not, as running echo $EC_HOME does not show anything.  I know this must be very rudimentary Linux scripting knowledge, but I don't know it. I tried looking for related questions without luck - so my apologies if this is a duplicate.


I watched Avengers : AoU and there was this scene where Scarlet Witch messes up Thor's mind. So after few scenes he finds Erik Selvig and they go inside a cave where they find a pool. Thor baths in this pool and starts sending out electric bolts and the images of bad dreams that Scarlet Witch gave, start appearing. What was this scene all about? What was this pool made of? How did Erik Selvig know about it.  I assume it was some anomaly that occurs where various realms meet as shown in Thor 2.

In Avengers: Age of Ultron,      Thor jumped into Water of Sight to re-visit his dream. They talked something like that the pool is on every planet (or, every realm) which shows reflection of some light.   What exactly is Water of Sight? Anything from comics?


Ok, so I'm kinda new to Linux but can usually problem solve and fix these things on my own. This time... yeah, I'm going to need some help. I've been trying for a while now and have looked at many different pages trying to fix this small problem. So, I've tried using blueman but have failed to get them to pair. I also tried to do "ControllerMode = dual" and the other options there but have gone nowhere. I also tried to do it through bluetoothctl and have gotten nowhere either. I can provide my system info if needed. Laptop Model: Alienware 14 p39g001 Thanks for any help!

With ubuntu 19.10 I have been attempting to pair my Airpods with my laptop. There seems to be a problem with pairing and system is unable to add them as Bluetooth device. This happened after an upgrade from 19.04. Changing ControllerMode in /etc/bluetooth/main.conf seems to have no affect. Any help appreciated.


Feynman diagram explains repulsion of electrons by means of photon exchange. Similarly can we explain repulsion of protons and attractions between protons and electrons?

Since Newton's law of gravitation can be gotten out of Einstein's field equatons as an approximation, I was wondering whether the same applies for the electromagnetic force being the exchange of photons. Is there an equation governing the force from the exchange of photons? Are there any links which would show how the Coulomb force comes out of the equations for photon exchange? I know that my question is somewhat similar to the one posted here , but it doesn't really have an answer to my question specifically.


I am looking for an example of non-commutative rings $A$ such that $A^2 \cong A$ as left $A$-modules.  I am thinking about the simplest non-commutative ring $A=GL_n(\Bbb R)$ for $1 < n \in \Bbb Z_+$, could we find a suitable subspace of $A$?  Thank you for your help.

I was reviewing my homework and it seems I overlooked something crucial while proving some ring has no Invariant Basis Number property. This is exercise VI.1.12 in Aluffi's Algebra: Chapter 0  The setup: $V$ is a $k$-vector space and let $R = \mathrm{End}_{k}(V)$.   Prove that $\mathrm{End}_{k}(V\oplus V) \cong R^4$ as an $R$-module Prove that $R$ doesn't satisfy the IBN property if $V = k^{\oplus \mathbb N}$.   For the first, I used to the fact that $V \oplus V$ is both the product and coproduct (in $k$-Vect) of $V$ with itself to get the isomorphism. What I just realized is I only showed that the two are isomorphic as groups not $R$-modules. So what would be the $R$-module structure on $\mathrm{End}_{k}(V \oplus V)$?   For the second, I used the fact that $V = k^{\oplus \mathbb N}$ implies $V \cong V \oplus V$ which in turn implies $R = \mathrm{End}_{k}(V) \cong \mathrm{End}_{k}(V \oplus V)$. Again, I just realized that I only showed the latter two are isomorphic as groups.   It may be obvious (and maybe why my professor let it pass?) but I can't come up with a good $R$-module structure that makes the two group isomorphisms $R$-linear.  Edit:  Explicitly, these are the isomorphisms I'm dealing with. Let $\pi_j, i_j$ be the natural projection/inclusion maps of the $j$-th factor resp. and $\psi: k^{\oplus \mathbb N} \oplus k^{\oplus \mathbb N} \to k^{\oplus \mathbb N}$ the isomorphism given by $\psi(e_i, 0)=e_{2i-1}$ and $\psi(0, e_i)=e_{2i}$.  Then the first isomorphism $\mathrm{End}_k(V \oplus V)\to R^4$ is given by $\varphi \mapsto (\pi_1\varphi i_1,\pi_2\varphi i_1,\pi_1\varphi i_2,\pi_2\varphi i_2)$  The second isomorphism $R \to \mathrm{End}_k(V \oplus V)$ is given by $\alpha \mapsto \psi^{-1} \alpha \psi$  The composition doesn't seem to be $R$-linear if I use the obvious $R$-module structure on $R$ and $R^4$.


I'm preparing for an exam, and I have come over the following problem: I have the function f, where C is a complex number $$f: C \to C,$$  $$z=a+bi \mapsto f(z)=a+i(a+b)$$  Is the function of the form $f(z) = z·w$, where $w$ does not depend on $z$?  I have written $w=c+di$, which gives $z·w=(ac-bd)+ (bc+ad)i$. This gives us two equations, namely: $$ac-bd=a$$ and $$bc+ad=a+b$$  I tried solving this system of linear equations for $c$ and $d$, and ended up with $c=d=1$. Seeing as this does not hold for any z, I concluded with the answer 'no', to the question asked in this task. My teacher, however, concludes with the opposite, using the following logic:  In his solution, my teacher ends up with the same system of linear equations as I did in my post. From there he says that the system has a unique solution if and only if the determinant of the matrix $$ \begin{matrix}a&-b\\b&a\end{matrix}$$ is non-zero. That is $a^2+b^2 \neq 0$.Then he says: But if $a^2+b^2=0 \Rightarrow a=b=0 \Rightarrow f(z) = 0 = 0 · w$ Hence the answer to the question must be 'yes'. If anyone could help me understand what is meant, I would greatly appreciate it.  Please let me know if something was unclear, or if I should explain more clearly what I have done. Thank you in advance!

I'm preparing for an exam, and I have come over the following problem: I have the function $f$, where C is a set of complex numbers $$f: C \to C,$$  $$z=a+bi \mapsto f(z)=a+i(a+b)$$  Is the function of the form $f(z) = z + w$, where $w$ does not depend on $z$? Is it of the form $z\cdot w$ (where $w$ does not depend on $z$)?  For the first part, my answer is 'no', seeing as $w=ai$ for the identity to hold, and it is then clear that $w$ depends on $z$. My teacher's solution says the same thing, but that the answer to the question is 'yes'. Am i wrong, or is my teacher wrong?  For the second part of the exercise: I have written $w=c+di$, which gives $z·w=(ac-bd)+ (bc+ad)i$. This gives us two equations, namely: $$ac-bd=a$$ and $$bc+ad=a+b$$  I tried solving this system of linear equations for $c$ and $d$, and ended up with $c=d=1$. However this only holds if $b=0$. I am a bit stuck, and can't really see clearly how to proceed, or how to come to a general conclusion.  Please let me know if something was unclear, or if I should explain more clearly what I have done. Thank you in advance!  EDIT (included my teacher's answer, which I do not understand):  In his solution, my teacher ends up with the same system of linear equations as I did in my post. From there he says that the system has a unique solution if and only if the determinant of the matrix $$ \begin{matrix}a&-b\\a&b\end{matrix}$$ is non-zero. That is $a^2+b^2 \neq 0$.Then he says: But if $a^2+b^2=0 \Rightarrow a=b=0 \Rightarrow f(z) = 0 = 0 · w$ Hence the answer to the question must be 'yes'. If anyone could help me understand what is meant, I would greatly appreciate it. NB: There is a possibility that my teacher has read the task wrong, and therefore answers 'yes' when the answer to both questions is 'no'.


Basically, I was a student at University Y when I wrote a paper. I am no longer a student there, but work at Company Z.   Do I still list University Y as my institutional affiliation? Their resources helped make the paper possible and all of it was written at University Y.   But on the other hand, I am currently working at Company Z.

I am moving from one job to another (postdoc to tenure track) this summer and I have papers in several stages of being written, these go from handwritten notes with all the necessary arguments to under revision at a journal. All the papers will have my new contact information put on them but where is the line for changing affiliation? It seems obvious to me that the one that is still in the handwritten notes stage will get the new affiliation and that the ones under revision won't. So somewhere in between is a line.   Where is it?  There are some similar questions so far (see  and  but they do not seem to be quite the same situation since I am not changing fields and the appointments are not concurrent.


this is my first time using Ubuntu 14.04 version.  I'm not sure what I've done, but I can't shut down my laptop. But if I log in as the guest, then it will shut down if I press the button and I'm not getting used to terminal. How can I solve the problem?

I recently upgraded from Ubuntu 11.10 to 12.04. If it makes any difference, my system is a Dell Inspiron 1520.   I encounter a problem whenever I shutdown or restart; it kills all running processes (as far as I can tell), but once I get past the shutdown text screen and the screen goes black,  my computer doesn't power off. The fans still run and the screen is still on, etc. I have to hold down the power button in order to complety shut down.   Does anyone know how to resolve this problem?


I'm searching for a RegExp that finds {}  I was under the understanding that this:  /[{}]{2}/g;     regexpression finds: {} and only the brackets if they stand exactly like that next to each other. I'm doing some code that makes me believe that I misunderstood that.    I now have this line: {{x,y},{0.0,1.0},{0.2,1.2214},{0.4,1.49182},{0.6,1.82212},{0.8,2.22554},{1.0,2.71828}}  And it becomes: { }x,y},{0.0,1.0},{0.2,1.2214},{0.4,1.49182},{0.6,1.82212},{0.8,2.22554},{1.0,2.71828{ }  That wasn't what I wanted, the above line should not be influenced by my regexp, because nowhere there is a "{}".   +++  ok so i misunderstood, How to do a rexeprexstion that ONLY findes "{}" when they stand exactly like that, no space between them, } comes after { ???

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


After purging the fglrx* packages, I tried this -  ankit@ubuntu:~$ sudo apt-get install --reinstall xserver-xorg-core libgl1-mesa-glx:i386 libgl1-mesa-dri:i386 libgl1-mesa-glx:amd64 libgl1-mesa-dri:amd64 Reading package lists... Done Building dependency tree        Reading state information... Done Reinstallation of libgl1-mesa-glx is not possible, it cannot be downloaded. Reinstallation of libgl1-mesa-glx:i386 is not possible, it cannot be downloaded. 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:  libgl1-mesa-dri:i386 : Depends: libdrm-intel1:i386 (>= 2.4.48) but it is not going to be installed                         Depends: libdrm-nouveau2:i386 (>= 2.4.38) but it is not going to be installed                         Depends: libdrm-radeon1:i386 (>= 2.4.31) but it is not going to be installed E: Unable to correct problems, you have held broken packages.   Any solution around this?

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I have never encountered measure theory or manifolds yet, despite being close to my third year university level. Any texts for either or both of these subjects would be greatly appreciated.

I would like to teach myself measure theory and I am looking for a good introductory textbook at the advanced undergraduate or early graduate level. A reader-friendly text with plenty of examples would be ideal.


I know of a few web-based apps that allow you to make tables, but they're all a bit clunky. Does anybody know of an app you can download that allows you to draw/edit tables and easily copy-paste code into latex?  Or, are there any other recommendations for the best way to draw a table for latex?

Manually hacking tables in LaTeX is one of the less funny things when preparing a document. Naturally, there are quite a few tools that promise to simplify this. In fact, I have somewhat lost track of all the tools available, and I'd like to gather your valuable experience into one big post. Some of the tools are mentioned in , but I feel there's much more around.  I'd suggest that somebody starts an overview with an alphabetic list (so that I can accept this answer and it stays on top), and that everyone replies with a "community wiki" entry, one reply per tool, and inserts the tool into the list.  Personally, I use Excel2LaTeX, but I'm unhappy with having to fire up Windows in order to generate the LaTeX code. I'm thinking of a rewrite as a standalone Python tool using the xlrd library, but I'm not too inclined to reinvent the wheel.


I have a movie named Con Man. Apparently, in Windows, you cannot have a file name with the name CON in it.  Can anyone please help me delete it?  It is stored in F:\Movies\Con Man The name of the file that I want to delete is Con.Man.2018.720p.WEBRip.x264-[YTS.AM]  I know there are a lot of similar issues but I am not able to apply them that is why posting here.  Thankyou  PS :: I am a noob!  Edit: Found this on the internet but cant work it out

Possible Duplicate:          I tried crating a folder with the name CON in Windows, but I couldn't crate it in any of the hard drives.   What could be the reason? Is it possible to create such a folder?


I am using MS SQL Server.  I have a table of students like this:  StudentID,Teacher 123,Adams 124,Adams 125,Johnson 126,Johnson 127,Adams 128,Marks   I need to have output that looks like this:  Teacher,Students Adams,123|124|127 Johnson,125|126 Marks,128   I appreciate your help. Thank you.

How do I get:  id       Name       Value 1          A          4 1          B          8 2          C          9   to  id          Column 1          A:4, B:8 2          C:9


In previous versions of OS X, you could remove the name from the menu bar. I can no longer find the option for this in the Users & Groups window in System Preferences.     Searching Google and even this site hasn't provided any answers, so how do you do it?

After the 10.7.5 update to Lion, I'm getting my name to appear in the menu bar. I don't particularly like it there. Any way to remove it?


How to disprove, if $f$ is a function,  $f(A \cap B) != f(A) \cap f(B)?$

Is this proof correct? To prove $F(A)\cap F(B)\subseteq F(A\cap B)  $ for all functions $F$.  Let any number $y\in F(A)\cap F(B)$. We want to show $y\in F(A\cap B).$ Therefore, $y\in F(A)$ and $y\in F(B)$, by definition of intersection. By definition of inverse, $y=F(x)$ for some $x\in A$ and $x\in B$ And so, $y=F(x)$ for some $x\in A\cap B$ And therefore, $y\in F(A\cap B)$  I have a gut feeling deep down that something is wrong. Can anyone help me pinpoint the mistake? I am not sure why am I having so much problems with functions. Am I not thinking in the right direction? Sources : 2nd Ed, P219 9.60 = 3rd Ed, P235 9.12, 9.29 - Mathematical Proofs, by Gary Chartrand, P214 Theorem 12.4 - Book of Proof, by Richard Hammack, P257-258 - How to Prove It, by D Velleman.


I'm using \usepackage[style=verbose-ibid,backend=bibtex]{biblatex} to format my references with \footcite{} for the in text references, while also separating my chapters into individual tex files by using \include{ChapterName} in the main tex document.   However, I find that the footnotes seem to reset whever I start a new chapter; references in the first chapter are 1, 2, 3... but in the second chapter it also starts again from 1. I would like the numbering to be continuous, resuming from the last number in the previous chapter.   The other aspects I'm okay with, such as a shortened reference when referring to a reference that was referred to earlier in the document, and ibid when referring to the same reference again on the same page. Just the numbering should be continuous.   What would I need to add to the preamble for it to work like this?  Edit: My question was thought to be a duplicate of  . Instead, my question is the opposite - I want numbering to be continuous throughout the whole report, with chapters resuming the numbering from the previous chapter.   Edit 2: Here's a MWE:  \documentclass{MastersDoctoralThesis} \usepackage{style=verbose-ibid,backend=bibtex}[biblatex] \addbibresource{Bibliography.bib} \begin{document} \mainmatter \include{Chapter1} \include{Chapter2} \end{document}   The auxillary file contents are as follows:  Bibliography.bib:  @Article{gillies,   author = {Gillies, Alexander},   title = {Herder and the Preparation of Goethe's Idea of World Literature},   journaltitle = {Publications of the English Goethe Society},   volume = {9},   date = {1933},   pages = {46--67}} @Article{bertram,   author = {Bertram, Aaron and Wentworth, Richard},   title = {Gromov invariants for holomorphic maps on Riemann surfaces},   journaltitle = {J.~Amer. Math. Soc.},   volume = {9},   number = {2},   date = {1996},   pages = {529--571}}   Chapter1.tex:  Sample text\footcite{gillies}.   Chapter2.tex:  Some more\footcite{gillies} sample\footcite{bertram} text.

I would like footnote numbering to continue over pages and chapters. In my document it's reset every chapter. I'm using the report documentclass.


Let $f(x)$ be a continuous function on $x\in[a, b]$. Let:   $$ m(x) = \min_{t\in[a, x]}f(t)\\ M(x) = \max_{t\in[a,x]}f(t) $$   Prove both $m(x)$ and $M(x)$ are continuous.   This statement seems so obvious, but I was not able to write down a formal proof.   There is a couple of trivial facts I've figured out so far. First by definition of $\min x$ we know it is monotonically decreasing. Also $f(x)$ is bounded and by Bolzano-Weierstrass there exists $x_0\in[a,b]$ such that: $$ f(x_0) = \inf_{[a, b]}f $$  So we might only consider the interval $[a, x_0]$, because $m(x)$ is going to be constant for $x \ge x_0$. Similar facts are true for $M(x)$.  I've also been playing around with the following inequalities without any success: $$ \min_{x\in[a,b]} f(x) \le \min_{t\in[a, x]} f(t) \le f(x) \le \max_{t\in[a, x]} f(t) \le \max_{x\in[a,b]} f(x) $$  What would be a way to prove the statement?

A problem that I have been thinking: For what kind of functions $f:[a,b]\to \mathbb R$ is  $x\mapsto\sup_{t\in [a,x]}f(t)$ continuous? This is not true for bounded functions, take for example $f(x)=0$ in $[0,1]$ and $f(x)=1$ in $(1,2]$. It is however trivially true for continuous monotone functions. Assuming mere continuity for $f$ I can show right continuity of $\max_{t\in[a,x]}f(t)$:   For $\epsilon$ and some $\delta>0$,  $$x\in [x_0-\delta,x_0+\delta]\implies f(x_0)-\epsilon<f(x)<f(x_0)+\epsilon$$ If $x\in [x_0,x_0+\delta]$ then $$\max_{t\in [a,x]}f(t)=\max\left\{\max_{t\in [a,x_0]}f(t),\max_{t\in [x_0,x]}f(t)\right\}$$ If $max_{t\in [a,x_0]}f(t)\ge \max_{t\in [x_0,x]}f(t)$ then $$\left|\max_{t\in [a,x]}f(t)-\max_{t\in [a,x_0]}f(t)\right|=0< \epsilon$$ Otherwise, $$\left|\max_{t\in [a,x]}f(t)-\max_{t\in [a,x_0]}f(t)\right|\le \max_{t\in [x_0,x]}f(t)-\max_{t\in [a,x_0]}f(t)<f(x_0)+\epsilon-\max_{t\in [a,x_0]}f(t)\le \epsilon$$ which proves right continuity. When I tried to prove left continuity I was stuck on showing $$\max_{t\in [x,x_0]}f(t)-\max_{t\in [a,x]}f(t)<\epsilon$$ Can this be circumvented?


I've been having this issue for a few months, and it's getting more and more prevalent. When I'm pedaling with force, particularly when standing, the chain slips, which is annoying, counterproductive, and dangerous. Lately, it will happen I almost every other pump of the pedals. This occurs no matter which gear the bike is in, but for the record I usually keep it at the highest gear and highest friction. I've only had it for about a year, and I got it brand new. I would really like to fix this issue, since it's my only transportation.

I've had my Trek 3900 for about a year now, and I replaced the chain about 3 months ago, but otherwise it's running with the same parts it came with (not counting tubes and tires).  I had to replace my chain because it had gotten really rusty from riding in rain/mud/water on trails, and had started skipping.    My problem is, whenever I ride, if I get above or below a very light pressure when pedaling, the chain skips. I was wondering if this could be caused by my chain, which has gotten a little rusty but not as stretched as the other one was, or if I might need a new cassette?    I just readjusted my derailer, but it still skips.   Does anybody know what could be causing this?


I have a very simple problem, but I can't seem to solve it. I have a table inside a div, which is the main element. Now I have a td tag inside the table with a width and hight set to that of an iphone screen size. Now I basically want to center that table with its td cell within the div tag, so that the 'screen' will be centered in any browser window. How do I do that?  Replacing that div with a table solved my problem, but I would like to use a div instead.  Thank You

How can I horizontally center a
 within another
 using CSS?

Foo foo


Someone please tell (advice) me some research study problems on Classical Mechanics that can be tackled with Undergraduate level knowledge.

Need to brush up on my late-undergrad and early-grad physics and was wondering if anyone can recommend books or lecture notes (hard copy, or on-line) that also have solutions.   Two that I have come across are:  Princeton Problems in Physics with Solutions - Nathan Newbury  University of Chicago Graduate Problems in Physics with Solutions - Jeremiah A. Cronin  Spacetime Physics - Taylor & Wheeler (favorite book on special relativity; has a lot of problems with solutions at the back; a lot of the problems really enforce the material and discuss paradoxes)  If possible, please also provide a reason why you like the books as opposed to just listing them.


Player $A$ rolls three $6$-sided dice and sums the outcome and player $B$ rolls a   $20$-sided dice. The player with the highest score wins. Which player   do you wish to be?   This question was asked to me in an interview. I was wondering if there's a quick way to solve the problem. Obviously you can compute $P(A > B)$ but this takes a lot of time. It's sort of hard to reason through this quickly since if $B$ rolls $1, 2,$ or $3$ then  $A$ is greater than or equal to $B$ with probability $1$. On the other hand if $B$ rolls $19$ or $20$, they're guaranteed to win.  I was wondering if there is some quick way to do this without enumerating all possibilities. Also, their expectations are the same, so that doesn't help much.   Thanks

Bob rolls $3$ six-sided die and sums the numbers facing up. Bill rolls a single $20$ sided dice and records the number. What is the probability that Bob's number is greater than Bill's number.  I started the problem trying to come up with an equation, but that didn't work, so I resorted to creating $6$ six by six tables with all of the possible sums for Bob's die. Then, I counted the number of each number and created a chart and calculated the probability of each of those numbers occurring. Then, I multiplied the probability of each number occurring by the probability that Bill's number is greater than that number. Finally, I added them all up.  Obviously, this was very tedious and time-consuming. Is there a more elegant/less tedious way to do this problem.   PS: Is there away to do a $n$ die vs $m$ dice problem without listing them all out? Is there a general formula? Up until now, that's what I've been doing.


I want to start and try using a flash for my photos. Since I never used more than build-in flashes of compact cameras, I am completely new to the topic of choosing the right flash for me.  After some reading I'm still not quite sure of what I should or can even use. The different camera manufacturers are using slightly different hot shoes/methods of communication between flash and camera, is that right?  I own a Samsung NX300m. Does that mean I can only use flashes explicitly built/modified for NX cameras? Since of course nobody wants to make flashes for cameras that do not get produced anymore, in that case there wouldn't be a big range of flashes for me.  Does anything of this change if I use a remote trigger?

When trying to get started with flash photography, there are a lot of new options, features and techniques that a photographer gets thrown in to.  When starting on a budget, what features will give a flash the most bang for the buck for people just starting out in flash photography that don't have a lot of money to spend?


How can I create an xml sitemap without using any plugin?  <?xml version="1.0" encoding="UTF-8"?>     <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">         <url>             <loc>http://www.example.com/</loc>             <lastmod>2005-01-01</lastmod>             <changefreq>monthly</changefreq>             <priority>0.8</priority>         </url>         <url>             <loc>http://www.example.com/about.htm</loc>             <changefreq>daily</changefreq>         </url>     </urlset>   How can I auto-generate a sitemap,  I have 2000+ posts on my blog, and what is the method to add auto entry into sitemap when publishing a post. I have tried plugins but i want it manually without plugins like Google sitemap generate,

I have to generate a xml file dynamically at runtime. Please help me in generating the below XML file dynamically using PHP.  <?xml version="1.0" encoding="UTF-8"?> <xml>  <track>      <path>song1.mp3</path>      <title>Track 1 - Track Title</title>  </track>  <track>      <path>song2.mp3</path>      <title>Track 2 - Track Title</title>  </track>  <track>      <path>song3.mp3</path>      <title>Track 3 - Track Title</title>  </track>  <track>      <path>song4.mp3</path>      <title>Track 4 - Track Title</title>  </track>  <track>      <path>song5.mp3</path>      <title>Track 5 - Track Title</title>  </track>  <track>      <path>song6.mp3</path>      <title>Track 6 - Track Title</title>  </track>  <track>      <path>song7.mp3</path>      <title>Track 7 - Track Title</title>  </track>  <track>      <path>song8.mp3</path>      <title>Track 8 - Track Title</title>  </track>