I have installed Ubuntu 14.04 along with Windows 8.1. My Wifi is working in windows but not in Ubuntu. I gave the following command in the command terminal.   nmcli nm RUNNING         STATE           WIFI-HARDWARE   WIFI       WWAN-HARDWARE   WWAN       running         connected       enabled         enabled    enabled         enabled    lspci -knn | grep Net -A2 03:00.0 Network controller [0280]: Qualcomm Atheros Device [168c:0042] (rev 30)     Subsystem: Lite-On Communications Inc Device [11ad:0806]   Though it says wifi is enabled, yet it's not working. I have an Acer Aspire E5-573 laptop.

I cannot see WiFi option in my Ubuntu 15.04. What should I do? Revert asap  lspci -nnk | grep 0280 -A2 output:-  03:00.0 Network controller [0280]: Qualcomm Atheros Device [168c:0042] (rev 30) Subsystem: Foxconn International, Inc. Device [105b:e09a]   rfkill list output:-  0: hci0: Bluetooth Soft blocked: no Hard blocked: no 1: acer-wireless: Wireless LAN Soft blocked: no Hard blocked: no      dmesg | grep ath [    9.545199] ath10k_pci 0000:03:00.0: pci irq msi-x interrupts 8 irq_mode 0 reset_mode 0 [   10.029684] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/cal-pci-0000:03:00.0.bin failed with error -2 [   10.029701] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware-5.bin failed with error -2 [   10.029704] ath10k_pci 0000:03:00.0: could not fetch firmware file 'ath10k/QCA9377/hw1.0/firmware-5.bin': -2 [   10.029711] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware-4.bin failed with error -2 [   10.029713] ath10k_pci 0000:03:00.0: could not fetch firmware file 'ath10k/QCA9377/hw1.0/firmware-4.bin': -2 [   10.029719] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware-3.bin failed with error -2 [   10.029721] ath10k_pci 0000:03:00.0: could not fetch firmware file 'ath10k/QCA9377/hw1.0/firmware-3.bin': -2 [   10.029726] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware-2.bin failed with error -2 [   10.029728] ath10k_pci 0000:03:00.0: could not fetch firmware file 'ath10k/QCA9377/hw1.0/firmware-2.bin': -2 [   10.029733] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/firmware.bin failed with error -2 [   10.029735] ath10k_pci 0000:03:00.0: could not fetch firmware (-2) [   10.029737] ath10k_pci 0000:03:00.0: could not fetch firmware files (-2) [   10.029739] ath10k_pci 0000:03:00.0: could not probe fw (-2)


I've implemented for a lot of my TextBox a ValidationRule :  <TextBox>     <TextBox.Text>         <Binding Path="Property" Mode="TwoWay">             <Binding.ValidationRules>                 <validator:MyRule ErrorMessage="Must be a number"/>             </Binding.ValidationRules>         </Binding>     </TextBox.Text> </TextBox>   So Is there a way to detect in code behind (or some XAML binding) if an error is raised by a ValidationRule to disable my Save button?

I have a page where a few textboxes cannot be empty before clicking a Save button.    <TextBox...                  <TextBox.Text>                     <Binding Path ="LastName" UpdateSourceTrigger="PropertyChanged">                          <Binding.ValidationRules>                             <local:StringRequiredValidationRule />                         </Binding.ValidationRules>                                                   </Binding>                 </TextBox.Text>   My rule works, I have a red border around my textbox until I enter a value.  I now want to add this validation rule to my other text boxes.  How do I disable the Save button until the page has no validation errors?  I'm not sure what to check.


I have a CentOS7 Server running slapd 2.4.44 and I'd like to modify the default hashing algorithm being used. Instead of using SSHA, i'd like to use SHA-256 or SHA-512.  I've been having trouble finding documentation on this and I'd like to ask if anyone can provide a link to any resources to put me on the right track.  I've read a few articles that mentioned using CRYPT to instruct OpenLDAP to use a strong encryption scheme but bash returns an error when I try those commands.   For example, I entered the following at the terminal..  password-hash {CRYPT} password-crypt-salt-format "$6$%.16s"  "bash: password-hash: command not found..."  Is there a file I should be modifying instead?  Thanks!

I have the following version on Ubuntu 12.04:  OpenLDAP: slapd  (Sep 19 2013 22:49:31) $ buildd@batsu:/build/buildd/openldap-2.4.28/debian/build/servers/slapd   OpenLDAP now offers SSHA as the default hash. I want to use a different hash. Yet, old tutorials are based on editing /etc/ldap/slapd.conf which is gone in newer version of OpenLDAP. Which file should I change?


Every object at a non-zero temperature radiates light, i.e. it glows. (Is that called blackbody radiation?)  What is the physical reason to this?  Is it because more heat implies that the atoms vibrate, and vibrating charges (the electrons or the nuclei) generate electromagnetic radiation?

By conservation of energy, the solid is left in a lower energy state following emission of a photon.  Clearly absorption and emission balance at thermal equilibrium, however, thermodynamic equilibrium is a statement of the mean behaviour of the system, not a statement that the internal energy is constant on arbitrarily short timescales.  The energy has to come from somewhere during emission, and go somewhere during absorption.  Energy in a solid can be stored as kinetic and potential energy of electrons and nuclei, either individually or in collective modes such as phonons and plasmons.  In thermal equilibrium energy will be stored more or less in various forms depending on the temperature and material.  However, even if most of the thermal energy in a particular solid at temperature $T$ is stored in the form of phonons, it could be that phonons primarily interact with light indirectly via electrons, e.g. a phonon excites an electron in a phonon-electron interaction, which can interact with light via the EM field.  Given that light is an EM field, it makes sense to me that it is emitted and absorbed by charged particles.  The electron-photon interaction is probably dominant for visible and ultraviolet light, given that metals are opaque, while semiconductors and insulators are transparent to (visible and UV) light with energy lower than their bandgap. However, once you get into energies in the IR and below, or X-rays and above, other mechanisms apparently take over.  For example, on the high-energy end of the spectrum I've heard that gamma rays can interact directly with nuclear degrees of freedom, which is reasonable considering that gamma rays are emitted during a lot of nuclear reactions.  A review of  might give clues to important light-matter interactions over a broad range of wavelengths.  Whether all of the these processes are involved in blackbody emission is a somewhat different question.  What physical processes mediate energy transfer during blackbody emission, and in which energy ranges are the various processes dominant?


I wonder why no partition editor allows you to shrink or enlarge exFAT partitions without having to actually delete it and make it again.

Is there any way to shrink an exFAT partition?   The windows disk manager has the "Shrink" option greyed out.


I have a series of files with arbitrary names and extensions. Like:   APW19981017.0151 APW19981017.0306 APW19981017.0477 APW19981017.0507 APW19981018.0410 NYT19981017.0177 NYT19981018.0098 NYT19981018.0123 NYT19981018.0160 NYT19981018.0185   I want these files to open with an editor, like TextMate or Sublime Text, on double-clicking, without having to right-click and choosing the editor from applications.  Basically the Finder should open any unknown extension file with the text editor.

I tried to open a file with an extension name of adb in Finder (to be precise, PathFinder). When I clicked the file, vi editor is activated to open the adb file. I didn't do anything with the adb file, so my guess is that vi editor changed the system setup to open it whenever unknown file format is opened.  How can I change this behavior? I want to open TextMate as a default.


Why is the sum of all natural numbers $- \frac1{12}$?  I need a proof my 14 year-old classmates could understand, with minimal effort on my part ;)  I know I can prove it using zeta functions, etc. but that's too complex for them, currently they don't believe me, and it's quite annoying.  Other questions on this site aren't detailed or simple enough for my classmates to understand. I need simple methods of proving each step along the path of a proof.

$\displaystyle\sum_{n=1}^\infty \frac{1}{n^s}$ only converges to $\zeta(s)$ if $\text{Re}(s) > 1$.  Why should analytically continuing to $\zeta(-1)$ give the right answer?


I want to run a specific command, such as rm, while logged in as root, but I want the root password prompt to be shown every time. When I run su -c "command" as root, I was not prompted for a password.

My friends keep deleting my files using the terminal. So please help me out by explaining how to make a password for rm command.


I want to know if I can listen to the Rhythm of War Audiobook, because it's up on Brandon Sanderson's youtube, before I read the rest of The Stormlight Archive. I know there's alot of books in the Cosmere, and I want to get into it, but I don't know if I have to read it in order to understand it all. P.S. my dad has the Mistborn books already, so if not I can get into those first.

My entry into Brandon Sanderson's works is Mistborn Trilogy, I finished and loved it. Then I got to know that many of his series are connected and happen in the same universe - Cosmere. Next I started with the Way of Kings, but am now kind of worried if I might read the series in the wrong order. So what is the right order to read them? is it the publication order..?   Elantris (2005)  Mistborn Trilogy Warbreaker (2009) The Stormlight Archive: The Way of Kings (2010) Mistborn: The Alloy of Law (2011) The Emperor's Soul (2012, novella) Shadows for Silence in the Forests of Hell (2013, short story published in Dangerous Women) The Stormlight Archive: Words of Radiance (2014)    or I have seen people suggest the following order too,   Mistborn Trilogy Elantris and the Emperor's Soul The Way of Kings Warbreaker Words of Radiance The Alloy of Law Shadows of Self   I have also read posts where they say it doesn't matter which order you read it in. So am confused, since I have already started the Way Of Kings (Only a few chapters in), should I stop it and go back to Elantris, and follow an order, or should I just continue finish this and pick other books in an order.


A Rubik's cube has 54 visible facelets. There are 6 colours and each colour has 9 facelets. How many configurations are possible? How do you find that?

Associated to the Rubik's cube is a group as described in this : $G = \langle F, B, U, L, D, R\rangle$. For example, the element $F$ corresponds to rotating the front face clockwise by $90$ degrees.  According to the article the order of the group is: $2^{27} 3^{14} 5^3 7^2 11$.  I have come across several places (for example ) where this order has been found by just counting various ways to arrange edges and such. Is there a nice way to compute the order by appealing to more "group theoretic" tools?


I want to write a class for creating Excel files from Datagridviews. I want to add a bottom line with Subtotals for selected columns and the number of those columns change from 1 to 3. I want my function work like this  exportToExcel(string title, DataGridView dgv, int colId1, int colId2, int colId3); //for with 3 sub total   //Example: exportToExcel("Some Title",mygridview, 3);  //for 1 sub total exportToExcel("Another Titme", othergridview, 5,6,7); //for 3 sub totals   Do I have to create functions for different variations or is there a way to make 2nd and 3rd column numbers optional ?

