Converting from V-brakes to Disc Brake without existing mounting holes

I have an Electric Bike with rear brakes which are not as strong as front disc brake (countless amount of tweaks never solved it well without rubbing the wheel too much). So, I am looking at converting to disc brakes  Is it possible? Using which products? I was thinking of a start with those two:   And since I cant post more than 2 links, search on AliExpress for "brand new hs1 brake rotors" - the one from "Store:Carbon-Bicycle Co.,Ltd" for 9$ is the one that was recommended.  But I lost contact with the guy who guided me to those once in a train, so I don't know how to proceed what else do I need...  The frame is made of aluminium, and below you can see pictures of the read wheel, to understand the construction and my options...        Note: The question referred to:   Deals with question on how to piece together parts for the specific branded Doberman frame, while in my case, I am not entirely sure which parts do I need, and my frame is Chinese generic no-brand frame, making it much more difficult to find the correct parts that would fit together well.


Problem 1  I have been struggling coming out an efficient way to take notes while reading papers, one commonly-used way is annotate the paper while reading, but some issues include   These notes are hard to organize since they are distributed through the text. There notes usually could not include mathematical formula. However, it is the major part of my notes. When paper is lost in thousands of papers, it is impossible to recover them.   Therefore, I tried to use stand-alone notes written in markdown, but problem 2 arises.  Problem 2  As mentioned in problem 1, there are so many papers (and notes) I need to keep and it is just not feasible to keep hierarchy of folders, which could have up to 5 or even 10 hierarchy. Even though problem 1 is resolved, an effective and easy way to search and retrieve previous papers and notes is still needed.   Finally, any input about your solutions is appreciated.


how to go to a directory in gnome terminal which contains spaces as its name?

I tried to md5sum a image but the path is long and contains spaces, and there is no option in the file manager to open that path in gnome-terminal. Like right-click-> open current directory in terminal like it used to be in other or previous Ubuntu.   How can I open a directory in terminal which has long path contains spaces and in Ubuntu?


"Unable to locate package sudo" when i try to install sudo on new Debian

i installed a new Debian on a small VPS and now when i try to install sudo i just get this message. I also tried to add FTP-Server into the list and i still get that error.  root@srv45758:~# vi /etc/apt/sources.list deb http://ftp.de.debian.org/debian/ jessie main contrib non-free deb http://ftp.de.debian.org/debian/ main contrib non-free deb http://security.debian.org jessie/updates main contrib non-free   Does any one maybe know the problem?


How do I leave a campaign politely when I'm not having fun?

So I've been playing a DnD 5e campaign for the past couple of weeks, and I've come to the conclusion today that I'm not really having much fun with it.  I've come into the campaign midway-through and don't really have any good opportunities to insert my character into things, and I have trouble even getting into the character that I've made outside of using X spell to burn Y enemy, which just doesn't appeal to me.  I've given it a couple of weeks, but I find that I mostly am just stuck behind this screen (we use Maptools) for 3 hours each Sunday, watching text scroll by without much care for what any of it says.    So with all that in mind, I'd like to leave the campaign.  I don't have any problem with the system, or timing schedules, and while I might not be having as much fun with my character as I'd like, I feel like that's not going to change anytime soon - a lot of the current characters are already established, and I feel like mine doesn't fill any niche that hasn't already been filled. On top of which, the quirks my character does have don't seem to be that interesting to the other players, and I don't have much fun trying to play them out.  In short, I don't really like playing this campaign, but I have no excuse to leave the campaign except that I'm not having fun - and rather than keep my DM's hopes up that I'll be staying, I'd like to leave as gracefully as possible, without insulting his DMing skills.   He's not bad - the group is just kind of large already, and I feel like I don't get much out of it myself.  How can I let the DM know this, without insulting his DMing skills?


I can't add a repository because when I click Unbuntu Software I do not have a selection for "Software and Updates", just "Updates".  If I click on "Updates" I get a window that says I'm up to date and no other choices.  I assume I am not going to the correct window or?  Please point me in the correct direction, thank you.


Order of polygon vertices in general GIS: clockwise or counterclockwise

Two days ago I asked a question about the internal storing order for the vertices of a polygon in ESRI shapefiles. That question was answered () and it was also answered in an old post () But now my question is more general, and I don't know if it has an unique answer. Is the clockwise order only for ESRI shapefiles or for general GIS formats? And what about the internal representation for a GIS software? For example, if I use QGIS and I read a *.shp containing polygons I suppose the internal representation of the outer bound is clockwise as in the original shapefile, but what about for all the file formats supported by QGIS? And for ArcGIS? And in the case there exists a file format with polygons stored in counterclockwise, if these files are loaded in QGIS, ArcGIS, etc., is the orientation changed internally, so if I read the data using PyQGIS, for example, the polygons are clockwise ordered? My purpose is to write a plugin for QGIS, but the source of data can be ESRI shapefiles or other formats. As I need to check the angles between consecutive sides of polygons using their azimuths I need to known if the order is clockwise. One solution is computing the area of each polygon and, if I remember correctly, if it is positive the order is clockwise and if negative the order is counterclockwise. Area computation is not an intensive task, so it will not slow my plugin so much. But in the special case of QGIS, anybody knows if it stores the polygons clockwise or counterclockwise, regardless the order in the original source? By now I'm working with ESRI shapefiles and the coordinates in layer.getFeatures().geometry().asPolygon() are stored in clockwise for the outer border and counterclockwise for the holes, i. e. as in the original *.shp.


I need to take photos and upload them in a web page. A resolution of 800x600 would be enough for me.  I go to Settings > Photos & Camera, but I can only find a configuration for the resolution of the video recording, but not the Photos.  Anyone know if there is any way to take photo with the camera in low resolution?  I'm looking to avoid having to use an external app


Network service discovery disabled: What does this mean for me?

Every time at boot I get a message “Network service discovery disabled. Your current network has a .local domain, which is not recommended and incompatible with the Avahi network service discovery. The service has been disabled.”    What does this mean for me?  Wi-Fi is disabled.


Can Ubuntu be used in a computer with no internal hard drive? Using only a USB or external hard drive


How to auto bracket ( ) referenced math equation numbers?

For example, a math equation is labelled using \label{my_equation}  Then I refer to it later using \ref{my_equation}  However, what I get is just a number say 11, instead of what is more mainstream which is (11) i.e. the equation number with brackets around it  Do I must put brackets manually every time or is that some way to hard code this?


If it's "I am" and not "I are", why is it "I aren't" instead of "I amn't"?

I've been taught to say "I am" and "I aren't", but that doesn't make any sense to me. I think it should have been "I amn't" as am+not=amn't, but why isn't it?


On the atomic level how do permanent magnets work?

How do permanent magnets work on the atomic level? Is there current inside this type magnet?  How do electromagnets work on the atomic level? Is there a current inside this type magnet?


We are using Google Analytics for our portal. In the language metric we see fr-fr and fr. What's the difference between fr-fr and fr in Google Analytics?  Thanks


In a sentence reading peri- and post-stimulus is the first hyphen necessary?    If not, what alternative structure should be used?


I'm using Ubuntu 12.04 on a password-protected proxy network. My web browser is configured and works, but I cannot install packages from apt or similar. Is there a way to configure apt to use my proxy? Is there a way to configure my entire system to use my proxy?


Is it okay to use the Present Perfect tense twice in the same sentence?

I wonder if it is grammatically fine to use two have/has been in the same sentence?  Example:     After you have been informed that your paper has been accepted…


What is the difference between AOSP and CM/AOKP?

I've been flashing ROMs but I don't really see the difference between them. I'm on KitKat 4.4.2 for the Nexus 4.


I have an array of urls links:  const urlLinks = [`http://1`, `http:/2`, `http://3`, `http://4`, `http://5` ]   How would I write an if statement, that would be executed, when at least one of the links in the array is present?  if (URL === urlLinks) {


What are the different ways that a message can be displayed to a bash shell after a user logs in?

I have a CentOS 5.7 VPS using bash as its shell that displays a branded greeting immediately after logging in via SSH. I've been trying to modify it, but can't seem to find where it is in the usual places. So far I've looked in the motd file and checked sshd_config for banner file settings. A banner file is not set.  Where else can I look for where the login message might be?


I know how to create my custom terminal commands and that would be really useful for me in compiling all my java classes in a folder. I also see that for doing this people usually creates a folder ~/bin and put files .sh with the lines they wish they run, but I could not understand it well, I create a compile.sh with some lines for example  -gcc file -o file -gcc file1 -o file1   but as I was reading I also need to add a line to a file called .bashrc that is hidden in my home folder and I don't know how to do that, is there any way easier of editing this file? After I do it, my custom command will be the name of the .sh file (compile)?


What makes scaling pixel art different than other images?

Recently I was coaching a developer who's new to making pixel art games, and realized there's some "conventional wisdom" around scaling pixel art that's not obvious to a newcomer, and might not be well documented. So, here's an attempt to fix that....     I've heard I should only scale pixel art by 200%, 300% etc. not in-between sizes like 120%   Why is that? Shouldn't scaling "just work" the way it does with other images? What if I really need to make my character just a fraction larger or smaller to get the right gameplay or look? How do I fix this?  I'm told it's "bad" to use pixel art at different scales in one game - why?    For example, if I scaled up my character so each sprite texel is 4x4 screen pixels, while my background art is scaled up so each sprite texel is 6x6 screen pixels. Isn't a pixel a pixel at the end of the day?


Which school of magic do magical weapons and armor auras radiate?

Detect Magic and similar spells can show the school of magic with a proper spellcraft check.  Which school of magic is detected for weapons and armor with only enhancement bonuses (e.g. a longsword +1)?


Are there any options for running DDL triggers in a MySQL database. I would like to create a view every time someone create a table.  If the "Users" table is created, I want the DDL trigger to create a view called "v_Users".


Every now and then a question comes up about the status of the momentum operator in the infinite square well, and while we have two good answers on the topic  and , I'm generally not satisfied by their level of detail and by how easy (not very) it is to find them when you need them. I therefore posit that it is high time we settle things and build a canonical Q&A thread for this, so, with that in mind:  What's the deal with momentum in the infinite square well?   Is the momentum operator $\hat p=-i\hbar \frac{\mathrm d}{\mathrm dx}$  when restricted to the compact interval of the well? Are there any subtleties in its definition, via its domain or similar, that are not present for the real-line version? Is the momentum operator $\hat p=-i\hbar \frac{\mathrm d}{\mathrm dx}$  in these conditions? If not, why not, and what are the consequences in terms of the things we normally care about when doing one-dimensional QM? If it is not self-adjoint, does it admit a ? If it does, is that extension unique? If the extension is not unique, what are the different possible choices, and what are their differences? Do those differences carry physical meaning / associations / consequences? And what is a self-adjoint extension anyways, and where can I read up about them? What is the spectrum and eigenvectors of the momentum operator and its extensions? How do they differ from each other? Is there such a thing as a momentum representation in this setting? If not, why not? What is the relationship between the momentum operator (and its possible extensions) and the hamiltonian? Do they commute? Do they share a basis? If not, why not? Do these problems have counterparts or explanations in classical mechanics? ()   And, more importantly: what are good, complete and readable references where one can go and get more information about this?


ASUS "FTE1000:00 0B05:0101" touchpad scroll option not working

I have an ASUS E402S laptop with Ubuntu 64-bit 16.04 LTS installed. The main problem is that the OS does recognize the touchpad with basic functions, but additional options such as scrolling through pages or between open applications are non-existent.  This is what my xinput result is showing:  ⎡ Virtual core pointer                      id=2    [master pointer  (3)] ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)] ⎜   ↳ Logitech USB Receiver                     id=9    [slave  pointer  (2)] ⎜   ↳ Logitech USB Receiver                     id=10   [slave  pointer  (2)] ⎜   ↳ FTE1000:00 0B05:0101                      id=12   [slave  pointer  (2)] ⎣ Virtual core keyboard                     id=3    [master keyboard (2)]     ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]     ↳ Power Button                              id=6    [slave  keyboard (3)]     ↳ Video Bus                                 id=7    [slave  keyboard (3)]     ↳ Sleep Button                              id=8    [slave  keyboard (3)]     ↳ USB2.0 VGA UVC WebCam                     id=11   [slave  keyboard (3)]     ↳ Asus WMI hotkeys                          id=13   [slave  keyboard (3)]     ↳ AT Translated Set 2 keyboard              id=14   [slave  keyboard (3)]   Apparently my touchpad's type is not shown in the list. What are the possible solutions to fix this issue?


