Using server data store with Python toolbox?

ArcGIS Server lets you set server side data stores:    This is nice. I can use one connection on my local machine and another on my server. (Right? Please tell me I'm right.) But for the life of me, I can't find a way to actually set the data store on my geoprocessing service. My service is defined using a Python toolbox. It looks something like this:  import mygptool  class MyGPTool(object):     def __init__(self):         """Define the tool (tool name is the name of the class)."""         self.label = "MyGPTool"         self.description = "Does my stuff!"      def getParameterInfo(self):         """Define parameter definitions"""         return [arcpy.Parameter(displayName="State (Abbreviation)"                                ,name="state_abbreviation"                                ,datatype="GPString"                                ,parameterType="Required"                                ,direction="Input"                                )]      # Boilerplate isLicensed, updateParameters, updateMessages methods      def execute(self, parameters, messages):         """The source code of the tool."""         state_abbreviation = parameters[0].valueAsText         mygptool.run_my_tool(state_abbreviation)         return   I have a feeling I need to add something to this definition, but I'm having an awful lot of trouble figuring out what I need to add to give my service a connection to work with. (At the moment, I'm generating a temp connection file based on connection parameters in a config file, but that is something I'm looking to change as it doesn't make moving across environments very easy.)  A workspace parameter doesn't seem to help:  arcpy.Parameter(displayName="My Database"                ,name="smart_db"                ,datatype="DEWorkspace"                ,parameterType="Required"                ,direction="Input"                )   This results in a constant parameter on my service, defeating the purpose of being able to specify the connection.  Also, I really do need a connection, not a table or feature class or what have you. The service creates multiple query layers using this connection; we're trying to avoid an MXD as this makes deployment much more difficult and tedious.  How can I make use of server configured data stores with a Python toolbox?


Is it possible to make Ubuntu 18.04 workspaces independent from each other? I mean, when I'm in workspace 2 and press Alt+Tab, I don't want to switch to workspace 1 and see Firefox. Instead, I want it to search in the same workspace (2) and switch to the related app (let's say a Terminal).  I was using Xubuntu before and it was the default behavior but It seems Ubuntu doesn't offer such option as far as I'm aware.  Any ideas?


Let R be a commutative ring, and I, J denote two ideals in R such that I + J = R. Is it true that IJ = I ∩ J?

So far I have that if I + J = R, then 1 ∈ I and/or 1 ∈ J. Then I = R and/or J = R. If both I = J = R, then IJ = I ∩ J = R must be true because we already know that multiplying every element in I or J by every element in R will end up giving us R again. So IJ = I ∩ J = R.  If I = R, but J ≠ R, then IJ = J = I ∩ J because we already know that when all elements of J are multiplied by all elements of R, the result is J again. Therefore, IJ = I ∩ J = J.  Therefore, it is true that if I + J = R, then IJ = I ∩ J.  Does this proof work or am I not able to say that 1 ∈ I or 1 ∈ J?


I have a text file,of 100 lines,i need to move line 40 to line 39(refer to position) How to do this with sed? I tried  sed '40 m 39' file   and  sed '40,39m' file   but give me error. Thanks


Include unicode text under square root symbol

How can I get unicode text to appear under the square-root symbol?   \documentclass{article} \usepackage{fontspec} \newfontfamily\myfont[Script=Devanagari,Scale=1.0]{Sanskrit 2003}  \begin{document} Normal text: $\sqrt{hello}$ \\ Testing unicode text under square root: $\sqrt{1.1{\myfont भू सत्तायाम् }}$ \end{document}   The above fails to print any of the unicode text in sanskrit:


How can I find which desktop enviroment I am using?

as the title:  How can I find which desktop environment I am using?  I want to accomplish this using command line.


$f$ is a differentiable  function such that $f(f(x))=x$ where $x \in [0,1]$.Also $f(0)=1$.Find the value of   $$\int_0^1(x-f(x))^{2016}dx$$


Can a road bike's rear derailleur be used for either a 9 speed cassette or 10 speed cassette?

I currently have a 9 speed 11-25T cassette on my road bike. I'm thinking about switching to a different cassette with more teeth on the climbing gear. The cassette I'm currently look at is a Shimano CS-5700 10 Speed Cassette.  Can I swap my cassette from 9 speed to 10 speed without swapping my rear derailleur?  Is a 10 speed cassette wider than a 9 speed cassette or is the spacing between the gears wider?  Do I just need to adjust the wire tension in order to alter how much the derailleur moves when shifting in order to accommodate for the difference in spacing?


Suppose $a \in \mathbb{R}$, $v \in V$, and av = 0. Prove that $a = 0$ or $v = 0$.   Clearly if $a = 0$, then $av = 0v = 0$.  If $v = 0$, then $av = a0 = 0$.  Is this rigorous enough to be an acceptable proof answer? I feel like I am missing something here.


What's the best way to prolong the lifespan of a Macbook Pro battery?

I have two Mac book Pros:    A 2013 Unibody retina that I use every day An older 2006 model with removable battery that I use a couple of times a month (when not in use, it's not connected to the AC. I recently replaced the battery, as the old one swelled apart).   I use them as desktop replacements, so I don't use the battery that often.   What's the best way to prolong battery lifespan? - If keeping the machines hooked up to the AC is a bad idea, then for how many hours each day should I use the battery?    Here is my research: There's a lot of conflicting advice.   Calibration  A lot of sources, say you should calibrate the battery by letting it run down to 0% each month. For example, this , this  article. All these articles were written in 2013/12 and cite Apple.com as the source for this advice.  However, the  page makes no reference to calibration. Is this because calibration is a bad idea, or is it because Apple no longer sells devices with removable batteries and so the advice is different?  Deep discharge  Other sources, such as this  question, imply that letting the battery drain is a bad idea, so using the AC whenever possible is actually a good thing.   Please note I am talking about the overall battery life span (e.g. the time the battery has before it needs to be replaced) and not increasing the day-to-day hours of the battery.


bash file in mac not functioning properly. How to restart or remove it? It is preventing me from doing anything meaningful in Terminal

The Terminal of my Mac when I open it says this :  Last login: Sun Jul 21 00:07:48 on ttys000 -bash: export: `/Users/vishveshbhat/Desktop/flutter/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin': not a valid identifier -bash: export: `=': not a valid identifier -bash: export: `/Users/vishveshbhat/Desktop/flutter/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:': not a valid identifier Ganeshs-MacBook-Air:~ vishveshbhat$    And whenever I enter a command, I get "command not found". What to do?


Algorithm for units to attack each other in strategy games

I am creating a strategy game with many objects, in which the objects will be able to attack each other.  If an object is within attack range of another object, it will be attacked. But I only know one way is to loop through all objects to see if it is within the scope of this object's attack. Therefore the complexity of the algorithm is O (n ^ 2). Can someone give me a better algorithm or preferably a book about algorithms like this.  Thanks !


Find $\lim_{n \to \infty} \left[\frac{(n+1)^{n + 1}}{n^n} - \frac{n^{n}}{(n-1)^{n-1}} \right]$ (a question asked at trivia)

My friend's trivia league had this math question:  $$\lim_{n \to \infty} \left[\frac{(n+1)^{n + 1}}{n^n} - \frac{n^{n}}{(n-1)^{n-1}} \right]$$  After computing a few values, one could guess the answer is $e$ = 2.718...But how can we prove that is the limit?  Someone offered up a hand-wavy proof like this:  \begin{align} \lim_{n \to \infty} \left[\frac{(n+1)^{n + 1}}{n^n} - \frac{n^{n}}{(n-1)^{n-1}} \right] & = \lim_{n \to \infty} \left[\frac{(n+1)(n+1)^{n}}{n^n} - \frac{n \cdot n^{n-1}}{(n-1)^{n-1}} \right] \\ &= \lim_{n \to \infty} \left[(n+1)\frac{(n+1)^{n}}{n^n} - n\frac{n^{n-1}}{(n-1)^{n-1}} \right] \\ &= \lim_{n \to \infty} \left[(n+1)\left(1 + \frac{1}{n} \right)^n - n\left(\frac{n - 1 + 1}{n-1} \right)^{{n-1}} \right] \\ &= \lim_{n \to \infty} \left[(n+1)\left(1 + \frac{1}{n} \right)^n - n\left(1 + \frac{1}{n-1} \right)^{n-1} \right] \\ &= \lim_{n \to \infty} \left[(n+1)e - n \cdot e \right] \\ &= \lim_{n \to \infty} e \\ &= e \end{align}  The part about substituting $e$ is hand-wavy since technically this is an indeterminate form of $\infty - \infty$. And using $e$ as as upper bound did not lead me to an easy proof either.  Is there a way to rigorously prove the limit? I tried a few approaches: (a) sandwiching the limit--I could prove $e$ was a lower bound, but I could not find a suitable upper bound converging to $e$, (b) using L'Hopital's rule with no luck, (c) using the mean value theorem--but that also got complicated.  So this is a pretty tough problem to ask at trivia! Is there a way to prove this limit formally?  Sources  Trivia question:   Thread on trivia:   Hand-wavy proof:   Idea for mean value theorem:


Word or phrase for mere coincidence that brings happiness

I wish to state that my exposure to a certain area was a mere coincidence, and I am happy about the area.   Moreover, I want to convey the idea that the incident was like a fairytale, something no one would easily believe, but because of it I ended up where I am.  The same incident happening to someone else might go unnoticed but it rang the bells for me.  Stating this idea as above is too long and boring, and such language seems childish or out-of-place in a statement of purpose. I want to make it succinct.  Is there any word or phrase that conveys the same idea?


Meaning of wave function which is in inside of the potential wall?

In particle in square potential barrier problem, we can easily find that some probabilities exist which express how many particles can go beyond of the potential wall.  So my question is that, can we find some particles in the potential wall - square of wave function's norm really means  probability of find a particle in the wall?


What are the highest DC and AC voltages or currents that can be considered as safe?

By safe I mean safe for us when we touch a wire that is not insulated. I have heard that human body resistance is normally 50k Ohm when dry and 20K Ohm when wet. Therefore, these voltages or currents should be safe for a person who is wet. It should be considered when no insulator is present to protect the body.


Replace function arguments name by local variables in Python

I want to have the function like the following  unit = "days" datetime.datetime.now() + datetime.timedelta(unit = 1)   Where in the unit could be days, hours, and minutes etc., which may be changed according to the the time shift unit.  Is there any way to do it in a fast way?


Webcam not found on Thinkpad E550 (ubuntu 14.04)

I got a new laptop Thinkpad E550 and at first the touchpad was not working so I updated the kernel but now the webcam is not working. Cheese is giving the error "device not found"  $ lsusb Bus 003 Device 002: ID 8087:8001 Intel Corp.  Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 5986:055a Acer, Inc  Bus 001 Device 003: ID 8087:0a2a Intel Corp.  Bus 001 Device 002: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


how to rename of handle a '-r' named file?

In a subfolder of my home dir, There is a file called '-r'  -rw-r--r-- 1 pi pi 10240 Sep 15 18:19 ./prog_python/-r   I don't even know why.  I would like to rename the file or delete it, but nothing like rename '/-r' newName or rename '\-r' newName works. Any advice ? Thanks !


I install a software in commande line from  source  and I did : tar -zxvf geneid_v1.4.4.Jan_13_2011.tar.gz and make but I put it in my Download folder, so I would like to install it in a more proper way, in another folder.  So i did make clean, Is it enough ? I have just to rm the folder and that's all ?  Thanks


How do you play Civilization V by E-Mail?

The Civilization series of games is famous for having a way to play by e-mail. This allows people to take a long time on their turn without holding up the other players, as you do in a real-time game. Yet, I can not find any method to play by e-mail in the game menus. Does it exist? If so, how do you do it?


When to use indefinite article "a(n)" when referring to a person with an adjective?

I'm not a native English speaker. From time to time I see the following structure when referring to a person: ... a(n) [adjective] [person's name] ... example:  "Meanwhile, an increasingly sadistic Henry begins focusing his attention..." / Wikipedia: It (novel) /  I'm pretty sure that the following is correct as well:  "Meanwhile, the increasingly sadistic Henry begins focusing his attention..."  What's the difference between these?


How to get QGIS to play with pandas (Windows)?

has anybody been successful getting pandas to work with QGIS's Python installation, on Windows? I've used the OSGeo4W installer to install QGIS2.2, which comes with Python 2.7 and Numpy 1.5.1. Any reasonably new version of pandas requires Numpy 1.6.1 or newer. So that seems like my main problem. I've tried: - Building an older version of pandas (e.g. 0.7.3 and 0.4.1) using easy_install, but that gives me a very long list of errors, at least the last of which are related to distutils\msvc9compiler.py - Using binaries of old pandas versions, but they are all built for Numpy 1.6.1 - Upgrading Numpy, which also gives me an error message. In case anybody is interested, the message ends with "File “C:\OSGeo4W\apps\Python27\lib\distutils\msvc9compiler.py”, line 299, in query_vcvarsall” newline “raise ValueERror(str(list(result.keys())))” newline “ValueError: [u’path’]"  I'm wondering if anybody else has ever been successful in getting pandas to work with a QGIS install on Windows??  It would be so easy if QGIS would ship with, say, a version of Numpy that's less than three years old. Does anybody know if such an upgrade is in the works for upcoming QGIS versions?


Led on for one minute eve if the switch is pressed for more than one minute?

how to make a circuit that when press the switch the led is gonna stay on for one minute and than off even if the switch is still pressed for more than one minute


Can we write the empty set as a union of open intervals?

The set $\mathcal{B}=\{(a,b) : a < b, a,b\in\mathbb{R}\}$ is a base for the usual topology. Hence every open set in $\mathbb{R}$ can be written as a union of elements of $\mathcal{B}$.   What I don't know is how does that definitions work here with the empty set. I don't see the way you can write the empty set as a union of elements of $\mathcal{B}$


How can I prevent gaps in a MySQL table AUTO_INCREMENT field?

For example, I have a table for user registration:  CREATE TABLE IF NOT EXISTS test_user (      user_id int(10) unsigned NOT NULL AUTO_INCREMENT,      user_name varchar(50) NOT NULL,      PRIMARY KEY (user_id),   ) ENGINE=InnoDB DEFAULT CHARSET=utf8   I want the user_id field ID numbers to be continuous, without gaps.    Failed transactions will occupy some ID numbers, is there any way around this?


thl 4000 can't install apps - insufficient storage

On my thl 4000 I can't install apps - I get 'insufficient storage' massage, but I have 168M of free storage and the apps are 2 - 8 M  I tried to follow all the instructions on the different forums, it helped at first but now nothing works.  android v - 4.4.2


JS .replace function for multiple variables

I am trying to work with the .replace function and it is working fine as long as I only have one variable to replace. As soon as I need to replace a variable more than once, it is not working anymore. Here is part of my code: function handleDetails(contentItem, contentKeys, templateKey, contentElementKey, callback=null) {     let contentTemplate = $('#' + templateKey).html();      for (const item of contentKeys) {         contentTemplate = contentTemplate.replace('{{' + item + '}}', contentItem[item]);     }      $(contentElementKey).append(contentTemplate);      if (callback) {         callback(contentItem);     } }  Example: {{date}} -> replaced with 04/11/2021 Now I want to use {{date}} twice in my template but only my first {{date}} gets replaced. Therefore I tried to use /g but without success. Here is what I´ve tried so far: contentTemplate = contentTemplate.replace('{{' + item + '}}/g', contentItem[item]);  or contentTemplate = contentTemplate.replace('/{{' + item + '}}/g', contentItem[item]);  or contentTemplate = contentTemplate.replace(/'{{' + item + '}}'/g, contentItem[item]);  I can´t find the right syntax. What am I doing wrong? Isn´t that the way it should work? I really appreciate any help. Thanks in advance, Chris


How to play audio in java programming in the simplest way

Is there anyone who can help me how to do this because it's difficult to know how to implement song in my simple program. I'm only beginner programmer and i want to know how to do that because i have a project regarding that. please help me in the simplest way because i'm not yet very good in java programming thanks ^_^  //this is my code. don't you think it's possible to do?      public class Audio {      public static void main(String[]args) throw IOException {       BufferedReader br = new BufferedReader (new InputStreamReader(System.in));       String AudioAccept;       System.out.println("Would you like to play song?");     AudioAccept = br.readLine();        if(AudioAccept == Yes){     // Play song which is what i want to know how to do.     }else{     System.out.println("Failed");     }      }     }


php - trying to print some special characters

I have been trying to print some characters on my php page and it returns something else, like corrupted characters  like      "joão", ø, ç, etc   echo '
não
'   the return is  nÃ£o   instead:  não   is this a problem with econding utf-8?  i have tried this code  header('Content-Type: text/html, charset=utf-8');   but no result


Missing operations in last round of DES and AES

Why doesn't last round of DES have swapping? Why MixColumn is not included in last round in AES?


Copy transforms from one object to another

I want an object to have the same Transforms (location, rotation, and scale) as another object. How can I copy the Transforms from one object to another?


T-SQL query to merge all rows into one row

I have a T-SQL query, which pulls details from several locations (Something like below):  IF OBJECT_ID('tempdb..#mytable') IS NOT NULL DROP TABLE #mytable;  CREATE table #mytable     ([Locno] varchar(6), [Stories] varchar(6), [Type] varchar(13)) ;  INSERT INTO #mytable     ([Locno], [Stories], [Type]) VALUES     ('54', '2', 'TH'),     ('65', '5', 'OB') ;  SELECT * FROM #mytable  Locno | Stories | Type 54    | 2       | TH 65    | 5       | OB   I want to bring all the rows into a single row. It's not a PIVOT or CONCATENATE, but something like below (I might have n number of locations):   Locno_1 | Stories_1 | Type_1 | Locno_2 | Stories_2 | Type_2     54  | 2         | TH     |  65     | 5         | OB   Can someone guide me how to do the same?  TIA


How can I delete duplicates in a Python list

Please how can I delete duplicates in list. Example     dup_list = ['he', 'he', 'sh', 'sh', ' jk', 'jk', 'gf', 'gf'] I want the new list to look like this.  new_list = ['he',  'sh', ' jk', 'gf']   Please can some help me with this.


How to change the `LastModifiedDate` of a record in a test class?

My batch class query depends on LastModifiedDate of a record being atleast one day in the past.  How do I set this variable?  Alternatively, how do I change system date only in the test?  EDIT : I "solved" this by using actual data from the org.


Hi I am trying to run this command in python's subprocess with shlex split, however, I haven't found anything helpful for this particular case :  ifconfig | grep "inet " | grep -v 127.0.0.1 | grep -v 192.* | awk '{print $2}'   I get an with ifconfig error because the split with the single and double quotes and even the white space before the $ sign are not correct. Please Help.


How to get shift+arrows and ctrl+arrows working in Vim in tmux?

This is all in iTerm2 on OS X.  I used to have  export TERM='xterm-256color'   in my .bashrc. This meant Vim in tmux did use 256 colors.  And once I added  set -g xterm-keys on   then keyboard shortcuts with modifiers worked fine in Vim. Namely: shift+left/right that I mapped to switch Vim tabs, ctrl+up/down that I mapped to move ("bubble") lines, and shift+left/right which worked out of the box to jump by word in the command-line mode (e.g. when typing something like :e foo bar baz).  However, this setup had the problem that the Vim background color only shows behind text, as mentioned .  So I removed  export TERM='xterm-256color'   from my .bashrc and instead put this in my .tmux.conf:  set -g default-terminal "screen-256color"   That fixed the Vim background color, but broke the keyboard shortcuts - they do unexpected things (move the cursor, delete text) instead.  By using ctrl+v to insert the verbatim output from the key combinations (as described ), I was able to work around it:  map [1;5A <C-Up> map [1;5B <C-Down> map [1;2D <S-Left> map [1;2C <S-Right> cmap [1;2D <S-Left> cmap [1;2C <S-Right>   This makes the shortcuts work, but it doesn't feel like the right solution. Could anyone tell me what's happening here and how to fix it?


How can I make my Hot chocolate thicker?

I've been trying to make a thicker hot chocolate and I'm not sure what to add without taking away from the flavor of the chocolate. Usually what I do is boil the milk, and then I add chocolate baking powder and shaved chocolate.


How do I install an application to my USB and get it to work on any machine when you aren't "Administrator"

I've tried applications like Mojo and portableapps creator but either it doesn't work or I need Administrative rights (Mojo).  How can I get a simple install app to work on my USB without being an Administrator?


The distance between two opposite vertices of the dodecagon is 2. Find the area of the dodecagon.  Is there any way to do this without trigonometry?  And could you include a proof also? :O


$P$ is projective . Show that $P$ is a direct summand of a  free $R-$ module  I am using the definition of a projective module as $P$ is projective if every exact sequence $M\rightarrow P\rightarrow 0$ splits   How to proceed?


How can we recover the Newtonian gravitational potential from the metric of general relativity?

The Newtonian description of gravity can be formulated in terms of a potential function $\phi$ whose partial derivatives give the acceleration:  $$\frac{d^2\vec{x}}{dt^2}=\vec{g}=-\vec{\nabla}\phi(x)=\left(\frac{\partial\phi}{\partial x}\hat{x}+\frac{\partial\phi}{\partial y}\hat{y}+\frac{\partial\phi}{\partial z}\hat{z}\right)$$  However, in general relativity, we describe gravity by means of the metric. This description is radically different from the Newtonian one, and I don't see how we can recover the latter from the former. Could someone explain how we can obtain the Newtonian potential from general relativity, starting from the metric $g_{\mu\nu}$?


Atoms do not have colour, but objects which are nothing but the assembly of atoms have colour! How is that possible?

Objects are made up of atoms, and objects have colour, but atoms, as my understanding goes, do not have colour, so how is it possible that colourless atoms form objects which have colour?


MathJax CDN (cdn.mathjax.org) will be shutting down

The news that  was recently brought to my attention.  I have updated  to use the alternate server given in the MathJax post.  It seems to work well, but if StackExchange is going to host a local copy to use with the sites that support MathJax, I will update ChatJax to use that server instead.  I  and was asked to post here. Also, I was told that the MathJax team has already contacted the SE devs about this. So my question becomes: what are the SE plans for continued support of MathJax?


How do I use Java to read from a file that is actively being written to?

I have an application that writes information to file. This information is used post-execution to determine pass/failure/correctness of the application. I'd like to be able to read the file as it is being written so that I can do these pass/failure/correctness checks in real time.  I assume it is possible to do this, but what are the gotcha's involved when using Java? If the reading catches up to the writing, will it just wait for more writes up until the file is closed, or will the read throw an exception at this point? If the latter, what do I do then?   My intuition is currently pushing me towards BufferedStreams. Is this the way to go?


What visa do I need for a flight connection in Kuala Lumpur, Malaysia?

I am really confused. I have two separate tickets, both with AirAsia.  First flight is Bombay to Kuala Lumpur, 2.5 hour layover, and connection to the second flight, Kuala Lumpur to Manila.   I believe that when I arrive in Kuala Lumpur, I have to go through immigration to collect my luggage, and go back to immigration to check in my next flight.  In that case, I will need a visa. When I go to  to apply for an e-Visa, it asks for accommodation proof, bank statement and Malaysia address, none of which I have.  I am Indian and having Indian Passport  Another search gave information regarding , but doesn’t say whether I get it at the airport or the local embassy.  Update: To avoid any issue while travelling, I obtained a Transit Visa from local Malaysian Embassy in Kuwait.


A question about notation of Bayes' Theorem

When I studied Bayesian statistics, a question about the notation of Bayes' Theorem came to my mind. Below is the density function version of Bayes' Theorem, where $y$ is data vector and $\theta$ is the parameter vector:  $$ p(\theta|y)=\frac{p(y|\theta)p(\theta)}{p(y)} $$ The numerator on the right handside can be written as: $$ p(y,\theta) $$ which is the joint probability distribution of $y$ and $\theta$, then Bayes' theorem could be written as: $$ p(\theta|y)=\frac{p(y,\theta)}{p(y)} $$ Furthermore, $$  p(\theta|y)\propto p(y,\theta) $$ Am I right on this? I think it does not look right. Because the posterior is the proportional to the joint density function. But where is the mistake?


On the "Ask Question" page, when the keyboard focus is in the entry box for "Tags", on the right hand side we see a box with some information on "How to Tag".   Can we add an item in there to indicate to users that, after selecting a tag, they can hover the mouse over the selected tags (which now appears below the entry box) to read the Tag-Wiki excerpts, to see if they have selected an appropriate tag? I think this will help with the problem of new users applying grossly inappropriate tags because they don't actually understand what a particular tag is for. (This happens a lot on Math, but also a bit on TeX and other sites that I read.)


Graph theory: Tree holds two sub-tree with an amount of vertices

I was asked the following question:  Let $T=\left(V,E\right)$ be a tree, and let $d$ be the maximum degree of a vertex in that tree. Assume that $d \geq 2$. Prove there an edge in the tree such that, when we remove it from $T$, we will get two trees each of which has at most $\left\lceil \dfrac{d-1}{d}\left|V\right|\right\rceil$ vertices.  I tried going by induction on $d$ the maximum degree while I set the number of vertices and it didn't worked. also tried to do induction on the number of vertices and it didn't worked too.  Thanks for the help, Yoav


What is the word for the mistake of placing an event or object in the wrong age or decade, such as a film star in a movie about Roman times wearing a robe made of nylon?


How do the Federation humans pay for drinks at Quark's bar given that humans have no money?

In the DS9 episode "In the Cards", when Jake wants to acquire a baseball card:     JAKE: I'm Human, I don't have any money.      NOG: It's not my fault that your species decided to abandon currency-based economics in favor of some philosophy of self-enhancement.      JAKE: Hey, watch it. There's nothing wrong with our philosophy. We work to better ourselves and the rest of humanity.   Quark is certainly not going to give free drinks to the Humans just because he is impressed with the moneyless philosophy of the humans. I can understand if he gives free drinks to beautiful Jadzia Dax to attract other male paying customers. Other than her, I expect everyone else has to pay. However, how can they pay if they have no money?


Would you please explain me the difference between Probability distribution and Sampling distribution easily ?  Is that the difference : in probability distribution we have probability for every individual whereas in sampling distribution we get probability for statistic ?  Does sampling distribution require more than 2 observations ?


If I have a [digital] photograph of an object, can I estimate it's approximate size?  I notice with interest that my camera (Nikon D3300) seems to record the approximate focal length of the lens in the Exif data. (It seems to round it to the nearest "common" nominal length.) However, I see nothing in the Exif data about the plane of focus. Presumably the camera system has that data somewhere (e.g., some lenses have it printed on the focusing scale), but I don't see it recorded anywhere.  Assuming I had the lens focal length and the lens focus distance, presumably it should be quite straight forward to estimate object size.  (In case it matters, I'm particularly interested in extremely tiny objects such as ants, grains of sand... stuff you can't exactly take a ruler to. I don't know whether that makes size estimates easier or harder.)


Let $a$, $b$ and $c$ be non-negative numbers such that $(a+b+c)^2(a^2+b^2+c^2)=27$. Prove that: $$\sqrt{a^2+3b^2}+\sqrt{b^2+3c^2}+\sqrt{c^2+3a^2}\geq6$$  A big problem here around $(a,b,c)=(1.6185...,0.71686...,0.4926...)$.  In this case we get $\sum\limits_{cyc}\sqrt{a^2+3b^2}-6=0.000563...$.  My trying.   Let $a^2+3b^2=4x^2$, $b^2+3c^2=4y^2$ and $c^2+3a^2=4z^2$, where $x$, $y$ and $z$ are non-negatives.  Hence, we need to prove that $$\sum\limits_{cyc}\sqrt{x^2-3y^2+9z^2}\leq\frac{\sqrt7(x+y+z)^2}{\sqrt{3(x^2+y^2+z^2)}}$$  Let $k$ and $m$ be non-negatives, for which  $x-ky+mz>0$, $y-kz+mx>0$, $z-kx+my>0$ and $1-k+m>0$.  By C-S $\left(\sum\limits_{cyc}\sqrt{x^2-3y^2+9z^2}\right)^2\leq(1-k+m)(x+y+z)\sum\limits_{cyc}\frac{x^2-3y^2+9z^2}{x-ky+mz}$.  Thus, it remains to prove that $$(1-k+m)\sum\limits_{cyc}\frac{x^2-3y^2+9z^2}{x-ky+mz}\leq\frac{7(x+y+z)^3}{3(x^2+y^2+z^2)}$$  It's a sixth degree, but I didn't find a values of $k$ and $m$, such that the last inequality will be true.  By this way we can prove that $\sum\limits_{cyc}\sqrt{a^2+2b^2}\geq3\sqrt3$ is true, but it's not comforting.  Also I tried to use Holder, but without success.  Thank you!


The year 2016 is coming up, so it makes me wonder: how do you prove that there is no simple group of order 2016? (without invoking the 10,000 page theorem on the classification of simple groups)


We have a website that we have converted into German - the back end is a MySQL DB (version 5.5) and the site is written in PHP 5.6 and HTML.  The issue we have is with special characters when we retrieve data from the tables and display it on the page. For example:  It is something our side, to do with the SQL retrieve from the database. In the table we correctly store the special characters:  Stored in the address table field: Nurnberg (with umlaut)  But when displayed on the web page: N�rnberg  Encoding on the page is charset="ISO-8859-1" and SQL connection is  •   MySQL charset: UTF-8 Unicode (utf8)  •   MySQL connection collation: UTF8-unicode-ci  All other special characters display fine from static text, just not when retrieved from the DB.  Any help much appreciated.


What Is The Proper Name For {!recordId} Type References?

What is the proper name for references such as:   {!recordId}   It's not a "field".  "id" would be the field.  When creating a custom button, this is referenced as a "merge field".    I'm attempting to use it when customizing the Force.com menu where apparently you can use these references (trying to confirmed) in URLs.  So far, the brackets are being percent-encoded and breaking the resultant URL...


Why 2 electrons can't be in the same quantum state when they are distant apart?

I understand that when 2 electrons are confined into a very small volume of space slightly bigger than their debroglie wavelength, one of the pair must jiggle with increase momentum due to pauli exclusion principle.  But looking at G. Smith's  in my earlier question, why can't 2 electrons separated with a vast distance of space share the same quantum state? It didn't make sense to me unless the electrons are bound to an atom then each of them must go to different energy level since already 2 electrons with the same lowest energy state show different spin state.


The task is to show that $x^2 + 1$ is irreducible over $\mathbb{F}_{743}$ and then find a generator of  $\mathbb{F}_{743}[x]/(x^2+1)$.  This question has already been asked but not really answered    I've shown that $x^2+1$ is irreducible, since $ 743 \equiv 3\pmod{4}$ and therefore $-1$ is not a quadratic residue mod 743.  But I don't understand how to find a generator of $\mathbb{F}_{743}[x]/(x^2+1)$. I assume I need to look for an element of order $743^2-1$, but is there an obvious way to do this, or is it just done by trying?


How does one create a keyword symbol from a string?

Making a symbol from a string is quite simple:  (intern "test") => test   I'm struggling to create keyword symbols for a plist. Looking for something like:  (XXXX "test") => :test   Note that (intern ":test") does not produce a keyword symbol but rather a symbol containing a colon (e.g. |:test|).  How can one correctly generate keyword symbols in Common Lisp? Thanks!


Given any 30 positive integers, prove that we can find some integers so their sum is divisible by 30. I don't know where to start. Please some hints.


Why is volatile needed in C? What is it used for? What will it do?


I have a module where I try to catch an url to use a specific function.  function my_module_menu(){     $items['beneficiaire/commande'] = array(         'page callback' => 'test_view',     );     return $items; }  function test_view(){     var_dump('test_view');     exit(); }   Unfortunately, when I call beneficiaire/commande nothing append. I know Drupal go through this hook because when I do  function my_module_menu(){     die('poc'); }   I see 'poc'.


How to prove $x_1 + x_2 +\ldots+x_n \le \left(\frac{1}{2}\right)\Rightarrow (1 - x_1)(1-x_2)\cdot \ldots \cdot(1-x_n)\ge \left(\frac{1}{2}\right)$?

Prove, that $x_1 + x_2 +\ldots+x_n \le \left(\frac{1}{2}\right)\Rightarrow (1 -  x_1)(1-x_2)\cdot \ldots \cdot(1-x_n)\ge \left(\frac{1}{2}\right)$. Value $n$ is a positive real number $(x_1, x_2, \ldots, x_n)$  I tried using mathematical induction but didn't get too far with that. Any ideas how to solve it with induction?


Ubuntu 18.04 - logged out after resuming from suspend or even turn the screen off

I tried Ubuntu 18.04, Budgie, and both have the same probelm when using nvidia dirver 390 & 396. When resume from suspend the system logout and every program I was working on is closed. It seems that nvidia driver is not supporting any change I make on xorg. When switch back to nouveau, the system works normally, and suspend resume is not logging out. I have almost every solution on the web, including nvidia forum and SE, none of them works. UPDATE: I reset recursively org.gnome using dconf-editor and now it works probably till now, it seems to be a gnome-shell problem NEW  This problem is not a swap error, since I tried to turnoff the swap, in addition, I read the journal output, I is related to gnome-shell dealing with nvidia leads to kill the session when turning on the screen, or waking from sleep. note: I know this question may be duplicated but for some reason I can't post any answer or put any comment. Please Please If you realy know the answer share it otherwise don't comment any off topic comment


War with remotely piloted micro-machines

While waiting to get onto a computer booked at the local library about 2 years ago, I picked up a sci-fi novel whose name and author I cannot recall and began reading.  Elements of the opening part of the book that I can recall.   A small squadron is trying to penetrate the defenses of an enemy power. It is mentioned they are traveling at an altitude of NN mm (which seemed odd at the time) They are swamped by autonomous flying defenders that hone in on the approaching craft and attack them (mostly by physically disassembling them in-flight). The pilots have a conversation in which it is revealed that this is not the first time they've attacked, and the defenses have improved over time. As each of the attacking craft are swamped the situation becomes more hopeless, until the last of the attackers is destroyed. It then turns out the pilots of the attack vehicles were at a far distant point, remotely operating micro/nano-machines..   That was mostly in the first chapter, as far as I read.  I'd guess it was written within the last 10 years (15 at the outside).  Can anyone identify this book & author?


Proving that $|\{B\subseteq S: |B|<\infty \}|=|S|$

I've some elementary set theory problem that I came across with:  Let $S\subseteq\mathbb{R}$ be infinite set, and let $A=\{B\subseteq S: |B|<\infty \}$. I'm interested in showing that cardinality of set $A$ is equals to cardinality of $S$, i.e $|A|=|S|$.  I thought using Cantor–Bernstein–Schroeder theorem in some way.


How do I reset proxy in terminal to automatic if not connected via proxy

I tried to reset proxy of the terminal by some commands but it doesn't happen and automatically switches back to this proxy 172.16.0.16 (which apparently was my college proxy).   I checked in my system settings.I don't understand why this is recurring. Please be comprehensive.Also I further would like to know how to bypass proxy server since I couldn't access any of the ubuntu repositories as they were blocked in my college's proxy settings as is Ubuntu's homepage.  Thanks for your time.    For sudo ls /etc/apt/apt.conf.d/        It displays a different set of options where proxy is not listed.I am on 12.10,if this should help any.I put a snap of the terminal after the above command has been entered.


Given $G$ is cyclic and $H \subset G$, is it true that $G/H$ is a cyclic group?

I am stuck on trying to find an element in $G/H = \{g + H | g \in G\}$ that will generate the whole set. My intuition tells me it is true since $G$ and $H$ are cyclic. I have a feeling that this direct approach of definition of a cyclic group is not the effective way to tackle this problem. Any advice appreciated, thank you.


If in Pete's World there's no Doctor, how is there a Torchwood?

Torchwood was founded because of The Doctor's interference with the Queen with the werewolf.   But in Pete's world, there is no Doctor.  How is there still a Torchwood in this world if there is no Doctor?


Linux bash know the script path which includes library script

I have a library script named A and a script B, C which includes A with   . ../../../A    The problem is how A can know which time I run ./B.sh or ./C.sh, example:  if(run ./B.sh)    echo "B (file path) is calling" else    echo "C (file path) is calling"


I just installed Ubuntu 14 on a separate hard drive from Windows 7.  But when grub2 boots up, I only see options to boot Ubuntu, Windows 7 is nowhere in sight.  I've had to manually boot the hard drive with windows 7 on it to get in.  Here's my disc info:   /dev/sda1 HPFS/NTFS (Windows 7 drive) /dev/sdb1 HPFS/NTFS (TB drive) /dev/sdc1 EFI System FAT (Ubuntu drive, grub is installed on this one)   If I run sudo update-grub I get:  Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.13.0-24-generic Found initrd image: /boot/initrd.img-3.13.0-24-generic Adding boot menu entry for EFI firmware configuration done   Running sudo parted -l shows:  Model: ATA Crucial_CT240M50 (scsi) Disk /dev/sda: 240GB Sector size (logical/physical): 512B/4096B Partition Table: msdos  Number  Start   End    Size   Type     File system  Flags  1      1049kB  240GB  240GB  primary  ntfs         boot   Model: ATA WDC WD10EZRX-00A (scsi) Disk /dev/sdb: 1000GB Sector size (logical/physical): 512B/4096B Partition Table: msdos  Number  Start   End     Size    Type     File system  Flags  1      1049kB  1000GB  1000GB  primary  ntfs   Model: ATA WDC WD2500JS-00M (scsi) Disk /dev/sdc: 250GB Sector size (logical/physical): 512B/512B Partition Table: gpt  Number  Start   End    Size    File system     Name  Flags  1      1049kB  538MB  537MB   fat32                 boot  2      538MB   242GB  241GB   ext4  3      242GB   250GB  8471MB  linux-swap(v1)   Any ideas on how to get Windows 7 to appear?


What is the equivalent of root in Windows 8.1, and how can I open a shell in that context?

I've heard the equivalent of root is the "SYSTEM" account. But I used a tool called "RunAsSystem" to open a shell as SYSTEM, and I'm still getting "access denied" errors even though I know the files in question aren't in use. How can I get a shell from which I can perform any action on any file regardless of whatever permissions are set?  EDIT: This is not a duplicate of . That one is asking why a standard administrator account doesn't have certain permissions; I'm asking if there's an account that has full permissions for everything.  EDIT2: It's not a duplicate of  either. That question is asking how to get a command prompt as the SYSTEM user. In my question I've clearly stated that I was able to do so, so I'm certainly not asking how to do that.  Also, I haven't chosen an accepted answer yet because I haven't decided yet--I didn't forget, if you were wondering.


Why am I getting this unexpected result in Eclipse console output? (String comparison)

EDIT: I do not think this is a copy of an existing question.  The references of my 2 declared string point at the same memory location, so why is my == (reference comparison) giving false?  It is not a character by character comparison.   I am writing test files to get a better understanding of Java String references and comparisons.  I expected the 3rd line of my code to be :     Should be true: true   Why is it not?     public class testr {      public static void main(String[] args) {         // TODO Auto-generated method stub          String s = "s";         String t = "s";           System.out.println("String s hashcode: " + s.hashCode());         System.out.println("String t hashcode: " + t.hashCode());         System.out.println("Should be true: " + s==t);      }  }   Output:  String s hashcode: 115 String t hashcode: 115 false


JS get caller function and re-execute it as async callback

Is there a way in vanilla Javascript (ES5) to get the caller function and re execute it after an async call is done without the need to pass it as a callback function?   I am building a caching mechanism on a system and for some reason it's not possible for me to use promises, es6's generator function etc (any modern js features which I thought could be of help).   Right now, I'm coding it this way (this is a much simplified version):  var cache = {}; var cacheCallbackQueue = [];  var theCallerFunction = function(someParam){      loadCache("aDataTarget",function(){         theCallerFunction(someParam);     });      // cache will be used here somehow     // if the needed cache haven't been loaded     // the async cacher should re-execute this caller function after the caching is complete }  var anotherCallerFunction = function(anotherParam){      loadCache("anotherDataTarget",function(){         anotherCallerFunction(anotherParam);     });  }  var loadCache = function(cacheId,callback){      asyncCall(cacheId, function(result){         cache[cacheId] = result;          cacheCallbackQueue.push(callback);         // is there a way to get the caller function automatically          // without the need to pass it as callback function on the parameter          checkCachingStatus();      })  }  // check if caching is completed,  // if the caching is completed,  // it will execute all previously queued callback function var checkCachingStatus = function(){     var cachingStatus = "complete";     if(!cache["aDataTarget"] || !cache["anotherDataTarget"]){         cachingStatus = "incomplete";     }      if(cachingStatus === "complete"){         for(var key in cacheCallbackQueue){             cacheCallbackQueue[key]();         }     } };  theCallerFunction("whatever"); anotherCallerFunction(666);   I am not sure if I'm coding it 'the right javascript way', I'm open for another suggestion


My key jammed in my U-lock. How can I unlock/break it?

I've been biking for 2 months now with my U-lock still on my bike, it sort of gets in the way of pedaling sometimes and I'm kinda tired of it.  Does anyone know of any ways to get the remnants of the key out from the lock? Or is my only option to send this to the bike shop and have them saw it off?  I can provide pictures if necessary. I've been using a secondary chain in the meantime.


How do I reduce the space between operators in math mode?

I have these operators +=, -= etc. in Math mode. LaTeX introduces space around single character operators. So I get + = and - = instead.   However, in my case I want no space between the + and the =, and similarly between the - and the = in the second operator.  How do I make them near each other such that there are is no horizontal space between them? I tried to put them in \mathit but it didn't have any effect.


What does it mean, that two questions are linked?

Just to feed my curiosity. How can , in which I never took a part (except reading -- no comment, answer, edit, no nothing) can be linked to  and vice versa?  How can an year old question be linked with a month old question, which doesn't even existed when first was written?  Why these two questions list each other in Linked section, while there isn't even a trace of one in another? What does it mean, that two questions are linked and what conditions must be met, to two question become "linked" together.


Problem: Let $a,b\in\Bbb N$ with $a\cdot(a,b)=b\cdot[a,b]$ where (a,b) means the greatest common divisor of a,b and [a,b] means the smallest common multiple of a,b prove that there are an infinite amount of solutions for a,b. What I tried: I first started off by assuming WLOG that $a<b$ and then assuming 1 case,that is $(a,b)=a$ and $[a,b]=b$ with that in mind we get $a^2=b^2$ and that clearly has infinite solutions,but i don't know if this is a legitimate proof and i would like to find out what's the correct proof for this if it's not this one.


Show that a polynomial is irreducible on $\mathbb{Q}$

I would like to show that $P(X)=X^4-20X^2+16$ is irreducible on $\mathbb{Q}$, how to proceed ?


Unfortunately, I think I already know the answer to this but I'm hoping I'm just missing a trick:   On a sunny day, is it possible to compensate for a 2 second shutter speed so the photo doesn't come out completely white?   When I was out yesterday, I set my camera to f/29 ISO 100 (the lowest I could go) to try to get a slow shutter speed photo of a river. The problem was, though, the sun came out and I ended up with several areas of the photo that were overexposed beyond repair. In manual mode, the exposure compensation feature on my camera does nothing. Is there a way to prevent the whiteout or am I just out of luck?   Also, would it be better to take the slow shutter photo, take a quick duplicate using aperture priority, and then compile the two?   Any suggestions are greatly appreciated. Btw, I'm using a Nikon D5600.


Characteristic polynomial of a complex 4 by 4 matrix

Let $A$ be a $4 \times 4$ matrix over $C$ such that $rank (A)=2$ and $A^3=A^2 \neq 0.$  Suppose that $A$ is not diagonalizable. Then prove that there exist a vector $v$ such that $Av$ is not equal to zero, but $A^2v=0$ and the characteristic polynomial of $A$ is $x^4-x^3$.


Suppose $A$ is a general $n \times n$ matrix and $B$ is obtained by interchanging two rows of $A$. Prove that $\det(B) = -\det(A)$

Suppose that $A$ is a general $n \times n$ matrix and $B$ is obtained by interchanging the first two rows of $A$. Prove that $\det(B) = -\det(A)$.  By general $n \times n$ matrix, I mean $$\left[\begin{matrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nn} \end{matrix} \right]$$ I'm thinking of using the cofactor expansion of the 2nd row of the first matrix, yielding $$ \det(A) = c_{21} a_{21} + c_{22} a_{22} + \cdots+ c_{2n} a_{2n}  $$ which will be positive or negative depending on $n$ and the values of $a_{21}, \ldots,a_{2n}$, and using the same on the first row in matrix $B$ to get $c_{11} a_{21}$ etc. and then use the fact that the power of the $c$ subscripts will alter $\det(B)$ to be the opposite sign, but I'm not sure how to express all of this mathematically in a proof directly. Help please?


Can someone explain the difference between Strong, Soft, Weak and Phantom references and the usage of it?

I have been trying to understand the difference between different references but the theory does not provoke any ideas for me to visualize the same.  Could anyone please explain in brief the different references?  An example for each would do better.


I've got a problem while testing my app, class "DateToday" exactly, here's part of that class:  public DateToday(){     monthName();     dayName();     dayNumber();     yearNumber(); }  public int yearNumber(){     year = c.get(Calendar.YEAR);     return year; }   And here's my test class:  @RunWith(RobolectricGradleTestRunner.class) @Config(constants = BuildConfig.class, sdk = 21) public class DateTodayTest {  private DateToday mDateToday;  @Test public void checkYear() {     assertEquals(mDateToday.yearNumber(), 2016); }   Why I am still having NullPointerException at checkYear() method and the test is failed? It may be a stupid issue but I am blind with that...


$$y' = {y \over {\sin x}}+\tan{x \over 2}$$  I was trying to do this by substitution $u=y/x $ and it did not work and also with $$y' - {y \over {\sin x}} = 0$$ $${dy \over dx} = {y \over {\sin x}} $$ $${\ln(y) = \ln\left|\tan\frac{x}{2}\right|+c } $$ $${y = c\cdot\tan\frac{x}{2} } $$ but then when im trying to calculate $y'$ I have a problem and I have too many equations. Is there some easier way or am I making some mistakes.


Here's a problem (at least it seems like a problem) I noticed in the first couple revisions of . Based on experiments shown below, when I include within a <pre> block lines that start with one or more spaces, they appear as a nested pre-area in the question, and if there are enough of these lines, I get two scrollbars, one for the nested <pre> (which seems to be created by the Markdown parser) and one for the outer <pre> (which is explicitly given in the question). I'd expect to get only one <pre> in the rendered question, the one that I explicitly include.  Example:   line of code  line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code line of code   line of code line of code


Hölder continuity of the Cantor function

The Cantor function (which I will define recursively below) is Hölder continuous and the exponent there is ln(2)/ln(3).   The function is defined as the limit function of a sequence of functions, where $f_{n}$ looks as below:   \begin{cases}       f_{n-1}(3x/2)  & 0 \leq x\leq 1/3\\      0.5 & 1/3\leq x\leq 2/3 \\       0.5 + f_{n-1}((3x-2)/2) & 2/3\leq x \leq 1    \end{cases}  I've proved that $f_{n}$ converges uniformly to the Cantor function and that $||f_{n} - f_{n-1}||_{\infty}$ $\leq$ $\frac{1}{2^n}$, but I have no idea where to proceed from there. Any inputs will be appreciated. My final goal, as I mentioned above, is to prove Hölder continuity with Hölder exponent ln(2)/ln(3).


In Rudin textbook, there are lines, "$(P_n)$ converges to p if and only if every subsequence of $(P_n)$ converges to p. We leave the details to the reader."  I'm confused because I thought there can exist several different subsequential limits?


Factoring a quadratic equation using two different methods. Why does this work?

I have the quadratic equation: $$4x^2 - 49$$  Using  $$\frac{b\pm\sqrt{b^2-4ac}}{2a}$$  I can factor the equation to  $$(x-3.5)(x+3.5)$$.  However, if I use   $$\frac{b\pm\sqrt{b^2-4ac}}{2}$$  I get 14, which I can then use the grouping method $$4x^2 +14x - 14x -49$$  to get an equivalent result of:   $$(2x-7)(2x+7)$$  Why does removing the $$a$$ from the denominator in the quadratic formula work to give me a number (this case 14), which I can then use to factor out the original quadratic equation?  Also, are there any benefits in solving the equation using the latter method? (the result to looks better to me)


What's the word when you learn something good unintentionally accidentally along the way stuff?

I forgot, it was such an exact definition!@!@!


was flagged by the system as vandalism, because the user had just deleted five of his old junk answers (need 10K rep to see):          Notice that these are all zero-voted and 3 of the 5 questions are closed!  So, I flagged this: "Not vandalism. These are all zero-voted answers on Q's that were either closed or have better answers."  I've flagged this way probably a dozen times, and it's always been found "helpful".  This time, the flag was declined -- meaning that the deletions were vandalism! (The decline-message was the standard "a moderator reviewed your flag, but found no evidence to support it".)  Yet, all 5 answers remain deleted.  Shouldn't they be restored if it was vandalism to delete them?  So, was this vandalism? Was the mod having an off moment? Something else?


C# generics limited to a certain functions overloads

I am using a method from an external library, with the following prototypes:  void ReadRaster(byte[] vals); void ReadRaster(float[] vals); void ReadRaster(int[] vals);   In order to interface with that function, I was thinking on implementing a generic method such as  void OpenImage<PixelType>(int x, int y) {      // Lots of code     (...)      var pixels = new PixelType[x * y];     ReadRaster(pixels);      // More code     (...) }   However, this won't do because I would have to limit PixelType to int, float or byte.  How could I do this?


If $\langle Ta, a\rangle \in \mathbb{R}$ for all $a$ then $T$ is self-adjoint

I have having trouble with the following question:  Let $V$ be a finite-dimensional complex inner product space, and let $T$ be a linear operator on $V$. Prove that if $\langle T\alpha, \alpha\rangle$ is real for every $\alpha$ in $V$ then $T$ is self-adjoint.   I have been focusing on trying to show that if $\langle T\alpha, \alpha\rangle = \langle T^*\alpha, \alpha\rangle$ for all $\alpha$ then  $T = T^*$, but have been unable to do so. I also feel like I'm missing something really obvious. How should I proceed.


How to decrease the height of chooser (file-picker dialog)

My chooser (file-picker dialog) goes under the dock so I can't see buttons. What can I do?


Whether Logfile Shrinking is good or bad one for Performance in SQL?

I am using SQL Server 2008 R2 database and on our SQL Server instance we have more than 70 databases. In a few databases I can see that the transaction log file size is more than 10 GB. I am shrinking the Tlog file size on a daily basis using the following script:  USE ABC; GO -- Truncate the log by changing the database recovery model to SIMPLE. ALTER DATABASE ABC SET RECOVERY SIMPLE; GO -- Shrink the truncated log file to 1 MB. DBCC SHRINKFILE (ABC_log, 1); GO -- Reset the database recovery model. ALTER DATABASE ABC SET RECOVERY FULL; GO   Is there any recommended way to shrink the transaction log file size?


Treated with the inverse operator, one could get: $f(x)=x$  However, an other obvious solution is $f(x)=C$ (when f is not invertible). How could I reach this solution? Are there other solutions available?    This is not a homework.   To prove the uniqueness of the solution, I am trying (and currently failing) to do something similar to:     Thank you Jack and V. Your efforts help. I wonder if one could prove that the "projectors" are the only family of solution to Idempotence.


Unable to Install Windows 10 Pro, version 1511, 10586, System Partition Encrypted w/ VeraCrypt

I have a laptop running windows 10 Pro, The system drive has been encrypted with VeraCrypt.  I am unable to get the update 'Windows 10 Pro, version 1511, 10586' to install.  Each attempt at installing follows this path.   Prompted To Update Give the OK to reboot Presented with VeraCrypt Boot loader, Enter my decryption key Booted into some sort of Windows Diagnostic mode, asking me for my keyboard language Select English and I am presented with the option to boot back into Windows Back to VeraCrypt Boot Loader, enter decryption key Enter back into windows, update not applied.   Here is the error in the event viewer each time.     Log Name: System Source: Windows UpdateClient EventID: 20 Installation   Failure: Windows failed to install the following update with error   0x8024200D: Upgrade to Windows 10 Pro, version 1511, 10586.   I found this link,  and performed the highest rated answer, as well as the accepted answer.  The end result was the same.  The update attempted to install, I went through the reboot, and I ended up without the update installed.


An automorphism that has no fixed points except for the identity and is its own inverse implies commutativity

Let $G$ be a finite group and suppose there exists $f\in\text{Aut}(G)$ such that $f^2=\text{id}_G$, i.e., $f$ is its own inverse, and such that $f$ has no fixed points other than the identity $e$ of $G$, i.e., $f(x)=x\Rightarrow x=e$. Show that $G$ is necessarily abelian.   While trying to do this exercise I noticed two facts.  First, $g$ and $f(g)$ have the same order because $o(f(g))|o(g)$ and, applying $f$ again and using $f^2=\text{id}_G$, $o(f(f(g)))=o(g)|o(f(g))$ and, once the order of any element is $\geq 1$, it follows that $o(g)=o(f(g))$. Also, it's easy to see that $g$ and $f(g)$ commute.  Second, there cannot exist such an automorphism if the order of $G$ is even, because $f(e)=e$ and we can form pairs like $\{g,f(g)\}$ with $f(g)\neq g$ that are invariant under $f$, i.e., $f(\{g,f(g)\})=\{g,f(g)\}$. But once the order of $G$ is even, proceeding with the construction of the pairs, we'll end up with just one element $\neq e$, so we must have some $\gamma\in G\setminus{e}$ with $f(\gamma)=\gamma$, contradicting the hypothesis.  Let $n$ be the order of $G$ and let's fix an enumeration of the elements of $G$, say $G=\{g_1,\ldots,g_n\}$. My approach was the following. For each $\sigma\in S_n$, let $x_{\sigma}=\prod_{i=1}^ng_{\sigma(i)}$. Then we have that $f(x_{\sigma})=x_{\sigma^{\prime}}$. If it's shown that $f(x_{\sigma})=e\;\forall\;\sigma\in S_n$, then we'd have $x_{\sigma}=e\;\forall\;\sigma\in S_n$, which implies that $G$ is abelian. The problem is that $S_n$ has $n!$ elements while $G$ has $n$ elements, so there repetitions among the $x_{\sigma}$, and we cannot apply directly the reasoning of the last paragraph.  Is this the right way, or is there an easier manner to solve this?


I have a shapefile. The coordinates (Lat/Long) are projected as decimal degrees. But, I want to re-project it to meters.   How can I do it with ArcMap?


I am about to buy a 4K laptop and I would like to run Ubuntu 15.10 on it. I believe that shouldn't be a big problem. I'm sure I can adjust the text and the Unity UI just right.  The thing is that I use VirtualBox quite often for running Ubuntu Server on it. I believe to run into problems here. When not yet set, the text within the guest operating system should be small and barely readable, right? Is there any way to do some scaling of the guest os view? Like for instance scale it by the factor of times 2? Is it possible to run applications that do not adapt to 4k with a kind of magnifying lens? Like for instance running VirtualBox with some double-size zoom?


The number of nonnegative integer triples with sum equal to $12$

How many triples $x,y,z$ satisfy  $x+y+z=12$, where  $x,y,z\ge 0$ are integers? Note that these are not ordered: $ (12,0,0)$ and $(0,12,0)$ are treated as same. Progress I have tried the formula ${13\choose 2}$ to select values of $x$ and $y$ from $0$ to $12$ as  $z$ would keep changing according to $x$ and $y$. (That is, $z=12-x-y$.) The problem is that that certain combinations of $x$ and $y$ would give value of $x+y$ greater than $12$. I can't seem to get around this.


Getting an error that a flow "was" activate and cannot be overwritten

I'm using Salesforce Migration Tool (Ant) to deploy flows and processes. If memory serves, so long as the flow in the destination org was not activate (or deactivated) I could overwrite it. If you didn't disable the flow first, I'd get this error:     Error: The version of the flow you're updating is active and can't   be overwritten   Now I am getting an error that tells me that the flow "was" active and cannot be overwritten, even after disabling the flow in the target org:     Error: The version of the flow you're updating was active and   can't be overwritten   Perhaps this was the way it has always been and I'm just taking crazy pills. Either way, the only way I see around this is to create a new version all flows I want to deploy each time I want to deploy them. Or, never make the deployed flows activate in the target org, which will make testing them quite difficult.  Any suggestions on ways to numb this pain?


Principal Component Analysis PCA Terms and relationships: eigenvalues, eigenvectors, loadings, score matrix, and SVD

I've read many websites, blogs, pdfs on this top but struggle to put the picture together in simple math terms, that explains how some of the terms relate to each other / are computed.  Let's assume that we use Singular Value Decomposition (SVD) to solve the PCA problem with input matrix $X$, assuming $X$ has zero mean and unit variance, the SVD of $X$:  $X = USV^{T}$  Now, $S$ is the vector of eigenvalues, sorted in decreasing order.   Can someone please explain, in math terms, how are the following terms defined?   e.g. Explained variance ratios = $\frac{S}{sum(S)}$ PCA Loadings == eigenvector of $X^{T}X$ == $V$? Score matrix $T$, $T == U * Diag(S) == XV$? Actual PCA components = eigenvectors of $X$?  Eigenvectors, can you get them from the SVD results?


Is there any way to recover unsaved notepad++ docs?

I had to immediate shut down, and I lost about 20 unsaved tabs, is there any way to recover these?


How to show that $f(X)=tr(X^{-1})$ is convex over the set of symmetric real positive definite matrices by showing that $g(t)=f(X+tV)$ is convex for any such $X$ and $V$? Clearly we need to show that $$g(t)\le (1-t)g(0)+tg(1)$$ but I'm stuck to find a simplified version of $tr((X+tV)^{-1})$. Thank you for your help!


I am using the algorithm2e package for a paper, and I am using it as follows:  \usepackage[ruled,linesnumbered]{algorithm2e}   Everything works OK, however, when I added the linesnumbered directive (not sure how is that called in latex) to the package declaration, I noticed that the algorithm gets out of the margin of the rest of text.  The following image shows the issue, you can see that after line #9, it should be #10, however, you can only see #0, because the 1 got covered by the green line.    Is there a way to force the algorithm to move a bit to the right?  I am using: Texstudio under linux  Update: Marked as duplicated with  question, but I think is not, that question is about the position of line numbers within the algorithm box itself, while this question is about the whole content of the algorithm box, with respect to the rest of the text (regular, not part of the algorithm)


Problem with the Definition of Inner Product Space.

Let $V$ be a vector space over a field $F=\mathbb{R}/\mathbb{C}.$ Then an inner product on V is defined to be a function $(,):V\times V \rightarrow \mathbb{F}$ satisfying the following property:  Linearity in the first coordinate.  Conjugate-Symmetry.  Positivity: For all $x \in V$, if $x$ is nonzero then $(x,x)>0$.   My Questions:  If I  take $\mathbb{F}$ to be $\mathbb{C}$. Since it is not an ordered field, the idea of positivity does not make sense. But I find this definition everywhere. Am I missing something out?  Every Inner Product defined on $V$ (an $\mathbb{R}$-vector space) is bilinear. Does every bilinear map $f: V\times V\rightarrow \mathbb{R}$  give rise to an inner product on $V$?


How to stop my PC from shutting down automatically at 6 A.M in morning?

Few months back i scheduled shutdown task at 6 A.M in morning using windows 7 task scheduler, now i don't know how to stop that from re-occurring.      I can't find it in the task scheduler.Is there any way to find the shutdown task and delete it or disable it.


If I can't win, but can stop my opponent from winning, is the game drawn?

Here's an article published on Hipsters of the Coast about a . The core idea is, one player was playing a deck that had no win condition except 4 . The deck wins by first getting Teferi to its ultimate, cast some spells to exile all the opponent's permanents, and then use Teferi's -3 to put itself back to the library. Since the opponent can't cast spells, they'll eventually draw their entire library and lose.  At least, that's the plan. In this particular game, the opponent countered or killed all four Teferi. That leaves the player with no way to win. However, he's still able to loop  to take all the turns and never lose either.  Question: if this happens in paper Magic, is the game drawn?


Changing from RAID to AHCI and Windows 7 will not boot

I had a RAID0 array that for all intents and purposes went to hell. I put a new SSD (same on-board Intel controller) and installed a new copy of Windows on it and all the drivers (Intel Rapid Storage, etc.). I failed to change the SATA type from RAID to AHCI when I did this though.  I have removed the old SSDs that were in RAID0 and if I change the SATA type to AHCI in the BIOS, Windows will not boot. It tries and fails. It then goes into the whole 'let me fix your woes' routine, only to tell me it cannot fix my woes.  The only help I could find was the following:     Locate and then click one of the following registry subkeys:   HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Msahci   HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\IastorV   In the right pane, right-click Start in the Name column, and then click Modify.   In the Value data box, type 0, and then click OK.   That is going from SATA to AHCI I think, but either way my values are already 0.  It seems to work okay, except for the fact that I'm running a 256K Samsung 830 and my read speeds are 226MB/s which is about half of what I should be getting...  Any help would be great. I would REALLY love to not have to reinstall Windows and all apps again...


How to solve the equation $n^2 \equiv 0 \pmod{584}$?

Well, I've confused when trying to solve this equation can anybody help me :  $n^2 \equiv 0 \pmod{584}$  I tried to factorize the $584$ i got $584=2^3\times73$.  so $n^2$ has to be divisible by $2^3$ and $73$ in this same time.  here i get stuck.


I've a question regarding to the graphical intuition of the LASSO. I'm understanding why the lasso produce zero coefficient in case of intersecting a corner of the diamond. But I don't understand the case when the lasso Regression just shrink the paramters and don't set them to Zero. So if the RSS lines intersect with the "side" of the diamond. Assume in the case of the figure, that $\beta_1$ bigger and $\beta_2$ smaller. So the RSS-line would likely intersect a side.   Could you give me some intuition when the RSS-Line tangents with the side of the diamond instead of the corner?


When dual wielding, can the character move in between the attack with the main hand and the off hand attack?


I have installed IDM through wine. But cannot integrate it to chrome or firefox. I want the feature like popping up the download menu on websites like youtube and other video websites. To be specific I would like to use IDM as same as in Windows, Can anyone help me? Or please suggest any alternatives that has the features like IDM.  Thanks in advance


Why are my Elytra Wings are not activating?

Why do my Elytra Wings only work intermittently?  I do not forget to jump, but when I switch to Survival and then back to Creative, they won't activate whatsoever. Any help is much appreciated. Thanks.


I don't understand how does the Elder Wand ownership work. Draco disarmed Dumbledore and gained ownership of the Elder Wand, but when exactly does this switch happen. What if Dumbledore picked up the wand after being disarmed? Was Dumbledore it's owner up until his death, and only then did Draco attain ownership because Dumbledore never touched the wand after being disarmed until his death and that counted as Draco defeating him, or did the ownership switch to Draco right after disarming Dumbledore? If so, what if Dumbledore picked up the wand then, would it disobey him? It seems a bit weird to me that ownership would switch to an attacker right after disarming it's owner because disarming doesn't really count as defeating an opponent. EDIT after some discussion in comments:  "I'm putting the Elder Wand," [Harry] told Dumbledore, who was watching him with enormous affection and admiration, "back where it came from. It can stay there. If I die a natural death like Ignotus, its power will be broken, won't it? The previous master will never have been defeated. That'll be the end of it." Harry Potter and the Deathly Hallows Chapter 36: "The Flaw in the Plan"  Bold part of the quote doesn't hold true if disarming an opponent gains you ownership of the Elder Wand. Harry says that if he dies a natural death its power will be broken, but that is not really true if he can get disarmed, get the wand back and still win the duel he is in (or the unlikely scenario of him running away after getting disarmed) and still die a natural death but the wand's power will not be broken as after that disarming he is no longer it's owner. UPDATE: I would disagree with the question being a duplicate. I understand that Draco unintentionally and unknowingly became it's owner, but my question is when exactly does this switch of ownership happen which the linked question does not answer. UPDATE 2: The question you marked duplicate is actually not a duplicate as there is no answer about which exact act gives a person ownership of the Elder Wand.


How can I clear the water out of this area?

I've sectioned of this area in the sea near my base, and I need to get rid of all the water from it.  From what I've tried the only way I can see to clear it is fully cover one layer, delete the blocks, then go down to the next layer. Is that the only way I can clear the area or is there a better approach?  Ideally I'd like a survival method (if there is a better one), but any commands what could be used I'd like to hear just so I can learn more commands :)


How to compare two dates in Java by incrementing Date? String dt = "2008-01-01";  // Start date String et="2008-01-10";  SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Calendar c = Calendar.getInstance(); Date startDate=sdf.parse(dt); Date  endDate=sdf.parse(et); Date incDate; // dt is now the new date  do {     System.out.println("hey i am called.....");          c.setTime(sdf.parse(dt));     c.add(Calendar.DATE, 1);  // number of days to add     dt = sdf.format(c.getTime());     System.out.println("Incremet Date"+dt);     incDate=sdf.parse(dt); } while(endDate.compareTo(incDate)>=0);


Derivation of equation of hyperbola - Where does the b²=c²-a² come from?

I'm learning about conic sections as defined using focci. Every derivation I find for the hyperbola get's this definition out of the blue: $b²=c²-a²$ It totally looks like a triangle somewhere, but when I see $a$ and $c$ they are parallel and I cant find how to form a triangle from them. for example  it's just stated  Let's define $b^2 = c^2 - a^2$ and make the substitution into the equation.  With no explaination.  also justs states  Remove the square roots by suitable squarings and use the relation $b^{2}=c^{2}-a^{2}$ to obtain the equation of the hyperbola:  For reference, I'm defining $a,b,c$ as in the following image, where  $b$ is a distance along the $y$ axis  $a$ and $c$ are distances along the $x$ axis (to the vertex and focus respectively)    The question: why is the pythagorean theorem applied here, is there a sneaky triangle that can be defined? how/why does $c$ suddenly become a hipotenuse?


Mobile headset audio OUT to MIC of another mobile using adapters

I want give sound output of one android mobile to MIC of another android mobile using adapters only ( I can not build circuit). One person suggested some work around using adapters , Please find below the handmade diagram based on suggestion. Can anyone please confirm whether it will work ? Because as per my understanding we can not feed sound output directly to MIC of another mobile due to level of sound. Please guide on the same or please suggest some sample or something better whatever is in your mind or YouTube video to achieve the same. Below adapters are used in this diagram as of now - male TRRS to two female TRRS cable, male TRRS to Microphone and headset splitter, 3.5 mm mono to stereo adapter, 3.5 mm male to male TRS cable.  My target is to transcribe ( speech to text ) the voice of the caller on mobile1 to mobile2 using some speech to text software installed on mobile2. So If I will get call on my mobile1 then whatever caller will speak will be translated to text on mobile2( using some app installed on mobile2).


As the title gives away I spilled a glass of wine on my mac. I turned it head down right a way and dried it. Every thing seemed to work fine until half an hour later i put it in charge. It first kept disconnecting from charge and then it wouldn't charge anymore. So I opened it up and there seems to be some kind of stain near the thunderbolt ports on the logic board the rest of it seems to be fine and there also a blinking light. This is the stain picture:  This is the LED that is still on:  Will it be necessary to change the whole logic board? I am considering sending it to an apple certified repair shop. I am just looking to walk in prepared as to not get robbed as I am a student and can't really afford a $700 new logic board. Thanks!


Why can I write the same word twice in a row and still be grammatically correct?

A sentence such as "I'd had an ice cream" is correct, and but when there is no apostrophe it becomes "I had had an ice cream"... Is this ok to write?


USB flash drive cannot be read only on a specific computer

I have a SanDisk Cruzer 32gb flash drive that cannot be read only on a specific computer due to some unknown reason. Do note that all my other flash drives are working fine on this computer. Here's my situation... Background Info I recently bought a HP laptop. Before wiping the laptop's hard disk, I used HP recovery media creator to store the HP recovery image in my flash drive. After I was done with wiping my laptop's hard disk and making sure my clean installation of the operating system works, I wiped my flash drive with the standard Windows formatting utility. I don't like the OEM's recovery stuffs because of all the bloatware, but I backed it up to my flash drive just in case my clean installation fails. The Problem Now, this flash drive cannot be read on my main desktop (running Windows 8) anymore. However, the same flash drive can be read on my other two computers (also running Windows 8) perfectly fine. Observations:  The flash drive cannot be accessed in Windows Explorer or any Explorer alternatives. Received "Windows can't access this disk" error messages when trying to check the disk's filesystem. The flash drive's size cannot be viewed in My Computer.  Ironically, according to the Device Manager, the USB flash drive is detected and working fine. Things I've Tried  Uninstalling the USB mass storage driver and rebooting. Uninstalling all USB drivers and rebooting. Wiping and reformatting my flash drive on the computers that it can work on using MiniTool Partition Wizard. Using BootIce to rewrite the MBR of the flash drive. Copying the MBR of my other flash drives to the problem flash drive using BootIce. I've also tried formatting in FAT16, FAT32 and NTFS.  All of the above methods have failed. Does anyone know what's the problem, or have encountered such errors before? Please enlighten me. Your help is much appreciated. Thank you. =)


Is there an intelligent way to label (or name) columns in a matrix? I would like to have something like  \[M=\left[\begin{array}{c|cc} 1 & 2 & 3\\ 4 & 5 & 6 \end{array}\right],N=\left[\begin{array}{c|cc} 7 & 8 & 9\\ 10 & 11 & 12 \end{array}\right]\] \[A \ B \ C \ D \ E \ F\]   where A, B,..., F are the labels (or rather names) of the first, second, ..., sixth columns, respectively. What I want is to label A be exactly below the first column, label B be below the second column, etc., of course, nicely aligned. So far I have forced some extra spaces before the labels manually, and also experimented with the \phantom command.


On my Toshiba Satellite E45t-A4100, the keyboard is not working. No matter what I press nothing responds. The touch screen is still working, and everything seems to be working properly, but I have zero keyboard function! When I went into the device manager and looked at the error message it say that windows can't start this hardware because its configuration in the registry is incomplete or damaged. I've tried all of the trouble shooting basics and I'm in the registry now I just don't know what to do. Any suggestions? I was up a few nights ago using my laptop and everything worked fine, the next morning when I woke up I opened it and turned it back on from sleep mode and none of my keys, nor mouse worked. Really strange to me, I did not add anything to my laptop or do anything, just simply used it one night woke up the next morning and can not use my key board for the last 3 days now.


In group theory it happens very often that you want to say: "The order of $H$ divides / does not divide the order of $G$." But the length of | is then always the same:  $ |H| | |G| $ produces |H|||G|  which is not ideal at all. (The negation \nmid has just this length too.) The length of "divides" should be longer than the "cardinality length". I could use   $ |H| \big| |G|$  but then there is no good way to say "does not divide" with the same length. Also, \big| is no solution when the expression has to be used in subscripts.   I thought it was just me, but I asked other group theorists, and nobody had a solution. I hope there is one.  I am seeking a division sign which is a little longer than the usual | , allows negation (with the same length) and proportionally correct use in subscripts (also under \sum etc.). It does not look professional if the "order sign" has the same length as the "divides" sign. (And what about combinations with absolute values, norms - although personally I don't use them as often as group orders.)


"Was going to" versus "would be" as the past tense of "will"

Do you think that "was going to be" or "would be" could be used as past tense of will?     I thought this book was going to be your choice.        I thought this book would be your choice.   Do these two sentences basically mean the same thing or are they slightly different?


Incorrect Solution for Problem 7 of Pinter's Book of Abstract Algebra, Chapter 2?

I'm just getting started with Pinter's A Book of Abstract Algebra, please be kind. The book solution for Chapter 2, Problem 7 claims that the following operator is non-associative:  $$ x * y = \frac{xy}{x+y+1}$$  The book solution:  $$ (x * y) * z = \left(\frac{xy}{x+y+1}\right) * z = \frac{xyz(x+y+1)}{x+y+z+xy+yz+xz+1}$$  $$ x * (y * z) = x * \left(\frac{yz}{y+z+1}\right) = \frac{xyz(y+z+1)}{x+y+z+xy+yz+xz+1}$$  However the $(x+y+1)$ and $(y+z+1)$ terms appear to actually cancel out:  $$ (x * y) * z = \left(\frac{xy}{x+y+1}\right) * z = \frac{\left(\frac{xy}{x+y+1}\right)z}{\frac{xy}{x+y+1} + z + 1} $$  $$ x * (y * z) = x * \left(\frac{yz}{y+z+1}\right)  =\frac{x\left(\frac{yz}{y+z+1}\right)}{x+\frac{yz}{y+z+1} + 1} $$  So the denominators cancel out, the two groupings are equivalent, the operator is associative.  This result is duplicated in Mathematica, but I'd like to make sure I'm not missing something.  Sorry for bothering people with such a basic question.


I recently saw a small clip about how to securely lock your bike.  I was wondering what are your tips for minimizing the chances of getting your bike stolen.                                  Here are a few of my tips:   use 2 chains take the saddle off ( makes it less attractive, especially in a bike rack )


C# An object reference is required for the non-static field, method, or property 'variables.rhifAnfoneb'

I am trying to get a list from another form. I have made the list public and put it in its own class to no avail.  Form1:  using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Data.Common; using System.Configuration;  namespace eAnfonebu {     public class variables     {         public List<int> rhifAnfoneb = new List<int>();         public List<int> rhifArcheb = new List<int>();         public string[] ddydiadArcheb;         public string[] enwArchebwr;         public string[] eBost;         public int[] gair;         public decimal[] prisMilGair;     }     public partial class Form1 : Form     {           public Form1()         {             InitializeComponent();          }          private void Form1_Load(object sender, EventArgs e)         {          }          private void createNew_Click(object sender, EventArgs e)         {             Form2 f2 = new Form2();             f2.ShowDialog(); // Shows Form2         }      } }   Form2 (addInvoice):  using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;  namespace eAnfonebu {     public partial class Form2 : Form     {         public Form2()         {             InitializeComponent();         }          private void AddInvoice_Click(object sender, EventArgs e)         {             try             {                 variables.rhifAnfoneb.Add(variables.rhifAnfoneb[variables.rhifAnfoneb.Length - 1] + 1);             }             catch             {                 variables.rhifAnfoneb.Add(1);             }         }     } }   I am getting the error (An object reference is required for the non-static field, method, or property 'variables.rhifAnfoneb') in              try             {                 variables.rhifAnfoneb.Add(variables.rhifAnfoneb[variables.rhifAnfoneb.Length - 1] + 1);             }             catch             {                 variables.rhifAnfoneb.Add(1);             }   I am sorry for different languages in same code but I am billingual and sometimes I set out to make an app in one language but then it slowly morphs to another.  If awnsering could you please awnser as simply as you could because I am new to c#  Any help would be greatly appreciated.  Eoin


How to deal with categorical independent variables with numerous levels

How to deal with regression when most of the independent variables are categorical having numerous (more than 10) levels and the dependent variable is continuous? For this would it make sense to perform dummy coding? What could be a better way to deal with this situation? I want to predict CPM (Cost per mille) based on certain categorical independent variables.


Why align and equation environment do not tolerate empty lines?

The following code does not compile:  \documentclass{article} \usepackage{amsmath} \begin{document}  \begin{align}      \eta_{m} = & \omega_{m1}D_{1} + \omega_{m2}D_{2} + \dots + \omega_{mT}D_{T} \\     \eta_{a} = & \omega_{a1}D_{1} + \omega_{a2}D_{2} + \dots + \omega_{aT}D_{T}  \end{align}  \end{document}   However, if I remove empty lines, it does. (Same with equation environment). Why? Why would it be problematic for a code to allow spaces? Convention?   For reference, the error in TexStudio is quite dramatic, for an apparent trivial issue:  line 7: Paragraph ended before \align was complete. line 7: Missing $ inserted. line 7: Missing \endgroup inserted. line 7: Display math should end with $$. line 8: Misplaced alignment tab character &. & line 8: Missing $ inserted. & \omega line 9: Misplaced alignment tab character &. & line 10: Missing $ inserted. line 11: Misplaced \cr. \end{align} line 11: Misplaced \noalign. \end{align} line 11: Misplaced \noalign. \end{align} line 11: Extra }, or forgotten \endgroup. \end{align} line 11: Missing $ inserted. \end{align} line 11: Display math should end with $$. \end{align}   NOTE: I am aware of , , and  question. But none of them explains why empty lines are problematic (besides a trivial and rather tautological answer like "the code does not allow it").


If I issue the trap builtin twice [for the same signal], what happens? Is the second command added to the first, or does it replace the first?  trap Foo SIGINT ... trap Bar SIGINT ...   When SIGINT happens, does Bash just run Bar, or does it run Foo as well? Or something else...?


No enable wifi option after installing Ubuntu 16.04

Clicking on the wifi dropdown menu on the upper right shows options of "Ethernet Network"(greyed out) and "Enable Networking". However there is no enable Wifi option at all. Running sudo service network-manager restart doesn't fix the issue, just prompts the "Disconnnected-you are now offline" popup.  Running lspci -nn -d 14e4: returns 06:00.0 Network controller [0280]: Broadcom Corporation BCM4322 802.11a/b/g/n Wireless Lan Controller [14e4:432b] (rev01)  Hardware switch for wifi on the laptop (which is a lightup button) is continuously lit up meaning that wifi should be on, except it's not.  Not sure what to do, but thanks in advance for any suggestions.


Is there something similar or like "pass" in python in bash/shell programming?

I sometimes need a command like  in Python in my bash scripts.  Like:  if grep something then     pass else     code fi   In Python you have:  >>> for element in a: ...     if not element: ...         pass ...     print element   QUESTION:  I always use continue but it gives an error that it should only be used in a for, while or until loop.  What would you do in this circumstance?


Trying to take input in Switch case of Java, but showing me another result. What is the specific problem here?

import java.util.Scanner; public class Dx {      public static void main(String[] args) {         Scanner myObj = new Scanner(System.in);         String day = myObj.nextLine();         if (day == "morning") {             System.out.println("Good Morning");         } else if (day == "afternoon") {             System.out.println("Good Afternoon");         } else if (day == "evening") {             System.out.println("Good evening!");         } else if (day == "night") {             System.out.println("Good night");         } else {             System.out.println("Good Day");         }     } }   Here the output shows Good Day when giving night or morning.


Gauss law example - Electric field and dA

I am still very confused and lost. I still dont understand why E1 is pointing down , E3 and 2 pointing up. while dA is point the left and dA2 and dA3 are in the same direction of the E3 and E2.  I still cant figure out :(   Could anyone show a diagram or something to illustrate the direction of electric field and dA?


I need help converting a .blend to a .mp4

So I made a 2d animation in blender 2.8/9 and I don't know how to save it as an mp4 so I can send it to my client.


Story about a Kid tagged for lobotomy who hacks the system to become a city executive

This was in a collection I read in the 80s. Target group was Young adult and I think the theme was education, entering adulthood, etc. I can't recall the names or characters. Collection was hardback. This is one of two stories in this collection I am curious about and will post about.   It was a short story where everyone gets assessed at end of their teenage years for their roles in life. This bright but lazy kid gets assessed and finds he's been assessed for a menial job where he'll probably have brain surgery to keep him happy in it. Nothing is to happen for a few days.   Panicking and angry, he goes off, changes records, hacks into the systems and alters the aptitude machines so they changes his assignment and he becomes an executive with unlimited perks. Then he meets a stranger who reveals it was all a test to poke him out of his apathy because the city needs the brightest people to keep running, but needs them motivated. If he hadn't cheated he would indeed have been lobotomised, etc.


How to run exe as window service using c#

I am trying to run an exe file as window service. I have done it before manually by doing like this:  sc create TestService binPath= "C:\MyExePathWhichIsToBeRunAsWindowService"    and it could worked properly, when i see the services i am able to find it, Now  have to do the same using c# code.  The code should ask the user for the path of exe file and this file has to be run as window service and also the name which  he has to provide to this window service.So these two things user will enter at runtime, which is an easy task for me but once if i got that, then how i will run the command below from c# code ?  sc create TestServiceNameUsrEntered binPath= "path user entered for exe at run time"    Could some one please help me ?  EDIT: Please note that user will always enter serviceApplication exe file Not arbitrary files


How do I change the screen resolution using Ubuntu command line?

I installed Ubuntu and the resolution of the desktop is so big that it only shows about 50% of the screen, but is shows up normal while using command line.   What should I type in the command line to change the desktop screen resolution?


I (believe I) am aware of the general difference between a hash and a MAC; the former is used for integrity and the latter for integrity and authentication as it also takes a secret key as an input in addition to the message.  But what if I hash the message, encrypt it using the secret key (one that is separate from the one used to encrypt the message), and send that instead of the MAC? Does it not hold the same properties as sending a MAC?  In both cases, we input a message and a secret key to compute an encrypted hash / MAC, so it seems like both integrity and authenticity are provided.  If not, in what way would an adversary be able to break the authenticity of a scheme that sends, along with each encrypted message, an encrypted hash (using a separate secret key)?  Edit:  As mentioned in a comment below, this has already been answered  and  but I am unable to mark it as a duplicate as it is on a separate StackExchange.


Is this a correct demonstration for why elements above untriseptium cannot exist?

With the confirmation that elements 113, 115, 117, and 118 are indeed fundamental elements that are now to be named on the periodic table, the next question is: what is the highest atomic number possible for an element? Feynman had a go at this years ago, and he derived (according to my limited understanding) that above element-137 (informally denoted 'Feynmanium') the electrons in the nearest orbit about the nucleus would be traveling at a velocity greater than the speed of light. (Note I am considering the Bohr model of the atom in this question.) I wished to demonstrate to my friends why this is and I came up with the following explanation.  According to Bohr's quantum condition, the angular momentum of an electron about the nucleus is given by $$ L=m_evr_n=n\hslash \implies r_n=\frac{n\hslash}{m_ev},$$ where $m_e$ is the mass of the electron, $v$ its velocity, $n$ an integer, and $r_n$ the radius of the $n$th possible orbit. Because we are concerned with the nearest orbit to the nucleus, $n=1$; and thus $$r=\frac{\hslash}{m_ev}.$$   Now, according to Coulomb's law, if the electron orbits about the nucleus the centripetal motion can be described by $$\frac{Ze^2}{4\pi\epsilon_or}=m_ev^2, $$ where $Z$ denotes the number of protons in the nucleus (the atomic number), and $e$ the elementary charge. Solving for $Z$ and substituting in $r$ from above yields $$Z=\frac{4\pi\epsilon_o \hslash v}{e^2}. $$ But what is $v$? Well, the maximum velocity an electron could ever have is the speed of light, and we wish to find the atomic number associated with an orbiting electron traveling at this speed, so we set $v=c$ and obtain our final result of $$Z=\frac{4\pi\epsilon_o\hslash c}{e^2}\approx 137.521,$$ which implies that for $Z>137$, the electrons at a position of $n=1$ in the Bohr model would have a velocity $>c$; and thus the highest atomic number achievable on the periodic table is 137.  Again, I just want to make sure this is a correct method for deriving element-137 before presenting. Perhaps one could explain how relativity plays a role here. I know Feynman used the Dirac equation to get this result...so could anyone (subsequently of course) expatiate on this in a simplistic manner? Thanks!


How to remove duplicate from list of tuple when order is important

I have seen some similar answers, but I can't find something specific for this case.  I have a list of tuples:  [(5, 0), (3, 1), (3, 2), (5, 3), (6, 4)]  What I want is to remove tuples from this list only when first element of tuple has occurred previously in the list and the tuple which remains should have the smallest second element.  So the output should look like this:  [(5, 0), (3, 1), (6, 4)]


I need to prove/show that $n^3 \leq 3^n$ for all natural numbers $n$ by strong induction. I have no clue where to begin!!!! :( I know how to do the beginning steps of showing that it's true for $k = 0$ and $k = 1$, etc but get suck on how to start the strong inductive step.


Show that the limit $a^x/x \to \infty$ when $a>1$ and $x \to \infty$

If $ a > 1 $, then      $$ \lim_{x \to \infty} \frac{a^x}{x} = \infty. $$   Above one can find the limit which is to be shown. Any tips? The epsilon/delta method, taylor series, definition of a derivative, etc, are not accepted as it is viewed as circular reasoning. Anyways, I really do not know how start but I guess that I should use the squeeze theorem someway down the track.


How to interpret coefficient standard errors in linear regression?

I'm wondering how to interpret the coefficient standard errors of a regression when using the display function in R.  For example in the following output:  lm(formula = y ~ x1 + x2, data = sub.pyth)         coef.est coef.se (Intercept) 1.32     0.39    x1          0.51     0.05    x2          0.81     0.02     n = 40, k = 3 residual sd = 0.90, R-Squared = 0.97   Does a higher standard error imply greater significance?   Also for the residual standard deviation, a higher value means greater spread, but the R squared shows a very close fit, isn't this a contradiction?