I been searching for a way to use this  tool but print the XY in different coordinate system like WGS 1984 (decimal degrees). I want to do this without changing my data frame and keep it in its original stateplane system. I have created a python addin to display the coordinates in DD but this required the data frame to convert to WGS 84 and back again to its original projection (stateplane). This option does work but cannot be used when editing because it locks the mxd. So what is the python code to find the XY in DD from the mouse click regardless of what projection the data frame is set?     here is what i have so far:  class Sel_Property(object):     """Implementation for Notifications_addin.selectproperty (Tool)"""     def __init__(self):         self.enabled = True         self.shape =3     def onMouseDownMap(self, x, y, button, shift):         mxd = arcpy.mapping.MapDocument("Current")         dataframe_string = mxd.activeView         dataframe= arcpy.mapping.ListDataFrames(mxd,dataframe_string)[0]         oldspatialref = dataframe.spatialReference         spatialref = arcpy.SpatialReference(4326)         dataframe.spatialReference = spatialref         dataframe.spatialReference = oldspatialref         pythonaddins.MessageBox("Your mouse clicked at " + str(x) + " , " + str(y),"My Coordinates:")   Here is the new code if anyone is interested.      mxd = arcpy.mapping.MapDocument("CURRENT")     pt = arcpy.PointGeometry(arcpy.Point(x, y), mxd.activeDataFrame.spatialReference)     Point = pt.projectAs(arcpy.SpatialReference(4326))     partObj = Point.getPart(0)     partObj.X     partObj.Y     pythonaddins.MessageBox("Your mouse clicked at " + str(partObj.X) + " , " + str(partObj.Y),"My Coordinates:")

I want to determine the coordinates of my current data frame. To do so I wrote this script:  def DataFrame ():    mxd = arcpy.mapping.MapDocument("CURRENT")    df = arcpy.mapping.ListDataFrames(mxd,"Layers")[0]   return mxd,df  def Center (df):    extent = df.extent    xmin = extent.XMin   xmax = extent.XMax   ymin = extent.YMin   ymax = extent.YMax    x = xmax - ((xmax - xmin)/2)   y = ymax - ((ymax - ymin)/2)   return x,y   As long as I am working with a geographic coordinate system, the results will be exactly the longitude and latitude. But as soon as I have a projected coordinate system it will return map units (i.e. meters). How can I avoid that problem? I always need to get lon/lat independend on the maps projection.


Sometimes after I did a commit, I found out that I left out a file which should also be included in the commit but actually not. What I often did was commit again.  git add the_left_out_file git commit "include the file which should be added in the last commit"   I think it might not be a good idea to do so, what I want to do is just include the file without adding a commit. Something like this,  git add the_left_out_file git add_staged_files_to_previous_commit   Is it possible?

I wrote the wrong thing in a commit message.  How can I change the message? The commit has not been pushed yet.


how to get <?php wp_title(''); ?> only in lowercase letters ?  I tried a lot but cant get it ! Perhaps one of you can tell me how to proceed ?

I used the following code to give out the category name (without link) in a single post.  How would it be possible for the category name that is given out to only appears in small letters ?  I just think this has to be made with substring, but I dont get it :) Could somebody please help me :)  <?php foreach((get_the_category()) as $category) { echo $category->cat_name . ' '; } ?>


I'd like to know how to get the file author using C#, Not the file owner but the file Author, because when searching I find just how to get the file owner.  I already try this:   string user = System.IO.File.GetAccessControl(file).GetOwner(typeof(System.Security.Principal.NTAccount)).ToString();   But this get the file owner.

I'm trying to find out how to read/write to the extended file properties in C# e.g. Comment, Bit Rate, Date Accessed, Category etc that you can see in Windows explorer.  Any ideas how to do this? EDIT: I'll mainly be reading/writing to video files (AVI/DIVX/...)


In the first part, there is a scene when Doc shows Marty the demonstration of time travel. Afterwards,when Einstein returned, the DeLorean is covered in ice.  What is the reason for this? If that happened due to time travel, why was it not shown after other time travels?

I have noticed some things that I can't understand in the Back To The Future films about the DeLorean.  In part I, when Einstein is sent 1 minute into the future the DeLorean comes back completely frozen. Why wasn't it cold in any of the other times when it was used for time travel?  In part III, the fuel line goes and this prevents it from going up to 88mph which they use a train to get up to 88mph instead. Since the DeLorean was turned into a flying car in part II, why didn't they just have it fly instead of using a train to get it to 88mph?


Consider the sentence below:     During this hour, I will refuse nothing to the soul that makes a request of me. In this hour, you can obtain everything for yourself and for the others for the asking.   Is the person who is mentioning the sentence basically saying that "I will grant every one of your request that you make to me during this hour"?

"I will refuse nothing to a soul that makes a request of me in virtue of my passion"  I am having trouble understanding this sentence because of the statement "in virtue of my passion" that follows immediately after "....request of me".(English is my second language). Could someone re-phrase the above sentence into an easier form to understand?  More specifically, is it  "I will refuse nothing to the soul that makes a request of (me in virtue of my passion)", or  "I will refuse nothing to the soul that makes a request of me,(in virtue of my passion)"?  Thank you


I have a file system mounted on /srv, that is unencrypted. This is perfectly fine; the local systems are trusted.   However, I want to perform backups with , which does not support encryption. Is there any reverse encryption file systems, that I can use to get a on-the-fly encrypted version of my normal filesystem mounted somewhere else on the system, that can be backed up?  For performance reasons, I would prefer not to encrypt the base file system, as this contains 8TiB of data, although this is a solution if I find no other.  I would prefer the file names to be encrypted as well, but this is not a requirement.  This is currently on 16.04, but answers does not have to be for this particular version.

Currently I'm using EncFS to encrypt my directory "confidential" to ".encconfidential" and sync that encrypted directory using an online service (e.g. Dropbox, UbuntuOne etc). However my entire disk is already LUKS encrypted, so the double encryption takes a toll on performance.  I wonder is there an "inverted" EncFS option? An unencrypted directory gets mounted and in the mounted directory you only see encrypted files. So I could work with the unencrypted documents while the sync tool sees and read/writes the encrypted files only.  Clarification: My primary use case is sync not backup. I want to be able to securely keep machines in sync without the double encryption penalty when operating local (I have to wait when I hit save, compared to transmission time an encrypted operation is a minimal increment in time - and it is background time, not user time)


What is the best way to compare two byte arrays in C#? I do not wish to use a for loop.  I have the following arrays:  byte[] hashBytes = Convert.FromBase64String(pass);   and:  byte[] hash = pbkdf2.GetBytes(20);   I have tried using:  bool isEqual = Enumerable.SequenceEqual(hashBytes, hash);   However, it always returns false.

How can I do this fast?  Sure I can do this:  static bool ByteArrayCompare(byte[] a1, byte[] a2) {     if (a1.Length != a2.Length)         return false;      for (int i=0; i<a1.Length; i++)         if (a1[i]!=a2[i])             return false;      return true; }   But I'm looking for either a  function or some highly optimized proven way to do this.  java.util.Arrays.equals((sbyte[])(Array)a1, (sbyte[])(Array)a2);   works nicely, but it doesn't look like that would work for x64.  Note my super-fast answer .


I am looking for a sci-fi short story that was assigned to my class in middle school (around 2005), but was presumably written in the latter half of the 20th century. I am not sure if it was completely age-appropriate.  The plot revolves around a brother (max age 12) and his sister (max age 8), who have a playroom walled with crystals that can recreate any environment they imagine. The room is very good at what it does - think Proust's strong emotional reaction to smells, but with all senses. The parents of the children are having second thoughts on having the crystal room in their house, especially as it seems to be the only place the children want to play, and are planning to get rid of it. The children are very against this idea.  Although the parents have had a bad feeling about the room and its effect on their children's development for a while, when both they and the children enter the room, it is implied that the little sister changes the the environment to a serene scene of the Swiss Alps, and the parents know this, with both the calm emanating from the room and this fact placating their fears. However, the next day, the father's wallet goes missing somewhere in the house, and when his search leads him the the playroom, he finds himself in a oppressively hot savanna, with groups of hungry lions in the near distance. It is implied that this is a trap that the children set to kill their parents. Whether the lions are tangible or holograms are uncertain, as is the mode of murder.  The last scene is of an adult neighbor or family friend visiting the house, and the children are happily having a tea party outside. They are asked where their parents are, but I cannot remember their reply.

I read this short story(I believe it was under novella length, but I could be mistaken) a while back, and I am trying to identify the title for a friend.   Plot:      Parents(male and female) get a computer aided/holographic nursery for their children. The mother becomes increasingly agitated as the children withdraw more. The children are barely even featured in the story, and the ending concludes with lions possibly eating the parents.   Publishing date: Years ago.   Tech level: Seemingly functional AI, not much more.


I would like to remove by Ubuntu partition by formatting its drive in the Windows Disk Manager. However, how can I restore the Windows 10 bootloader after this action? I no longer wish to use GRUB.