Note: This question was asked at a time when C# did not yet support optional parameters (i.e. before C# 4).  We're building a web API that's programmatically generated from a C# class. The class has method GetFooBar(int a, int b) and the API has a method GetFooBar taking query params like &a=foo &b=bar.   The classes needs to support optional parameters, which isn't supported in C# the language. What's the best approach?


An Analog or Asimov's sci-fi mag publication, I think. The leader of war that was fought and won in the far future has chosen to settle on an idyllic out-of-the-way present-day planet. He's making friends, perhaps finding love, but he has the rotten luck of rogue soldiers under his former (future?) command who also pick this particular spot in the continuum for their peace-time retreat. They bully his friends and threaten much worse with supernatural future-soldier powers. Our hero faces a hard choice: abandon this relatively insignificant place to the bad guys and ensure the future peace of the universe, or reveal himself and his own powers and be forced to destroy the rogue soldiers and return to the future and fight the war again. Of course he squishes the bad guys and bids sad farewell to his friends.

I read this story in an anthology in the eighties or early nineties.  It was about an old man who lived outside a western-like town, though that might have just been how I imagined it.  He goes to town and some ex-military thugs are there causing problems.  Flaunting some odd interdimensional military tech of some sort.  He doesn't want to intervene as doing so would be bad but in the end he must.     By intervening, his military identity is revealed and that causes him (some paradox or causality law) to have to go back and fight the war again.   The war is at the end of time or the universe.  The man is maybe a colonel of the sky something... Not much to go on; I have been searching my collection and wracking my brain for years trying to recall the story.


Here is my String array containing the following:  "message" "player" "how" "are" "you"  I am wanting to join the "how" "are" "you" part of the String[] and I am currently doing the following:  String msg = "";  for (int i = 2; i < args.length; i++) {     msg = msg + args[i] + " "; }  Util.messagePlayer(player, msg);   So my question is, is there a better/more efficient way of doing this?

While working in a Java app, I recently needed to assemble a comma-delimited list of values to pass to another web service without knowing how many elements there would be in advance. The best I could come up with off the top of my head was something like this:  public String appendWithDelimiter( String original, String addition, String delimiter ) {     if ( original.equals( "" ) ) {         return addition;     } else {         return original + delimiter + addition;     } }  String parameterString = ""; if ( condition ) parameterString = appendWithDelimiter( parameterString, "elementName", "," ); if ( anotherCondition ) parameterString = appendWithDelimiter( parameterString, "anotherElementName", "," );   I realize this isn't particularly efficient, since there are strings being created all over the place, but I was going for clarity more than optimization.  In Ruby, I can do something like this instead, which feels much more elegant:  parameterArray = []; parameterArray << "elementName" if condition; parameterArray << "anotherElementName" if anotherCondition; parameterString = parameterArray.join(",");   But since Java lacks a join command, I couldn't figure out anything equivalent.  So, what's the best way to do this in Java?


We are unable to build the workspace in Eclipse Kepler. It's throwing  Errors occurred during the build. Errors running builder 'Java Builder' on project 'XXX'. java.lang.NullPointerException   error while building project.  Even after checking the Eclipse log, we are unable to fix it. Please find below eclipse log:  !MESSAGE Errors running builder 'Java Builder' on project 'TRi2V3'. !STACK 0 java.lang.NullPointerException     at com.dell.toadext.javaeditor.ui.sqlmarker.AstResource.addStringLiteral(AstResource.java:153)     at com.dell.toadext.javaeditor.ui.nodeResolvers.MethodInvocationResolver.resolveSetLengthBuilderMethod(MethodInvocationResolver.java:151)     at com.dell.toadext.javaeditor.ui.nodeResolvers.MethodInvocationResolver.resolveBuilderMethod(MethodInvocationResolver.java:100) .......   Could you please suggest the solution to fix it.

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?


In Angular any simple way to set the focus (input cursor) on the start of input box string without jquery. Currently, I've used setFocus() {     this.testInput.nativeElement.focus();   }  but above code set cursor at the end of the input box string but I want to set the cursor at start. My html code <input class="__input" value="Hello-" #testInput type="text">  @ViewChild('testInput') input: ElementRef;  .

Does anybody know how to move the keyboard caret in a textbox to a particular position?  For example, if a text-box (e.g. input element, not text-area) has 50 characters in it and I want to position the caret before character 20, how would I go about it?  This is in differentiation from this question:  , which requires jQuery.


think /θ/  than /ð/   As you can see,the first consonant of the two words differs.But according to the wiktionary,they are both from Proto-Germanic,and the first characters in Proto-Germanic are both þ which pronounced as θ.  So,why the pronunciation become different from each other nowadays?   the wiktionary pages:  and

Consider the th in thistle versus the th in this: the former is unvoiced, while the latter is voiced.  Is there a rule or reason for the differences?


I want to simulate flying knife (rigid body) then it fall down and hit the ground/floor. How to give the knife an initial velocity to make it flying ? I can't find the setting.   Thanks

I'm trying to create a bowling animation and I want the ball to hit the pins. I already added the Rigid Body physics to the objects but can't get the ball to move.  Obviously I could just add keyframes but   that seems to interfere with the Rigid Body physics it doesn't look too realistic.   Is there a way to add some kind of motion to the ball?


I recently finished a discrete mathematics class, and near the end of the semester, the prof (very superficially) touched on countable and uncountable infinities. His explanation of countable infinities began and ended with the example of the cardinal number set, while he explained that, for example, the set of all functions $f$ such that $f:\mathbb{R}\mapsto\mathbb{R}$ is, in fact, uncountable.  My question is threefold:   Does it make sense to say that any uncountable infinity is larger than any countable infinity? Does it make sense to say that certain countable infinities are larger than others? Finally, does it make sense to say that certain uncountable infinities are larger than others?   For example, is the set of all reals larger than the set of reals between any two integers? Can arithmetic-like rules be applied if this is true (addition of infinities makes them larger)?

Can someone explain to me how there can be different kinds of infinities?  I was reading "" by  and came across the concept of countable and uncountable infinities, but they're only words to me.  Any help would be appreciated.


I'm making a user plateform on my website with php/mysql, and I want to know if is it good to allow users add photos using the mysql blob file, or adding their photos in a folder with their id, and storing every photo's path with a VARCHAR variable into the database. Thanks

So I'm using an app that stores images heavily in the DB. What's your outlook on this? I'm more of a type to store the location in the filesystem, than store it directly in the DB.  What do you think are the pros/cons?


I have two C files 9.c ,10.c.  9.c  #include <stdio.h> int b=6; int main() { fun1(); printf("%d\n",b); } extern int b;   10.c   void fun1() { printf("%d\n",b); b=8; }   I did gcc 9.c 10.c but it gives following error:   10.c:3: error: 'b' undeclared (first use in this function)  I was expecting that linker would resolve the definition of b, but why its not resolving.

My question is about when a function should be referenced with the extern keyword in C. I am failing to see when this should be used in practice.  As I am writing a program all of the functions that I use are made available through the header files I have included.  So why would it be useful to extern to get access to something that was not exposed in the header file? I could be thinking about how extern works incorrectly, and if so please correct me. Also.. Should you extern something when it is the default declaration without the keyword in a header file?


I already have a 'custom structure' for my 'Posts', e.g. example.com/newsarchive, so my 'Posts' follow: example.com/newsarchive/welcometonovember  Now I am expanding and created a new custom post type called: Movies  I want the permalinks for these items to be:   example.com/moviearchive/favouritemoviepost   However, at the moment I am getting:  example.com/newsarchive/moviearchive/favouritemoviepost   How can I change that?

I have several custom post types, which are properly structured as /%post_type%/%postname%/, however I wish to have the same effect for regular blog entries: /blog/%postname%/  If I prepend the permalink structure with /blog/ it affects the custom post types as well, so currently my permalink structure is simply /%postname%/  Which is the recommended way of doing this? I had a solution involving some rewrites, but the permalink shown in the post editor area does not reflect it.


I guess this question applies to all "muggle-born" witches/wizards...  How do they get their books? Does the letter contain additional information on how to travel to Diagon Alley? Does an escort come and take them, similar to how Hagrid helped Harry?  In the second book we see that her parents are there with her, but did they go the first year? If that's the case, how would Hermione and her family ever know how to get in?

Courtesy of , I found the a bit of  (currently un-cited):  The Leaky Cauldron The pub serves as a way of entering into Diagon Alley from the Muggle world for Muggle-borns and their parents (both of whom, until the first letter from Hogwarts, have no magical knowledge or means of entering). The rear of The Leaky Cauldron opens onto a chilly little courtyard, in which a particular brick must be tapped three times to open a path to Diagon Alley.  But from what I can see, Muggleborns and their parents wouldn't be able to enter from Leaky Cauldron, because - based on what I can tell - that requires one to use a wand:  He {{Hagrid}} tapped the wall three times with the point of his umbrella. The brick he had touched quivered – it wriggled – in the middle, a small hole appeared – it grew wider and wider – a second later they were facing an archway large enough even for Hagrid, an archway on to a cobbled street which twisted and turned out of sight.  Is there some canon information confirming the Wikipedia assertion that Muggle parents and not-yet-wand-owning Muggleborns could enter Diagon Alley from the courtyard behind Leaky Cauldron?


Is there a cleaner way of parsing a string that contains a word to describe it's  RegistryValueKind? I'm still learning C# and I don't think I'm fully grasping enums.      private RegistryValueKind ParseValueType(string valueType)     {         switch (valueType)         {             case "String":                 return RegistryValueKind.String;             case "Binary":                 return RegistryValueKind.Binary;             case "DWord":                 return RegistryValueKind.DWord;             case "ExpandString":                 return RegistryValueKind.ExpandString;             case "MultiString":                 return RegistryValueKind.MultiString;             case "QWord":                 return RegistryValueKind.QWord;             case "Unknown":                 return RegistryValueKind.Unknown;             default:                 return RegistryValueKind.None;         }     }   Surely this isn't standard coding procedure?

What's the best way to convert a string to an enumeration value in C#? I have an HTML select tag containing the values of an enumeration. When the page is posted, I want to pick up the value (which will be in the form of a string) and convert it to the corresponding enumeration value. In an ideal world, I could do something like this: StatusEnum MyStatus = StatusEnum.Parse("Active");  but that isn't a valid code.


What are the do and do nots with regards to sexual relations between a professor and graduate student? As long as they aren't your advisor or on your committee is it considered OK? How does this work?

What sorts of restrictions do universities place on romantic or sexual relationships between faculty and graduate students, and what are the underlying issues that motivate these restrictions?  For example, suppose the student has previously taken a class from the professor but has no plans for further academic contact.  What other factors could help determine whether a relationship would be allowed or considered appropriate?