I am attempting to remove the  of a string using a regex. Basically it's because Google Translate API needs that kind of wrapping if some string should not be translated, which is what I need.  I have that regex to do this (it needs to handle new lines, that's why [\S\s] is used instead of .) :  [\S\s]+(?=<\/span>)<\/span>   However when testing it, it is way too greedy because for that input for example:  %1 per il seguente motivo: \n %2!d!   That regex gets the whole string. I was a little confused because many answers (including "") seems to indicate that ? as a non greedy thing.  I need to have it find every span wrap with the notranslate class, not all of them if there are many.


In SF1, Stop refreshing the embedded vf page on a layout

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


Prove that $ x^xy^y=z^z $ has infinite integral solutions

Show that there exist an infinite number of solutions for $$ x^xy^y=z^z $$ where $x,y,z \gt 1$ & $x,y,z\in \mathbb Z$  I don't know how to even start,infact I am not able to find a particular solution of this problem let alone infinite.How to approach?


ImageView is null (NullPointerException)

I'm trying to set the srcCompat of an ImageView but got this error instead.  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.pangelyn/com.example.pangelyn.SwipeRight}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setImageResource(int)' on a null object reference  I've checked multiple post in SO already but nothing seems to work.  Java file:   private void loadLocale() {     SharedPreferences prefs = getSharedPreferences("Settings", Activity.MODE_PRIVATE);     String language = prefs.getString("Lang","");     setLocale(language);      ImageView imageView = findViewById(R.id.imageView_flag);      if (language.equals("en")) {         imageView.setImageResource(R.drawable.usa);     }     else if (language.equals("in")) {         imageView.setImageResource(R.drawable.indonesia);     }     else if (language.equals("fil")) {         imageView.setImageResource(R.drawable.philippines);     } }   XML file:              <ImageView                 android:id="@+id/imageView_flag"                 android:layout_width="30sp"                 android:layout_height="30sp"                 android:layout_alignParentRight="true"                 android:layout_marginRight="5sp"                 android:background="@drawable/stroke"                 android:padding="3dp"                 android:scaleType="centerInside"                 app:srcCompat="@drawable/philippines" />   EDIT:   2020-02-13 23:32:37.312 9854-9854/com.example.pangelyn E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.pangelyn, PID: 9854 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.pangelyn/com.example.pangelyn.SwipeRight}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setImageResource(int)' on a null object reference     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)     at android.app.ActivityThread.-wrap11(Unknown Source:0)     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)     at android.os.Handler.dispatchMessage(Handler.java:106)     at android.os.Looper.loop(Looper.java:164)     at android.app.ActivityThread.main(ActivityThread.java:6494)     at java.lang.reflect.Method.invoke(Native Method)     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setImageResource(int)' on a null object reference     at com.example.pangelyn.SwipeRight.loadLocale(SwipeRight.java:164)     at com.example.pangelyn.SwipeRight.onCreate(SwipeRight.java:42)     at android.app.Activity.performCreate(Activity.java:7009)     at android.app.Activity.performCreate(Activity.java:7000)     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)      at android.app.ActivityThread.-wrap11(Unknown Source:0)      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)      at android.os.Handler.dispatchMessage(Handler.java:106)      at android.os.Looper.loop(Looper.java:164)      at android.app.ActivityThread.main(ActivityThread.java:6494)      at java.lang.reflect.Method.invoke(Native Method)      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)


When I stumbled upon tabu some time ago it looked quite interesting on a first glance and I intended to learn more about it when I have the time. But, in the comments section of  posted on the new german question and answer site texwelt.de Herbert Voß wrote that the tabu package is obsolete in its current version (thereby citing the package author) and is not actively maintained anymore. What are the implications for the usability of the package? Should I refrain from investing time to learn tabu and consider some other packages for the creation of tables instead?


Show $\Bbb R ^n$ with a finite set removed is still connected.

The question is:     Show that if $A⊆\Bbb R^n$ is finite and $n≥2$, then the set $\Bbb R^n\backslash A$ is connected in $(\Bbb R^n,τ_d)$ where $τ_d$ is the topology induced by the Euclidean distance in $\Bbb R^n$.   My attempt:  Denote $A^C=\Bbb R^n\backslash A$ and suppose $A=\{a_1,…,a_n\}$. Assume by contradiction that $A^C$ is not connected, then there exists $O_1,O_2∈τ_{A^C }$ st. $A^C=O_1⋃O_2,O_1⋂O_2=∅$. Here $\tau_{A^C}$ is a subspace topology.  Intuitively, part of $A$, denoted by $A_1$ is "enclosed" in $O_1$ and the rest, denoted by $A_2$ are "enclosed" in $O_2$. Then $G_1=O_1\bigcup A_1$ is an open set in $\tau_d$, and $G_2=O_2\bigcup A_2$ is also an open set in $\tau_d$, and $\Bbb R^n=G_1\bigcup G_2$. However, $G_1, G_2$are disjoint, contradicting with the fact that $\Bbb R^n$ is connected.  However I got stuck when trying to implement this idea. Can anyone provide some help? Thank you!


I have gone through a few posts that talks about changing the GraphicsDevice.BlendState and GraphicsDevice.DepthStencilState (). . however even after changing the states .. i cant see my 3D model on the screen.. I see the model for a second before i draw my video in the background. .  If i dont play my video then i can see the 3D model ..Here is the code:  GraphicsDevice.Clear(Color.AliceBlue); spriteBatch.Begin();  if (player.State != MediaState.Stopped) {     videoTexture = player.GetTexture(); }  Rectangle screen = new Rectangle(GraphicsDevice.Viewport.X, GraphicsDevice.Viewport.Y, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height);  // Draw the video, if we have a texture to draw. if (videoTexture != null) {     spriteBatch.Draw(videoTexture, screen, Color.White);      if (Selected_underwater == true)     {         spriteBatch.DrawString(font, "MaxX , MaxY" + maxWidth + "," + maxHeight, new Vector2(400, 10), Color.Red);         spriteBatch.Draw(kinectRGBVideo, new Rectangle(0, 0, 100, 100), Color.White);         spriteBatch.Draw(butterfly, handPosition, Color.White);          foreach (AnimatedSprite a in aSprites)         {             a.Draw(spriteBatch);         }                            }      if(Selected_planet == true)     {                     spriteBatch.Draw(kinectRGBVideo, new Rectangle(0, 0, 100, 100), Color.White);         spriteBatch.Draw(butterfly, handPosition, Color.White);         spriteBatch.Draw(videoTexture,screen,Color.White);          GraphicsDevice.BlendState = BlendState.Opaque;         GraphicsDevice.DepthStencilState = DepthStencilState.Default;         GraphicsDevice.SamplerStates[0] = SamplerState.LinearWrap;          foreach (_3DModel m in Solar)         {             m.DrawModel();         }     }     spriteBatch.End();


How to add a small rounded rectangle around a word inline

I want to add a box with a very light pink background and red border around a word but inline and  within a sentence.   i.e. something like this (drawn with inkscape)    I know the mdframed package can be used for placing boxes around paragraphs, but it does not seem to work inline and also give colored boxes.   Possibly TikZ is a solution? From the little I know of TikZ, it can be used to draw pictures inline inside a sentence.


Lualatex (luaotfload) broke after upgrading to Mavericks

Ever since I upgraded to OS X Mavericks—post hoc ergo propter hoc—I can no longer compile my dissertation using LuaLaTeX.  When running lualatex I first got the following error:  luaotfload | db: reload initiated; reason: “unresolved font name: ‘lucidacal   Segmentation fault: 11  'lucidacal' presumably refers to the Lucida Grande font, which I had installed in ~/Library/texmf. I removed ~/Library/texmf and ~/Library/texlive and now I get the following error:  luaotfload | db : Font names database not found, generating new one. luaotfload | db : This can take several minutes; please be patient.Segmentation fault: 11   I can reproduce this error by running luaotfload-tool --update. At some point I also got the following error:  luaotfload | db: Font names database not found, generating new one. Bus error: 10   I can't reproduce this, however.  I tried upgrading all packages using TeXLive but this didn't help.  I have no idea how to fix it and would be grateful for any clues!


Find general solution for the equation $1 + 2 + \cdots + (n − 1) = (n + 1) + (n + 2) + \cdots + (n + r) $

A positive integer $n$ is called a balancing number if  $$1 + 2 + \cdots + (n − 1) = (n + 1) + (n + 2) + \cdots + (n + r) \tag{1}$$  for some positive integer $r$.     Problem: Find the general solution (closed-form expression) of equation $(1)$, in other words, find $f_1(m)=n, f_2(m)=r$ where $f_1, f_2$ are solution of $(1)$ for any integer $m \in \mathbb Z$.   I have asked a  with a constrain involving Pell's equation.