I installed Ubuntu on a system that has Windows 10 installed. I can boot to Windows or Ubuntu normally using GRUB. I want to delete Ubuntu partition, but first I must restore the Windows 10 MBR.  In  (applies to Windows 7 and Windows Vista) they say to use Bootrec.exe with options /FixMbr /FixBoot, but when I type "bootrec.exe /FixMbr" in a command prompt, Windows says:     'bootrec.exe' is not recognized as an internal or external command.   I say I can boot to Windows 10 and run a command prompt from there (I don't need to use an installation medium), but I don't know what to enter.


After looking around for a while I've found several good pages describing how to check and see if a bash script is running interactively and , but one of them that I keep seeing over and over is checking the variable $- for the presence of i to signify that it is interactive.  I'm looking for a way to use an if statement that would work with both /bin/bash and /bin/sh (which is typically aliased to /bin/dash on Ubuntu systems), or in fewer words "an interactive if test that is universal as possible"  For bash it seems these things should work:  Case Statement  case "$-" in *i*)    echo This shell is interactive ;; *)  echo This shell is not interactive ;; esac   If Statement  if [[ $- == *i* ]] then     do_interactive_stuff fi   But $- is apparently not set in dash. Possibly because $- is supposed to be the  variable which      was originally a ksh construct adopted into Bash, and unfortunately it does not seem to work reliably in Bash scripts... [ for it's intended purpose however] ...One possible use for it is to have a script self-test whether it is interactive.   So is there an (relatively simple) if test that can be used both with bash and dash?  Or am I just "doing it wrong?"  ps: I have been under the impression that dash is faster than bash, and unless the script needs "bash specific" functions it would be better to hashbang it as #!/bin/sh and let it use the system-default shell. I get that checking for an interactive shell in the way mentioned above is "bash specific" but it seems odd to think there is not a more universal way. In the script I'm working on I don't need any other bash-specific functionality.

I think I understand the differences between an interactive, a login and a batch shell. See the following links for more help:    (from the sister site: )  (from A User's Guide to the Z-Shell)   My question is, how can I test with a command/condition if I am on an interactive, a login or a batch shell?   I am looking for a command or condition (that returns true or false) and that I could also place on an if statement. For example:  if [[ condition ]]    echo "This is a login shell" fi


When I run the following code:  public static void main(String[] args) {     float number = 10.0f/6.0f;     System.out.println(number); }   My output is:  1.6666666   This sort of makes sense to me - float has seven digits of accuracy. Not sure why the integer portion doesn't count as one of those digits, or why the last digit isn't a 7, but okay. Similarly, when i switch to double:  public static void main(String[] args) {     double number = 10.0/6.0;     System.out.println(number); }   My output is:  1.6666666666666667   This also sort of makes sense. Double has greater accuracy. 15 digits according to my textbook. I've got a 16 digit mantissa and this time it rounds up to 7 at the end. Not sure why the deviation in the number of digits, and maybe the 7 at the end where we had a 6 at the end of the float is due to the fact that the original calculation is happening in binary and being converted to decimal.  What I don't understand though is what happens when I do this:  public static void main(String[] args) {     double number = 10.0f/6.0f;     System.out.println(number); }   My output is:  1.6666666269302368   My understanding is that the division results in a float that is implicitly converted to a double when it is assigned to the variable, but where do all the extra digits come from? I expected zeros. I thought that it might be that the java compiler treats the situation specially because it sees that the mathematical expression is part of the declaration and initialization of a double type variable, but the following code has the same output:  public static void main(String[] args) {     float number1 = 10.0f/6.0f;     double number2 = number1;     System.out.println(number2); }   Again:  1.6666666269302368

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I've been doing extensive research into photography, and I want to ensure that I understand the "Rule of Thirds" correctly.  So my question, to all the experts out there, is, is this photo a good example of rule-of-thirds? Can you tell what the intended subject is?  (Note: This was taken with a smartphone camera purely as a quick demonstration. So ignore the over-exposed sky :-P )

Please can someone explain the "Rule of Thirds"?    What is it? What does it tell me?   Why is it important?   What can I do with it?


This command:  rm -rf "$HOME/.quicklock/locks/"*   does seem to remove files or folders in the locks directory, which start with "."  how can I remove those files too? Any other filenames that would fail to be removed given that command?

How to match the hidden files inside the given directories   for example   If I give the below command it's not giving the result of the hidden files,     du -b maybehere*/*   how to achieve this simple using a single command instead of using   du -b maybehere*/.* maybehere*/*   as I need to type maybehere twice.


I have MapListDialog which inherits from base class ListView. But I have problem with "undefined reference to" by MapListDialog constructor definition.  //create instance in main.cpp mapListDialog = new MapListDialog(this);   Definition for MapListDialog inherited from ListView  src/modes/MapListDialog.h   #include <controls/ListView.h>  class MapListItem {  public:     const char *label;  };  class MapListDialog : public ListView<MapListItem> { public:     //***compiler fails at line below ***     MapListDialog(BaseView *parent): ListView<MapListItem>(parent) {};     ~MapListDialog() {};     };   Definition of ListView  src/controls/ListView.h  #include "Dialog.h"  template<class T> class ListView : public Dialog { public:     ListView(BaseView *parent);     ~ListView(); };   src/controls/ListView.cpp  #include "ListView.h"  template<class T> ListView<T>::ListView(BaseView *parent):Dialog(parent) {}  template<class T> ListView<T>::~ListView() { }   I think, is not necessary put here definition of Dialog, but for every case...  class Dialog : public BaseView {     Dialog(BaseView *parent);     ~Dialog(); }  class BaseView { public:     BaseView(BaseView *parent);     ~BaseView(); }      MapListDialog.h:23: error: undefined reference to   'ListView::ListView(BaseView*)'

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.)


I've been programming a lot last month and I've asked a lot of questions. Not all of them were good questions so definitely this limit has struck me where it was supposed to.  Still, it's very uncomfortable. Especially it's annoying that I can't tell whether I can ask question already. I've just spent 30 minutes writing a question to make sure it's a good question but it turned out that the limit is still active. That's strange because I last posted question 2 days ago.  Therefore my question is, how can I know when will I be able to post again? Maybe I could use data explorer for this?

All I'm wondering, is if the 30 day timer that one has after submitting 50 questions lasts for 30 calender days, or exactly 720 hours from when the question was asked.


I have a large metabolomics dataset, 6000 samples and 3300 features. For the samples the only thing that differentiates each sample from the rest is that one gene was knocked out, which will not affect most of the metabolites.  The features are metabolite concentrations.  There are some 'known'/measured batch and technical variables such as different Mass Spec runs, differential growth of the bacteria in the samples.  However, I also want to adjust for the unknown variables.  It has been suggested that I perform PCA then throw out the first few principal components.  However, I'm not sure how I can use the PCA information to predict values for the original features using the remaining principal components.  df.pca <- prcomp(as.matrix(df.rw),              center = TRUE,              scale. = TRUE)   df.pca.x.minus12<-df.pca$x[,-c(1,2)]   How to predict values of the original 3300 features after removing the first 2 components?

Principal component analysis (PCA) can be used for dimensionality reduction. After such dimensionality reduction is performed, how can one approximately reconstruct the original variables/features from a small number of principal components?  Alternatively, how can one remove or discard several principal components from the data?  In other words, how to reverse PCA?    Given that PCA is closely related to singular value decomposition (SVD), the same question can be asked as follows: how to reverse SVD?


I have feature class sitting in FGDB. I can add it to map, right click on it in the table of content and pick "Zoom To Layer". This is what I see:    I start editing session, remove most of the features in this feature class, save edits, stop editing. Right click on the layer, "Zoom To Layer". This is what I see:    The only option I have is to close ArcGIS session and start a new one.  Is there a better way to tell ArcGIS to use the true dataset extent?

I have a featureclass in an Esri file geodatabase. When I edit the features using the editor in ArcMap, and I delete most of my features and keeping only the ones in the middle, the zoom to layer command doesn't work as expected. Instead of zooming to the extent of the features remaining in the feature class, the extent will be the former one (containing all deleted features). When reviewing the extent values in the properties dialog for the feature class, I can clearly see the old values. So the edit session doesn't seem to alter the full extent values.  Is there a way to recalculate these values?  I am pretty sure that this problem should occur to everyone editing features in ArcMap...


I have this question which seems a little harder than I thought. It has been about an hour for me hitting aimless thoughts on this one. I can really use a hint here if some one knows how to tackle it.     Let $f: \Bbb{N} \to \Bbb{N}$ such that $f$ is strictly increasing and $f(f(n))=3n$ for all $n \in \Bbb{N}$. Find $f(2001)$.

Let $f: \mathbb N \rightarrow \mathbb N$ are increasing function such that    $$f\left(f(n)\right)=3n$$   for any positive integer $n$.      Find $f(2017)$   My work so far:  1) If $m\not=n$ then $f(m)\not= f(n)$  2) $f(3n)=3f(n)$


What does an icon on the tag mean, for example the "rg" before the sql-server tag as pictured below?


And he gave the boy his belessing. The boy could see in his father' s gaze a desire to be able, himself, to travel the world- a desire that was still alive, despite his father' s having had to bury it, over dozens of years, under the burden of struggeling for water to drink, food to eat, and the same place to sleep every night of his life.   Is " ' s" here "is" ? if it is "is", is there special grammer that follows  this rule --> "to be verbs(am, is, are)+having+pp+to+simple verb " ? Could anyone explain me when we use this structure?  Sorry if I made some mistakes, my English is not perfect. Lots of thanks for your help.    This text is from the book named " The Alchemist" by "Paulo Coelho"

The rule says that we can use a possessive adjective or an object pronoun before a gerund. Is there a rule  that says when to use each or are they interchangeable? Some say that it's wrong to use an object pronoun before a gerund.


I have the following:  for root, dirs, files in os.walk(pathToSearch):             for file in files:                 if file.endswith(fileTypeToSearchFor):   It works well, it searches through and brings back files.  What I'm struggling with though is if fileTypeToSearchFor is 'JPG' it misses all the 'jpg' files and vice versa.  It's fully case sensitive.  Is there a way that os.walk can retrieve a file list with endswith where it's not case sensitive?  Thanks a tonne...

How can I do case insensitive string comparison in Python?  I would like to encapsulate comparison of a regular strings to a repository string using in a very simple and Pythonic way. I also would like to have ability to look up values in a dict hashed by strings using regular python strings.


I am using ABP ad-block extension of google chrome on my windows 8.1 laptop. But it doesn't work. Useless pop-ups appear out of no-where. Even if I click anywhere on the screen these pop-up ads appear.The ad blocker shows how many ads it has blocked but doesn't prevent these pop-ups from appearing. I want to know the possible reasons behind this or is there some problem with the browser and ad-block compatibility? Because I am using the same ad-blocker extension on chrome browser in my macbook air.  Thanx in advance!!

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


The following code executes as expected.  However, the editor shows red lines under attribute5 and WCC_ID in "h.attribute5 = i.WCC_ID" and states "Invalid column name" when the mouse hovers over the red lines.  These columns exist in the respective tables.  What is wrong with the SQL?   SELECT  * FROM ( SELECT attribute5 FROM OPENQUERY([FAMISPRO.WORLD],'SELECT attribute5 FROM FAMIS_EMP')  ) AS h INNER JOIN ( SELECT DISTINCT h.WCC_ID, h.KEYMARK FROM OPENQUERY ( PROJECT ,'SELECT * FROM ENTRY;' ) AS h LEFT JOIN ( SELECT * FROM OPENQUERY ( PROJECT ,'SELECT * FROM ENTRY;' )   WHERE EVENT = 'RETURNED' ) AS i ON h.WCC_ID = i.WCC_ID AND h.KEYMARK = i.KEYMARK WHERE i.EVENT IS NULL ) AS i ON h.attribute5 = i.WCC_ID;

IntelliSense in SSMS isn't updating unless I shut it down and restart. I've tried disconnecting from the server and reconnecting while the SSMS session is active, but that isn't working.  Steps to recreate:    Create a table  Select something from that table SSMS displays squiggly red lines under it with the tip "invalid object name" Execute the query   How can I force IntelliSense to update without restarting SSMS?