I have a dataset, containing min. and max. dates for each row. What would be the best syntax for Amazon Redshift/Postgres to mark the rows, if they are in a certain timerange? Here's a little Excel example for better understanding:

Given two date ranges, what is the simplest or most efficient way to determine whether the two date ranges overlap?  As an example, suppose we have ranges denoted by DateTime variables StartDate1 to EndDate1 and StartDate2 to EndDate2.


How can I hide the Windows taskbar when I run my C# WinForms application?  I tried some code, but it opens in maximized view with the taskbar.  Do you have any sample code or suggestions?

I have a WinForms app that I am trying to make full screen (somewhat like what VS does in full screen mode).  Currently I am setting FormBorderStyle to None and WindowState to Maximized which gives me a little more space, but it doesn't cover over the taskbar if it is visible.  What do I need to do to use that space as well?  For bonus points, is there something I can do to make my MenuStrip autohide to give up that space as well?


In python, how can an object's properties be accessed without explicitly calling them? And print those properties?  Ex:  class MyClass:      def __init__(self):      self.prop1 = None      self.prop2 = 10       def print_properties(self):      # Print the property name and value  example_a = MyClass() example_a.print_properties()   Desired output:  prop1: None prop2: 10   Different from:  as it was pointed out that accessing the private __dict__ methods is not advised. Linked posted is 2008 answer and doesn't define how to iterate through the object.

Is there a built-in method in Python to get an array of all a class' instance variables? For example, if I have this code:  class hi:   def __init__(self):     self.ii = "foo"     self.kk = "bar"   Is there a way for me to do this:  >>> mystery_method(hi) ["ii", "kk"]   Edit: I originally had asked for class variables erroneously.


This problem came from Schaum's complex variable p.156     Suppose $f(x)$ and $(g)$ are analytic inside and on a simple closed curve $C$ and suppose $|g(z)|\lt |f(z)|$ on $C$. Then $f(z)+g(z)$ and $f(z)$ have the same number of zeros inside $C$.   Here is the proof:     Let $F(z)=\frac{g(z)}{f(z)}$, or briefly $g=fF$. then, if $N_1$ and $N_2$ are the number of zeros inside $C$ of $f+g$ and $f$, respectively, we have by Argument Theorem, using the fact that these function have no poles inside C, $$N_1=\frac1{2\pi i}∮\frac{f'+g'}{f+g}dz$$ $$N_2=\frac{1}{2\pi i}∮\frac{f'}fdz$$   then$$N_1-N_2=\frac 1{2\pi i}∮\frac{f'+f'F+fF'}{f+fF}dz-\frac 1{2\pi i}∮\frac{f'}{f}dz$$$$=\frac 1{2\pi i}∮\frac{f'(1+F)+fF'}{f(1+F)}dz-\frac 1{2\pi i}∮\frac{f'}{f}dz$$$$=\frac 1{2\pi i}∮\left\{\frac{f'}{f}+\frac{F'}{1+F}\right\}dz-\frac 1{2\pi i}∮\frac{f'}{f}dz=∮\frac{F'}{1+F}dz$$$$=\frac 1{2\pi i}∮F'(1-F+F^2-F^3+...)dz=0$$      using the given fact that $|F|\lt 1$ on $C$ so that the series is uniformly convergent on $C$ and term by term integration yields the value zero. Thus, $N_1=N_2$ as required.   I don't understand the last step that why it yields to zero.  I also don't understand the wiki version.

I am trying to understand this proof of Rouché's theorem, but I am missing the logic of the last and most crucial step. Here are the assumptions:     Suppose that $ f $ and $ g $ are analytic inside and on a regular   closed curve $ \gamma $ and that $ |f(z)| \gt |g(z)| $ for all $ z > \in \gamma $. Then $$ \mathcal{Z}(f + g) = \mathcal{Z}(f) \text{ inside > } \gamma $$   The proof goes as follows:  First note that $ f \neq 0$ on $ \gamma $ since otherwise $ |g| \lt 0 $ which doesn't make any sense. So, we can write the following:  $$ \mathcal{Z}(f + g) = \frac{1}{2\pi i} \int_{\gamma}\frac{(f+g)'}{(f+g)} = \frac{1}{2\pi i} \int_{\gamma} \frac{(f(1 + \frac{g}{f}))'}{f(1 + \frac{g}{f})} = \frac{1}{2\pi i} \int_{\gamma} \frac{f'}{f} + \frac{1}{2\pi i} \int_{\gamma} \frac{(1 + \frac{g}{f})'}{(1 + \frac{g}{f})} $$  We know $ f $ is analytic, so $ \frac{1}{2\pi i} \int_{\gamma} \frac{f'}{f}  = \mathcal{Z}(f) $ by the argument principle. What I don't know is, why is $ \frac{1}{2\pi i} \int_{\gamma} \frac{(1 + \frac{g}{f})'}{(1 + \frac{g}{f})} = 0$?


Was wondering if adding an ascending and descending index (on the same column) could allow SQL to search any faster by utilizing both indexes at the same time?

Over the past few weeks I've been raging against an old Firebird database. This database is crappy for all sorts of reasons, but one thing I noticed was that every single field of every single table has two indexes; each one with a single segment, one in asc order and one in desc order.  Apart from the wtf'ness of having an index for every field in every table, it got me thinking - is there any advantage for single-segment indexes to having two indexes with the same index segments, but one in desc and one in asc? Is there anything to be gained, or would a modern DBMS simple use the asc index and start from the end and work its way backwards if required?


Let $p_1,...,p_n\in\Bbb N$ be distinct primes. Compute $\text{Gal}(\Bbb Q(\sqrt{p_1},...,\sqrt{p_n})/\Bbb Q)$  Intuitively, $G:=\text{Gal}(\Bbb Q(\sqrt{p_1},...,\sqrt{p_n})/\Bbb Q) = (\Bbb Z/2\Bbb Z)^n$. My first idea is that if $\sigma\in G$, then $\sigma(\sqrt{p_i})=\{\sqrt{p_i},-\sqrt{p_i}\}$ for each $i$. Hence, from this, pick $\sigma_i\in G$ such that $\sigma_i(\sqrt{p_i})= -\sqrt{p_i}$ and $\sigma_i(\sqrt{p_j}) = \sqrt{p_j}$ for all $j\neq i$. Then, $\sigma_i$'s generates $G$ and each $\sigma_i$ does not generates $\sigma_j$ if $i\neq j$, $G = (\Bbb Z/2\Bbb Z)^n$. Is this valid? Another way to do this is using the fact that 'if $K/F,L/F$ are both Galois and $K\cap L =F$ then $\text{Gal}(KL/F)\simeq\text{Gal}(K/F)\times\text{Gal}(L/F)$', we inductively apply this. The problem is whether $\sqrt{p_i}\in\Bbb Q(\sqrt{p_1},...,\sqrt{p_{i-1}})$. Any hint or comment will be appreciated.

For distinct prime numbers $p_1,...,p_n$, what is the Galois group of $(x^2-p_1)\cdots(x^2-p_n)$ over $\mathbb{Q}$?     This problem appears to be quite common, however my understanding of Galois theory is quite poor, and I have no idea how to do this problem.


I am trying to install libpci-dev library in Ubuntu 18.04.5 LTS since I am working on Linux driver stuff that communicates with a board over PCIe. However, using apt-get command I get the following error: $ sudo apt-get install libpci-dev Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libpci-dev : Depends: libpci3 (= 1:3.5.2-1ubuntu1) but 1:3.5.2-1ubuntu1.1 is to be installed               Depends: libudev-dev (>= 196) but it is not going to be installed E: Unable to correct problems, you have held broken packages.  I tried to run the following set of commands hoping it will fix the dependency issue, but no success: sudo apt-get autoremove sudo apt-get clean sudo apt-get update sudo apt-get upgrade sudo apt-get install -f  I checked the output of this command and there is no error: sudo dpkg --configure -a  I installed synaptic and tried to install the development library from there, however, this is what I get as an error:  So how can I solve this issue? What am I missing? Some additional output to the problem from the commands: apt-cache policy libpci-dev libpci3 libudev-dev zlib1g-dev  libpci-dev:   Installed: (none)   Candidate: 1:3.5.2-1ubuntu1   Version table:      1:3.5.2-1ubuntu1 500         500 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages         500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages libpci3:   Installed: 1:3.5.2-1ubuntu1.1   Candidate: 1:3.5.2-1ubuntu1.1   Version table:  *** 1:3.5.2-1ubuntu1.1 100         100 /var/lib/dpkg/status      1:3.5.2-1ubuntu1 500         500 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages         500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages libudev-dev:   Installed: (none)   Candidate: 237-3ubuntu10   Version table:      237-3ubuntu10 500         500 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages         500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages zlib1g-dev:   Installed: (none)   Candidate: 1:1.2.11.dfsg-0ubuntu2   Version table:      1:1.2.11.dfsg-0ubuntu2 500         500 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages         500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages  And for the following command: grep ^deb -r /etc/apt/ --include=*.lis  /etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted /etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ bionic universe /etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse /etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic main

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


How to open a ticket in salesforce to get personalized support?  this web  has an option called "Open a Case". But, despite I'm authenticated, it gets me to    So I'm not able to open a case  Thanks

I want to log a case in my developer edition. When I click on Contact Support from this URL:  I can see an Open a Case icon. On clicking it I get taken to salesforce login page and after entering credentials it shows empty  page with below url   Anyone faced same issue ?


This is my Http header trace when i access pwd.html  host:port/pwd.html?type=Msg=8  POST /pwd.html?type=Msg=8 HTTP/1.1 Host: host:port User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Referer: anotherhost:port/referrer Cookie: SomeCookie=loggedoutcontinue; targetURL=Someurl Connection: keep-alive Content-Type: application/x-www-form-urlencoded Content-Length: 4936   APP_REQ=324823823   HTTP/1.1 200 OK Date: Tue, 26 Aug 2014 15:05:29 GMT Server: Application-Server Last-Modified: Mon, 25 Aug 2014 18:55:15 GMT Accept-Ranges: bytes Content-Length: 1336 Keep-Alive: timeout=5, max=99 Connection: Keep-Alive Content-Type: text/html Content-Language: en   How can I read the value of APP_REQ from my pwd.html using Javascript? Its not part of query string or URL but it is part of request.

How do I access a page's HTTP response headers via JavaScript?  Related to , which was modified to ask about accessing two specific HTTP headers.     Related:


Thanks for your attention! I am a new hand in C++ and this drives me crazy.  Here is the compile result:  $ g++ -std=c++11 main.cpp Node.cpp C:\Users\Sen\AppData\Local\Temp\ccsNgEyE.o:main.cpp:(.text+0x29): undefined reference to `Node<int>::Node()' C:\Users\Sen\AppData\Local\Temp\ccsNgEyE.o:main.cpp:(.text+0x43): undefined reference to `Node<int>::setItem(int const&)' c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe:  C:\Users\Sen\AppData\Local\Temp\ccsNgEyE.o: bad reloc address 0x0 in section `.ctors' c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: final link failed: Invalid operation collect2.exe: error: ld returned 1 exit status   And here are my files: Node.h:  #ifndef NODE_H #define NODE_H template <class ItemType> class Node{ private:     ItemType item;     Node<ItemType>* next; public:     Node();     Node(const ItemType& anItem);     Node(const ItemType& anItem, Node<ItemType>* nextNodePtr);     void setItem(const ItemType& anItem);     void setNext(const Node<ItemType>* nextNodePtr);     ItemType getItem() const;     Node<ItemType>* getNext() const;     }; #endif   Node.cpp:  #include "Node.h" using namespace std;  template <class ItemType> Node<ItemType>::Node(){     next = nullptr; }  template <class ItemType> Node<ItemType>::Node(const ItemType& anItem){     item = anItem;     next = nullptr; }  template <class ItemType> Node<ItemType>::Node(const ItemType& anItem, Node<ItemType>* nextNodePtr){     item = anItem;     next = nextNodePtr; }  template <class ItemType> void Node<ItemType>::setItem(const ItemType& anItem){     item = anItem; }  template <class ItemType> void Node<ItemType>::setNext(const Node<ItemType>* nextNodePtr){     next = nextNodePtr; }  template <class ItemType> ItemType Node<ItemType>::getItem() const{     return item; }  template <class ItemType> Node<ItemType>* Node<ItemType>::getNext() const{     return next; }   My main.cpp file:  #include <iostream> #include <vector> #include "Node.h"  int main(){      Node<int>* node1 = new Node<int>();     node1->setItem(1);   }   I simply don't know why... in g++ command I added in Node.cpp and in Node.cpp there is obviously implementations of the constructor and method.  Thanks for your attention!

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


Can someone please help me proof this theorem. So far I assumed towards contradiction that there exist three consecutive odd natural numbers that are primes P, P+2, and P+4.   Theorem: 3, 5, 7 are the only three consecutive odd natural numbers that are prime.

Prove that the only prime triple is $3,5,7$.  I tried proving using this method: Multiplication of $3$ jumps back and forth between being an even and an odd number. Thus goes from odd to odd over an interval max size 6, and likewise from even to even. In either case these will have the following types: (even - odd - even - odd - even - odd) and (odd - even - odd - even - odd - even), with 3 being a multiple of the first instance in the combinations. In the both combinations, the first and fourth would be divisible by three, leaving only two possible primes left (two odd numbers). Thus the only triple prime can be a combination where three is considered a prime....  However, is this a formal proof? can anybody tell me how to do a proof for this questions?


I was looking at tutorials for C and pointers on the internet and found a debugging example and am wondering how to fix this block of code? I have been looking for a while and can't find out how to make it work. I want to replace the 'i' in "Harris" with an "a".  char * ptr = (char *) "Harris";  ptr[4]="a";

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


I have a globle flag to enable logging / disable logging and a class level flag as well.  This is the code:  public class Utils {     public static volatile boolean GLOBLE_LOG_FLAG = true; }  public class TestClass {     private static volatile Boolean LOCAL_LOG_FLAG = Utils.GLOBLE_LOG_FLAG;      public void test() {         System.out.println("LOCAL_LOG_FLAG: = " + LOCAL_LOG_FLAG);          Utils.GLOBLE_LOG_FLAG = false;          System.out.println("now LOCAL_LOG_FLAG: = " + LOCAL_LOG_FLAG);     } }  public static void main(String[] args) {         TestClass class1 = new TestClass();         class1.test(); }  Output:  LOCAL_LOG_FLAG: = true now LOCAL_LOG_FLAG: = true   Why LOCAL_LOG_FLAG does not change when i set Utils.GLOBLE_LOG_FLAG = false;  If java is using object reference it should change LOCAL_LOG_FLAG to false when I assign Utils.GLOBLE_LOG_FLAG = false; isn't it ? What's my mistake here?  Thanks

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


I am trying to copy variables of the same class type  FUNCTION[] funcs; FUNCTION[] orphelines;   as follows   orphelines[nb_orphelines]=funcs[numero];   Is = right for this task? I get a NullPointer error....

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?


If humans digest cellulose digesting prokaryotes,  can  we start digesting cellulose like cows?

Humans don't digest fibre, and nor do any animals, but some creatures have micro-organisms (bacteria, I'm guessing) in their gut which digest fibre for them.  My question is, could humans take some sort of pill and establish our own fibre-digesting colonies in our intestines?  Has this been tried?  Supposing it could be done, would you suppose it would have any negative effects on our health?  (i.e.. would those whose gut digested fibre for them be stuck on a low-fibre diet?).    Purpose of question: just wondering.  It would be cool to be able to eat bark.


Determine whether each of the following sets can be made into a vector space a)The set of all 2x2 matrices with trace zero(the trace of a matrix is the sum of the entries on the main diagonal)

Is the set of 2x2 matrices with sum of diagonal entries equal zero a vector space over the real numbers under the usual matrix matrix  addition and scalar matrix multiplication?


This question is not about benchmark.  I have a java thread cycle that should to operate close to a period time T:  public class MyRunnable implements Runnable {      private final long period = 10000L; //period T, in this case 10 secs      public void run() {         while() {             long startTime = this.getTime();              this.doStuff();              long endTime = this.getTime();             long executionTime = endTime - startTime;             if(executionTime < this.period) {                 long sleepTime = (this.period - executionTime);                 try {                      Thread.sleep(sleepTime);                 } catch(InterruptedException iex) {/*handle iex*/}             }         }     }      private long getTime() {         return System.currentTimeMillis();     }      private void doStuff() {/*do stuff*/}  }    Of course, depending on the schedule premption choices, Thread.sleep(sleepTime) could be slightly greater than sleepTime. But, in average, this approach provides a close averaged approximation to the period T.  The problem  The method:  private long getTime() {     return System.currentTimeMillis(); }   provides the wall clock reference time. If the machine's clock changes, forward or backwards, this implementation fails to provide a close approximation for the period T. For instance:  long t1 = getTime(); Thread.sleep(30000); long t2 = getTime(); System.out.println(t2 - t1);   prints something like 204283 if someone manually changes the clock three minutes ahead while Thread.sleep(30000) "runs".  Since the system clock is always changing (timeserver synchronization, system load, user settings, etc...) using System.currentTimeMillis() is not realiable enough for my needs.  Failed solution  In order to provide a more robust time reference I tried the following implementation for getTime method:  long getTime() {     long result;     ThreadMXBean mxBean = ManagementFactory.getThreadMXBean();     if (mxBean.isThreadCpuTimeSupported()) {         result = mxBean.getCurrentThreadCpuTime()/1000000L;     } else {         throw new RuntimeException("unsupported thread cpu time");     }     return result; }   The problem of getCurrentThreadCpuTime is that the resulting amount of time is the CPU time consumed by the Thread, not the time left at that instant. Time left when the Thread is sleeping or blocked is not taken in account. For example:  long t1 = getTime(); Thread.sleep(30000); long t2 = getTime(); System.out.println(t2 - t1);   surprising prints "0" (zero) by the getCurrentThreadCpuTime getTime's implementation.  What I want  I guess that what I need is something like this:  private long getTime() {     long cpuCycles = getAmountOfCPUCyclesSinceTheProgramStarted();     long cpuFrequency = getCPUFrequency();     long result = cpuCycles / cpuFrequency;     return result; }   The problem is that I didn't found a java way to implement getAmountOfCPUCyclesSinceTheProgramStarted() and getCPUFrequency() in a cross platform fashion.  Finally, my question is: how to obtain the spent time of a method in java in a reliable and cross-platform way?

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


Embedded the VF page on a layout and is getting refreshed everytime while touching on it. How can i stop refreshing it. its happening only in SF1 mobile. working fine in Desktop.

Below is my VF page which is embedded on a layout. In SF1 mobile app, it's getting refreshed whenever we touch on it. How can I avoid refreshing the VF page while touching it on the screen? In Desktop it's working fine. Please provide your inputs. <apex:page standardController="PremiseObj__c" lightningStylesheets="true"> <apex:includeLightning /> <apex:slds /> <div id="premiseServDetails"> </div> <script> window.onload = function (){     $Lightning.use("c:PremiseObjUpdateApp", function() {         $Lightning.createComponent("c:PremiseObjUpdatecmp",                                    {                                         recordId : "{!Premiserecord__c.Id}"                                     },                                    "premiseServDetails",                                    function(cmp,event) {                                        setTimeout(function() {                                            //document.getElementById('loading').style.display = 'none';                                        }, 3000);                                    });     }); } </script> </apex:page>


In the movie The Avengers (2012), at the end the Hulk smashes Loki to the floor. After that we can see Loki injured with blood on his face.     How can the Hulk hurt a god? Shouldn't Loki be super strong, how can a god bleed?

In Thor: The Dark World, Odin and Loki are discussing Loki's actions during The Avengers.  Loki argues that he would have ruled Earth as "a benevolent god", and Odin replies:  Odin: We are not gods! We are born, we live, we die, just as humans do.  Now that's pretty definitive.  And Loki's snarky reply ("Give or take five thousand years...") would seem to confirm that Asgardians have a limited lifespan, and will eventually die of old age.1  And we know that Asgardians can die in battle, because we've seen it happen over and over with supporting characters and Asgardian soldiers. Now, I've always been more of a fan of Thor stories (like Jason Aaron's Thor: God of Thunder arc) in which Thor and the Asgardians are gods.  Straight-up, genuine, higher-level-of-existence gods, not von-Däniken-esque wannabes playing on the tired old notion of magic just being super-advanced science.  BUT, despite my preferences, this exchange would seem to confirm once and for all that in the MCU, the Asgardians are not gods, but rather were mistaken for gods because of their ram-horns full of awesome-sauce and their magnificent bulging pecks. But wait!  Watch that movie for about 30 seconds longer and we come across this exchange:  Thor: She is ill. Odin: She is mortal. Illness is their defining trait.  Wait, what?  I thought Asgardians weren't immortal?  They can die in battle, and they naturally die of old age.  In my book, that makes them long-lived, but entirely "mortal".  Surely Odin isn't splitting a hair so fine as to say that resistance to disease alone makes one "immortal"? So, if the Asgardians of the MCU aren't actually gods (grumblegrumblegrumble...), and they can't live forever (or even particularly long in a cosmic sense), and they can be killed in battle, in what sense are they "immortal" at all?  1 Fun fact: adjusted for a roughly 5,000 year lifespan, 1,048-year-old Loki is currently in the tail-end of his rebellious teenage phase.


I applied a Mac OS theme to my Ubuntu 18.04.4 LTS.   The new icons are coming properly in titlebar of all applications except for terminal and gedit like below.    You can see that between the minimise-maximise buttons and the title of my terminal there's a big useless image which is the new theme's icon.  How to fix this?

A while ago I upgraded from Ubuntu 17.04 to Ubuntu 17.10 and everything is working fine except for the fact that the icon in the window title bar of my Terminal seems to be stretched out to some ridiculous size.    This only seems to happen in the Terminal window. The Nautilus icon is completely fine.    The problem seems to go away if I login into an Xorg session instead of a Wayland one. I've looked around and didn't find any immediate solution to this. Any help would be greatly appreciated.


A supposedly simple, textbook example of a binary GLMM using adaptive Gauss-Hermite Quadrature with 5 fixed and 1 random effect is not converging. The example analysis that I'm trying to reproduce is from Hosmer et al (2013: 347).   The following code reproduces the problem:  install.packages("aplore3") require(aplore3) data("polypharm") polypharm$ID <- factor(polypharm$id) #Turn the Random Effect into a factor polypharm$inptmhv2 <- as.numeric(polypharm$inptmhv3 != "0") polypharm$race2 <- as.numeric(polypharm$race != "White") polypharm$gender_m <- as.numeric(polypharm$gender == "Male") require(lme4) mixed1 <-        glmer(polypharmacy ~ gender_m + age + mhv4 + race2 + inptmhv2 + (1|ID),       nAGQ = 2, # AFAIK this needs to be set to >1 or it's not GHQ         family = binomial,            data = polypharm)   And the result is  Warning message: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :   Model failed to converge with max|grad| = 0.339924 (tol = 0.001, component 1)   In the help file, the author of glmer() says that up to 25 quadrature points may be used when there's only one random effect. I therefore tried refitting the model with every nAGP value from 1 through 25 (not shown), but none of those models converges either.   The model does converge when nAGP is set to 0 but, as I understand it, that method is essentially a cheap shortcut that sacrifices estimation accuracy -- and sure enough, the estimates thus obtained are quite different from those in Hosmer et al's example.  Since this dataset was specifically selected by eminent statisticians to serve as a didactic example of GLMMs, it seems hard to believe that convergence should be so hard to attain. The most plausible explanation is that I'm messing something up. But what?  I'm not opposed to using other packages either. But the chart on page 131 of  straightforwardly suggests that GHQ is the way to go, and glmer() seems the default choice for that.  References:  Hosmer, D. W., Lemeshow, S. & Sturdivant, R. X. (2013). Applied logistic regression (3rd ed.). Hoboken, N.J.: Wiley.

My data is described here   I am trying to see the effect of an interaction using lmer so my base case is:  my_null.model <- lmer(value ~ Condition+Scenario+                               (1|Player)+(1|Trial), data = my, REML=FALSE)  my.model <- lmer(value ~ Condition*Scenario+                               (1|Player)+(1|Trial), data = my, REML=FALSE)   Running the anova gives me significant results, but when I try to account for random slope ((1+Scenario|Player)) the model fails with this error:     Warning messages:  1: In commonArgs(par, fn, control, environment()) :    maxfun < 10 * length(par)^2 is not recommended.  2: In optwrap(optimizer, devfun, getStart(start, rho$lower, rho$pp),  :   convergence code 1 from bobyqa: bobyqa -- maximum number of function evaluations exceeded  3: In commonArgs(par, fn, control, environment()) :   maxfun < 10 * length(par)^2 is not recommended.  4: In optwrap(optimizer, devfun, opt$par, lower = rho$lower, control = control,  :    convergence code 1 from bobyqa: bobyqa -- maximum number of function evaluations exceeded  5: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :    Model failed to converge with max|grad| = 36.9306 (tol = 0.002)  6: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :    Model failed to converge: degenerate  Hessian with 1 negative eigenvalues   Alternatively if it fails to converge after a lot of iterations (I set it to 100 000) and I am getting the same results after 50k and 100k it means that it is very close to the actual value, just it does not reach it. So can I report my results like this?  Note that when I set the iterations so high I get only these warnings:   Warning messages: 1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :  Model failed to converge with max|grad| = 43.4951 (tol = 0.002) 2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :  Model failed to converge: degenerate  Hessian with 1 negative eigenvalues


My global preferences, alias cp='cp -iv', is ignored by sudo while using zsh.  I'm setting up a new system, and I'm trying out zsh for my user account. The root user still has bash. In /etc I have:  /etc/bash.bashrc /etc/zsh/zshenv   Both of these have the above alias, alias cp='cp -iv'.   In the user's directories, neither of these contains the commands in the /etc global configs.   ~/.zshenv /root/.bashrc    If I switch to the root user su - and try to clobber a file with copy, I get the correct prompt, cp: overwrite 'fruits/apple.txt?'. The same for the home user. However, if I sudo the copy command for the home user while in zsh, the file is overwritten! Using bash, I've not experienced this problem before, so I don't have a clue where else to look.

I am running Ubuntu 10.04 and I use upstart for daemon management.  My enterprise application is run as a daemon and must be run as root because of various privileges.  E.g.:  sudo start my-application-long-ID sudo stop my-application-long-ID etc   I would like to introduce an alias to abbreviate these commands as something like:  alias startapp='sudo start my-application-long-ID'   and run it as startapp and that works but I would prefer to not have sudo in the alias.  alias startapp='start my-application-long-ID'   does not when run using sudo startapp, returning sudo: startapp: command not found.  However, when I added the alias:  alias sudo='sudo '  sudo startapp now works but I am still curious why sudo ignores aliases.


I am a High-School Student and I wanted to study logic.Now , as a background , I have read Set theory, some Geometry and Induction and I thought it would be sufficient enough to begin self studing an elementary subject like Logic. I started from reading some lecture notes , but they were kind of confusing. The Definitions are easy to read but sometimes they explain concepts in a hand wavy way and expects me to automatically understand the concept without any second thoughts (In a way , they are not formal and concise enough for me).I guess I have been reading the wrong logic lecture notes. Sometimes , they have simple definitions but end with hard exercises witch you need a lot of experience to solve. But How Am I expected to solve those problems if I am just studying logic from ground zero. For example ,you are told to do exercise 1.0 for which you need knowledge of chapter 2.0.This makes me frustrated. At this point , I have 3 options, $1$.Download multiple pdf from multiple sources :This is time consuming , but I am definitely willing to do the hard work to read from all of them and gain some insight about this subject. The problem is from reading multiple books(good or bad) ,The things I learn from from them might conflict with each other in my head and I might end up learning nothing good. $2$.Reading One good textbook and going downwards:This might be a good option , but the problem is that ,again , I have 0 experience about this topic. If this is a good option , then It will definitely help me to give some advise about witch textbooks I should start with if I want to learn logic in a Concise , Rigorous and formal way. $3$.Just Give up : Assuming I am a high school student , I might be asking for too much and it might ruin my future student carrier somewhat. So I can just give up and learn this stuff when I grow up .Maybe I should give up because I am not hard working and smart enough to study mathematics like this. It is true That I have 0 experience about this topic and only started to read things like proposition-logic and truth tables.Thats why I am asking this question.Which option I should choose? Edit:Here is a short summary of my background.I am at hi-school studying things like set theory,function,algebra .But still , often I like to go out of my safezone and study things like abstract algebra,linear algebra,calculus,tensor calculus etc.But first I wanted to establish a firm grasp on the foundations of mathmatics (things like proposition logic and axiomatic set theory).I want to also study it rigorously and formally, so that it becomes my second nature.According to my second option , I should definitely choose a good book(like mendelson) and not start with something totally unworthy because that will be a waste of my time.Why do like to   study it rigorously and formally?Because that way I can resolve apparent paradoxes and build up my mathematical foundation without any "structural issues".I also like to research about something if I find any doubt,but I definitely don't like the moments when I find out that what I have learned so far was just a lie and start over again. (that happened to me many time because of bad textbooks and teaching methods)

I just started to learn mathematical logic. I'm a graduate student. I need a book with relatively more examples. Any recommendation?


I have just wrote out a sentence that ended, "this would not of been possible." but the more I look at it, the more it looks wrong.  Would the correct saying be, "this would not have been possible."?  Or do both apply?

I have noticed a lot of people use of instead of have, for example: "that must of been really annoying".  Is this correct?


I need a page to be half content, half node edit form. How can I do this? I thought I'd put the content type's form display into a block. Sounds easy enough. I've been trying contrib and custom modules, but I can't seem to grab the form. Thought I could get away with something like this. class EvaluationBlock extends BlockBase {    /**    * {@inheritdoc}    */   public function build() {     $node = \Drupal::routeMatch()->getParameter('node');     if ($node instanceof \Drupal\node\NodeInterface) {       $render_array = EntityFormDisplay::collectRenderDisplay($node, 'project_evaluation_form');       // error_log($render_array);       return $render_array;     }   } }

I'm attempting to make a page for users to edit data for a specific content type, but I only want them to have access to some of the fields not all. To do so I created a custom form display mode for content. I have a custom controller that is meant to display this form with a custom display mode. Here is the code meant to render it.      public function showCustomForm() {         $node = \Drupal::entityTypeManager()->getStorage('node')->load('123');         $edit_form = \Drupal::entityTypeManager()->getFormObject('node', 'my_custom_form_display_mode_id')->setEntity($node);         return \Drupal::formBuilder()->getForm($edit_form);     }   And I get the error     Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException:   The "node" entity type did not specify a   "my_custom_form_display_mode_id" form class. in   Drupal\Core\Entity\EntityTypeManager->getFormObject() (line 184 of   /var/www/mydomain/http/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php).   I was using this  as an example. But still had no luck.  How would I programmatically load a node edit form with a custom form display mode?


I'm wondering why Hagrid isn't allowed to carry a wand or do magic.  We know that Hagrid carries a pink umbrella with the suspected remnants of his broken wand secreted inside (CoS chapter 7), and that Hagrid does do magic here and there even though he's not supposed to (SS chapters 4 and 5).   We learn in Chamber of Secrets that Hagrid was expelled from Hogwarts (CoS chapters 7 and 13), and that his wand was snapped in half. However, canon also states that witches and wizards are not required to attend Hogwarts; they can attend a different school, such as Beauxbatons or Durmstrang, or be homeschooled (DH chapter 11). To me, this suggests that a witch or wizard doesn't necessarily need to attend a school in order to become fully-qualified. While it doesn't expressly say so in canon, I note that the Weasley twins still use magic routinely after they quit Hogwarts (OOTP chapter 29). Why would expulsion from Hogwarts preclude Hagrid from learning and using magic?  Why can't Hagrid have a functional wand and be allowed to perform magic?

Why was Hagrid's wand snapped in two when he was expelled from Hogwarts? Why was he banned from performing magic? Yes, he was expelled from Hogwarts after being framed by Tom Riddle as being responsible for Moaning Myrtle's death via Aragog the Acromantula. But why did he receive this punishment?  ‘What’ve you been feeding [the pumpkins]?’ said Harry. Hagrid looked over his shoulder to check that they were alone. ‘Well, I’ve bin givin’ them – you know – a bit o’ help.’ Harry noticed Hagrid’s flowery pink umbrella leaning against the back wall of the cabin. Harry had had reason to believe before now that this umbrella was not all it looked; in fact, he had the strong impression that Hagrid’s old school wand was concealed inside it. Hagrid wasn’t supposed to use magic. He had been expelled from Hogwarts in his third year[...] Chamber of Secrets - page 90 - Bloomsbury - chapter 7, Mudbloods and Murmurs  Why would Hagrid's wand be snapped in two and he not be allowed to do magic when:  Attendance and completion of an education at Hogwarts was not compulsory by wizarding law¹; homeschooled children were allowed to do magic for their lessons, and then do magic fully when they turned 17. The Weasley twins dropped out of Hogwarts after practically destroying parts of the castle with fireworks (and conjuring an awesome swamp on the fifth floor), yet were allowed to do magic despite not completing Hogwarts or any kind of homeschooling curriculum (that we know of). No Death Eater character that we know of was banned from using magic, despite their crimes and devotion to Voldemort. I don't recall any Death Eater wands being snapped and the owner banned from performing magic after being convicted of Death Eater crimes (please do correct me if I'm wrong). For example, Bellatrix Lestrange's wand was not snapped in Goblet of Fire when she received a life sentence in Azkaban and, as we know, her wand played a fairly significant part in Deathly Hallows.  ¹I realize in Deathly Hallows Voldemort made attendance at Hogwarts compulsory; however, by that time, Hagrid had been cleared of the charges of being responsible for Myrtle's death and was allowed to use magic again.


I am sure that, I am the only real person who is living in this world and all you all just illusion.  My brain works in two ways it creates the world and makes me feel it i.e it only generates both input and output stimulus . Whatever I think in my brain,it will be created outside the world but in such a way I don't realize it.And even matter and energy can be created through my brain but I am not aware of it..  So nobody is real in this world except me.  Please note :to explain "I am like semi-god I can create anything and might be I am not aware of it "thats why this question arised ...it is nothing to do with dreams/matrix .. So how do I make realize all of you that you are just a illusion and created by me?

While I am familiar with Descartes and the oft-quoted idea, I think therefore I am, I am not familiar with any philosophy that actively sought to rationalize that anybody else exists.  Are there philosophers who analyzed this question? Or is it taken for granted that it is (im)possible for anybody to validate their own existence to somebody else?


Is there a PDF for a distribution defined as a sum of squares of random variables pulled from a family of normal distributions with different standard deviation?  Is there a way of analytically writing the PDF of such a distribution as a hypergeometric function without prior normalization to make all the underlying normal distributions have unit variance?  A possible case of application would be an N-dimensional length of displacement from center under the effect of a random, normally distributed forces along each dimension, each with it's own characteristic variance and mean, different between dimensions.

I need to find the distribution of the random variable  $$Y=\sum_{i=1}^{n}(X_i)^2$$ where $X_i\sim{\cal{N}}(\mu_i,\sigma^2_i)$ and all $X_i$s are independent. I know that it is possible to first find the product of all moment generating functions for $X_i$s, and then transform back to obtain $Y$'s distribution. However, I wonder whether there is a general form for $Y$ like the Gaussian case: we know the sum of independent Gaussian is still a Gaussian, and thus we only need to know the summed mean and summed variance.   How about all $\sigma^2_i=\sigma^2$? Will this condition make a general solution?


I'm something new in latex and I want to add some pdf pages in my document.   For do that I slit de original pdf, because I have some problems with the format, and to insert one page I use a newcomman which I myself make:  \newcommand{\ipdfpag}[4]{%#1 Where is the pdf. #2 page to insert. #3 scale and #4 hspace.    \begin{figure}[H]    \hspace{#4}    \includegraphics[scale=#3]{#1/#2_#1}    \end{figure}  }   I don't know if this is de best way to do this, but I obtain what I want.   Okay, now I have to insert more than one pdf page, if it there are less than 4 or 5 there aren't problem, but I have more than 30, and it's very boring write something like:  \ipdfpag{mitos}{1}{1}{-2cm} \newpage  \ipdfpag{mitos}{2}{1}{-2cm} \newpage  \ipdfpag{mitos}{3}{1}{-2cm} \newpage  \ipdfpag{mitos}{4}{1}{-2cm} \newpage  \ipdfpag{mitos}{5}{1}{-2cm} \newpage  [...]   My question is: Are there the possibility tho create a new command or other thing with the next idea:?  for i = 1,5    \ipdfpag{mitos}{i}{-2cm}  end    I could see that there are commands like \repeat, \loop... but I couldn't understand them and I prefer more easy command.   Thanks, and sorry for my english, I'm not very good at it.

I have this command  \newcommand{\pdfappendix}[1]{     \includegraphics[scale=0.6]{pdf/#1.pdf} }   It works well when I have 1 page pdf but is not including the other pages. Now I decided to change the command to take a second argument which is the number of pages and will repeat \includegraphics that number of times.  I want something similar to (the following is not latex code):  \newcommand{\pdfappendix}[2]{     for index=1 to #2     {        \includegraphics[scale=0.6]{pdf/#1index.pdf}     } }   Example: MyPDF.pdf has 4 pages. I will split it in 4 pdfs with 1 page each: MyPDF1.pdf, MyPDF2.pdf, MyPDF3.pdf, MyPDF4.pdf. The output of the command will be:  Then I will write the command: \pdfappendix{MyPDF}{4}  And it will output:  \includegraphics[scale=0.6]{pdf/MyPDF1.pdf} \includegraphics[scale=0.6]{pdf/MyPDF2.pdf} \includegraphics[scale=0.6]{pdf/MyPDF3.pdf} \includegraphics[scale=0.6]{pdf/MyPDF4.pdf}   Is it possible to do that?  PS: I don't want to use \includepdf because I have some problems with section headers.


the Chinese invented the paper   the Chinese invented paper       I can't decide which article we get before paper — zero article or the.  Are we talking about paper in general (so zero article is used before it) or is the definite article the used?

I can’t for the life of me figure out where to use a and where to use the — and where there is no article at all. Is there a simple rule of thumb to memorize?   The standard rule you always hear:     “If a person knows which item you are talking about then use "the"   . . . doesn’t clear things up for me, as I have no idea whether or not they know.


We want to delete the files under /tmp that are older than 100 minutes.  What is the difference between:  find /tmp -type f -mmin +100 -exec rm {} \;   and:  find /tmp -type f -mmin +100 -exec -delete    second - Is it possible to add some print / echo in the command so that it will print each file it deletes?  /tmp/hadoop-unjar7118762490947462979/META-INF/NOTICE was deleted !!!

I'm trying to understand the difference between these two commands: sudo find / -name .DS_Store -delete  and sudo find / -name ".DS_Store" -exec rm {} \;  I noticed that the -exec ... {} method is preferred. Why? Which one is safer/faster/better? I've used both on my Macbook and everything appears to work well.


I'm trying to fix this but it doesn't work. Inside the command block. I typed in   /setblock 125 64 617 minecraft:command_block 0 replace {Command:"testfor @a {Inventory:[{id:"minecraft:bedrock"}]}"}   and it said:     [09:58:00] Data tag parsing failed: Unexpected token 'm' at: minecraft:bedrock"}]}"

Does someone know how to set a command block with a command inside using the setblock command?  I have created this code /setblock <x> <y> <z> command_block {TileEntityData:{Command:"testfor @p[_=1]"}} but it doesn't works.  Do someone know how to do that?


I upgraded today to 18.04. One item I am missing is a "Show desktop" button in the dash. How can I add this without running a script?  (This must be a common request)

I am migrating from Unity to GNOME. One item I am missing is a "Show desktop" button (aka "minimise all windows") in the dash. How can I add this functionality to the GNOME dash (or Ubuntu dock in Ubuntu 17.10 and later), even if it means making a custom .desktop file?  (I know that I can use the Ctrl + Super + D   and that I can install , but I specifically want a button in the dash.)


The task is to delete the nth node of a doubly-linked list. I drew it out, and I don't see the nullpointer error that's tripping me up.   I've created an if-statement to handle the edge case of an empty list. I created a while loop to traverse the linked list otherwise. I get there error when I'm attempting to set the node links. Details below.       public double delete (int k) {      int i = 0;     Node temp = first;     double retVal;      if (k < 0 || k >= N) throw new IllegalArgumentException ();      if (temp == null)         return 0;      while (temp != null) {              if (i == k - 1) {                 temp.next = temp.next.next;                 temp.next.next.prev = temp;                 temp.next.next = null;                 temp.next.prev = null;                 return temp.next.item;             } else {                 i++;                 temp = temp.next;             }         }      return 0;   I was expecting to delete and return the node to be deleted. Instead I got a nullpointerexception at the line commented with "//Issue".

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?


Can anyone explain what this fast-foward prompt means?  I jumped in on the BNK-3R quest of "Where Angels fear to tread" with friends in co-op before I got to that point in my own game.  When I accepted the quest for "Angels" from Roland it prompted me to fast foward through parts of the mission i already completed.  I said yes but I don't understand what saying "yes" did and if i should say "no" in the future.

In the first Borderlands, I got quite frustrated with the confusing affects multiplayer had on my character in singleplayer. Many times, someone in my party got a message saying they were ineligible for a quest and that they would not get credit for it.  Eventually, we all decided to make characters that we would all play only with each other and never play in single player.  This was quite an unideal solution.  Has Borderlands 2 solved any of these problems? What happens if I connect to a game with someone ahead of me in the story? What happens if I connect to a game with someone behind me? And what if I host in each of those situations? Is mission progress saved? Does everyone get XP and rewards?


Some time ago I enrolled in a class called "Introduction to Real Analysis" in which we learned a lot about Set theory and it's axioms, I learned about the specification axiom, about Russell's paradox and (my favorite part) the nonexistence of the set of all sets. Later on discussing with friends they told me that this was nonsensical since the axiom of regularity (which I didn't knew) solves the Russell's paradox.  Reading in Wikipedia and in other materials about the axiom of regularity I couldn't understand why it is needed. It isn't clear to me how it is true and why we should 'believe' in it, Isn't the axiom of specification more than enough to define a set? Aren't the two getting in the way of each other?  And is my favorite proposition false?  The universe exists?

Besides the axioms of extensionality and regularity, all of the axioms of ZFC either postulate the existence of a set or give a method for generating new sets from existing sets.  Extensionality then gives an equivalence relation on sets which allow us to confirm our definitions we create are well defined.  Regularity then gives a rule that all sets must satisfy.   From all the other axioms (besides regularity) we can start generating sets and decide which generated sets are equivalent. For all generated sets they either will satisfy the proposition in the axiom of regularity or they will not.  If all sets generated do satisfy the axiom of regularity then what is the point of the axiom of regularity? It adds no additional structure to the sets of ZFC.  If there exists a generated set that does not satisfy the axiom of regularity then aren't the axioms inconsistant?  I believe my misunderstanding stems from a misunderstanding with how logic/formal systems work. Any clarification would be greatly appreciated.


Is there a command which can take a screenshot of a specific area of the desktop? I use Ubuntu. Thanks for every answer.

Is there an equivalent of the Window's Print Screen + Paste (or better yet the Mac OS Cmd+Shift+4, Space) in Gnome?


I am getting an epoch String from my DB which looks something like this : 1391328000000   I am having a hard time trying to convert it to Java Date.  I tried the following  :  private String buildDate(String dateString){         System.out.println("dateString " + dateString);          DateFormat format = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");         format.setTimeZone(TimeZone.getTimeZone("Etc/UTC"));         String formatted = format.format(Integer.parseInt(dateString));          return formatted;     }

I have a string containing the , and I need to convert it to a Java Date object.  String date = "1081157732"; DateFormat df = new SimpleDateFormat(""); // This line try {   Date expiry = df.parse(date);  } catch (ParseException ex) {   ex.getStackTrace(); }   The marked line is where I'm having trouble. I can't work out what the argument to SimpleDateFormat() should be, or even if I should be using SimpleDateFormat().


I tried to fix my problem with dotsymbols in pstricks (see ) and end up with an update of several packages in miktex. Now (after update) pstricks stops working. I get the following error:  (C:\Users\flenk1\AppData\Roaming\MiKTeX\2.9\tex/generic/pgf/utilities\pgfkeysfi ltered.code.tex \pgfkeys@tmptoks=\toks20 )) (C:\Users\flenk1\AppData\Roaming\MiKTeX\2.9\tex/generic/pgf/utilities\pgffor.co de.tex Loading [  ! LaTeX Error: Missing \begin{document}.  See the LaTeX manual or LaTeX Companion for explanation. Type  H <return>  for immediate help.  ...                                                l.10 \ProvidesPackageRCS[v                           \pgfversion] $Header: /cvsroot/pgf/pgf/generic/pgf...  ? x   I tried the following compile commands:  C:\Program Files\MiKTeX 2.9\miktex\bin\x64\latex.exe C:\Program Files\MiKTeX 2.9\miktex\bin\x64\xelatex.exe C:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe C:\Program Files\MiKTeX 2.9\miktex\bin\x64\lualatex.exe   but all end up with the same error. Even after a complete reinstallation of miktex the same error remains.  My Minimum example is really minimal:  \documentclass{scrartcl} \usepackage{pstricks} \begin{document} This is a test \end{document}   Is there a possibility to switch back to an older version of pstricks or pgf? Most of my files use pstricks, so for me this error is catastrophic.  Thanks for any help.

Consider the following MWE:  \documentclass{article} \usepackage{pstricks} \begin{document} A \end{document}   It produces the error  Runaway argument? ] {pgffor.code.tex}  ! Paragraph ended before \ProvidesPackageRCS@i was complete. <to be read again>                     \par  l.11   How do I fix this?


I have a usb flash drive which is not recognized when plugged into two of my PCs. Here is what happens when I plug in the drive:  [ 1809.142270] usb 2-3: New USB device found, idVendor=058f, idProduct=1234 [ 1809.142278] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 1809.142283] usb 2-3: Product: Mass Storage Device [ 1809.142287] usb 2-3: Manufacturer: Alcor Micro [ 1809.142793] usb-storage 2-3:1.0: USB Mass Storage device detected [ 1809.143306] scsi9 : usb-storage 2-3:1.0 [ 1810.141362] scsi 9:0:0:0: Direct-Access     Generic  USB Flash Disk   7.76 PQ: 0 ANSI: 4 [ 1810.141924] sd 9:0:0:0: Attached scsi generic sg2 type 0 [ 1810.146091] sd 9:0:0:0: [sdb] Attached SCSI removable disk   And here is the rest:  ls -l /dev/sd* sda   sda1  sda2  sda3  sda4  sda5  sdb    ~# dd if=/dev/zero of=/dev/sdb dd: failed to open ‘/dev/sdb’: No medium found   Any suggestion on how to bring this flash drive to life? I have tried with gparted and a few other tools including urescue windows

I've run across (personally or by proxy) a bunch of storage media that exhibited physical problems during their life. Hard disks, solid state drives and other flash storage media all fail after some time. The situation is worse with USB flash drives and flash cards because of the large amount of suppliers with inferior flash cell and flash controller quality.  How can I reliably detect if a storage drive suffers from physical damage?  Note that this question isn't about file system integrity (which can be checked with ).


I added comments to a bunch of cells. When I then sorted the cells, the comments did not follow their original cell and now was connected to the new cell.  This is a massive problem and now my comments are all messed up.   This is the same problem that was brought up here, but was not answered.    Any ideas?

I'm running into this weird problem with Google spreadsheets: if the cells have comments on them and I sort the spreadsheet, the rows sort but the comments stay in the same position, and don't move with the cells they're attached to.  In other words, the cells look like this:  A C  <-- comment on this cell B   and then I sort by this column:  A B  <-- comment remains on this cell (stays in position) C  <-- comment should have remained attached to this cell   This means that sorting is completely broken and I can't use it at all, because I clearly need the cell comments to stay with the cell they're attached to.  Is this a bad bug in Google Spreadsheets, or am I missing something here?


If some one placed a lure module on a PokeStop and I go there am I stealing their Pokemons? For example when I see a Pidgey spawn does that mean everyone seea the Pidgey spawn and the first who clicks wins? Because I really don't want to steal other people's Pokemon when some one paid for that.

I was wondering if everyone sees the same Pokémon on the map. If I catch all the Pokémon around me will others be unable to get any?


I want to varify if the entered string is in email format or not. I am bit confused. I tried to write below code but failed. Can ayone help me please.  Javascript Code: <script>             function emailValidation(id)             {         var emailPattern =  var emailPattern = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;                 if (emailPattern.test(id) === false)                 {                     alert("not a valid email address.");                  }                              document.getElementById(id).value = "";             }          </script>  HTML Code:              <input type="text" id="empemail" onblur="emailValidation('empemail')" name="email" placeholder="eg: aaa@abc.ca" required="">

Is there a regular expression to validate an email address in JavaScript?


I am attempting to drag a file represented by a TreeView node onto the desktop, Windows Explorer, or any other applications that allow files to be dropped onto them.  I've written the code below based on various Internet examples I've found and I'm running it as administrator.  It does allow me to drag as long as I remain in the TreeView control that contains the nodes, displaying the Copy icon with the cursor as it moves.  However, when I drag it off the control to the desktop or Windows Explorer for example, the icon turns into the red circle with a slash across it and nothing gets dropped.  I've ensured that the dragged file actually does exist.  private void treeView_Files_ItemDrag(object sender, ItemDragEventArgs e) {     DoDragDrop(e.Item, DragDropEffects.Copy); }  private void treeView_Files_DragDrop(object sender, DragEventArgs e) {     TreeNode NewNode;      if (e.Data.GetDataPresent("System.Windows.Forms.TreeNode", false))     {         Point pt = ((TreeView)sender).PointToClient(new Point(e.X, e.Y));         TreeNode DestinationNode = ((TreeView)sender).GetNodeAt(pt);         NewNode = (TreeNode)e.Data.GetData("System.Windows.Forms.TreeNode");         string[] files = new string[] { "C:\\temp\\TestFile.pdf" };         DataObject dataObject = new DataObject(DataFormats.FileDrop, files);         DoDragDrop(dataObject, DragDropEffects.Copy);     } }

I've seen this done in Borland's  environment, but I'm not sure how to go about it for a C# application I'm working on. Are there best practices or gotchas to look out for?


I'm using QGIS 3.0 for comparison of several landcover grids. These have a set style with 72 categories of landuse. The Style menu allows you to give a text label for each value within a band. The Identify tool gives the band and value for a particular pixel but does not give the label - which forces you to remember or look-up value labels.   Is there some setting to show the associated labels with the Identify results?

I have been struggling for one hour with this simple problem (QGIS 1.8.0-Lisboa, Windows 7) :  I have a raster layer. I would like to display the label and not only the band value when I use the Identify Features button. Is it possible?


Determine the set of continuity point of Riemann function defined on $ [0,1]: $ $$  f(x) = \begin{cases} \frac{1}{q}, & x = \frac{p}{q} \mbox{ is rational in lowest terms} \\ 0, & x = 0 \mbox{ or }  x\mbox{ is irrational} \end{cases}   $$ $( \frac{p}{q}$ is in lowest terms, if $p$ and $q$ are integers with no common factor and $q > 0$) I'd like to determine the set of points of continuity and I really don't know how to approach this.

In :  $$ \begin{align} t(x) = \begin{cases} 0 & \text{if $x$ is irrational}\\ \frac{1}{n} & \text{if $x = \frac{m}{n}$ where $\gcd(m,n) = 1$} \end{cases} \end{align} $$  I can prove the discontinuity at rational $b$ by taking a sequence of irrationals $x_n$ which converge to $b$.   But while going through an argument for continuity at irrationals.  I found this in a book.      On the other hand if $b$ is an irrational number and $\epsilon > 0$   then there is a     natural number $n_0$ such that $1/n_0 < \epsilon$.   There are only finite number of rationals with denominator less than   $n_0$ in the interval $(b-1,b+1)$. Hence we can find a $\delta > 0$   such that $\delta$ neighbourhood of $b$ contains no rational with   denominator less than $n_0$.   I understand the rest of the proof. But I am unable to prove the emphasized text. Although I find it intuitive.


Today,I design a paper cover,some English word need to use  the typeface of "Times New Roman" while other English sentence need to use other typeface.  My trial  \documentclass[a4paper,UTF8,winfont]{ctexart} \usepackage[top=2.8cm, bottom=2.5cm, left=1cm, right=1cm]{geometry} \usepackage{setspace} \usepackage{amsmath} \usepackage{times} \usepackage{mathptmx} \begin{document}  \title{Simulation of a SCARA robot with PD and learning controllers}  \section{PD controller} \end{document}   However,the \usepackage{times} apply all english sentence to the typeface of "Times New Roman".Here,I encounted a problem,but I don't know how to solve it?Cab some help me?Thanks sincerely!

The standard font packages make global changes to the fonts in my document. What if I want to use a particular font for just a portion of my text?   How do I find the right name of the font? How do I select the font? How do I restrict the scope of the font change?     There are separate answers for different flavors of TeX (quick links):


I installed Ubuntu Server, and found that it only provides a command line interface  I know how to install a GUI, but I want to know whether I should do so. Am I better off sticking to CLI-only?

One day my company is going to need a server, and I like Ubuntu since it has the least amount of viruses out of all the OSes (I think), but when I look at the Ubuntu Server it only has black background and white text, which is command line. Is that all to Ubuntu Server? Or is it like Ubuntu Desktop, and a modules for command line? I don't really want it to just be the command line.  I'm new to the Ubuntu OS stuff. Even now I still use windows.


I got this message when I restarted my Ubuntu MATE 16.04 32-bit. How do I fix this?  error: file '/grub/i386-pc/normal.mod' not found

I've installed ubuntu 13.10, but after rebooting I get the message:  GRUB loading: Welcome to GRUB!  error: file '/grub/i386-pc/normal.mod' not found Entering rescue mode... grub rescue>   I have the following partitons setup:  /dev/sdb5:  /boot  ext4   500MB /dev/sdb6:  swap            4GB /dev/sdb7:  /      ext4    60GB /dev/sdb1:         ntfs   900GB   I have already tried solution from "" and "" but did not get success.  I am using 1TB external HDD for this and don't want to mess the windows on /dev/sdaXY . i have acer travel mate with Intel i5 processor,4 GB RAM. I am using iso image of 64 bit ubuntu named "ubuntu-13.10-desktop-amd64.iso" .. Please help me, I have tried various solution but did not fix it for last 3 days.


I want to cite a url that contains cyrillic letters: wikipedia.org/wiki/Апории_Зенона However it is displayed as  Is there any way to display it as https://ru.wikipedia.org/wiki/Апории_Зенона? I am using LuaLaTeX with biblatex MWE \documentclass[12pt]{article}  \usepackage{polyglossia} \setmainlanguage[babelshorthands=true]{russian} \setotherlanguage{english}  \setmainfont{FreeSerif} \setsansfont{FreeSans} \setmonofont{FreeMono}  \usepackage{hyperref}  \usepackage[         backend     =   biber,%         style       =   numeric,%         sortlocale  =   en_US,%         language    =   auto,     ]{biblatex}  \addbibresource{b.bib}   \begin{document} \nocite{*}  text  \printbibliography  \end{document}  Bibliography @online{zenon,     author = {{Зенон Элейский}},     title  = {Апории Зенона},     url    = {https://ru.wikipedia.org/wiki/Апории_Зенона} }

I try to add a unicode URL into the bibliography and LaTeX automatically converts the cyrillyc letters into percent-encoding. I found that hyperref is responsible for this, but I found no way to disable it. It's OK to encode the link itself, but in document I don't need this, the reader wants to see letters instead of character codes. I really don't want to print this https://ru.wikipedia.org/wiki/SLAM_(%D0%BC%D0%B5%D1%82%D0%BE%D0%B4) on papaer, this gives no useful information to reader.   TeX:  \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T2A]{fontenc} \usepackage[english, russian]{babel}  \usepackage{biblatex} \addbibresource{1.bib}  \begin{document} Hello \cite{Wiki:SLAM}. \printbibliography \end{document}   1.bib:  @InCollection{Wiki:SLAM,   title     = {SLAM (метод)},   booktitle = {Википедия~"--- свободная энциклопедия},   organization = {Wikimedia Foundation, Inc.},   address    = {США},   date      = {2016-05-23},   url       = {https://ru.wikipedia.org/wiki/SLAM_(метод)},   urldate   = {2017-02-22},   language  = {russian}, }   Result:    I want to have https://ru.wikipedia.org/wiki/SLAM_(метод) in the URL.


Prove that any subset of six elements of $S=\left\{1,2,...,9 \right\}$ must contain   at least two elements whose sum is 10.   I thought of using the pigeonhole principle, but I can't think of how to write this proof, I can only think of particular cases.  Let's say I have the subset $A\subset S$, $A=\left\{1,2,3,4,5,6 \right\}$, so there's $6+4=10$, and $5+2+1$ and blah blah blah...   I can't think of a way to "generalize" this... Any ideas?

How can I go about solving this Pigeonhole Principle problem?   So I think the possible numbers would be: $[3+12], [4+11], [5+10], [6+9], [7+8]$  I am trying to put this in words...


i have point Feature (man hole) and line feature (cable). just i want to know which cable length is connected in between which two manhole. if i put spatial joint it will take only starting point or end point. i want know the both point.  Please revert me further clarification. i am new to the GIS Field. so please kindly help me out.

I have two shapefiles, Point and Polyline. I'm trying to populate my polyline layer with the point data ID (systemID) where the lines start to where they end; eg. create two columns (from and to). The lines already have flow direction assigned to them. I am using ArcHydro tools but Arcpy is also fine.  In ArcHydro I have tried using Attribute Tools > Generate From/To Nodes for lines but it creates values for To and From that are not from my point data. My other alternative was using Feature to Vertices and joining the result to my point data table to get the systemID. But then I would have to update the polyline layer as well. I am sure there is a easier way of doing it.  Note: not all the lines have points at the vertices, blank values are fine for them.


Suppose $\sum_{n=2}^{\infty} a_n$ is a convergent series. Is the following series convergent as well? $$\sum_{n=2}^{\infty}{\sqrt{a_n} \over \ln{n}}\left( n^{a_n}-1 \right)$$ The part with $n^{a_n}-1 $ looks quite similar to $\sqrt[n]{n}-1$ which behaves like $\ln{n}$, however, I'm not able to tie this fact to the behavior of the whole expression. Any suggestions?

If $\sum_{n=2}^{\infty}a_n$ converge, then also converge this series? $$\sum_{n=2}^{\infty}\frac{\sqrt{a_{n}}}{\ln\, n}(n^{a_{n}}-1)$$  Please verify my answer below  Counterexample:  $$a_{n}=\begin{cases} \frac{1}{k^{2}} & n=k!^{k^{2}}\\ \\ 0 & \text{All other cases} \end{cases}$$  When our infinites sum is equal to  $$\sum_{k=1}^{\infty}\frac{1}{k}\cdot\frac{1}{2\, \ln\, k}\cdot(k!-1)$$


How do I replace the following array with an ArrayList.   Employee[] companyTeam = {manager, engineer1, superviso1, accountant, intern };

I have an array that is initialized like:  Element[] array = {new Element(1), new Element(2), new Element(3)};   I would like to convert this array into an object of the  class.  ArrayList<Element> arraylist = ???;


I'm running sudo apt-get update to update a new install on Ubuntu 16.04.2 64 bit. I get the following error message:  The repository 'cdrom://Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2) xenial Release' does not have a Release file.   N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.   N: See apt-secure(8) manpage for repository creation and user configuration details.   E: Failed to fetch cdrom://Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2)/dists/xenial/main/binary-amd64/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs   E: Some index files failed to download. They have been ignored, or old ones used instead.   I tried using the apt-cdrom command to mount the cdrom but it seems to not work, I think i'm typing it in wrong as i am new to linux and have only been using it for a few weeks.I try to type in commands and it comes back as command cannot be found.the apt-cdrom has great info on how to probably solve this problem but I'm not sure how to use it or how to properly type the commands in.

When updating I got this error message:  W:Failed to fetch cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)/dists/oneiric/main/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs W:Failed to fetch http://ppa.launchpad.net/synce/ubuntu/dists/your_ubuntu_version/main/source/Sources  404  Not Found   What to do?


I've come to an impasse with my player where we are unable to determine that if Mage hand can cause a Stunning effect by gripping the targets testicles I've determined through research that 10 pounds are a lot more weight than you think at first: it is roughly 44 newtons that's like 44 apples. Would the mage hand roll anything for this feat? Would the monster roll con?

My players have been asking to improvise specific combat actions, mostly the archer wanting to aim at specific body parts. I haven't been able to find anything in the DMG or the PHB on the subject so I was wondering how I should deal with this.    How (if at all) should an attack roll be modified when targeting a specific body part? If there is not RAW on this I am open to playtested house rules per .


Let's have $X,Y,Z$ independently exponentially distributed with parameters respectively $\lambda_x, \lambda_y, \lambda_z$. I want to calculate $$P(X<Y<Z)$$ My work so far According to  I know that $P(X<Y)=\frac{\lambda_x}{\lambda_x+\lambda_y}$ and $P(Y<Z)=\frac{\lambda_y}{\lambda_y+\lambda_z}$ I want to combine those two to calculate initial probability. $P(\{X<Y<Z\})=P(\{X<Y\} \cap\{Y<Z\}) \neq P(\{X<Y\})P(\{Y<Z\})$ because indeed $X,Y,Z$ are independent but $X<Y$ and $Y<Z$ are not (due to $Y$ appearance in both inequalities). So I had a problem with this calculation. Could you please give me a hand with calculation above ? Is there any way how can we smoothly use our knowledge with $P(X<Y)$ to calculate $P(X<Y<Z)$ ?

Suppose we have three independent exponential random variables $A$, $B$ and $C$  with respective parameters $1$, $2$ and $3$.   Calculate $P(A<B<C)$.  The hint says this problem could be solved with calculus and without calculus. I am really curious how to approach it with different methods.


I generated 300mb text file, trying to edit it using sublime 3 on xubuntu 13.10 64 bit, it's so slow and crashing, I'm not a vim/vi user, what is the best editor to work with these kind of files.  I only need to search for and remove duplicated text.

Is there any text editor, which can edit such file?  I've  tried:   gedit kate nano vim mcedit   without success.