How to select columns in SQL server 2008 using WHERE and IN, having 2 columns in the where clause

How to select columns in SQL Server 2008 using WHERE and IN, having 2 columns in the where clause. Here is what I have, however I am  getting some error message.  select * from tbl where (col1, col2) in (VALUES ('x1','y1'),('x2','y2'),....);      Msg 4145, Level 15, State 1, Line 2   An expression of non-boolean type specified in a context where a condition is expected, near ','.   Please advise.


file all files that link to any file in a specific directory

I need to do this on a mac/linux:   Given: some directory such as /usr/local/lib/node_modules Find: all links that are symbolic links to any files within the given directory   I would like to remove those links since the directory does not exist anymore and provide a cleaner working environment.


Will it ever be possible to use wrapfig with an enumerate or itemize environment?

is incompatible with the enumerate and itemize environments. Is there a typographical reason not to wrap a list around a figure or is it a technical limitation of LaTeX? If it is a technical limitation, is there any work (new packages or changes to LaTeX) currently being done to eliminate the limitation in the future?  Edit: To respond to some of the comments: I realize that there are "gymnastics" which can make this work. I do not have an example of the problem. Whenever I run into a problem with wrapfig because it is near an enumerate or itemize environment, I search for an easy solution, find none, and move the figure elsewhere. In the vast majority of cases, the cost of learning the complex solutions isn't worth the benefit of keeping the figure where I want it.


I know this might seem like a duplicate, but I've seen the other posts, and they're problems and different than mine.  I installed Ubuntu along side Windows 10, and now I want to take more 30Gb from the hard drive I installed Ubuntu on. However, I'm not being able to do it.  I was following  video on youtube, and my problem begins at minute 10:45. He is able to resize the extended partition while mine is locked. I also noticed that my ext4 root partition is inside the extended one. Here's what it looks like:   I'm super new to this, so I'm sorry if I'm doing something stupid. Thanks


Can you use class features while Polymorphed?

More specifically I'm trying to understand if a Barbarian who has been polymorphed, either willingly or not would be able to . However this also applies to things such as , or , anything a player might want to continue to use while no longer themselves.  Many questions specify you're able to rage while Wild Shaped, as  specifies      You retain the benefit of any features from your class, race, or other source and can use them if the new form is physically capable of doing so.   However,  specifies the following,     The target's game statistics, including mental ability scores, are replaced by the statistics of the chosen beast. It retains it's alignment and personality.   And     The creature is limited in the actions it can perform by the nature of its new form.   Unlike Wild Shape, nowhere does polymorph specify that you retain benefits from your class or race. Does this imply that class abilities do not carry over to polymorphed individuals?


I'm experiencing a very weird problem here. I was using a mysql database for developing a rails app and everything was fine. Then I rebooted the computer (Ubuntu 13.10) and found myself locked out of the database with this message:  Access denied for user 'root'@'localhost' (using password: NO)   Both the rails app and the command line give me this message. I've followed the instructions to reset the mysql root password but to no avail -- every time I stop mysqld (whether via kill, /etc/init.d/, or any other recommended method the process disappears for about 2 seconds only to reappear with a new pid. It's almost as if a virus has taken over (could that be??).  Anyway I am hermetically sealed out of my mysql server. Any ideas on what happened and what I could do about it?  EDIT:  I know how to log into mysql via command line w/ a password.  The problem is that I set no password during install and something set one for me, and I have no clue what it is.


Listening to a song, I've met one interesting sentence with indirect speech, but it's a song. An author can use whatever words he needs to get into rhyme, so I want to ask if this is right to write like in that case. There're two examples (the first one was in the song, the second one is that how I think would have been right):  So I said this is the worst day of my life. So I said it was the worst day of my life.  As I believe, this is right to use one tense back (didn't know how to say it more appropriately, but I hope you understand what I meant) when we have something to do with an indirect speech, although there're always exceptions of any rule, and we have to work with context. I reckon the first example isn't that bad if we're speaking about the day that isn't over yet. However, anyone can be mistaken. And, please, accept my apologies for my non-grammatical speech.


Which package to use for presentations? Beamer, Prosper, or Other

I have to prepare my slides in latex. A quick search came up with different packages. Before start preparing, I need your experiences. I do not want to regret after learning one as I did, learning vim (now can not quit) instead of emacs.  EDIT: After asking this question at that time, I start learning Beamer. Now I'm really happy with that, I created my own template and now it's easier just copying from my .tex files to beamer template. I recommend beamer for powerpoint users who are actively using latex .


Are velocity and acceleration smooth quantities?

My thinking:    acceleration corresponds to a force which is instantaneous, so the acceleration of a rigid body can be rather spiky (non-smooth) velocity (angular velocity) describes the ratio of change of the distance(angle), so it is smooth in the real world.   Conclusion, it makes sense to  (e.g., simple averaging) a velocity signal (temporal velocity), but it does not make so much sense to do smoothing on acceleration signal. Am I right?


biblatex: is there a command analogous to \ifciteseen but within one page?

Biblatex is loaded as  \usepackage[style=numeric-comp,hyperref=true]{biblatex} \ExecuteBibliographyOptions{citetracker=true,sorting=none,firstinits=true}   I am looking for an if-command, which would do the same job as \ifciteseen does, but only for the current page.   The idea is to test if some source has been cited already on the current page and, depending on the result, change the citation. For instance, if I want to produce a footnote only upon the first citation on the current page, I could do  \ifciteseenONTHISPAGE {% yes, do nothing  } {% no, do smth  \noexpand\footnote[\thefield{labelnumber}]{%  \fullcite{\thefield{entrykey}}\addperiod}}}}   I am aware of \iffirstonpage and \ifsamepage but cannot figure out if they can be of any help here and how.


htaccess .zip url rewrite from /*.zip to /key/*.zip

Currently I have some zip files stored in the http root of my php/apache web server.  Currently I can access the files using this:  http://example.com/filename.zip   However, I want to "protect" the access to this files, and they should only be accessible using something like:  http://example.com/key/filename.zip   Could someone help me to create a rewrite rule to do this?  The key is a fixed string. It will be hardcoded in .htaccess rules.    When the user accesses the following URL:  http://example.com/key/filename.zip   He should be able to download the zip file.    When the user accesses the following URL:  http://example.com/filename.zip   He should not be able to download the zip file. He should receive an http error.    My code so far:  RewriteEngine on RewriteRule ^key/(\w+).zip $1.zip


I am looking to use the "Sim Settlements" mod for Fallout 4, but I can't seem to get past 20 settlers. Is the settlement limit fixed based on any factors? I understand Charisma is a part of the equation and that it's 10 + your Charisma modifier, but I'm looking to make a metropolis, I can't be running around adventuring in gear that looks like I came out of a thrift store.  The ideal situation is to have 40 settlers where I can have a large metropolis of generated houses.   Is the settlement limit 20 people and without vanilla charisma gear are there any ways to remove it?


Why would my zipped file be the same size as the uncompressed files?

I am trying to zip 13 mp4s. The uncompressed versions of those files are 2.69GB.  But when I zip them with 7zip, using Ultra compression level and any of the compression methods - including LZMA, the resulting file is still 2.69GB.  Why is that?  Edit 1  I am even trying it in the 7z format, and as you can see from the image below the Compression Ratio is 99%! That doesn't provide me much compression at all.  The settings I used for .7z are LZMA2


What should I do if I see a late duplicate answer?

When I visit recently-active but old questions, I often find that the activity consists of a new answer which duplicates, in briefer form, a long-existing answer. Such answers are often from new users and are generally reasonably accurate, but entirely duplicative of another answer long since posted.  What should I do in this case, as a <10k user?  Should I downvote it? Should I flag it? Should I comment on it?


How to make a circular array using offset object as center?

We know that the there is an Object Offset option for Array modifier, but when trying to make a circular array with that offset object as the center of the array circle, it always doesn't behave quite like what's expected. So how to make a nice and controllable circular array?  P.S.: There is an old  about moving the object's origin. I wonder if there is any way to do this without changing the location of the origin. :)


Is there a way to either place a window in the center of the screen after it is opened, or cause it to open in the center of the screen?  This needs to be done using command line.


Determinant of a matrix whose $(i,j)$th element is $|i-j|$?

Question states: "Let $D_n$ denote the determinant of the $n$-by-$n$ matrix whose $(i,j)$th element (the element in the $i$th row and $j$th column) is the absolute value of the difference between $i$ and $j$. Show that $D_n = (-1)^{n-1}(n-1)2^{n-2}$."  It seems like that I can get a recurrence relation (especially the question was from a book chapter dealing with recursion). In trying to get a recurrence relation, here is what I have done so far:  (Let $R_k$ denote the $k$th row and let $(i,j)$ denote the element/spot of $i$th row and $j$th spot)  1) replace $R_1$ with $R_1-(R_2+R_{n-1})$ to get $R_1^*$  2) replace $R_1^*$ with $R_1^*+R_{n-2}$  3) If I am not mistaken, I should have $-2$ on $(1,1)$, $2$ on both $(1,n-1)$ and $(1,n)$, and all other element in the first row as $0$.  4) take out $2$ from the first row, and expand the determinant about the first row  5) I should have $D_n=2(-D_{n-1}+(-1)^n B_{n-1})$, where $B_{n-1}$ is the determinant of a not-easily-reducible mayrix whose last column consists of $n-1$ ones followed by one $-1$.  How should I go about from now on? Once I get a recurrence relation, it would be pretty easy to get the explicit formula for $D_n$ using induction.  P.S. This question apparently is a question taken from 1969 Putnam Competition


How to change the the style of a vector layer programmatically?

I want to change the style of the polygon contained in the vector layer. Is there any API available?  (I can click the properties of the shapefile, then select the style and change the symbol properties, but I want to do this programmatically.)  I am using Python to customise QGIS.


How quickly does gravity extend from created mass?

I apologize in advance if this is a stupid or off-topic question. Since Energy can be converted into matter according to $E=mc^2$, how fast does it take for the gravity of that new matter to extend from it and start mutual attraction to other pieces of matter? Is instantaneously? or at the speed of light? or is it that the energy converted in this process already has gravity and that that gravity is only rearranged in this new matter?


Why can blood group O be given to all blood groups?

The blood of persons of blood group O contains antibodies against antigens A and B. The red blood cells of persons of blood group A have A antigen on their surface. If someone with blood group A receives blood from a donor of group O, then anti-A antibodies in the donor blood should attack the A antigens on the recipient's red cells. Shouldn’t this be a problem?


Tikz arrow with two 90° edges linking two nodes

I would like to draw an arrow pointing from the south of the t node to the south of the e node. The problem is that I have a slight grade in the edge pointing from the first to the second node.  This seems to come from the fact that the height of the arrow isn't considered within my calculation.   Does anybody know how to consider it? Is there a more elegant way to achieve the desired solution?  \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{positioning}  \begin{document} \begin{tikzpicture}         \node[draw](tID){t};         \node[draw, right=2.0cm of tID.east](eID){e};         \draw[->,semithick] (tID.south) -- ($(tID.south) - (0.0,0.5)$) -- ($(eID.south) - (0.0,0.5)$) -- (eID.south); \end{tikzpicture} \end{document}


Difference of the usage of past simple and present perfect tense

What is the exact difference between-'i had breakfast' and ' i have had breakfast'? What are the precise meanings these convey and how do they differ?


misconception of full wave and half wave filter rectifiers

Can someone please explain to me "The difference" in output voltage between the full wave and half wave rectifiers. Im asking about circuits with a single diode and 2 diodes .. NOT bridge circuit. And when they are functioning as "filter" circuits using a capacitor....


Local user accounts have disappeared after installing Active Directory and running dcpromo

I'm kinda newbie in this Windows 2008 Server R2 configuration stuff, so I would appreciate any help regards the issue I'm facing.  After a Windows 2008 Server R2 clean install I created a couple of local user accounts and joined them to the administrators group, I tested them and I was able to log on with each one.  Then I installed Active Diectory role (DNS role implied) and runned DCPromo. The domain was created and promoted succesfully and I was able to log on into the domain from a client machine.  The issue began when I realized that I was no longer able to log on locally into the server (meaning LOCALMACHINE\localusername). I looked into domain user accounts and noticed that the local user accounts I created previously were now part of the domain. I consider a bad thing not being able to log on locally anymore, so in a shot to fix it I stopped the Active Directory service... my bad! Now I'm sort of locked up, I can't log either locally or as part of the domain.  Can someone please shed some light in this? What did I miss in the process? I tried googling but could find any straight forward solution or explanation. What concept I'm not catching?How can I promote a server to PDC and still be able to log on locally?  Thanks in advanced.


Edit xy domain of feature classes during import from boilerplate geodatabase schema (ArcGIS)

Situation:    I work for a company that creates geodatabases for a client that are restricted to a specific boilerplate schema (eg domains, subtypes, etc.).  During a recent draft review, the client complained that when zooming to full extent during an ArcMap session, the full extent was too far "out."  Desired solution:  Alter xy domain of empty feature classes (contained in feature datasets) to extent of interest area as they are imported into production geodatabase (I know that a feature dataset destination will ignore the xy domain environment setting).  Problem:  No geoprocessing tool (eg feature class-to feature class, import to geodatabase, project, define projection, etc.) will accomplish the task (inside or outside feature datasets).  The domain environment setting (advanced geodatabase) is ignored for all actions I've tried.


I did a factory data reset on phone and it still wants the last synced Google account.   I found phone and would like to bypass factory reset protection, how do I do it?


Enchantment and other continuous effects priority

I have read a lot of questions about the priority in the stack and the triggered abilities.  However, I would like to validate my understanding of the continuous effects priority rule.     613.6. Within a layer or sublayer, determining which order effects are applied in is usually done using a timestamp system. An effect with an earlier timestamp is applied before an effect with a later timestamp.   Here's a scenario:   Player A has a plain. Player B cast a  on it and change it to a swamp. At this point, the plain will end up as a swamp Player A use a  ability to turn it into a forest. At this point, the plain will end up as a forest Player B also cast a  on it and change it to a island. At this point, the plain will end up as an island Once again, player A use his  ability to turn it into a forest. At this point, the plain will end up as a forest   Is my logic ok?


Expanding subscript and subscript capabilities

Well, I liked the idea expressed in the question . But I want it to work in a sightly different way.  I just want to expand the usual _ and ^. How? So that the code escapes from the sup/subscript if there is a space (see exceptions at the bottom):   a_11 + b_123ijk + c_k\ell should be the same as a_{11} + b_{123ijk} + c_{k\ell}. And the same for superscripts: m^qwpoeriu equal to m^{qwpoeriu}.   At this moment, I have this code in my preamble (it helps if you want to write F_\mathrm{max} you can do it like F_|max|), so the solution should't break it  \makeatletter \begingroup\catcode`\_=\active\protected\gdef_{\@ifnextchar|\subtextup\sb}\endgroup \def\subtextup|#1|{\sb{\mathrm{#1}}}  \AtBeginDocument{\catcode`\_=12 \mathcode`\_=32768} \makeatother   Why?  I usually space my code \biggl( a_b \cdot \cos(x - c) = 1 \times \vec v rather than \biggl(a_b\cdot\cos(x-c)=1\times\vec v, because I find it much more easier to read. So this would easily work well for me since in so many times I wouldn't need to write {}. Of course, there are moments where I still need to do it, i.e., \alpha_k\ell + \alpha_{\ell k} = 1.  EDIT: More things. I'm not particularly interested in a_b_c_d + e to be like a_{b_{c_d}} + e (and the same with ^), but I think it would be great if that also worked (which means that the space should escape all the sub/superscripts).  More things, NOT only the space should escape the sub/superscript, also this:   the alternative sup/subscript, i.e.: a_b^c + 1 = 0 should work as a_{b}^{c} + 1 = 0, and a^blk_ijk as a^{blk}_{ijk}, the ending of math $a_bcde$ should be like $a_{bcde}$, and also a closing brace: \frac{1}{a_ijk} equal to \frac{1}{a_{ijk}}.


Draw object to screen without being affected by rotation / zooming

I have a 2D game, with a camera that follows the main player. In the game the camera may also rotate the view around the player / zoom in or out on the player.   Let's say I want to add a mini-map to the bottom right of the screen. Is there any way that I can draw the mini-map on the screen so that it is not affected by the camera's zoom / rotation? Is there a way to draw directly to screen coordinates instead of the world coordinates?  Or do I have to perform a transform on the mini-map whenever the camera rotates or zooms.  Thank you for any help


Does the wavefunction probabilities have to sum to 1?

In quantum mechanics we are often told that $\int |\psi(x,t)|^2 dx^3 =1$. i.e. the probabilities have to sum to 1. And that this implies the time evolution operator is unitary.  But can't we define the probability as:  $$P(x,t) = \frac{|\psi(x,t)|^2}{\int |\psi(x,t)|^2 dx^3}$$  Then the probabilities would still add up to 1.  But then we needn't have a unitary time evolution operator. In fact wouldn't any complex operator do?  What am I missing here?  e.g. could you have a time evolution operator like $U(t)=2^t$


I've a List of this type List> that contains this  List<int> A = new List<int> {1, 2, 3, 4, 5}; List<int> B = new List<int> {0, 1}; List<int> C = new List<int> {6}; List<int> X = new List<int> {....,....};   I want to have all combinations like this  1-0-6 1-1-6 2-0-6 2-1-6 3-0-6   and so on.  According to you is This possibile to resolve using Linq?


A quicker way to change owner/group recursively?

Currently, when I want to change owner/group recursively, I do this:  find . -type f -exec chown <owner>.<group> {} \; find . -type d -exec chown <owner>.<group> {} \;   But that can take several minutes for each command. I heard that there was a way to do this so that it changes all the files at once (much faster), instead of one at a time, but I can't seem to find the info. Can that be done?


Why is latent heat required for a system to change its state? (I.e. liquid water to ice) Why the "extra" energy?


After shutdown, Ubuntu fails to start with fsck prompt

I forgot to plug in the charger and my system shut down. After that I tried to start Ubuntu, but the HP logo was showing up for too long so I forced shutdown by pressing power button. After that this error showed up.  Error reading block 1315...(input/output error) Run fsck manually   This error showed up:


Is it okay for this wire/cable to be hitting my pedal?

This little piece is sticking out. This is my first bike and I was wondering if it’s a problem or I should try and attach it to the bar or if it’s okay to be like that?? Help I’m new to the bike world.


Experiment of an accelerated charge’s radiation in General Relativity

I have seen a video saying a stationary (from our frame) charge should radiate, because is accelerated, the falling charges are the ones with no acceleration. But he says we cannot test it due some technical challenges, what are those challenges? // Video:


Why is it not advisable for humans to drink distilled water?

Distilled water is pure and it does not contain any minerals, so may not be advisable for drinking. Although laboratory made distilled water is completely pure, industry made water may still contain harmful impurities. Also there is some probability of exosmosis into body tissues which may lead to swelling.


I'm trying to start another program I've written with the program I'm currently writing. Right now I am trying to do so by starting the batch file I created for it, but that doesn't seem to work, but I don't know why.  Runtime.getRuntime().exec( "cmd F/AKS/Abgaben/Aufgabenblatt1/allesRichtig/runTest1.bat");   Am I doing something wrong with the command? Even though it does seem to find the bat file.


Simulation software to solve high school level mechanics problems

I'm a physics teacher and I would like to find a simulation software that could be used to give exact numerical answers to high school level problems in Newtonian mechanics.  I want the students to first calcultate a numerical answer to a physics problem and then use the simulator to visualize the problem in order to understand it better and verify that the simlator gives the same answer that they got when doing the calculation themselves.  Here are some examples of what kind of problems I want the students to be able to solve with the simulator:   A slope with a specific angle of inclination and a ball starts rolling at a certain point. Determine the speed, angular momentum and total mechanical energy of the ball after a specific time t. A ladder of known mass and length is leaning against the wall at a specific angle. The contact between the ladder and the wall is frictionless. Calcultate the x and y components of the force between the floor and the ladder.   I would like the software to have the following features:  - Simulation in 2D. No 3D simulations are necessary and the software should at least have the option of doing simulations only in 2D.  - Position all objects exactly by writing numbers (just positioning the objects using the mouse is not precise enough).  - Show animations of the time evolution of the system.  - Show forces, velocities and accelerations as arrows.  - Give exact numerical results so that the students can use the software to verify their calculation.  Ideally the software would have a graphical user interface, but if no suitable software with graphical interface exixts, I could also consider a software with text-based inputs. I would consider both free and commercial software.  My question is: Is there any software that would meet these requirements and if there is, where could I get it?


I am in a little bit confusion here. I was going through a blog article and I read       He is more intelligent than me.    I think it is incorrect. It should have been       He is more intelligent than I am.     To summarise, which is correct?   He is more intelligent than me He is more intelligent than I He is more intelligent than I am


Can WMS be used to get a local copy of raster data?

I have tried reading up on WMS on wiki and other sources but haven't managed to get my head around a couple of points.   1) Using WMS is it possible to get a local copy of the raster data (say a tiff image tile). The reason, I ask is, I need to use his raster data in a secondary process that needs a local copy of the file.   2) I am primarily interested in allowing users the option of downloading orthoimagery and elevation from the USGS repository. I've tried using the Seamless viewer but I am thinking more along the lines of user specifying a coordinate (or four corner coords) and getting the orthoimage and elevation data corresponding to that. I thought WMS (Geoserver being my first option) is the way to go for this, but not certain. So wanted to get your advice.  Thanks in advance.  Sincerely, ST.


How do World of Warcraft referrals and the free month work?

I sent the referral link to my boss and he bought the game and applied his CD key.  He now has a paid account linked to mine:    Yet when I view my World of Warcraft account, it seems they didn't give me the free month. It appears I only have the free month that came with my Battlechest purchase.  I just created and bought my account this morning. Would this affect the free referral month in any way?    We haven't seen each other or partied online in the game yet, do we need to do that first in order for me to receive the month?


What is this weird encoding of my username on Meta.Rus?

I joined Russian.se to ask a specific question of translation. I didn't know if my question would be on-topic, so I  (long story short, it wouldn't be).  I went back today to that meta-question today, to see if there'd been any additional answers or commentary, and I saw this weird string where my username would normally be:    In case it matters, the specific string is:     a25bedc5-3d09-41b8-82fb-ea6c353d75ae   Which I take to be some kind of GUID or something. In any case, I'd expect to see my normal username "Dan Bron" appear, as it does here on Meta.se and all the other sites where I have accounts.  Some notes:   I primarily use the iOS app. I'm not 100% certain I joined Rus.SE and asked this question using it, but it's a good bet.   I'm using the iOS app right now to view the question, but I checked and the weird string shows up in mobile Safari and Chrome too.   I joined the stack using the normal mechanism, likely on iOS, but either way I just started asking a question and when prompted with "do you want to join this community?", I selected "yes". I did not sign up independently and then link the accounts or anything.   I did not delete my account or otherwise interact with the stack since I asked the question and accepted the answer.   The gravatar is correct, so the system still apparently "recognizes" me, and the username isn't something like "userXXXX", so I don't think my account has been deleted by mods or CMs or anything without me asking.     What's going on here?


Proving: If both a and b are even integers, then gcd(a, b)= 2*gcd(a/2, b/2)

I went about trying to prove above statement but need a little help. I don't know if my reasoning for why $gcd(a*c, b*c)= c*gcd(a, b)$ is correct. Could I get help on clarifying why this theorem is so? Proof: Let $a$ and $b$ be even integers. Then, $a=2k_{1}$ and $b=2k_{2}$, where $k_{1}, k_{2}\in\mathbb{Z}$ by the definition of even integers. The $gcd(a, b)$ is then, $gcd(2k_{1}, 2k_{2})$. We know the gcd is the product of the prime factorizations that divide both $a$ and $b$, taken with their minimum multiplicities. Thus, multiplying $a$ and $b$ by a third integer increases the multiplicities identically and increases the minimum in the same way. Therefore, $gcd(2k_{1}, 2k_{2})= 2* gcd(k_{1}, k_{2})$. We know that $a=2k_{1}$ and $b=2k_{2}$, so solving for $k_{1}$ and $k_{2}$ gives us: $k_{1}=\frac{a}{2}$ and $k_{2}=\frac{b}{2}$. Substituting $k_{1}$ and $k_{2}$ back into $2*gcd(k_{1}, k_{2})$, we get $gcd(a, b)=2*gcd(\frac{a}{2}, \frac{b}{2})$. Therefore, when both $a$ and $b$ are even integers, the $gcd(a, b)= 2*gcd(\frac{a}{2}, \frac{b}{2})$.


Is is safe to use Groovy 2.4.7 with Jdk 7 or are there any known compatibility issues ? I have been trying to search for this information but couldn't find anything substantial.   Thanks Sashi


Guidelines for selecting suffix when making an adjective out of a proper name (-esque, -ean, -ian,

Examples:  For (Michael) Jordan, we often see Jordanesque. Why? Perhaps because he is His Airness (and the -esque suffix is associated with fanciness)? Maybe also to avoid confusion with Jordanians?  Plato -> Platonic. Why? Do names ending with an "o" generally get the suffix "-nic"? If so what do we do with Michelangelo?  And here are some for which there does not seem to be consensus:   Tolstoy -> Tolstoyian? Tolstoyan? Toylstoyean? Something else? Any guidelines?  Schelling -> Schellingian? Schellingesque?  Is this just mostly arbitrary and a matter of convention?


I'm new to C# and directly diving into modifying some code for a project I received. However, I keep seeing code like this :   class SampleCollection<T>   and I cannot make sense of what the   <T>    means nor what it is called.  If anyone would care to help me just name what this concept is called, I can search it online. However, I'm clueless as of now.


how can I transfer my photos from glaxaxy s4 to pc?

I have a broken screen and a wireless mouse. Is there another way I can transfer my photos?


Am I approaching low probability events in my neural network correctly?

I have a logistic neural network with binary output. Of the 2 outcomes it attempts to predict, the first is very likely (occurring 90% of the time) such that my neural network will only ever predict this first outcome, albeit with a different level of certainty (about 86%-94%).  However, the second outcome, when it does occur, is devastating enough to substantially hurt the performance of the neural network. The fact that my neural network never predicts it has led me to seek another means of assessing its likelihood. I have settled upon dealing with its likelihood relative to the first outcome; if the second outcome is above 10% (first outcome is therefore less than 90% likely), I have coded it to predict the 2nd outcome, thus arousing the warranted caution of the user.  Is my attempt to sensitize my model to this second outcome the right approach given my objective, or is there a more rigorous approach I should take?


If $p$ is a prime and $x,y \in \mathbb{Z}$, then $(x+y)^p \equiv x^p+y^p \pmod{p}$

I want to prove that if $p$ is a prime and $x,y \in \mathbb{Z}$, then $$(x+y)^p \equiv x^p+y^p \pmod{p}$$  So far I know that $$(x+y)^p = \sum_{k=0}^{p} \dbinom{p}k x^{p-k} y^k$$  A part of the above equation is supposed to cancel, I think, but I can't figure out a way how to make it cancel.


why doesn't the text get centered?it becomes on the right edge

why doesn't the text get centered? it becomes on the right edge what should i change?      .text4 {       width: 762px;       height: 714px;       font-size: 24px;       line-height: 40px;       color: #273d46;       font-family: "Times New Roman";       text-align: center;   } <div class="text4">       Donec aredsed odio dui. Morbi leo risus, porta ac consectetur ac, vestibulum       at eros. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Donec       ullamcorper nulla non metus auctor fringilla.       Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Aenean eu leo        quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. </div>


Jquery, how to push in an array at a specific index?

I can't figure out how to push a string in an array at a specific index.   Here is my array : var list = ['',''];  I would like to be able to replace, for example, the first array entry, so the list would be :  list = ['something',''];  I tried to found a function for that, but nothing came up...  I know that I can add a string to an array using  list.push('something'); but I don't know how to do something like list.pushThisAt(string, index);  I need your help !


Why is it "If I were you" and not "If I was you"?

From my research online the correct way is to say "If I were you" and not "If I was you" because this is the "subjunctive mood".  However they don't say the underlying reason for it. They just say use "If I were you" when it is subjunctive.  What if I wanted to say "If he was you", should I use "if he were you" instead? Since most post talk about "If I.." I have no way to know what would be the correct way for "If he...", "If she..", etc.  I read that the subjunctive is a mood and not a Tense. With Tenses you know the conjugation. How does it work with the moods?  I found  which has a long list of conjugations, and it has "I were" for the Past subjunctive.   So, when I am saying "If I were you":   Am I using the "Past Subjunctive"?  And therefore I should also say "If he were you"?


# of invertible $n \times n$ matrices with entries in field $k$ with $q$ elements?

What is the number of invertible $n \times n$ matrices with entries in a field $k$ with $q$ elements?


Show that for Fibonacci numbers, if $m|n$ then $F_n | F_m$?

I've been trying to solve this problem, I realized the following: For example, for $3|6$ we have: $$F_6=F_5+F_4=(F_4+F_3)+F_4=2F_4 + F_3$$ I realized that doing this, for $m,n$ and $m|n$ we will always get an expression such as: $$F_n=xF_m+yF_{m+1}$$ The value of $x$ doesn't seems to matter. But if $y=F_m$ which I strongly suspect it is, then we are done because: $$F_n=F_m(x+F_{m+1})$$ Until now, I've been unable to show that $y=F_m$ or find another way to prove this. I've been stuck for a while, can you help?


How to find a matrix representation of a linear transformation?

Im stuck in this exercise where i have to find the matrix representation of a linear transformation.  Let $P_3(\mathbb{C})$ be a complex vector space of complex polynomial of degree $\leq2$.  Let $\alpha, \beta \in \mathbb{C}, \alpha\neq\beta$ and consider $L:P_3(\mathbb{C})\rightarrow \mathbb{C}^2$ given by  $L(p)= \begin{pmatrix} p(\alpha)\\ p(\beta)\\ \end{pmatrix}$ , $p\in P_3(\mathbb{C})$  Consider the basis  $\mathcal{V}=(1,X,X^2)$ for $P_3(\mathbb{C})$ and the standardbasis $\mathcal{E}=(e_1,e_2)$ for $\mathbb{C^2}$  Find the matrix representation  ${}_{\mathcal{E}}[L]_{\mathcal{V}}$ for $L$ according to $\mathcal{V}$ and $\mathcal{E}$.  I dont know if this is correct, but i have reached the following  $_{\mathcal{E}}{[L]}_{\mathcal{V}}= \begin{pmatrix} \vdots & \vdots & \vdots \\ [L(1)]_\mathcal{E} & [L(X)]_\mathcal{E} & [L(X^2)]_\mathcal{E} \\ \vdots & \vdots & \vdots \end{pmatrix} \in Mat_{2,3}(\mathbb{C})$  I know I have to find $[L(1)]_\mathcal{E},  [L(X)]_\mathcal{E},[L(X^2)]_\mathcal{E}$, but i dont know how to do it.


$f:\Bbb{R}\to [0,1]$ is continuous at what points?

Let $$ f(x) = \begin{cases} 1 & \text{if } x=0\\ \frac{1}{q} &  \text{if } x = \frac{p}{q} \ \text{with } \gcd(p,q) = 1\\ 0 &  \text{if } x\in\Bbb{R}\setminus\Bbb{Q} \end{cases} $$ Find where $f$   is continuous.   So as the rationals are dense in the irrationals, and the irrationals are dense in the rationals, I believe that the function $f$ is nowhere continuous. Is this correct, and if so, how do you formally prove that (with $\varepsilon$-$\delta$ definition of continuity)?  Edit: @SpamIAm has pointed out that the function in fact is continuous at all irrationals. I would like to see a proof of that.


Let $(X,d)$ be a metric space. Prove that $E$ is disconnected iff there exists two open disjoint sets $A$,$B$ in $X$ such that $E\cap A\neq\emptyset, E\cap B\neq \emptyset$ and $E\subset A\cup B$.   I'm not sure how to begin, so let me just start by pointing some stuff out from the question that I noticed, and my knowledge as of now. (Hopefully it'll be useful.)   There is $a\in A, b\in B$ which are both limit points of $E$ (I think) Since $A$ and $B$ are disjoint, $A\cap B=\emptyset$  The closure of a set is the "smallest" set which contains its limit points, (so it is a closed set as well).  Both $A$ and $B$ are open so they are made up entirely of interior points, so they don't have any points on the boundary.   I know that the definition of separated means that I have $A,B\subset X$, for which $A\cap \bar{B}=\emptyset=\bar{A}\cap B$, where the bar above the set denotes its closure.  And I know that the definition of connected set means for $E\subset X$, $E$ is connected if $E$ is not the union of two non-empty separated sets, so a disconnected set would be for $E\subset X$, $E$   is disconnected if it is the union of two separated sets (which are both non-empty).  Any hints as to how to begin would be appreciated. Thank you.


I wanted to apply  but since I'm using fractions it's all crowded and messy. Is there a way to leave more space between the lines?  \begin{equation*}     \begin{array}{c|c c c|c}         &1 &-2  &1 &-\frac{4}{27}\\         \frac{1}{3} & &\frac{1}{3} &-\frac{5}{9} &\frac{4}{27}\\         \hline         & 1 &-\frac{5}{3} &\frac{4}{9} &0\\     \end{array} \end{equation*}


How to handle with command to execute only it's subdirectory?

I'm looking for a way of execute command which I can execute some command only under sub directory not command affect to current directory. find -name ":RUN" -exec rm -rf {} \;  If I got a directory name is level0 which has sub directory the name is level1. and I run the above example command at level0 directory then not only level1 directory but also level0 affected by command. How do I handle with that command only affect to level1 directory at level0 execute?


How to get Google to display a list of posts in the SERPs for a self hosted WordPress blog?

My website is javatechig.com and is around 6 months old. I have used All-in-One SEO WordPress plugin for SEO tricks. Definitely after using SEO plugin, my website page view is increased, but still it is not giving one good site-link in Google Search.   I have followed the following steps:   Created sitemap.xml and submitted to Google Webmaster Tools Edited all posts with meta tags Header tags are carefully taken care   I want to make a sitelink similar to the attached image:


Check if a directory contains a file with a given extension

I need to check the current directory and see if a file with an extension exists. My setup will (usually) only have one file with this extension. I need to check if that file exists, and if it does, run a command.  However, it runs the else multiple times because there are multiple files with alternate extensions. It must only run the else if the file does not exist, not once for every other file. My code sample is below.    The directory is structured like so:  dir_________________________________________     \            \            \            \       file.false    file.false    file.true    file.false   When I run:  import os for File in os.listdir("."):     if File.endswith(".true"):         print("true")     else:         print("false")   The output is:  false false true false   The issue with this is if I replaced print("false") with something useful, it will run it multiple times.  Edit: I asked this question 2 years ago, and it's still seeing very mild activity, therefore, I'd like to leave this here for other people:


messenger()->addMessage not working after a $form_state->setResponse

In the submitForm of a custom form, I have this:    switch ($form_state->getValue('suscribe')) {   case 0:     $iStatus = 1;     break;   case 1:     $iStatus = 3;     $sFileName = 'sites/default/files/_private/bulletins/' . $form_state->getValue('adherent')[1] . ".pdf";     $response = new BinaryFileResponse($sFileName);     $response->setContentDisposition(       ResponseHeaderBag::DISPOSITION_ATTACHMENT,       'bulletin.pdf'     );     $form_state->setResponse($response);     break; }  $storage = \Drupal::entityTypeManager()->getStorage('member'); $id = $form_state->getValue('adherent')[0]; $entity = $storage->load($id); $entity->status = $iStatus; $entity->save();  \Drupal::messenger()->addMessage($this->t('Your wish has been recorded.'));   suscribe is a Yes/No radio button. $form_state->setResponse($response); triggers the automatic download of a pdf document.    The message (Your wish...) is correctly displayed in case 0. In case 1, the message shows only if I refresh the page (or go to another page). How can I have the message displayed without doing another action after submitting the form in case 1?    By the way, database is correctly updated in both cases. I'm using Drupal 8.6.10.


I would like to have a long title in tikzposter and have tried to introduce a newline within the \title{} command using \\ and \newline but it does not start a new line. In the old tikzposter class I think that long titles were split among several lines by default. I will be glad to know about any workaround for displaying long titles on several lines in the new tikzposter class.


what & Which android phones are fastest and compatible with ubuntu touch/

I've Been looking at getting an android for Ubuntu and i want to know which phones are compatible if some one could point me to a list of compatible phones i would be happy.i haven't been able to find a phone list anywhere that can give me a list of phones that fully work with Ubuntu touch/phone. all i need is the list but if some one also knows which phone is fastest with it (I'm looking at CPU speed) id be happy to. so far the ones i have been able to confirm that work are all 1.7Ghz and below but i know there are ones with 2.7 and i want to know if they work, I would assume not since they are all really new and haven't had drivers developed for them.  thanks in advanced for any replies.


Updated script from py file while importing to Jupyter notebook

Imagine you have created a py file named funcs with a function called my_func().  While using Jupyter Notebook, you want to import said function with the following:  from funcs import my_func   Now you do something with it, i.e.   x = my_func(bla)   After that, there is something that you want to modify from my_func. So I change it and save it. If I re-run the code posted above, the change will not be seen, and therefore I am obliged to restart the kernel to run the function with said changes. Is there an efficient way to do it?  Note: I know the reload module allows you to reload the entire funcs py file, but I want to do this in a more specific function level. Not the entire script. With reload I would have to import funcs and not just my_func and therefore would have to write   x = funcs.my_func(bla)   Which isn't my objective.  Answer:  import sys, importlib importlib.reload(sys.modules['funcs]) from funcs import my_func


Does “either . . . or” apply to only two options?   For example, can I say, “It can provide either 100, 150, or 400 amps of power”? Or should it just be “It can provide 100, 150, or 400 amps of power”?


In the following sentence, I want to know if I've understand the correct meaning or not:     This version holds that the wave function does not so much describe the state of the physical system as the state of our knowledge of the system.    Can we say that it means the wave function describes the state of our knowledge  of the system more than it describes the state of the physical system  ?  It is worth noting that in the Cambridge Dictionary, we read:  not so much sth as sth  If you say that something is not so much one thing as something else, you mean it is more the second thing: They're not so much lovers as friends. I don't feel angry so much as sad.


Prove that the boy cannot escape the teacher

I'm struggling with the following problem from Terence Tao's "Solving Mathematical Problems":     Suppose the teacher can run six times as fast as the   boy can swim. Now show that the boy cannot escape. (Hint: Draw an   imaginary square of sidelength 1/6 unit centred at $O$. Once the boy leaves   that square, the teacher gains the upper hand.)   Here $O$ is the center of the swimming pool. This question is a follow up on the previous one, which is solved in the affirmative in the text     (Taylor 1989, p. 34, Q2). In the centre of a square swimming   pool is a boy, while his teacher (who cannot swim) is at one corner   of the pool. The teacher can run three times faster than the boy can swim,   but the boy can run faster than the teacher can. Can the boy escape from   the teacher? (Assume both persons are infinitely manoeuvrable.)     My attempt:  Since the boy can always swim back into the small square of sidelength 1/6 centered at $O$, I can't see how to apply the hint properly. Also, since the student's path need not even be smooth (it was taken as a polygonal chain in the previous question) I'm having difficulties writing data down clearly.  Any help would be appreciated. Thanks.


Lowest temperature possible in the universe?

The third law of thermodynamics states that nothing can reach to absolute zero temperature. What is the lowest possible temperature that can be in the universe? Has any experiment reached to a billionth of a Kelvin? Is there any restriction on how low it can be? Is $10^{-1000}\;\rm K$ possible? Or is there a lowest quantum of temperature?


How To Ristrict SSL for one domain in VHOST Apache2

I have configured Vhost on apache2.it is a name based configuration. First domain is ssl-secure and second one is non ssl-secure site.All are working fine if hit in browser address bar  and  . but if i try to access  and try to load with unsafe page1 is open while it not available on domain2.com.  if I check from ssl checker domain2 also get a same ssl certificate   My expectation is it should not load page1 because it is not exists.and also if check from ssl checker should not found ssl-certificate any more.How to prevent this please any one can guess. thanks in advance.  my configration is in available in folder "/etc/apache2/sites-available" example below domain1.com.conf  <VirtualHost *:80>      ServerName  domain1.com      ServerAlias www.domain1.com      DocumentRoot /var/www/domain1.com/public_html  </VirtualHost> <VirtualHost *:443>      ServerName  domain1.com      ServerAlias *.domain1.com      DocumentRoot /var/www/domain1.com/public_html      SSLCertificateFile "path/domain1_com.crt"      SSLCertificateKeyFile "path/domain1_.key"      SSLCACertificateFile "path/domain1.ca-bundle" </VirtualHost>   domain2.com.conf  <VirtualHost *:80>      ServerName  domain2.com      ServerAlias *.domain2.com      DocumentRoot /var/www/domain2.com/public_html  </VirtualHost>


Word meaning the reverse of 'Xenophobia'

Xenophobia refers to the irrational fear or hatred of foreigners. But recently I've seen people displaying (in newspaper articles and other places) an irrational fear or hatred of their own countrymen. Is there a word for that?


What are the typical reasons for a network wide suspension?

I have come across a user profile that has been recently suspended until January network-wide. I have checked out all his various SE accounts and could not find a single negatively voted post in his five newest posts on any SE account. In fact, on some he was obviously quite productive.  So with a user like this I would wonder why he was suspended network wide. What are typical reasons for network-wide suspensions and why might a productive users like this one suddenly be suspended?


Error 000725 message from output workspace when using Python (ArcPy) script tool?

I am having trouble running a script tool that I just created in Arc 10.1.  The script runs fine in PythonWin, but when I create a script tool with it, the tool seems to not want to accept folders or geodatabases as its output workspace.  I have the output parameter (argument) set as both an output and a workspace in the script tool, but it still keeps giving me an error that the "Dataset.....already exists"    I'm a new user, so I can't post a picture, but the error is 000725  Here is my script, if that helps out.  import arcpy #allow for overwrites arcpy.env.overwriteOutput = True  #set the workspace inWorkspace = arcpy.GetParameterAsText (0)  #set the erase feature eraseFeature = arcpy.GetParameterAsText (1)  #set the output workspace outWorkspace = arcpy.GetParameterAsText (2)   #get a list of all the features in the workspace arcpy.env.workspace = inWorkspace featureClassList = arcpy.ListFeatureClasses()  try:      #loop through all of the features in the workspace     for featureClass in featureClassList:          #construct the output path         outEraseFeature = outWorkspace + "\\erase_" + featureClass          #perform erase         arcpy.Erase_analysis(featureClass, eraseFeature, outEraseFeature)          arcpy.AddMessage("Wrote clipped file " + outEraseFeature + ". ")         print "Wrote clipped file " + outEraseFeature + ". "  except:      # Report if there was an error     arcpy.AddError("Could not erase feature classes")     print "Could not erase feature classes"     print arcpy.GetMessages()


How to reference JabRef generated .bib-file in LaTeX document?

I am using JabRef to create the bibliography. I added all the entries, generated the required key for each entry and saved the entries in a file named refs.bib. I want to add the references/bibliography I created in my document, so I used the following commands:  \begin{thebibliography}{1} \bibliography{refs.bib} \end{thebibliography}   When I compile the code, I get empty pages despite refs.bib contains data. Please let me know how to correctly use the JabRef file in LaTeX.  Note: the refs.bib file is located in the same directory of the LaTeX document


Slightly changing the formal definition of continuity of $f: \mathbb{R} \to \mathbb{R}$?

I'm curious for some perspectives on why it would be wrong to change the definition of continuity of $f: \Bbb R \to \Bbb R$ in the following way:  Original definition. $f : \Bbb R \to \Bbb R$ is said to be continuous at $x \in \Bbb R$ if $\forall \epsilon > 0$ $\exists \delta > 0$ such that $|x - a| < \delta \implies |f(x) - f(a)| < \epsilon$. Altered definition. $f : \Bbb R \to \Bbb R$ is said to be continuous at $x \in \Bbb R$ if $\forall \delta > 0$ $\exists \epsilon > 0$ such that $|x - a| < \delta \implies |f(x) - f(a)| < \epsilon$.  The altered definition is more in line with what I think when I think about continuity intuitively: nearby points are sent to nearby points.  It only makes sense to me to be able to choose "nearness" in the domain (i.e., $\forall \delta > 0$) and show there is nearness in the codomain (i.e., $\exists \epsilon > 0$) to prove intuitively that "nearby points are sent to nearby points". Similarly, if $X, Y$ are topological spaces, we say $f: X \to Y$ is continuous if the preimages of open sets are open.  What would be wrong about changing the definition to say that a map is continuous if the images of open sets are open (i.e., $f$ is continuous if it is an open map)?  This is more inline with the intuitive idea of "nearby points being sent to nearby points" -- you pick nearness in the domain (i.e., an arbitrary open set) an show nearness in the codomain (i.e., the image is open). Does anyone have any useful remarks?


Script to remove certain span elements from an HTML file

I want to write a script that completely removes every instance of a particular span class from a given HTML file.   For example, if my undesired span class is "foo" then running my script on the file          <title>hello world</title>       lorem ipsum  STUFF  alpha beta  MORE  STUFF       should yield          <title>hello world</title>       lorem ipsum alpha beta        I have two questions.   Can this be done with sed or perl?  Is there a tool in linux that is designed to easily edit HTML documents like this?


Consider this snippet:  stop () {     echo "${1}" 1>&2     exit 1 }  func () {     if false; then         echo "foo"     else         stop "something went wrong"     fi }   Normally when func is called it will cause the script to terminate, which is the intended behaviour. However, if it's executed in a sub-shell, such as in  result=`func`   it will not exit the script. This means the calling code has to check the exit status of the function every time. Is there a way to avoid this? Is this what set -e is for?


Alternative approach for a line integral?

Let $F$ be the vector field in ${\Bbb R}^3\setminus\{0\}$ defined by    $$ F(x,y,z):=\left(0,\frac{xz}{(y^2+z^2)\sqrt{x^2+y^2+z^2}},\frac{-xy}{(y^2+z^2)\sqrt{x^2+y^2+z^2}}\right). $$   Compute the line integral $\int_CF\cdot ds$, where $C$ is the unit circle centered at the point $(1,1,1)$ that lies on the plane $x+y+z=3$ and has the orientation from the point    $\left(1-\frac{1}{\sqrt{6}},1-\frac{1}{\sqrt{6}},1+\frac{2}{\sqrt{6}}\right)$ to    $\left(1-\frac{1}{\sqrt{6}},1+\frac{2}{\sqrt{6}},1-\frac{1}{\sqrt{6}}\right)$ to   $\left(1+\frac{2}{\sqrt{6}},1-\frac{1}{\sqrt{6}},1-\frac{1}{\sqrt{6}}\right)$ and back to   $\left(1-\frac{1}{\sqrt{6}},1-\frac{1}{\sqrt{6}},1+\frac{2}{\sqrt{6}}\right)$.   A key step is to parameterize the curve: $$ \begin{cases} (x-1)^2+(y-1)^2+(z-1)^2=1,\\ x+y+z=3. \end{cases} $$    Let $$ \begin{cases} x=1+\sin\theta\cos\phi\\ y=1+\sin\theta\sin\phi\\ z=1+\cos\theta \end{cases} $$ Substituting it into $x+y+z=3$, we have $\theta=g(\phi)$ for some function $g$, which can be written down explicitly. Then we have $$ (x,y,z)=(x(\phi),y(\phi),z(\phi)). $$  Here is my question:     Is there an alternative approach which might be more efficient than using the parameterization above to calculate the line integral?     [Added] I'm not sure if Stokes' theorem would help. Some calculations render that $$ \nabla\times F(x,y,z)=\left(\frac{x}{(x^2+y^2+z^2)^{3/2}}, \frac{y}{(x^2+y^2+z^2)^{3/2}}, \frac{z}{(x^2+y^2+z^2)^{3/2}}\right). $$ It seems that this would not simplify the calculation when we do integration on the "upper" sphere (since the center of the circle is not at the origin), of which the unit circle in the problem is the boundary.


I have the following tuple, which contains tuples:  MY_TUPLE = (     ('A','Apple'),     ('C','Carrot'),     ('B','Banana'), )   I'd like to sort this tuple based upon the second value contained in inner-tuples (i.e., sort Apple, Carrot, Banana rather than A, B, C).  Any thoughts?


wp_get_current_user() function not working in Rest API callback function

Consider the following class.  <?php class MCQAcademy_Endpoint extends WP_REST_Controller {      /**      * Register the routes for the objects of the controller.      */     public function register_routes() {         $version = '1';         $namespace = 'custompath/v' . $version;         $base = 'endpointbase';          register_rest_route(             $namespace,             '/' . $base,             array(                 array(                     'methods'         => WP_REST_Server::READABLE,                     'callback'        => array( $this, 'get_items' ),                     'permission_callback' => array( $this, 'get_items_permissions_check' ),                     'args'            => array(),                 )             )         );     }      /**      *      */     public function get_items( $request ) {         $rs = array(             'data' => array(),             'request' => array(                 'lang' => 'en',             ),         );          $args = array();         $items = get_posts( $args );          foreach( $items as $item ) {             $itemdata = $this->prepare_item_for_response( $item, $request );             $rs['data'][] = $this->prepare_response_for_collection( $itemdata );         }          $rs['wp_get_current_user'] = wp_get_current_user(); // Does not output as expected          return new WP_REST_Response( $rs, 200 );     }      /**      * Check if a given request has access to get items      */     public function get_items_permissions_check( $request ) {         return true; // to make readable by all     }       /**      * Prepare the item for create or update operation      */     protected function prepare_item_for_database( $request ) {         return $request;     }      /**      * Prepare the item for the REST response      */     public function prepare_item_for_response( $item, $request ) {         $data = array(             'ID' => $item->ID,             'post_content' => wpautop($item->post_content),             'post_title' => $item->post_title,         );          return $data;     }      /**      * Get the query params for collections      */     public function get_collection_params() {         return array(             'page'     => array(                 'description'        => 'Current page of the collection.',                 'type'               => 'integer',                 'default'            => 1,                 'sanitize_callback'  => 'absint',             ),             'per_page' => array(                 'description'        => 'Maximum number of items to be returned in result set.',                 'type'               => 'integer',                 'default'            => 10,                 'sanitize_callback'  => 'absint',             ),             'search'   => array(                 'description'        => 'Limit results to those matching a string.',                 'type'               => 'string',                 'sanitize_callback'  => 'sanitize_text_field',             ),         );     }      // Register our REST Server     public function hook_rest_server(){         add_action( 'rest_api_init', array( $this, 'register_routes' ) );     } }  $myEndpoint = new MCQAcademy_Endpoint(); $myEndpoint->hook_rest_server();   Everything is going well except calling the wp_get_current_user() function in the get_items() function return empty user even though the user is logged in in the website.


Java if statement returning as not equal?

I have this block of code here (java):  void findDistance() {                 String name1 = new String();                Scanner s = new Scanner(System.in);                System.out.print("Enter the name of Starting Location: ");                name1 = s.next();                name1 = name1.toLowerCase();                for (int i = 0; i < numCities; i++) {                    System.out.println(name1);                    System.out.println(cityNames[i]);                    if (name1 == cityNames[0]){                    //    int x = i;                        System.out.print("x");                     }                     else {                     //     System.out.println(name1);                     //     System.out.println(cityNames[i]);                           System.out.println("y");                        }                   }                 }   for some reason, even though name1 and cityNames[0] are equal, the if statement doesnt think so. I have a couple of print statements to return the value in there to test it, and it does print as equal.  Anyone have any idea why this is happening?


How to change the files for a database through query?

Context: Running with SQL server 2017 on our environment. We have a different drive that holds various files related to the database like F drive holds the .mdf files (primary and audit) and H drive holds the .ldf file (log).  Problem Statement: Due to a small mistake, the audit and log file swap its place and placed in alternate drive like the log files switched to F drive along with the primary file and the audit file moved to the H drive.  Note: The database is running fine and transactions are happening without any error, but want to rectify this as there are 80 databases on the server and this happened for only few like 12 databases.    What I Tried so far: I tried to shut down the server and swap the files to the correct directories but didn't work.    Is there a way to rectify this from any query without shutting down the SQL server for some time as other team is going to affect by this?  Please refer to the screenshot attached.


I know that in rings which are not UFDs, the GCD and LCM may not exist. However, I don't know whether it is equivalent the existence of the GCD and the LCM in one of those rings, i.e.      I am looking for an example where a couple of elements have a GCD and fail to have a LCM (or viceversa).    Can anyone help me?


What is the best companion for getting maximum carrying capacity?

If I only want to maximize my carrying capacity, what is the best companion to bring assuming I'm willing to take any necessary perks?  I'm not interested in having pocketed or +str equipped items on companions as it gets really messy with the "Take all" action.  Dogmeat works with the Lone Wanderer perk which gives you +100 capacity at rank 2. This already makes dogmeat look like a good candidate for best carrying capacity. However I don't actually know how much each companion is able to carry. In addition the 3rd rank in the Inspirational perk increases carrying capacity, but it doesn't say by how much. If it's an additive bonus this would initially not affect this question, however because Lone Wonderer works with dogmeat I'm unsure if Inspirational also works with dogmeat?  TLDR:   What is the base carrying capacity (including base strength) for each companion? How does the Inspirational perk work, and does it work with dogmeat?


Best way to switch between multiple power rails based on whether they're present or not

I've come across this issue multiple times already and never really figured out the best way to do it.  I'm designing a controller PCB for a drone and I would like to have a few different ways of powering it. USB power just for the control electronics, a battery connector (2-4S, not really sure yet) for the ESCs/motors and another regular connector for development 12V supply so I don't have to rely on batteries.  Now, I'd love to have a circuit that would automagically switch between these and make sure only one of them is active at any time to protect other supplies from reverse current and what not if multiple are plugged in at the same time. For instance, I would probably have USB and the 12V supply or battery plugged in at the same time during development because USB would just be used for debugging and the 12V supply or the battery to power all of the electronics and motors. Priorities would be 12V supply > battery > USB.  I could probably figure out the rest out myself but I just don't know where to start with this.


Arranging 5 D's, 6 E's and 3 F's such that the First D precedes the First E which precedes the First F

I am trying to solve this problem and looking for any tips. I have 5 D's, 6 E's and 3 F's and I have two conditions.  The first D must be before the first E.  The first E must be before the first F.  I thought I could solve this through determining the ways to make a string of letters with a D before an E before an F, however, that is not enough because it does not cover instances like DEFDEF... or DEFFD... since there can be letters that come after the initial string that meets the conditions.  I also contemplated using the Inclusion Exclusion principle as follows  cases where a D comes before an E + cases where an E comes before an F subtract their intersection (which I'm not sure how I'd calculate) however I still cannot account for cases where there are letters after the initial D, E, F...  Any ideas?


I'm trying to learn how to use Python (IDLE using Python 3.4) on my Ubuntu computer, but i dont know how to open/run a .py file from the terminal from the desktop.


Analagous references with different in-text-citation styles

I have the following two analogous references  @article{ref1,   author = {Martí, R. and Laguna, M. and Glover, F. and Campos, V.},   journal = {European Journal},   number = 2,   pages = {450-459},   title = {yyyyyyyyyyyyyyyyyyyyyyyyyyyy},   volume = 135,   year = 2001 } @article{ref2,   author = {Lim, A. and Lin, J. and Rodrigues, B. and Xiao, F.},   journal = {Journal},   number = 2,   pages = {180-188},   title = {xxxxxxxxxxxxxxxxxx},   volume = 6,   year = {2006} }   When I make an in-text-citation, I get a different output style for them:  (Martí et al. 2001) (Lim; J. Lin; B. Rodrigues, et al. 2006)   I'd like to get the same citation style as produced with reference ref1.   I'm using biblatex package with some parameters  \usepackage[style=authoryear,backend=biber,maxbibnames=99]{biblatex}   The following are additional configurations of the template I'm using  \setlength{\bibitemsep}{\baselineskip} \addbibresource{thesis.bib} \AtBeginBibliography{\renewcommand*{\mkbibnamelast}[1]{\MakeUppercase{#1}}} \DeclareNameAlias{sortname}{last-first} \DeclareNameAlias{default}{last-first} \renewcommand*{\multinamedelim}{\addsemicolon\space} \renewcommand*{\finalnamedelim}{\addsemicolon\space}   Another reference of another work of "Lim, A." is  @article{ref3,     author="Lim, A. and Lin, J. and Xiao, F.",     title="zzzzzzzzzzzzzzzzzzzzz",     journal="Applied Intelligence",     year="2007",     volume="26",     number="3",     pages="175--182" }


Once an tag synonym is created, it can be in error, e.g., grape --> animal. How does one undo this?


A room has N (1 to N inclusive) bulbs and N switches. N people go in one by one. 1st person goes in and toggles none of the switches. 2nd person goes in and toggles all switches other than the multiples of 2(2, 4, 6...). 3rd person goes in and toggles all switches other than multiples of 3(3, 6, 9...), and so on (Till Nth person toggles all the switches except Nth switch). Once the process is finished, how many bulbs are in 'on' state. (Assume that all bulbs to be in 'off' state initially).  Example : If N=3 then answer is 2 and when N=7 then answer is 5.   How to find it for given N ?


How can we say that difference in energy between 99.99% and 100% of speed of light is infinite?

How is it not possible for a particle to attain 100% speed of light and what will happen if it attains the speed of light?


What is the word for a person who does different jobs?

I'm asking about someone who's employed by a company and does different jobs (both a qualified and unqualified person). Who knows; maybe in English those two are two different words? What are they called in English?  All I know is a navvy but that usually means physical work.  Let me just try a few things here. These are just wild guesses, nothing more.    odd job man/worker   shiftman   (unskilled) labourer


I have a dataset in csv file format that I'm loading into pgfplotstable. I can't change the format of the original csv, and being financial data it has a column of item names and two or three explanatory data points at the top of the table. e.g.  \documentclass{article} \usepackage{array,datatool,pgfplotstable}   \begin{filecontents}{sample.csv}     item,2008,2009,2010,2011      ,Actual,Actual,Forecast,Forecast      ,GBP,GBP,GBP,GBP      ,('000),('000),('000),('000) rounded     Area 1 OP, 1000000,1500000,1750000,250000     Area 2 OP, 400000,500000, 450000,-50000     Area 51 OP, 300000,375000,390000,15000     No P, 1250000, 1000000, 950000, 50000     Residuals, 800000, 80000, 90000, 10000   \end{filecontents}  \pgfplotstableread[col sep=comma]{sample.csv}\mystuff   I'm stumped at the next stage which is to typeset \mystuff so I have comma separators and can add a row that sums the 'Area' columns. At the moment to display the table I have to do something like  \begin{document}  \pgfplotstableread[col sep=comma,header=false]{sample.csv}\mystuff  \pgfplotstabletypeset[   columns/0/.style={string type},   columns/1/.style={string type},   columns/2/.style={string type},   columns/3/.style={string type},   columns/4/.style={string type}]\mystuff  \end{document}   How do I tag the top three rows as string and the rest of the last four columns as integer type so I can format and transform them?


What does the caret (‘^’) mean in C++/CLI?

I just came across this code and a few Google searches turn up no explanation of this mysterious (to me) syntax.  Hashtable^ tempHash = gcnew Hashtable(iterators_);  IDictionaryEnumerator^ enumerator = tempHash->GetEnumerator();   What the heck does the caret mean? (The gcnew is also new to me, and I asked about that .)


Can we include $\infty$ and $1/\infty$ into $\mathbb R$?

We cannot include $\infty$ into $\mathbb R$ if we define $0\infty =1$. However, we don't have to do so. We just define another element $1/\infty\neq 0$ to be the reciprocal of $\infty$. In that way, can we get a consistent system of numbers?   Please read the following carefully, because this is NOT the usual way we treat $\infty$. I know perfectly why we cannot define $0\infty =1$ with ordinary rules for addition and multiplication. I am NOT doing that. Please do not downvote without reading this carefully.  To be more specific, we can do arithmetic operations with this extended set of real numbers and $\infty$ and $1/\infty$. For example, $(3\times \infty)^{-1} =\frac13 1/\infty$  Is there a branch of math about this?


How to change the shape of a spotlight in Eevee?

I am trying to make a spotlight project a square onto the wall in Eevee, but I can't find an easy way to do it. Right now I kinda have a jimmy-rig where I made a cube and put a square-shaped hole in it, then moved it in front of the light. This is really hard to move around though and I would like it to work as it does in Cycles with nodes. Is this possible? Or should I stick with my jimmy-rig?


What is common practice when doing electrical rough-in for recessed lights in a drop ceiling and walls are not yet finished?

I am installing a drop ceiling with pot lights as part of remodeling a portion of my basement. Since I am refinishing the entire room (newly framed walls), it seems like I have a catch 22:   I need to get the electrical rough-in done before I put up drywall (including the wiring to the pot lighting fixtures in the drop-ceiling) However, I have always seen drop ceilings installed after the drywall is up, which means I cannot mount the pot lights in the ceiling/wire for them unless I mount the grid (or some portion of it) for the drop ceiling first.   Can I wire up a portion of the grid for the suspended ceiling before drywalling and leave gaps around the edges slightly bigger (~1/8" - e.g. 3/4" gap for 5/8" cement board) than required to insert drywall, or is this a ludicrous suggestion?  Or, is the wiring for pot lights in this situation typically addressed as part of the final inspection? I was not planning on having any additional junction boxes between the panel and the pot lights (all splices to supply multiple lights are supposed to just be inside of the boxes on the pot lights per my submitted plans). Since a portion of the wire run from the breaker panel to the pot lights will be concealed by dry wall for another room (I am finishing the other room at the same time under the same permit) which means the cable would be run from the panel and dangling near where the pot light will eventually be mounted for the rough-in inspection in this case.  I plan on calling my inspector to see what is acceptable, but what is typical practice in this situation?