I develop my plugin with this code :  function my_function( $atts ) {     some code } add_shortcode( 'myfunction_shortcode', 'my_function' );   I need to use my shortcode on my page or post, when I used it output code shown on top of my page.

The shortcode produced by this function - a list of all sites in a multisite - outputs above the content in the loop, no matter where it is placed in the editor.  I've looked at the other related questions and answers on WPSE and realize that it has to do with the function using echo instead of return, but it's not as easy as replacing the instances of echo with return in the function below. Or adding echo=0 with a WP function like wp_list_pages()  Any ideas? Where is the function that needs to be returned instead of echoed?  // Output a single menu item function projects_menu_entry($id, $title, $link_self) {     global $blog_id;     if ($link_self || $id != $blog_id) {         echo '
';         if ($id == $blog_id) {             echo '';         }         $url = get_home_url($id);         if (substr($url, -1) != '/') {             // Note: I added a "/" to the end of the URL because WordPress             // wasn't doing that automatically in v3.0.4             $url .= '/';         }         echo '' . $title . '';         if ($id == $blog_id) {             echo '';         }         echo '
';     } }  // Output the whole menu // If $link_self is false, skip the current site - used to display the menu on the homepage function projects_menu($link_self = true) {     global $wpdb;      echo '
';      projects_menu_entry(1, 'Home', $link_self);      $blogs = $wpdb->get_results("         SELECT blog_id         FROM {$wpdb->blogs}         WHERE site_id = '{$wpdb->siteid}'         AND spam = '0'         AND deleted = '0'         AND archived = '0'         AND blog_id != 1     ");      $sites = array();     foreach ($blogs as $blog) {         $sites[$blog->blog_id] = get_blog_option($blog->blog_id, 'blogname');     }      natsort($sites);     foreach ($sites as $blog_id => $blog_title) {         projects_menu_entry($blog_id, $blog_title, $link_self);     }     echo '
'; }  // Adds a [bloglist] shortcode  function bloglist_shortcode($atts) {     projects_menu(false); }  add_shortcode('bloglist', 'bloglist_shortcode');


i would like to check a combobox, if the Layer is "LVS" or "PRJ". If one of these is selected, i want to return a Path as a String, but the function always return "null". Can someone help me maybe?  private String getGroovyPath(MyTitleAreaDialog dialog) {     String LayerLVS = "lvs/dev/scripts/123/aderf/de/lock/clt/Simplescript.groovy";     String LayerPRJ = "prj/dev/scripts/123/aderf/de/lock/clt/Simplescript.groovy"";      if(dialog.getLayer() == "LVS")     {         return LayerLVS;     }     else if(dialog.getLayer() == "PRJ")     {         return LayerPRJ;     }     return null; }

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


Here is the problem. I have a long-term visa (I live and work in Germany and I'm married). I want to visit London (to be specific, I am from Tunisia).  I heard that having a long-term visa for a European country can make it easier for me to apply for a UK visa (as I saw, the visa is required in my case).  I don't know how I should apply for this visa, and to use my European visa to facilitate the steps.

My wife has been living and working in the UK since September 2016. I was completed my studies in Poland. I studied in the UK for 3 years but left the country to continue my studies in Poland.  I am a Pakistani national and EU family member. I've had a residence permit card from Poland for 3 years. My wife and I would like to drive from Poland to the UK and I would like to know how I can exercise my freedom of movement rights as I would have to convince the border authorities.  Could you help me with any law? I only saw Article 10 and it is the residence card issued under international EU law.  Can I get a visa at the border if my wife lives in the UK and exercises her treaty rights in the UK? Could you tell me which law applies to my situation as I realise an Article 10 residence card is issued following international EU law and my residence card is national.  I have all the necessary documents to show her employment, funds and our relation.  Please let me know which law reference I can give at the border.


So I have an expression:  XRegExp.cache("^([\\w-]+(?:\\.[\\w-]+)*)@((?:[\\w-]+\\.)*\\w[\\w-]{0,66})\\.([a-z]{2,6}(?:\\.[a-z]{2})?)$", "i");   which I use to validate emails during registration, emails can have custom domains so every one of them must pass, e.g: foo@bar.baz(this does indeed pass).  My problem is that not every email passes validation(e.g: thisfails@proxima.solutions), so what am I doing wrong?

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


I am a newbie struggling to get two simple string inputs out of a text widget and use it later in my program.  How do I migrate the strings keypad and message to input them elsewhere?  #Text widget to input 2 text strings and store as 'keypad' and 'message' from tkinter import * master = Tk() master.title("simple one time pad") master.resizable(0,0)  global keypad global message  k = Text(master, width=50,height=10) k.pack()  separator = Frame(height=2, bd=1, relief=SUNKEN) separator.pack(fill=X, padx=5, pady=5)  m = Text(master, width=50,height=10) m.pack()  def encrypt():              keypad = (k.get(1.0, END))     str(keypad)     message = (m.get(1.0, END))     str(message)      print(keypad)     print(message)              mb = Button(master, text="Encrypt", command=encrypt) mb.pack(anchor=N)  mainloop()  print(keypad) print(message)   Gives the following error:   Traceback (most recent call last):   File "/home/maverick/Window-hell-1.py", line 39, in <module>     print(keypad) NameError: name 'keypad' is not defined   I get the first set of print() In the def encrypt: but crashes after the mainloop(). I tried the whole self.xxx routine but then my widget wouldn't function.

How can I create or use a global variable in a function?  If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access?


I have a table with some condensed information, and want to have in it links to figures (a lot), that illustrate some of the observations in the table.   Anyway, if the figures look like:  \begin{figure}  \includegraphics{blah} \caption{blaaaah} \label{pic:label1}  \end{figure}   then a \cref{pic:label} creates a link - okay - but by clicking on it the view is positioned such, that the caption is on top. (To put the label before caption is even worse - it takes the caption of the previous figure).  Can I make the link such, that it centers on the picture and not way below. For, say, paragraphs, putting them on top of the screen is reasonable, but for figures it's rather a bug, isn't it?  Surprisingly, I didn't find such a question here yet? Do I have to create a container around the floatfigure? Can tikz help?

I'm using the following command to embed images in my LaTeX document (which is then rendered as PDF)  \newcommand{\img}[4]{   \begin{figure}[!hbt]     \centering       \vspace{1ex}       \includegraphics[width=#2]{images/#1}       \caption[#4]{\label{img.#1} #3}     \vspace{1ex}   \end{figure} }   When creating a href to an image, the viewer jumps to the image caption instead of the top of the image. How do I change my \img command so it still puts the caption below the image but links to it jump to the image itself?


If I don't love him because he is tall, is he tall or not, according to context?

You are not hired because you are qualified.   I think this means you are hired but it is not because you are qualified. But I think this can  also means you are not hired, and the reason for it is that you are qualified.   Does this ambiguity really exist or do I mistake anything?


I'm trying to understand something written in my textbook. Suppose $n=pq$ is the product of two primes and we know the four solutions $x \equiv \pm a, \pm b$ of $x^2 \equiv y \ $(mod $\ n)$. Then $a \equiv b \ $ (mod $p$) and $a \equiv -b  \ $(mod $q$), or $a \equiv b \ $(mod $q$) and $a \equiv -b  \ $(mod $p$).  Can someone explain why this is true?

I understand what the Chinese remainder theorem is. However I am not sure how to apply it to my question. Can someone explain please?


Would it be unsafe to travel to Greece at this time?

I am travelling to Athens, Greece, shortly, and have seen . Should I be worried? Should I cancel my trip?  Update  It's fine, taxis are currently on strike, but Syntagma Sqaure is fine:


I have recently bought a Windows 7 Ultimate K, and changed it's language pack and such to English. I have two languages (Korean and English) I use on my computer and whenever I press SHIFT+SPACE it changes it. This really bothers me because when I type I hold the shift and space button... A LOT (Changed language when writing "A LOT":P).This also makes gameplay on ANY game with a sprint+jump sequence VERY DIFFICULT. Any help?

In Windows (XP at least), when there are two or more keyboard layouts for the same input language, pressing Ctrl+Shift switches the keyboard layout. Where can this be disabled or changed to another keystroke combination?  A similar feature is changing input languages. Alt+Shift is the default keystroke and that can be changed and disabled through the Regional and Language Options in the Control Panel. The keyboard layout switch (Ctrl+Shift) cannot be found in that panel.


What does"Questions with most views, answers and votes" mean? I just don't get it, how does SE arrange questions with hotness? It does not seem to arrange questions with the most views or votes.

I really like the , where certain questions from the Stack Exchange Network are presented, along with a hotness rating that is described as "arbitrary" in its tooltip. Such questions also appear randomly on the sidebar on sites across the network, under the heading "Hot Network Questions". How do these arbitrary hotness points work, and how are they used to select questions to appear in those lists?


Some of the features I am working with has more than 300 factor levels. I tried to reduce their number of levels with a 'fake dummy' method. For example, I replaced one 600-level predictor with 4 predictors (as $600<5^4$). Is this a valid approach?

What techniques are available for collapsing (or pooling) many categories to a few, for the purpose of using them as an input (predictor) in a statistical model?    Consider a variable like  (discipline chosen by an undergraduate student). It is unordered and categorical, but it can potentially have dozens of distinct levels. Let's say I want to use major as a predictor in a regression model.  Using these levels as-is for modeling leads to all sorts of issues because there are just so many. A lot of statistical precision would be thrown away to use them, and the results are hard to interpret. We're rarely interested in specific majors -- we're much more likely to be interested in broad categories (subgroups) of majors. But it isn't always clear how to divide up the levels into such higher-level categories, or even how many higher-level categories to use.  For typical data I would be happy to use factor analysis, matrix factorization, or a discrete latent modeling technique. But majors are mutually exclusive categories, so I'm hesitant to exploit their covariance for anything.  Furthermore I don't care about the major categories on their own. I care about producing higher-level categories that are coherent with respect to my regression outcome. In the binary outcome case, that suggests to me something like linear discriminant analysis (LDA) to generate higher-level categories that maximize discriminative performance. But LDA is a limited technique and that feels like dirty data dredging to me. Moreover any continuous solution will be hard to interpret.  Meanwhile something based on covariances, like multiple correspondence analysis (MCA), seems suspect to me in this case because of the inherent dependence among mutually exclusive dummy variables -- they're better suited for studying multiple categorical variables, rather than multiple categories of the same variable.  edit: to be clear, this is about collapsing categories (not selecting them), and the categories are predictors or independent variables. In hindsight, this problem seems like an appropriate time to "regularize 'em all and let God sort 'em out". Glad to see this question is interesting to so many people!


There is a paper I am citing that has an author with the name shown in the image below.   The default citation provided by the search engine I was using suggest {\v i}, which shows as the following in my paper:    I am wondering (since I don't now Russian) if this is even a faithful representation of the corresponding letter in Russian.  Also, I am wondering if {\v i} is the most accurate way to represent this letter in LaTeX.  This is the only Russian letter I need to represent in my document, so I don't have a need to include Russian language packages or similar things if it can be avoided.

See the rough sketch above. I am able to typeset the accented i shown in the middle (for which I used the \v macro) and, obviously, the plain and simple i shown on the left also. However, I can't figure out how to typeset the one shown on the right. How can I do that?


I am trying to type the symbol "~" in normal text, but it is not showing up. Why is this?

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


I have java application with several main methods. I would like to convert it to a windows .exe that does not require a java run time environment. Which application can I use to do so that will convert the application together with its database to exe?. I am currently using excelsior jet. However it can only convert the application to exe leaving the database to interact it wit it externally. Any Advice?

If I have a Java source file (*.java) or a class file (*.class), how can I convert it to a .exe file?  I also need an installer for my program.


I have been studying this criterion that tell us that if $f:[a,b]\to \mathbb{R}$ is bounded and almost everywhere continuous respect to $\lambda$ (the Lebesgue measure) iff $f$ is Riemann integrable. My problem is that I had this example let $f:[0,1]\to \mathbb{R}$ $$f(x)=\left\{\begin{array}{cc} 0& x\in [0,1]\setminus \mathbb{Q}\\ 1/q &\text{ if }p/q \text{ is the lowest expresion for }x\in \mathbb{Q}\cap [0,1] \end{array}\right.$$ So I know this functions is almost everywhere continuous and  bounded. So by the criterion is Riemann integrable. But I wanted to prove that this Riemann integrable with out the criterion, as my intuition tells me that it shouldn't be Riemann integrable but the theorem say it is. Any help would be greatly apreciated.

Consider the function $f: [0,1] \to \mathbb{R}$ where f(x)= \begin{cases} \frac 1q & \text{if } x\in \mathbb{Q} \text{ and } x=\frac pq \text{ in lowest terms}\\ 0 & \text{otherwise} \end{cases}  Determine whether or not $g$ is in  $\mathscr{R}$ on $[0,1]$ and prove your assertion. For this problem you may consider $0= 0/1$ to be in lowest terms.  Here's an attempt. I may have abused a bit of notation here, but the ideas are there.   Proof: Let $M_i = \sup \limits_{x \in [x_{i-1},x_i]} f(x)$.  Notice first that the lower Riemann sums are always $0$, since every interval contains an irrational number. Thus, to prove $f \in \mathscr{R}$, it suffices to prove that, given any $\epsilon >0$, $\sum \limits_{i \in P} M_i \Delta x_i < \epsilon$ for some partition.     Let $\epsilon > 0 $ and $M  > \frac{2}{\epsilon}$. We first show that there exists $\eta(x,\frac{1}{M})$ so that $|f(x) - f(y)| < \frac{1}{M}$ if $|x-y| < \eta$. Fix $x \in (\mathbb{R} \setminus \mathbb{Q}) \cap [0,1]$. Now, consider the set $$R_{M} := \{ r \in \mathbb{Q} : r = \frac{p}{n}, n \leq M, p \leq n, p \in \mathbb{N} \}.$$ Clearly this set is finite, enumerate it as $\{q_1,\ldots, q_m\}$. So, let $$\eta(x,\frac{1}{M}) = \min_{i=1,\ldots, m} |x- q_i|.$$ We see then, $|f(x) - f(y)| < \frac{1}{M}$ on this $\eta$-neighborhood.    After we choose that $\eta$ so that $x \in (\mathbb{R} \setminus \mathbb{Q}) \cap [0,1]$, is continuous in a $\eta$-neighborhood, we see  $$ A:= [0,1] \setminus R_M \subset \left( \bigcup_{ x \in ( \mathbb{R} \setminus \mathbb{Q}) \cap [0,1]} B_{\eta(x)} (x) \right) \cap [0,1].$$  Since $A$ is compact, we may take finite sub-covering, and let $\delta = \min \limits_{i=1,\ldots,n} \{\eta(x_i)\}$. Take a partition $P_1$ of $A$ so that $\Delta x_i < \delta$. Since $R_M$ is non-empty, we can take a partition $P_2$ of $R_M$ so that $\Delta x_i < \frac{\epsilon}{2m}.$ Moreover, we see that,  on $[0,1]$, $f$ is at most $1$. Let $P = P_1 \cup P_2$. Thus,   \begin{eqnarray*} \sum_{i \in P} M_i \Delta x_i &=& \sum_{i \in P_1} M_i \Delta x_i + \sum_{i \in P_2} M_i \Delta x_i \\ &\leq& \frac{1}{M} \sum_{i \in P_1} \Delta x_i + \sum_{i \in P_2} \Delta x_i \\ &<& \frac{\epsilon}{2} + \frac{\epsilon}{2} = \epsilon  \end{eqnarray*}    Comments?    EDITED I think I resolved the issue.


is there a way the particle system can adapt its height to the correct height of the adaptive displacement height map?   Currently my grass is rather beneath or below my ground because they still follow the flat non adaptive ground... How to remedy this? How the particles can follow each bump and variation in height of the terrain without losing its adaptive faculty?   Its quite problematic for nature scene...   Thanks

I'm faced a problem that I can't find a workaround for.  Displacement Node and particles. I understand that in modifiers section of an object the particle effects have to be the last ones to make them follow the modifications, but what about Displacement Node?  I'm using multiple nodes on my setup to modify the actual displacement, so it's not possible for me to use the Displacement Modifier instead of Displacement Node. It would be great to make Particles just follow Adaptive subdivision + true displacement but I can live with normal subivision and displacement node (I duplicate the object and use one as emitter, with normal subdivision, and second use microdisplacement). Any workarounds to make it work?  .blend as example:   My mirror of this .blend:   Problem visualisation:   /edit: Have to edit because someone marked is as duplicate:     No, person you mentioned in link uses Displacement Modifier. There's   no problem with Displacement Modifier and Particles. There's problem   with Displacement NODE (material node), which is still in development,   and I'm looking for a workaround.


the problem I’m experiencing is that contact names do not appear on whatsapp lock screen notifications. For example, if I get a message from Dad, whatsapp only displays the whatsapp logo and “message”, without displaying the sender. When I turn on message previews, I can see both the contact name and the message preview, but I used to be able to see just the contact name (“Dad has sent you a message”) instead of having to see the preview. This just happened as I updated to ios 11.3.1. Anyone having a similar problem? Thank you so much.

Today I updated to version 2.18.52 & I can’t see the names of the people who send me a message. The only thing I see is the WhatsApp logo and the word “message”.    I can’t also see the status my friends posts, they all look black. I uninstalled the app, reset my phone & nothing seems to work so far.


I have read this sentence in an :     The theory [of general relativity] holds that gravity is geometry: particles are deflected when they pass near a massive object not because they feel a force, said Einstein, but because space and time around the object are curved.   Do we have a physical evidence that this is in fact true? By evidence I mean stronger explanation than just , that dictates that bent curvature of space is more plausible/shorter/elegant explanation than let's say gravitational pull being mediated by graviton particle?   EDIT: I understand now that my question does not make the sense I thought it did. Gravity explained by a force between two objects manifests differently than gravity explained by curvature of space and we have measured the difference. Maybe the first part of my question may be of some interest - whether there are other indication of curved space - but I understand now it is the ONLY valid metaphor we have.

I'm not really far into the  but already have an important question: are there formulations that can do without spacetime curvature and describe the general theory of relativity/all associated gravitational effects in global ? Idea: Einstein chose spacetime curvature so that one had not to build gravitational effects into the rest of physics equations like Maxwell's equations. I assume that spacetime curvature provides a convenient way to apply physics laws not related to gravity unmodified locally because .  Please correct me everywhere I am wrong.


I am developing an ASP.NET web application in which I am allowing my users to upload either jpeg,gif,bmp or png images.If the uploaded image size are greater then 1 mb . then I want to resize image into 15-16 Kb with Demission 230*300 without losing Image Quality.after resize image should be view good in 230*300 Demission ,please help me anyone .  protected void btnSubmit_Click(object sender, EventArgs e) {     if (IsValid)     {         Bitmap image = ResizeImage(fileImage.PostedFile.InputStream, 400, 800);         image.Save(Server.MapPath("~/Photos/") + Guid.NewGuid().ToString() + ".jpg", ImageFormat.Jpeg);          image.Dispose();     } }  private Bitmap ResizeImage(Stream streamImage, int maxWidth, int maxHeight) {     Bitmap originalImage = new Bitmap(streamImage);     int newWidth = originalImage.Width;     int newHeight = originalImage.Height;     double aspectRatio = (double)originalImage.Width / (double)originalImage.Height;      if (aspectRatio <= 1 && originalImage.Width > maxWidth)     {         newWidth = maxWidth;         newHeight = (int)Math.Round(newWidth / aspectRatio);     }     else if (aspectRatio > 1 && originalImage.Height > maxHeight)     {         newHeight = maxHeight;         newWidth = (int)Math.Round(newHeight * aspectRatio);     }      Bitmap newImage = new Bitmap(originalImage, newWidth, newHeight);      Graphics g = Graphics.FromImage(newImage);     g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBilinear;     g.DrawImage(originalImage, 0, 0, newImage.Width, newImage.Height);      originalImage.Dispose();      return newImage;      }

How can I resize an image, with the image quality unaffected?


Let $p$ be a prime number. Prove that among $1,2,\ldots,p-1,$ exactly $\phi(d)$ elements have order $d$, given that $d \mid (p-1)$. (Note: Here $\phi(d)$ denotes Euler's Totient Function.)   I didn't see a way of proving this statement. How can we count solutions $k$ to $k^d \equiv 1 \pmod{p}$?

If $d$ is a positive divisor of $n$, the number of elements of order $d$ in a cyclic subgroup of order $n$ is $\phi (d)$=the number of positive natural numbers less than $d$ which are coprime to $d$.  The question I have concerns a part of the proof:  If $d | n$ then there exists exactly one subgroup of order $d$ -- call it $\langle a \rangle$.  Then every element of order $d$ also generates the subgroup $\langle a \rangle$ and an element $a^k$ generates $\langle a \rangle$ iff $gcd(k,d) = 1$ implies that the number of such elements is precisely $\phi (d)$.  How does every element of order $d$ also generate the subgroup $\langle a \rangle$, wouldn't it be only one $a$ since $|\langle a \rangle| = |a|$?  And how does this fact imply $\phi(d)$ is the correct number?


Me and my friends are making a game in minecraft and are using tellraw. How do we use @p in tellraw because we cannot find it anywhere! Thanks

So I am currently making a minecraft custom map (for 1.9). I want to make the player "say" something using /tellraw commands. I did figure out how to make the player name come up using /say commands, but still have no idea how to do it using the /tellraw command.  How do I do that?


so I had to get Ubuntu and I have no idea what I am even doing. and I NEED STEAM! so I download it and nothing it won't open so can you very smart people help me????????


Recently, there's been a pop-up about review queues:  It is extremely annoying, as I believe   .  It does a lot more to distract and aggravate people than it does to inform them, and it acts against one of the keys to SE's success: a clean UI. I for one do not want the site bugging me to death every other day, by covering things up and being distracting, about features that I will most likely never use - or about ones that are not new to me and that haven't changed.  This makes it harder and much more stressful to do things with the features that I do use, and many people feel the same way. Can we please remove this immediately, and can we please avoid these sorts of "Got it" pop-ups in the future?  I don't remember ever meeting a user, here or in real life, who thought well of these things.

The Public Platform team is continuing to work towards  and we’re here today to announce a new onboarding experience for the review queues. In the  (), we learned that each queues’ instructions could be easily misinterpreted and additional information was difficult to find. Without proper guidance or context, new reviewers would contribute inconsistent reviews and risk having their review privileges suspended. With this release, our goals were to 1) better highlight the review privilege and 2) provide upfront instruction and guidance for successful reviewing. New privilege announcements Community moderation is a significant aspect of Stack Overflow and the Stack Exchange sites. We want users to be aware and familiar with this newly earned privilege, but also celebrate the opportunity to contribute to the community in a unique way.  Many users were discovering the review queues by chance. Once the privilege is earned, a new review queue icon with a red alert would appear in the top-right part of the navigation. We are adding a popover to bring more attention to this easy-to-miss icon. We will also be adding notices for when users earn access to other, higher reputation queues. Additionally, new reviewers will also receive an email notification about the newly earned privilege. They will only get the email if they earn the privilege and don't perform a review within 24 hours (anyone who doesn't want to receive email notifications like this can visit their  and turn off "Tips and Reminders"). We are also showing a popover to users who earned access to review queues in the past, but have never done a review or haven't reviewed in the last 30 days. This popover is only appearing for the next 90 days. The goal is to engage users who may not have interacted with the queues since we made  and . Welcome banner  If a reviewer clicks “Learn more” on the on-page popover or goes to the review queue home page (/review), they’ll be greeted with an onboarding message with general information about the review queues. Informational modals  Queue-specific modals will appear upon page load as you visit each queue. They summarize and highlight important aspects and tips about reviewing in a particular queue. This information can be revisited at any time by clicking “Learn more” under the page header. Feedback As always, please leave your feedback and any bugs you may discover related to this release below this post. We will be monitoring this post for the next few weeks (May 4, 2021). After May 4th, please report any further issues as new questions.


I'm using an external SDK which wants me to use  try {  ... }  catch (Ex20301Exception) {  ... }   I'd rather use  try {  ... } catch (CustomerOverCreditLimitException) {  ... }   Is there a way I can achieve this? Or do I have to live with comments?

I want to create an alias for a class name. The following syntax would be perfect: public class LongClassNameOrOneThatContainsVersionsOrDomainSpecificName {    ... }  public class MyName = LongClassNameOrOneThatContainsVersionOrDomainSpecificName;  but it won't compile.  Example Note This example is provided for convenience only. Don't try to solve this particular problem by suggesting changing the design of the entire system. The presence, or lack, of this example doesn't change the original question. Some existing code depends on the presence of a static class: public static class ColorScheme {    ... }  This color scheme is the Outlook 2003 color scheme. i want to introduce an Outlook 2007 color scheme, while retaining the Outlook 2003 color scheme: public static class Outlook2003ColorScheme {    ... }  public static class Outlook2007ColorScheme {    ... }  But i'm still faced with the fact that the code depends on the presence of a static class called ColorScheme. My first thought was to create a ColorScheme class that I will inherit from either Outlook2003 or Outlook2007: public static class ColorScheme : Outlook2007ColorScheme { }  but you cannot inherit from a static class. My next thought was to create the static ColorScheme class, but make Outlook2003ColorScheme and Outlook2007ColorScheme classes non-static. Then a static variable in the static ColorScheme class can point to either "true" color scheme: public static class ColorScheme {     private static CustomColorScheme = new Outlook2007ColorScheme();     ... }  private class CustomColorScheme  {     ... }  private class Outlook2008ColorScheme : CustomColorScheme  {     ... }  private class Outlook2003ColorScheme : CustomColorScheme  {    ... }  but that would require me to convert a class composed entirly of readonly static Colors into overridable properties, and then my ColorScheme class would need to have the 30 different property getters thunk down into the contained object. That's just too much typing. So my next thought was to alias the class: public static ColorScheme = Outlook2007ColorScheme;  But that doesn't compile. How can I alias a static class into another name?  Update: Can someone please add the answer "You cannot do this in C#", so I can mark that as the accepted answer. Anyone else wanting the answer to the same question will find this question, the accepted answer, and a number of workarounds that might, or might not, be useful. I just want to close this question out.


I need to convert the column values from a set of rows into a single comma separated string.  So how can I transform this:  DtCreated               | UserName | Question          | Answer 2016-09-24 14:30:11.927 | mauricio | Upload 2 images:  | image1.jpeg 2016-09-24 14:30:11.927 | mauricio | Upload 2 images:  | image2.jpeg 2016-11-08 13:59:00.000 | mauricio | What's your name? | Mark 2016-11-08 13:59:00.000 | mauricio | What's your name? | Vivian 2016-11-08 15:37:26.000 | alex     | How old are you?  | 18 2016-11-08 15:37:26.000 | alex     | How old are you?  | 14   Into this:   DtCreated               | UserName | Question          | Answer 2016-09-24 14:30:11.927 | mauricio | Upload 2 images:  | image1.jpeg,image2.jpeg 2016-11-08 13:59:00.000 | mauricio | What's your name? | Mark,Vivian 2016-11-08 15:37:26.000 | alex     | How old are you?  | 18,14   This is my query:  SELECT   sf.DtCreated as [Data da Submissão],      sf.UserName as Usuário,  fc.Title as Question,  sv.Value + sv.Text as Answer   FROM [form].SubmissionForm sf   inner join [form].Submission s on   sf.id = s.SubmissionFormId   inner join [form].FormComponent fc on s.FormComponentId = fc.Id   inner join [form].SubmissionValue sv on s.Id = sv.Submission_Id   where sf.Form_Id = '31a224f2-5944-46d5-bf8f-d10cadb5a4b5'   order by sf.DtCreated,sf.UserName,s.subFormNumber,fc.[order] asc

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


When I attempt to install unetbootin on my Ubuntu 19.04 system, I get: "E: The repository ' disco Release' does not have a Release file."  message ---- what PPA can I use to get unetbootin to work properly?

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


Suppose, the angle of elevation of a hot air balloon is $25°$ and the point of observation of the angle of elevation is situated $300$m away from the take off point.  We can find out the distance between the take off point and the balloon by - $\tan(25°) = \frac{\text{Distance}}{300}$ Now, if we don't use a calculator to find the value of $\tan(25°)$, is there any other way to do this?

Does anyone know of a way to estimate the tangent of an angle in their head? Accuracy is not critically important, but within $5%$ percent would probably be good, 10% may be acceptable.  I can estimate sines and cosines quite well, but I consider division of/by arbitrary values to be too complex for this task. Multiplication of a few values is generally acceptable, and addition and subtraction are fine.  My angles are in degrees, and I prefer not have to mentally convert to radians, though I can if necessary. Also, all angles I'm concerned with are in the range of [0, 90 degrees].  I am also interested in estimating arc tangent under the same conditions, to within about 5-degrees would be good.  Backstory  I'm working on estimating the path of the sun across the sky. I can estimate the declination pretty easily, but now I want to estimate the amount of daylight on any given day and latitude. I've got it down to the arc cosine of the product of two tangents, but resolving the two tangents is now my sticking point. I also want to calculate the altitude of the sun for any time of day, day of the year, and latitude, which I have down to just an arc tangent.


Running ubuntu 15.10 64 bit. Extracted oracle's jdk and was trying to run java. Permission look ok, but why is it not finding java executable -  raj@raj-VirtualBox:~/jdk1.8.0_74/bin$ ./java -version bash: ./java: No such file or directory raj@raj-VirtualBox:~/jdk1.8.0_74/bin$ ls -l | grep java -rwxr-xr-x 1 raj raj   5730 Jan 29 22:08 java -rwxr-xr-x 1 raj raj   5881 Jan 29 22:08 javac -rwxr-xr-x 1 raj raj   5889 Jan 29 22:08 javadoc -rwxr-xr-x 1 raj raj   2293 Dec 22 15:58 javafxpackager -rwxr-xr-x 1 raj raj   5881 Jan 29 22:08 javah -rwxr-xr-x 1 raj raj   5881 Jan 29 22:08 javap -rwxr-xr-x 1 raj raj   2293 Dec 22 15:58 javapackager -rwxr-xr-x 1 raj raj   1809 Jan 29 22:08 java-rmi.cgi -rwxr-xr-x 1 raj raj 104523 Jan 29 22:08 javaws raj@raj-VirtualBox:~/jdk1.8.0_74/bin$ java -version bash: /home/raj/jdk1.8.0_74/bin/java: No such file or directory raj@raj-VirtualBox:~/jdk1.8.0_74/bin$ javac bash: /home/raj/jdk1.8.0_74/bin/javac: No such file or directory raj@raj-VirtualBox:~/jdk1.8.0_74/bin$ pwd /home/raj/jdk1.8.0_74/bin raj@raj-VirtualBox:~/jdk1.8.0_74/bin$ cp java java2 raj@raj-VirtualBox:~/jdk1.8.0_74/bin$ ./java2 bash: ./java2: No such file or directory raj@raj-VirtualBox:~/jdk1.8.0_74/bin$ java2 bash: /home/raj/jdk1.8.0_74/bin/java2: No such file or directory

I downloaded a Chromium snapshot and unzipped it, like this:  michael@ubuntu:/opt/chrome-linux$ ls chrome                  libffmpegsumo.so                nacl_irt_x86_32.nexe chrome.1                libppGoogleNaClPluginChrome.so  product_logo_48.png chrome_100_percent.pak  locales                         resources chrome.pak              nacl_helper                     resources.pak chrome_sandbox          nacl_helper_bootstrap           xdg-mime chrome-wrapper          nacl_irt_srpc_x86_32.nexe       xdg-settings   But when I try to run chrome, it isn't there...  michael@ubuntu:/opt/chrome-linux$ ./chrome bash: ./chrome: No such file or directory   Does anyone know why it won't open? Running Xubuntu 12.10 AMD64.  michael@ubuntu:/opt/chrome-linux$ ldd /opt/chrome-linux/* | grep -i "not found" ldd: /opt/chrome-linux/locales: not regular file ldd: /opt/chrome-linux/resources: not regular file


sentence = "Hello" print sentence print sentence[:]   Both outputs the same thing, i.e. Hello  So, when and why to use/not use [:] ?  Thanks! :)

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


new to python and scripting in blender and i cant seem to figure out out to move the origin of an object using python.   Also, what would be the best way to calculate the center and bottom of a mesh? Looping through the vertices and calculating using those?

I have a lot of 3D objects of various sizes, shapes in blender 2.76b and I would like to set the origin to the bottom center of the objects bounds.  I cannot select the bottom edge and snap to cursor etc as each shapes edges are in different X/Y positions.  Is there a script or tool that will allow me to set the origin to the lowest edge z position?


I have come across something strange: I have direct edit privileges on Stack Overflow, that is, I can make edits without having my edits approved from other users. Though, when I come to approving edits made by other users, I can only vote for the edit to be approved, then wait for another vote for the edit to take place. I am wondering, what is the logic behind this? I can make edits myself, but can't approve other edits? One would simply think of rejecting that edit and making their own.

I don't need further approvers for my edits on Stack Overflow, but if I approve another person's edit (which is often the edit I wanted to make), the edit needs to wait for more approvers.  Can it be changed so that if someone who can make edits without further approvers, approves an edit, it doesn't need further approvers ether?    It appears that in the interest of better quality reviews, you have to at least notionally improve the edit as an extra step. Is there a way this could be more obvious as I might not be the only one who didn't know this?


I'm trying to implement template for stack however error occurred when compiling.  This is my Stack.h file  const int MAX_STACK = 2;  enum STATE { OK = 0, STACK_FULL, STACK_EMPTY };  template <class T> class Stack { public:     Stack();      void Clear();     int Push(T x);     int Pop(T * w);     int StackState();  private:     T t[MAX_STACK];     int top; };   and my Stack.cpp file  #include "Stack.h"  template<class T> Stack<T>::Stack(): top(0) {}  template<class T> void Stack<T>::Clear() {     top = 0; }  template<class T> int Stack<T>::Push(T x) {     if (top < MAX_STACK)     {         t[top++] = x;         return OK;     }     else     {         return STACK_FULL;     } }  template<class T> int Stack<T>::Pop(T * w) {     if (top > 0)     {         *w = t[--top];         return OK;     }     else     {         return STACK_EMPTY;     } }  template<class T> int Stack<T>::StackState() {     switch (top)     {         case 0:             return STACK_EMPTY;         case MAX_STACK:             return STACK_FULL;         default:             return OK;     } }   Test program in Main.cpp  #include <iostream> #include "Stack.h"  int main() {     Stack<char *> stack;      char tab[3] = { 'V', 'E', 'R' };      std::cout << "Inserting into stack:\n";      for (int i = 0; i < 3; i++)     {         if (stack.StackState() != STACK_FULL)         {             std::cout << "Trying to insert " << tab[i] << ",\n";             stack.Push(&tab[i]);         }         else         {             std::cout << "Stack is full!\n";             break;         }     }      std::cout << "\n\nDeleting items from stack: ";      for (int i = 0; i < 3; i++)     {         char ** z;          if (stack.Pop(z) == OK)         {             std::cout << "Deletion successful: " << **z << "\n";         }     }      return 0; }   However getting this error  Undefined symbols for architecture x86_64:   "Stack<char*>::StackState()", referenced from:       _main in main.o   "Stack<char*>::Pop(char**)", referenced from:       _main in main.o   "Stack<char*>::Push(char*)", referenced from:       _main in main.o   "Stack<char*>::Stack()", referenced from:       _main in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)   Thank you for ideas.

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.)


Why aren't the 'progressive' verbal constructions (such as 'I am talking') regarded as tenses in traditional grammar?  "There is no consensus, not even among linguists, about what constitutes a tense."--yeah, okay, fair enough, but that is hardly an answer.  "I have worked"--a tense, apparently. "I am working"--not a tense, apparently. There is no aspect of this that I understand. Why is the line drawn here?  Okay, further edit for clarification--I am referring specifically to the McGraw-Hill Handbook of English Grammar and Usage, which describes six tenses--3 simple and 3 perfect. I can see no justification whatsoever for this classification.  Furthermore, I can see no practical use for the concept of tense, in any of its varied applications. So why even bother with it? (In English, at least. I'm willing to accept that it may be a very useful concept in other languages.)

Could you please explain to me the differences between the simple, progressive and perfect aspects.  "Simple aspect" means completed action (action starts and finishes) but I don't really understand the fine details.  For example, with these sentences:     It usually rains in the fall.   He smokes 15 cigarettes a day.   I slept for a long time yesterday.     Here's what I understand: if I didn't complete sleeping I should use "I was sleeping". If it doesn't stop raining we can't say "it is finished". Is that correct?  For continuous aspect, duration is an important factor – but how?  For example:     She is wearing a jacket.   Normally "to wear" action is completed but we can use here present continuous aspect.  Another example:     She has been wearing the same jacket for 3 days.   and why can't I use continuous aspect here?     I have cleaned my room.   It means that my room is clean now. Action is finished but why can't I say "I have been cleaning room" like "They have been playing in the mud"? Action is completed but we don't care here about completed, we are caring about duration, why?


I have installed Ubuntu 18.04 along side windows 10 on HP desktop. The Wi-Fi of the system works well on windows 10 , but on Ubuntu 18.04 it shows no wi-fi adaptor found. After going through internet I was able to get Wi-Fi on Ubuntu but for this I have to disable secure boot from BIOS settings. Is there any way to get Wi-Fi on Ubuntu 18.04 with secure boot enabled? Desktop have Realtek drivers

This issue happens only on UEFI systems with enabled Secure Boot.  When I try to install DKMS modules like VirtualBox, Nvidia, or Broadcom drivers, they do not install and I get Required key not available when I try to modprobe them.  VirtualBox complains that vboxdrv is not loaded.  Broadcom wl driver is shown in lspci -k as a kernel module but is not in use. sudo modprobe wl throws Required key not available.  Also this issue may happen when I install some kernel modules from git sources.  This issue may appear after a kernel update as disabled wireless adapter, black screen after a reboot, etc.   How can I fix it?


I would like to subscribe (via RSS) to my Stackoverflow notifications. I am unable to find the RSS feed for this anywhere.

Just wondering if I'm missing something here. Also, I couldn't find any previous question related to this.


Im trying to read and write an object to a .ser file. This object is composede by and array of another objects, and an integer. Like this:  public class  Ranking implements Serializable{     private static ArrayList<Acabada> partides = new ArrayList<Acabada>();     private int tipus_ordenacio; }   When using serialitzation, the code seems to work. When I open the file generated there appears some unredeable stuff. But when writting (deserialization) I get this message:     tipus ordenacioo 1java.io.InvalidClassException: domain.Ranking; local class incompatible: stream classdesc serialVersionUID = 5620111485391998837, local class serialVersionUID = -3886134201979592842   This is the code I use to deserialize.    public void readFromFile() {           try {             FileInputStream fis = new FileInputStream("ranking.ser");              ObjectInputStream ois = new ObjectInputStream(fis);             domain.Ranking ranking = (domain.Ranking) ois.readObject();                         ois.close();             fis.close();     }         catch (FileNotFoundException e) {             e.printStackTrace();         } catch (IOException e) {             e.printStackTrace();         } catch (ClassNotFoundException e) {             e.printStackTrace();         }       }     What am I doing wrong? Thanks!

Eclipse issues warnings when a serialVersionUID is missing.       The serializable class Foo does not declare a static final   serialVersionUID field of type long   What is serialVersionUID and why is it important?  Please show an example where missing serialVersionUID will cause a problem.


If in the series  $1-\dfrac {1} {2}+\dfrac {1} {3}-\dfrac {1} {4}+\ldots $ the order of the terms be altered, so that the ratio of the number of positive terms to the number of negative terms in the first $n$ terms is ultimately $a^{2}$, show that the sum of the series will become $\log \left( 2a\right) $.  Solution attempt. Let $p$ be the number of positive terms in the first $n$ terms of the reordered series so based on the question we are allowed $a^{2}=\dfrac {p} {n-p}$. Now solving for p we get $p=\dfrac {a^{2}n} {\left( 1+a^{2}\right) }$ and $n-p=\dfrac {n } {\left( 1+a^{2}\right) }$.  We also observe that in the original series only the odd terms are positive and only the even terms are negative.  Let's define $S_{odd}=1+\dfrac {1} {3}+\dfrac {1} {5}+.\ldots +\dfrac {1} {2n-1}$ and $S_{even}=\dfrac {-1} {2}\dfrac {-1} {4}\ldots -\dfrac {1} {2n}$  $S_{Reordered}=S_{odd_{p}}+S_{even_{n-p}}$  $S_{Reordered}=\sum _{t=1}^{t=P}\dfrac {1} {2t-1}+\sum _{t=1}^{t=(n-P)}\dfrac {-1} {2t}$ $S_{Reordered}=\sum _{t=1}^{t=\dfrac {a^{2}n} {\left( 1+a^{2}\right) }}\dfrac {1} {2t-1}+\sum _{t=1}^{t=\dfrac {n } {\left( 1+a^{2}\right) }}\dfrac {-1} {2t}$    In order to extend $S_{Reordered}$ from n terms to an infinite length. I guess i should take the limit of the $S_{Reordered}$ as $n\rightarrow \infty $ which would make the upper values of $t$ (Not sure of technical term here) to be $\infty$ giving me   $S_{Reordered}=\sum _{t=1}^{t=\infty}\dfrac {1} {2t-1}+\sum _{t=1}^{t=\infty}\dfrac {-1} {2t}$   and i have lost the $a$ from the expression. I guess i am stuck i need to perform some step to capture a before taking the limit. Any help would be much appreciated.


I have a high-dimensional data matrix X where sample size is smaller than the variable size. I want to use PCA as a dimensionality reduction method, but I cannot call it directly in R since the matrix X is rank-deficient. I saw below technique in an R code to get the principal component representation from a rank-deficient matrix:  1) Get U from svd(XXT)  2) Get the principal component representation C by solving X = UC  I am new to PCA, and I have no idea how that makes sense. Could someone clarify how those 2 steps is equivalent to applying PCA on X?

I have a $20\times100$ matrix $X$, containing my $N=20$ samples in the $D=100$-dimensional space. I now wish to code up my own principal component analysis (PCA) in Matlab. I demean $X$ to $X_0$ first.  I read from someone's code that in such scenarios where we have more dimensions than observations, we no longer eigen-decompose the $X_0$'s covariance matrix. Instead, we eigen-decompose $\frac{1}{N-1}X_0X_0^T$. Why is it correct?  The normal covariance matrix is of size $D\times D$, each element of which tells us the covariance between two dimensions. To me, $\frac{1}{N-1}X_0X_0^T$ is not even of the correct dimensions! It is $N\times N$ matrix, so what would it tell us? Covariance between two observations?!


solve the following equation :  $$3^x +4^x = 5^x \text{ in } \Bbb R$$  the trivial answer is $x=2$ .

I would like to prove that the equation $ 3^x+4^x=5^x $ has only one real solution ($x=2$)  I tried to study the function $ f(x)=5^x-4^x-3^x $ (in order to use the intermediate value theorem) but I am not able to find the sign of $ f'(x)= \ln(5)\times5^x-\ln(4)\times4^x-\ln(3)\times3^x $ and I can't see any other method to solve this exercise...


When I'm going to install the Google Chrome,it says on the Ubuntu Software Center that Dependency is not satisfiable: libappindicator1

How do you install Google Chrome on Ubuntu?


I want to root my Android 11 on Samsung A72 without using any third part app. Is their a way? I cannot find anything on google on duckduckgo that mentions a terminal or a manual root.

I want to learn how to root a android phone manually, I mean without any apps like KingRoot, dr.fone etc. I did not found any guides or information about it.  (Background Information: I want to root a BlackBerry KeyOne, even if you say it does not work i want to learn and try it anyway)  Can you please help me?


I created a document called doc.txt, and in it I wrote "blaha". I wrote a program to see if it says blaha.      File file = new File("C:/Users/Public/doc.txt");     if (file.exists()){      FileReader fr = new FileReader(file);      LineNumberReader ln = new LineNumberReader(fr);         while (ln.getLineNumber() == 0){           String s = ln.readLine();           System.out.println(s);           if(s=="blaha"){               System.out.println("Match");           }else{               System.out.println("Nomatch");           }     }     }   And when I run the program, it always says Nomatch. Why is this?

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


I am SQL developer and am really new to both F# and C#. I need help on how to pass a string to f# function below and to return the result from F# to C#.  Description of project: I am using stanford postagger to tag a sentence with the parts of speech.  Reference link from where i copied this code. ()  module File1   open java.io open java.util open edu.stanford.nlp.ling open edu.stanford.nlp.tagger.maxent  // Path to the folder with models  let modelsDirectry =  __SOURCE_DIRECTORY__  + @'..\stanford-postagger-2013-06-20\models\'  // Loading POS Tagger  let tagger = MaxentTagger(modelsDirectry + 'wsj-0-18-bidirectional-nodistsim.tagger')  let tagTexrFromReader (reader:Reader) =  let sentances = MaxentTagger.tokenizeText(reader).toArray()  sentances |> Seq.iter (fun sentence ->     let taggedSentence = tagger.tagSentence(sentence :?> ArrayList)     printfn "%O" (Sentence.listToString(taggedSentence, false)) )   // Text for tagging  let text = System.Console.ReadLine();  tagTexrFromReader <| new StringReader(text)

I am playing around with F# and C#, and would like to call F# code from C#.    I managed to get it to work the other way around in Visual Studio by having two projects in the same solution, and adding a reference of the C# code to the F# project.  After doing this, I could call C# code and even step through it while debugging.  What I am trying to do is F# code FROM C# instead of C# code from F#.  I added a reference to the F# project to the C# project, but it isn't working the way it did before.  I would like to know if this is possible without doing it manually.


How to make a gradient for text from color to color?    .gradient {      background: linear-gradient(to right, blue, green 100%);      -webkit-background-clip: text;      -webkit-text-fill-color: transparent;      font-size: 300%;   }
COUNTRY

I have a layout similar to:  <div>     <table>     </table> </div>   I would like for the div to only expand to as wide as my table becomes.


$A \preceq B$ indicates for covariance matrices A and B, B-A is SPSD (symmetric positive semi definite). Hence, I want to show that $B^{-1} \preceq A^{-1}$ , which seems straight-forward but I can't come up with a way to solve this.

If $A$ and $B$ are two positive definite matrices such that $A - B$ is nonnegative definite, is it true that $B^{-1} - A^{-1}$ is positive definite? The doubt came to me when working with confidence regions in multivariate statistics that are usually obtained as hyper-ellipsoids.


I have a query:   DECLARE @str NVARCHAR(max) SET @str = 'SET QUOTED_IDENTIFIER ON' + CHAR(13)+ CHAR(10) + 'GO' + CHAR(13) + CHAR(10) + 'Select 1 from MyTable' PRINT @str EXEC (@str)   It returns an error:     Msg 102, Level 15, State 1, Line 2 Incorrect syntax near 'GO'.   But if I exec the printed query in a new query editor it works fine.  I am using SQL Server 2014.

What is the reasoning behind using the GO statement after every SQL statement? I understand that GO signals the end of batch and/or allows the reputation of statements but what advantage does it have using it after every statement.   I am just curious as a lot of Microsoft documentation etc. have started using it after every statement  or maybe I've just started to notice.   Also what's considered best practice?


How can I check if there is a link from the current file on Linux? Say, I have:  touch foo ln -s foo bar ll foo bar  bar -> foo  foo   Now, I want to know, if there are any file linked from foo:e.g.   $magic-command foo foo<-bar

I want to do some housekeeping in a directory, and I want to see if a given directory has any symlinks pointing to it. I can easily enough see what directory a symlink points to, but now I want to see the relationship in reverse.


I require a regular Expression to validate FileName in C# that ignores everything except all upper/lower alpha chars, numbers, backslash, underscore, period, dash, etc.  "*" and "?" for wildcards. I want to use that in RegEx.IsMatch(fileName,expression)

Is there a method in the System.IO namespace that checks the validity of a filename?  For example, C:\foo\bar would validate and :"~-* would not  Or a little trickier, X:\foo\bar would validate is there is an X: drive on the system, but wouldn't otherwise.  I suppose I could write such a method myself, but I'm more interested in a built-in one.


X is man who devotes his entire life to helping others. However, he lives a miserable life, and he hates it. X is not empathetic: he doesn't suffer because of other's suffering. Moreover, he is absolutely certain that, if he quits his life to lead a more normal one, he will be much, much happier. He won't feel any sort of regret or compassion for the people he wouldn't help anymore. Yet, X continues to spend his life altruistically.   What could be a possible rational reason for X's decision? Is there some other reason why, besides personal utility, one should choose to act in a certain way?  In ethics expressions like "you must", "you have the duty to", "you are morally obliged to" are used often, but why "must" someone do something if it doesn't help in reaching personal happiness?

Is it possible for people to actually be selfless? It seems that in many cases where someone is being kind, they are actually performing in a manner that will benefit them. Either the recipient of the kindness will reciprocate, or the act of kindness itself is deemed commendable. Therefore, the one who offered the kindness still benefits personally from their action.  A child shares a toy in the same way. Even with the heroic act of martyrdom, the possibility of knowing one could become a martyr may be uplifting. It seems that every "selfless" act, in some way, may benefit the one being "selfless".  In light of those observations, is selflessness truly possible? What does philosophy have to say about this question?


i have a dd-wrt router (ip 192.168.1.1) with the following network interfaces:    eth0 ath0 ppp0 (a pptp vpn client)   i would like to route all traffic from ip 192.168.1.10 to 192.168.1.20 through ppp0 interfaces.   Is it possible maybe with iptables ?   EDIT: i'm using dd-wrt v24sp2 running i think busybox

Is it possible to route all outgoing requests for SSH (port 22) to mydynamicdns.afraid.org via wlan0 instead of eth0 when both are connected?  Since my IP is dynamic, I would like to use a name instead of IP.


Prove that $Q_8$ has a subgroup $H$ of order $2$ and $H$ is normal in $Q_8$  Attempt  We have Quantemion group $Q_8=\{\pm 1, \pm i, \pm j,\pm k\}$. Its subgroups are $\{1\}, \{-1,1\}, \{-1,1,-i,i\}, \{-1,1,-j,j\}, \{-1,1,-k,k\}$, and $\{-1,1,-i,i,-j,j,-k,k\}$ of which $H=\{-1,1\}$ is a subgroup of order 2.  Question: 1. Is there any other subgroup of order 2. 2. How to show that this subgroup of order 2 is normal in $Q_8$?  Please help.

How should I start to show this. Can anyone give the specific steps?


This is a question I was sent by a friend, I really have zero idea on how to solve the question. I'm not even sure where to begin solving it. Though I did make an attempt to solve it, I always reached a dead end.  So here's the question:     Let $n$ be a positive integer greater than $1$ and let $p_1, p_2, ... p_t$ be the primes not exceeding $n$.   Show that $p_1p_2...p_t < 4^n$

This an interesting problem my friend has been working on for a while now (I just saw it an hour ago, but could not come up with anything substantial besides some PMI attempts).  Here's the full problem:  Let $x_{1}, x_{2}, x_{3}, \cdots x_{y}$ be all the primes that are less than a given $n>1,n \in \mathbb{N}$.   Prove that $$x_{1}x_{2}x_{3}\cdots x_{y} < 4^n$$  Any ideas very much appreciated!


so I'm trying to compile a document and while the references are mostly working fine, when I compile the bibliography some of my references are not showing up.  Here's an example of a few I'm having this problem with:  @article{benmelech2012,   title={Securitization without adverse selection: {T}he case of {CLO}s},   author={Benmelech, Efraim and Dlugosz, Jennifer and Ivashina, Victoria},   journal={Journal of Financial Economics},   volume={106},   number={1},   pages={91--113},   year={2012},   publisher={Elsevier} }  @article{cantor2001,   title={Moody’s investor service response to the consultative article    issued by the Basel Committee on Bank Supervision ``A new capital adequacy    framework''},   author={Cantor, Richard},   journal={Journal of Banking \& Finance},   volume={25},   pages={171--185},   year={2001},   publisher={Wiley Online Library} }   I've been trying to find a pattern or something wrong but I haven't been able to, any ideas?

Is there any way to have BibTeX or biblatex insert a bibliography without having citations in the body of the document itself? Maybe a way to hide the in-text citations, so that BibTeX still sees them and includes them in the bibliography, but does not print them in the body?


I tried to remove wine from the terminal using :  apt-get remove wine  but wine still exists. How can I remove it completely?  harsh@harsh-BOOK:~$ sudo get-apt purge Q4Wine [sudo] password for harsh:  sudo: get-apt: command not found harsh@harsh-BOOK:~$ sudo get-apt purge wine sudo: get-apt: command not found harsh@harsh-BOOK:~$ sudo rm wine rm: cannot remove ‘wine’: No such file or directory harsh@harsh-BOOK:~$ sudo rm q4wine rm: cannot remove ‘q4wine’: No such file or directory harsh@harsh-BOOK:~$ sudo rm winetricks rm: cannot remove ‘winetricks’: No such file or directory

I've searched the net for such information and found different command lines, like these ones:  sudo apt-get remove application sudo apt-get remove application*  sudo apt-get remove --purge application sudo apt-get remove --purge application*  sudo apt-get purge application sudo apt-get purge application*   So, what is the correct way? Is it necessary to use that "*"?  After that, I also found these commands:  sudo updatedb sudo locate application sudo rm -rf (file/folder name)


Since I started working with Apache, PHP/HTML/CSS/JS and databases such as MySQL, I always had to deal with latin charset problems.   I mean, starting from the database until the views are displayed in the browser screen, through all the many instances in which charset can be altered, I never had the chance of working with no problems, except with a Wamp/Xampp installation in localhost with Windows.  I always tried to set all charsets/encoding/collation in every place I could, but I always had different results, depending on the server (Linux, Windows).  I always check:  1) Database collation.  2) Table collation.  3) Column collation.  4) Apache charset configuration in httpd.conf  5) PHP charset configuration in php.ini  6) Individual php/html file encoding.  7) Addition of meta tag in every html with same encoding/charset.  8) Addition of "header(... charset...)" with same encoding/charset;  But in many circumstances, I keep on receiving unrecognized chars instead of accents and special latin symbols. Sometimes it works ok in the screen, but I find problems with generated CSV/Excels, or as a JSON response from a webservice, etc.  I checked other posts like this one:    I try to follow the tips, but I can't fix the problem in certain cases.  Tired of trying lots of things I always end up using functions such as utf8_encode / decode, or iconv(...).  Sometimes I even get the desired result only by using both utf8_encode/decode, one inside the other. Horrible.  Is there a tidy and easy way to resolve this without having to use those scary functions that leave the code untidy?  Is the Operating System an issue? I tend to see more charset problems while running systems in Linux servers.

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


I am wondering how to apply a specific filter to a class declaration in order to only accept certain data types.   Say I want the following two classes:    // Here, T can only be an array type. ie. int[], uint[], byte[], etc. public class myClassArray<T> where T is Array {  }  // Here, T can only be an integral numeric type. ie. int, uint, byte, etc. public class myClassNotArray<T> where T is NotAnArray {  }   In both cases I still want to be able to do basic arithmetic.  I have tried a bunch of things, but everything failed pretty badly. I think it is because I do not really understand what characterises a specific data type and how to find out what does.    For instance and Array seems to implement:   "ICloneable, System.Collections.IList, System.Collections.IStructuralComparable, System.Collections.IStructuralEquatable"   but somehow, doing something of the sort still does not allow me to do arithmetic:    public class myClassArray<T> where T : ICloneable, System.Collections.IList, System.Collections.IStructuralComparable, System.Collections.IStructuralEquatable {    public voidDoSomeStuff(T value1, T value2)    {         // I would like this to work:         for (int idx = 0; idx < value1.Count(); idx++)         {             var result = value1[idx] - value2[idx];             .....                         }     } }

Can anyone tell me if there is a way with generics to limit a generic type argument T to only:   Int16 Int32 Int64 UInt16 UInt32 UInt64   I'm aware of the where keyword, but can't find an interface for only these types,  Something like:  static bool IntegerFunction<T>(T value) where T : INumeric


I wonder if we can put "A" before a proper noun. Here's an example I found on Google:     As a Vietnam veteran I remembered that it was 16 years after my tour in Vietnam.   I wish to know why the author use "A" before "Vietnam." Thanks.

I wonder about the use of as a and as (only)  in writing. Can you explain when it is correct to quantify the noun when presenting oneself? I will paste some examples for clarity. Are there any rules to follow? Example 1  a) As teacher, I meet many children. b) As a teacher, I meet many children.  Example 2  a) Working as pilot, I fly airplanes. b) Working as a pilot, I fly airplanes.


I have a Class Sample and I call the method calcValues in my main class. But if I call calcValues, it throws a Null Pointer Exeption. But I do not know why...  Here is the code:  Class Sample:  public List<Float> calcValues(List<Float> inputValues)  {     List<Float> outValues = new ArrayList<>();      for (Float value : inputValues) //causes the error     {         SensorDataResult res = this.mySensorData.computeAverage(value);          System.out.print("Ergebnis: ");         System.out.print(res);         if(res != null)          {             // TODO Maybe check for Alarms             outValues.add(res.getValue());         }     }     return outValues; }   Class Main:  public static void main(String[] args)  {     Sample newSample = new Sample();     List<Float> inputValues = new ArrayList<Float>();     inputValues.add(10.0f);       newSample.calcValues(inputValues); //causes the error in main class }   Why does this method (calcValues) throw an error when I call it?  The StackTrace:      Exception in thread "main" java.lang.NullPointerException       at at.axtesys.idr.Sample.calcValues(Sample.java:29)       at at.axtesys.idr.TCPServer.main(TCPServer.java:24)

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


I'm using Ubuntu 14.x, and recently attempting to create files failed with some kind of disk is full message.  I had more than 2gb spaces and that's not possible, but I heard that it can causes if inode is full.  I'm not skilled linux user, so I don't get it how to remove them. First what I do was typing this above command as root to see how many inodes were used:  $ df -i -h Filesystem     Inodes IUsed IFree IUse% Mounted on udev             248K   414  248K    1% /dev tmpfs            250K   467  250K    1% /run /dev/xvda1       512K  512K     0  100% /   Yeah, it's 100%. Then I found the command that shows how much inodes were used in current system:  #  for i in /*; do echo $i; find $i |wc -l; done   It prints this:  /bin 172 /boot 353 /dev 416 /etc 1971 /home 21808 /lib 17720 /proc 43272 /sys 36453 /tmp 5134 /usr 423458 /var 10117 ...   So I deleted some files in /home/dev, and I got some free inodes back, but not much:  Filesystem     Inodes IUsed IFree IUse% Mounted on /dev/xvda1       512K  464K   49K   91% /   Besides, when I re-install the files that I needed, it takes inodes again, so this actually not solved.  I saw that /usr directory takes almost of inodes: 423458, but I don't know which files can I remove that doesn't affect other system or programs.  How do I find "unnessecary" inodes to delete? Any advice will very appreciate it.

So I received a warning from our monitoring system on one of our boxes that the number of free inodes on a filesystem was getting low.  df -i output shows this:  Filesystem       Inodes  IUsed    IFree IUse% Mounted on /dev/xvda1       524288 422613   101675   81% /   As you can see, the root partition has 81% of its inodes used. I suspect they're all being used in a single directory. But how can I find where that is at?


It's ok with english:    But, for example, on ru StackOverflow the text doesn't fit on one line, so text isn't aligned:    If I add css width rules to .s-checkbox, .s-radio it will be ok:  .s-checkbox, .s-radio {     border-top-width: 1px !important;     border-left-width: 1px !important;     border-right-width: 1px !important;     border-bottom-width: 1px !important; }

Switching mode for how the questions with ignored tags will be handled has weird visual behavior (blue circle size is too large) on localized sites, e.g. :        Seems this is happens due to the existence of the second line of option description.  Here is on MSE it looks valid:


The HD of my computer (/dev/sda) has 3 partitions (/dev/sda1, /dev/sda2, /dev/sda3), each containing a copy of Windows Vista Ultimate (restored from a Clonezilla partition image).  Using an Ubuntu LiveCD (15.04), I successfully installed Grub2 in the MBR of the HD using the following commands:  #sudo su #mkdir /mnt/sda1 #mount /dev/sda1 /mnt/sda1 #grub-install --root-directory=/mnt/sda1 /dev/sda "Installation finished. No error reported."   Running os-prober output the following:  #os-prober /dev/sda1:Windows Vista (loader):Windows:chain /dev/sda2:Windows Vista (loader):Windows1:chain /dev/sda3:Windows Vista (loader):Windows2:chain   However, when I attempt to run update-grub (to generate a grub.cfg file), I receive the following error:  #update-grub /usr/sbin/grub-probe: error: failed to get canonical path of '/cow'.   Can anyone please tell me how I can get update-grub to work using the Ubuntu LiveCD?  If possible I would really like to avoid building my grub.cfg file completely from scratch.  Any and all help greatly appreciated!

I am trying to install Ubuntu 12.10 for quite some time, and passing hurdles one by one. Now I am in a situation as follows.  I have got a PC and 10 GB HDD which will be totally dedicated to Ubuntu so no option of Wubi and dual boot.  I was trying to install from DVD, but it is getting stuck at "Out of frequency" error. So I had to adapt for USB boot option. But my PC is USB non bootable, so workaround is "Plop Boot Manager". So I am doing the installation procedure as follows:   starting  from a CD drive which is having plop installed. opting for for USB boot in plop options. booting begins from USB. monitor eventually gives "out of frequency" error press Shift+Alt+F1 to get the terminal. open the grub with sudo nano /etc/default/grub. do necessary changes. sudo update-grub.   Now here I am getting error as follows:   /usr/sbin/grub-probe:error:failed to get canonical path of /cow.     My system is   P4 3.06 GHz, 1 GB ram , 10 GB HDD without an OS, monitor CRT lg StudioWorks (7 years old). Mobo Mercury P4 266a NDMx (865 equivalent). The whole system is perfectly in working condition under XP, but it is USB non bootable, and all other devices working perfectly.  What should I do next?


I am still running the (very old) Kubuntu 14.04 and want to upgrade to Kubuntu 20.04. I plan to do this by simply installing Kubuntu 20.04 into some new partitions (logical volumes to be precise), since I have new space and delete the old installation once I am done with moving. What do I need to consider when moving? Especially, what directories should I take with me, which shouldn't I? Is there a good strategy or are there best practices, where I should look for program files that I might want to keep? Are there (official) moving guides out there?

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc