Let $R$ be a Dedekind domain, and let $\mathfrak{m}$ be a maximal ideal in $R[x]$ is of the form $\mathfrak{m} = (\mathfrak{p},f(x))$ where $\mathfrak{p}$ is a maximal ideal in $R$, and $f$ is a polynomial in $R[x]$ which is irreducible in $(R/\mathfrak{p})[x]$. Let $g(x) \in \mathfrak{m}$.  I am know that exist a ideal $\mathfrak{a}$ in $R$ such that $(\mathfrak{p},\mathfrak{a}) = 1 $, i.e $\mathfrak{p} + \mathfrak{a} = R$ and $\mathfrak{p}\mathfrak{a} = \mathfrak{p}\cap \mathfrak{a} = (p)$. (chapter 16, corollary 19, page 768, Abstract Algebra, Dummit Foote...)  Easily, since $g(x)\in \mathfrak{m}$, we have $ g(x) = l(x) + f(x).k(x)$ where $l(x) \in \mathfrak{p}[x]$. The question is: Can we make a "strong" form as show that there exists an ideal $\mathfrak{a}$ in $R$ such that $g$ can be show as the form $$ag(x) = p h(x) + a f(x) k(x)$$ where $p\in \mathfrak{p}$ such that $(p) = \mathfrak{p} \mathfrak{a}$, $(\mathfrak{p},\mathfrak{a}) = 1$ and $a\in \mathfrak{a} - \mathfrak{a}\mathfrak{p}$.

Let $R$ be a Dedekind domain, $\mathfrak{m}$ be a maximal ideal in $R[x]$ is of the form $\mathfrak{m} = (\mathfrak{p},f(x))$ where $\mathfrak{p}$ is a maximal ideal in $R$, and $f$ is a polynomial in $R[x]$ which is irreducible in $(R/\mathfrak{p})[x]$. Let $g(x) \in \mathfrak{m}$.  I am know that exist a ideal $\mathfrak{a}$ in $R$ such that $(\mathfrak{p},\mathfrak{a}) = 1 $, i.e $\mathfrak{p} + \mathfrak{a} = R$ and $\mathfrak{p}\mathfrak{a} = \mathfrak{p}\cap \mathfrak{a} = (p)$. (chapter 16, corollary 19, page 768, Abstract Algebra, Dummit Foote...)  Easily, since $g(x)\in \mathfrak{m}$, we have $ g(x) = l(x) + f(x).k(x)$ where $l(x) \in \mathfrak{p}[x]$. The questions is: Can we make a "strong" form as to show that there exists an ideal $\mathfrak{a}$ in $R$ such that $g$ can be show as the form $$ag(x) = p h(x) + a f(x) k(x)$$ where $p\in \mathfrak{p}$ such that $(p) = \mathfrak{p} \mathfrak{a}$, $(\mathfrak{p},\mathfrak{a}) = 1$ and $a\in \mathfrak{a} - \mathfrak{a}\mathfrak{p}$.


Let $(a_n)_{n\in\mathbb{N}}\in[0,\infty[^{\mathbb{N}}$ be a monotonically decreasing sequence, so that $\sum_{k=0}^{\infty}2^ka_{2^k}$ converges. Show that $\sum_{n=1}^{\infty}a_n$ converges and test $\sum_{n=1}^{\infty}\frac{1}{n\sqrt{n}}$ for convergence.    Can anybody…explain to me what this exercise even asks of me? I have trouble understanding it in the first place. Is $a_n=2^ka_{2^k}$ here or something else? If so am I simply supposed to show that $\sum_{n=1}^{\infty}2^{n}a_{2^{n}}$ converges? Seems unlikely. I don't get it.

I have to prove the  by tomorrow and I am really unconfident about what I did:  $$\sum_{n=1}^\infty a_n\text{ converges } \iff \sum_{n=1}^\infty 2^n a_{2^n}\text{ converges}$$  I did the following:  Let $(b_n)$ be a sequence as follow: $b_{2^k+m}:=a_{2^k}$ with $k\in\mathbb N_0$ and $0\leq m<2^k$.  It's $a_{n+1}\leq a_n$ and so $0\leq a_{n+p}\leq a_n$ for all $n,p\in\mathbb N$.  So $\sum\limits_{n=1}^\infty b_n$ converges by the majorizing series $\sum\limits_{n=1}^\infty a_n$. And it's $\sum\limits_{n=0}^\infty b_n=\sum\limits_{n=0}^\infty\sum\limits_{m=0}^{2^n-1}a_{2^{n+1}}=\sum\limits_{n=1}^\infty 2^{n-1}a_{2^n}$ so $\Rightarrow$ is done.  For $\Leftarrow$ consider $c_{2^k+m}:=a_{2^k}$ with $k\in\mathbb N_0$ and $0\leq m<2^k$.  It's $|a_n|\leq c_n$ and $\sum\limits_{n=0}^\infty c_n=\sum\limits_{n=0}^\infty\sum\limits_{m=0}^{2^n-1}a_{2^{n}}=\sum\limits_{n=1}^\infty 2^{n}a_{2^n}$ and so $\sum\limits_{n=1}^\infty a_n$ converges by the majorizing series $\sum\limits_{n=0}^\infty c_n$.  Is this in form and content correct?


I like to customize each of the 16 colors in my windows command prompt, but setting them up manually is a slow and painful process (due to some bugs in the colors tab of Console Windows Properties). I'd like a way to import these settings quickly when I am setting up a new machine.    My question is - where are these settings actually stored? In the registry somewhere? In a config file?

Where are the default settings saved for the Command Prompt defaults?  Are they stored in the registry somewhere, or in a file?  I would love to make a .reg file to set my default preferences when logging into a machine for the first time.  I'm talking about the default application settings: QuickEdit mode, buffer size, text color, etc.


I'm using Blender and UE4, and I've got a problem: For most materials I use several textures (Color, Roughness, Metalic, etc.) I recently discovered painting with Blender and I love it, but I would like to know how can I paint several layers at once. For example, I might have a mesh with a Color and a Roughness layer, and when I add rust to it, I want the Roughness layer to also be affected.  Any ideas?

Is there any way to paint onto a bump map and diffuse map at the same time, so that the strokes match up? Like a multi-layer brush that uses a greyscale texture for the bump layer and a color texture for the diffuse color?  Here's a rough sculpt to demonstrate what I'm imagining:    The GIF above shows how such a brush could be made. The black and white height map would be the displacement brush, transferring its greyscale data to the bump map texture and the green one would transfer its color data to the diffuse map texture.  The resulting brush images:      Making the brush is one thing, but is it possible to use such a brush?


file_name = file_path.split('\')  Gives me an error because \' is to represent a single quote in python. I want to split a file name using single backslash.

I have a string that contains both double-quotes and backslashes that I want to set to a variable in Python. However, whenever I try to set it, the quotes or slashes are either removed or escaped. Here's an example:  >>> foo = 'baz "\"' >>> foo 'baz ""'   So instead of baz "\" like I want I'm getting baz "". If I then try to escape the backslash, it doesn't help either:  >>> foo = 'baz "\\"' >>> foo 'baz "\\"'   Which now matches what I put in but wasn't what I originally wanted. How do you get around this problem?


Does anybody know of any? (I'd be using a php page to call the terms)  THANKS!

Lot of googling did not help me! Are there any good dictionary web based available?   I am looking for a site which can send me the meaning of words if we pass the word through query string!


Here is the fix-wordpress-permissions.sh file and it's location is home/htdocs/wordpressTest. #!/bin/bash # # This script configures WordPress file permissions based on recommendations # from http://codex.wordpress.org/Hardening_WordPress#File_permissions # # Author: Michael Conigliaro <mike [at] conigliaro [dot] org> # WP_OWNER=www-data # <-- wordpress owner WP_GROUP=www-data # <-- wordpress group WP_ROOT=$1 # <-- wordpress root directory WS_GROUP=www-data # <-- webserver group  # reset to safe defaults find ${WP_ROOT} -exec chown ${WP_OWNER}:${WP_GROUP} {} \; find ${WP_ROOT} -type d -exec chmod 755 {} \; find ${WP_ROOT} -type f -exec chmod 644 {} \;  # allow wordpress to manage wp-config.php (but prevent world access) chgrp ${WS_GROUP} ${WP_ROOT}/wp-config.php chmod 660 ${WP_ROOT}/wp-config.php  # allow wordpress to manage wp-content find ${WP_ROOT}/wp-content -exec chgrp ${WS_GROUP} {} \; find ${WP_ROOT}/wp-content -type d -exec chmod 775 {} \; find ${WP_ROOT}/wp-content -type f -exec chmod 664 {} \;  when i type sudo ./fix-wordpress-permissions.sh / inside the home/htdocs/wordpressTest folder my massive file permission change. How can i revert?

I accidently ran  sudo chmod 755 -R /   instead of  sudo chmod 755 -R ./   I stopped it after few seconds, but now there is some problems such as  sudo: must be setuid root   How can I revert permissions back?


The aspect ratio of the map frame doesn't match the contents, leaving a lot of white space inside the frame, even after I've scaled the contents to fill one dimension. When I drag one edge of the frame to change the aspect ratio, the scale of the content changes. I know I can zoom with the mouse wheel, but the jumps are too big. Is there a way to set the sensitivity of the zoom? Alternatively is there a better way to change the map's aspect ratio so that the scale doesn't change? qgis 2.01 64 bit windows 7

Is it possible to lock the scale in the QGIS 2.0.1 print composer? Every time I resize the map, the scale is adjusted. This makes trying out different map layouts really annoying.


In  as well as in Landau's textbook on classical field theory, there is a proof of the conservation of spacetime interval in which authors deduce, that the differentials of the interval in two different inertial reference frames are infinitesimals of the same order and therefore must be proportional. What does it mean and how can you prove it without refering to the properties of Lorentz transform, which is to be derived from conservation of spacetime interval.

I've started today the book of Landau and Lifshitz Vol.2: The Classical Theory of Fields $\S 2$. They start from the invariance of the speed of light, express it as the fact that $$c^2(\Delta t)^2-(\Delta x)^2-(\Delta y)^2-(\Delta z)^2=0$$ is preserved when we change inertial frame, so they consider $$ds^2=c^2dt^2-dx^2-dy^2-dz^2,$$ and say     We have observed that if $ds=0$ in one frame then $ds'=0$ in another frame. But $ds$ and $ds'$ are infinitesimal of the same order. So it follows that $ds^2$ and $ds'^2$ have to be proportional that is $ds^2=ads'^2$...    and he goes on to prove that $a=1$.  How to translate this argument in a rigorous one? I'm really interested in this, both to understand this deduction and also to be able in future to make similar ones.


I want to make an overline via " $\overline{O}$VERLINE " above a letter but this letter then appears in an italic shape. How do I avoid this?

If I want to draw an overline over some text, not an equation, how can I do it? \overline seems to only work in math mode, and when used outside of math mode, it automatically says "Missing $ inserted".


I grew up with him playing football  I searched for it but coundn't get the answer I want. what is this usage called and how to use it correctly? like situations where it is used?

People often see him play basketball on the playground at the weekend.   Can I use playing instead?


So if I were to make a , ,  (all  archetypes), would I treat each archetype as a separate class in which to invest level or do they act as though they were all one class simply trading out abilities for the ones each archetype modifies or removes.

In the APG it states;     A paladin could, however, be both an undead scourge and a warrior of the holy light, since none of their new class features replace the same core class feature.   So does that basically mean that this PC would be a multiclass Undead Scourge/Warrior of the Holy Light?  Does the leveling/skill/feat acquisition work just like any multiclass character?


I am away from home using my notebook. I have installed Microsoft VS Community 2015 and Microsoft VS 2013 Express. I get the same error on both IDEs. I have tried both qualifying "++GlobalLineCount::glCount" and unqualifying "++glCount". I have retyped the text in case of some unseen character. I am not using precompiled headers. I have tried glCount both as pubic and private. This is pure C++. This code fails as is. It is an extraction of a larger program that also fails with the same error. The larger program does compile and link on my home PC using Microsoft VS Community 2015. Because the larger program behaves correctly on my home PC but not on this notebook I am suspicious of the IDE installed or configuration. Currently, I am 1500 miles from my home PC so doing anything with it is not possible. Thanks in advance.  My error:  TestGlobalLineCount.obj : error LNK2001: unresolved external symbol "public: static unsigned __int64 GlobalLineCount::glCount" (?glCount@GlobalLineCount@@2_KA)  My code:  #include <stdint.h> #include <stdio.h> #define MODULE_WHO_AM_I "TGLC" class GlobalLineCount { public:     static uint64_t getNextGLC(void)         { return ++GlobalLineCount::glCount; }      static uint64_t glCount; }; int main() {     printf("%-5s %4d %6llu - Test Start\n",         MODULE_WHO_AM_I, __LINE__, GlobalLineCount::getNextGLC());     return 0; }

Can anyone explain why following code won't compile? At least on g++ 4.2.4.  And more interesting, why it will compile when I cast MEMBER to int?  #include <vector>  class Foo {   public:       static const int MEMBER = 1;   };  int main(){       vector<int> v;       v.push_back( Foo::MEMBER );       // undefined reference to `Foo::MEMBER'     v.push_back( (int) Foo::MEMBER ); // OK       return 0; }


prove that this sequence is converging and find its limit  $x_1 = \frac32$ $x_{n+1} = \frac3{4-x_n}$  i believe that the solution entails proving the sequence is monotone descending and its infimum is 1, but i don't know to to show that. i also tried messing with triangle inequality, but with no success so far any help into solving this will be very appreciated

I'm given:  $$\begin{align*} x_1&=\frac32\\\\ x_{n+1}&=\frac3{4-x_n} \end{align*}$$  How do I go about to formally prove the sequence converges and show it?  Thanks in advance.


I have a web-to-lead html form (generated form standard Salesforce functionality) and a duplicate rule.   I want to display a success and error message that whether lead is created or not after clicking on submit.

I am using web to lead form to enter data on a form externally. Whenever the form i submitted, leads are created in salesforce.  Now, i want to have a check for duplicates based on some fields, say first name and last name.  When the form is submitted with duplicate first name and last name, i want to show error message on the form saying that the lead exists in system.  Can you please guide me on how we can achieve this? Can we show real time error messages on web to lead form?  Thank you.


When I'm trying to update ubuntu 14.04 LTS, I got this error message:  E: Malformed line 1 in source list /etc/apt/sources.list.d/virtualbox.list (dist)   E: The list of sources could not be read.     Contents of /etc/apt/sources.list.d/virtualbox.list:  deb download.virtualbox.org/virtualbox/debian trusty contrib non-free

I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that.  I just tried to upload a screen shot but since I'm new it won't allow me to.  I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following:  COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse)  E: The list of sources could not be read.,  E: The package list of status file could not be parsed or opened.   How do I report bugs?  What can be done about this.  I have searched and everything everyone says to do leads me back to the same line error message.  So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software.


I want to know how newFunc(); works. Is it a function or not? const first = () =>  {     const greet = 'Hi';     const second = () => {         alert(greet);     }     return second; }   const newFunc = first(); newFunc();

I asked a question about Currying and closures were mentioned. What is a closure? How does it relate to currying?


Okay, I'm level 5, I have Pokemon that aren't currently defending a gym that are stronger than one of the Pokemon in a gym, but not another, do I have to defeat both for my Pokemon to be eligible to defend the gym? The gym is owned by my team.

So I defeated a Team Valor gym earlier today using my highest cp Pidgeot. It turned grey, so I went to claim it with that Pidgeot, except it wouldn't let me. What determines which pokemon you are allowed to place at a gym? Is it just those who have participated in a battle can't? Is there a time period for it? What about training at a friendly gym? Does this impact anything?


is there a way to show a Outlook calendar in a SharePoint calendar. I know, that you can overlay a Exchange calendar, but will this calender sync by itself ?  Or is there another way to display the personal Outlook calendar in SharePoint 2013?

Is it possible to view outlook calendar in SharePoint 2013?  Head of the department wants to view everyone's Outlook Calendar in the SharePoint 2013. Is this possible?  He can view other's outlook calendar in his outlook a/c but he wants to view other's outlook calendar in SharePoint 2013.


I'm not familiar with regular expressions and am not sure what I'm doing wrong.  reg=re.compile('[a-zA-z]+?') #regular expression checks for at least one alphabetic character  print(bool(reg.match('*ab*')))   I would like this to result in True. It doesn't matter where the alphabetic character occurs in the string.

What is the difference between the search() and match() functions in the ?  I've read the  (), but I never seem to remember it.  I keep having to look it up and re-learn it.  I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head.  Or at least I'll have a better place to return with my question and it will take less time to re-learn it.


I'm trying to get LaTeX working on Anki.  I am the only admin on my system but when I try and run the terminal command "tlmgr update --self && tlmgr install dvipng" I get an error saying I need to run the program as an admin. I am the admin! How do I run this program?   Note:  Due to lack of reputation, I am unable to vote or bump any existing material, so I am asking a new question.  The comment to the top answer is identical to my query, hence the identical text.

Originally I was going to ask a question about how to get  working in , but as I was writing the question, I was trying to solve the problem myself. I thought others may benefit from my findings, so I decided to post them here. If you notice that any of my steps are wrong, please let me know. And I was still unable to get it to work, so if you scroll down to the end, you can see where I'm stuck and still need help.  The current issue is: How can I install libgd?    I'm trying to make  work with . The only information I could find about how to do this is from :        [...] to use LaTeX, you have to install it separately - it is not  bundled with Anki   [...] on OSX use MacTex   Dvipng must also be installed.   On OSX, if you use MacPorts or similar to install LaTeX, make sure latex and dvipng are linked in /usr/bin.      The standard installation of  takes up 3GB, far more than I believe is necessary, since I am not going to use its GUI application. I just need the LaTeX library, if I understand it correctly, which should be way less than 3GB. Therefore, I'm installing the  version instead, which only takes up about 100MB.  I'm not sure if I already have  installed or not, so I'm restarting Anki to see if it works or not. I got the following error:     Error executing dvipng. [...] Output written on tmp.dvi [...]   So I probably need to install dvipng... The Install readme has the following information:     Installing dvipng should be simple: merely ./configure',make', and   `make install'.      Prerequisites:         The GD Graphics Draw library, libgd   The path-searching library kpathsea   libpng and libz      Again, I'm not sure which, if any, of these prerequisites I already have installed, so I'm just going ahead with the installation in hopes of error messages guiding me to the right path.  After executing ./config, it gives the error:     configure: error: cannot find/use libpng   ... which I think is weird since the readme states:    To be able to compress and write PNG files to disk, dvipng (or  really libgd) uses libpng which in turn uses libz. These should be  available on any modern system, if not, download them and install  them.    I went to the , and tried finding a "current binary" that works with my OS (10.6/i386), but it seems that none of the latest 3 versions have a binary that is available to download. So I went to the "old binaries" section, which took me to , which has libpng v1.4.5. I installed the "Individual Installer package" for libpng.  Now that it's installed, I tried installing Dvipng again, and it now gives the following error:     cannot find/use libgd   This drawing library can be downloaded at    When I go to , I see it says that the page moved and that it is currently down. There is only a link to the source files and no binary distribution. I'm not sure where I should go from here... should I download the source and compile it somehow? Once it's complied what do I do with it? Do I run some file it generates? Would I move files it generates to specific folders? How would Dvipng know how to access it? I'm unfamiliar with how to do something like this, so any help would be appreciated.     Here's a summary (so far) of the dependency hierarchy which must be installed in order to get LaTeX to work with Anki:   : Installed (got the BasicTeX version to save a lot of disk space). : Not installed (can't install without libgd).  : Installed (got the Individual Installer package). libgd: Not installed (not sure how to install this). ???      Other questions:   Is there a better, reliable method to know if any of these dependencies are installed rather than running an installer which depends on them and hoping for a meaningful error message?


have downloaded and then unzipped ubuntu 14.04.1 LTS on 8/22/14 to my windows 7 desktop.  I get lots of folders and files after unzipping, but can not figure out how to create the iso image. My goal is to do so on a USB stick, but haven't been able to get to that step, wah!

I would like to see a full how-to guide on how to install Ubuntu.


I've been working on implementing a 2D radar for a 3D game lately, it's working fine in a very basic version. This is what is looks like:    It works by transforming the 3D coordinates of the enemies nearby to the local player space and then drawing those coordinates with the center-offset of the radar circle.  Transforming the enemy positions (and adding them to a vector):  if (LocalPlayer) {     Vec3    diff;     double  distance;     position.clear();      for (auto i = commonInfected.begin(); i != commonInfected.end(); ++i)     {         diff = (*i)->GetPosition() - Global::camera->GetPosition(true);         distance = diff.xz().Length();          if (diff < 100)         {             position.push_back(diff);         }     } }   Drawing the enemies:      for (int i = 0; i < position.size(); ++i)     {         pos.x = position[i].x;         pos.y = position[i].z;          pos += {80, 80}; // center of the circle          context->DrawText("x", pos.x, pos.y);     }   However, the problem I have is that the plotted enemies do not rotate with the player and that plotted enemies can "go out" of the circle shape of the radar. How do I approach this kind of problem?  I have seen and carefully read through this question but couldn't understand it.

I'm trying to build a radar system like the one in the original X-Wing games. The way it works is that there are two circular radar systems, one for behind the ship, and one for infront.   So, I've written a class to represent the radar, it has a vector representing the direction the radar is facing, and a 3D position of where the radar is. Both of these things will change in realtime as the ship moves and so the radar will need updating each frame.  Now I'm trying to figure out how to transform the position of another ship onto the radar. What I need is a final 2D X/Y coordinate between -1,-1 and 1, 1 for plotting on the 2D radar screen.   Given two vectors (the direction of the ship - which the radar is facing - and the direction to the ship we are plotting), how can I calculate a 2D X-Y position on the radar? Obviously I also have access to the up and right vectors of the ship too.  My instinct says that this should be relatively straightforward, but my math skills suck.


Are there differentiable functions $F:(a,b)\rightarrow \mathbb{R}$, where the set of points at which the derivative of $F$ is discontinuous, is dense in $(a,b)$?   So far I've only found functions where derivatives are discontinuous only at a finite number of points.

Could someone give an example of a ‘very’ discontinuous derivative? I myself can only come up with examples where the derivative is discontinuous at only one point. I am assuming the function is real-valued and defined on a bounded interval.


I've been battling the castle guards for ages and I have been getting no where! just losing a bunch of candies from all the health potion making. What is the quickest way to beat all the guards?

I already have the pink and red leather gloves, the armor, the crown, and the monkey's staff (and they're all enchanted). Regardless of how many health potions I use, I always die. Help!


Currently i have 2 screens and i've activated the workspaces feature. When I switch to another workspace, the 2 screens switch the workspace and this isn't the behavior I want.  I want a Mac like workspace support where only the screen I focus switch the workspace.  How can I do this ?

I connected my laptop to my LCD. Using the laptop display hotkey I can switch between different modes - only laptop monitor on, only LCD monitor on, both on and display the same view, both on and the desktop is stretched (divided).  But, I'm looking for something else - I would like to have two workspaces, one visible on the laptop monitor and the other on the LCD.  Is that possible?


I am trying to populate a dynamically allocated 2D array.  Specifically, I am trying to input random numbers into an array.  Code below:  #include <stdio.h> #include <stdlib.h> #include <time.h>  int main(void) {  int i, j, num_students = 10, num_grades = 4; int **array;  srand(time(NULL));   array = malloc(sizeof(int *) * num_students);  for (i = 0; i < num_students; ++i)     array[i] = malloc(sizeof(int) * num_grades);  for (i = 0; i < num_students; ++i) {     printf("Student %d has grades: ", i);     for (j = 0; j < num_grades; ++j)         array[i][j] = rand() % 101;         printf("%d ", array[i][j]);      printf("\n");     free(array[i]); }  free(array);  return 0;  }   The output:  Student 0 has grades: 0  Student 1 has grades: 0  Student 2 has grades: 0  Student 3 has grades: 0  Student 4 has grades: 0  Student 5 has grades: 0  Student 6 has grades: 0  Student 7 has grades: 0  Student 8 has grades: 0  Student 9 has grades: 0    I do not know why it is printing 0 instead of the random numbers.

Why does everyone tell me writing code like this is a bad practice?  if (foo)     Bar();  //or  for(int i = 0 i < count; i++)     Bar(i);   My biggest argument for omitting the curly braces is that it can sometimes be twice as many lines with them. For example, here is some code to paint a glow effect for a label in C#.  using (Brush br = new SolidBrush(Color.FromArgb(15, GlowColor))) {     for (int x = 0; x <= GlowAmount; x++)     {         for (int y = 0; y <= GlowAmount; y++)         {             g.DrawString(Text, this.Font, br, new Point(IconOffset + x, y));         }      }  }  //versus using (Brush br = new SolidBrush(Color.FromArgb(15, GlowColor)))     for (int x = 0; x <= GlowAmount; x++)         for (int y = 0; y <= GlowAmount; y++)             g.DrawString(Text, this.Font, br, new Point(IconOffset + x, y));   You can also get the added benefit of chaining usings together without having to indent a million times.  using (Graphics g = Graphics.FromImage(bmp)) {     using (Brush brush = new SolidBrush(backgroundColor))     {         using (Pen pen = new Pen(Color.FromArgb(penColor)))         {             //do lots of work         }     }  } //versus using (Graphics g = Graphics.FromImage(bmp)) using (Brush brush = new SolidBrush(backgroundColor)) using (Pen pen = new Pen(Color.FromArgb(penColor))) {     //do lots of work }     The most common argument for curly braces revolves around maintance programming, and the problems that would ensue by inserting code between the original if statement and its intended result:  if (foo)     Bar();     Biz();     Questions:   Is it wrong to want to use the more compact syntax which the language offers? The people that design these languages are smart, I can't imagine they would put a feature which is always bad to use. Should we or Shouldn't we write code so the lowest common denominator can understand and have no problems working with it?  Is there another argument that I'm missing?


Bought it a the groceries store, and forgot it in the groceries bag.  So it was left at room temperature, in the original sealed container for around 12 hours.  Given that cheese should usually be refrigerated, is this product still safe to eat?

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


I have a mathematical theorem written in pencil on paper. I am using a handheld device to use the internet.  On this webpage -  - are the high requirements of the modern world for the publication of a math paper. I have hundreds of handwritten pages of mathematical work, but what I need to publish should be only ten pages or so.  Proving Legendre's conjecture took a lot of work. Verifying the proof took a lot of work. Putting the proof into text will be a lot of work, for my handwritten papers have more numbers than words, and the drawings have to be explained. Publishing the proof of Legendre's conjecture in a refereed mathematics publication of worldwide repute would allow other mathematicians to read it at their convenience and verify it for themselves and, most importantly, make use of the other results which follow from the proof technique.  From the start, through the process, to the finish is the way to go. I need assistance getting started.

Which book (free or otherwise) was the most useful to you when you started learning LaTeX?  I am frequently asked this question by friends who want to learn LaTeX, and I recommend the book which got me started, , but I feel that there might be better options around.  Also see .


Consider these two example sentences:     I don't think Kelly will pass the exam.    and     Kelly will not pass the exam.   Is it absolutely the same meaning or not if someone says these phrases?

An ELL post () says     I don't think I understand what kind of buttonholes they're talking about.   I found "I don't understand" is commonly used to express the unawareness of something.     So, what is the difference between "I don't think I understand" and "I don't understand"? Is the latter more formal than the former, therefor no published book uses the former?  Could someone please give a hint? Thanks in advance.  On Google, "I'm not sure I understand" got 17,300,000 hits, "I don't think I understand" got 48,500,000 hits, "I don't understand" got 162,000,000 hits.


I am looking for libraries which can read RSS / ATOM feeds in my J2EE application (based on JBoss Seam).   Is  the only application there for reading feeds?  I am assuming the Seam RSS  is only for generating RSS feeds and not for reading feeds.

I'm using Java, and need to generate a simple, standards-compliant RSS feed. How can I go about this?


I'm part of a small study group at work that's trying to get a better grasp on what makes JavaScript tick. In our recent discussions about objects, we've learned that an object's public methods are recreated each time an object is instantiated, while methods assigned to the object's prototype are only created once and inherited by all instances. From what I understand, both public methods and those assigned to the prototype are publicly accessible.  The question I have, then, is why bother creating public methods at all if adding to the prototype is apparently more efficient? What benefit does the public method provide that the prototype doesn't?

What's the difference between  var A = function () {     this.x = function () {         //do something     }; };   and  var A = function () { }; A.prototype.x = function () {     //do something };


I have the following function in a class named cache_level which extends the linked list class.:  @SuppressWarnings("unchecked") public boolean addObject(Object O) {     System.out.println(O);     if(O != null)        {                boolean x = getObject(O);         int I = 21;         if(x == true && size() == cacheSize) //if object is found and size of list is full         {              remove(O);             addFirst(I);             cacheHit++; //increment to show we found the object         }         else if(x == true && size() != cacheSize)//found but not full         {             addFirst(I);             cacheHit++;         }            else if(x != true && size() == cacheSize) //item not found but list full         {             removeLast();             addFirst(I);         }         else  //item not found and list not full         {             addFirst(I);         }             return x;     }     else      {         System.out.println("NULL OBJECT WAS FOUND");         return false;     } }      and I have a function in main which uses a scanner to read a text file.:  File file = new File(filename); Scanner fileScan = new Scanner(file); String line = ""; String token = "&";  while ((fileScan.hasNextLine()))  {                line = fileScan.nextLine();      Scanner lineScan = new Scanner(line);     //System.out.println(token);     while (lineScan.hasNext())      {         token = lineScan.next();         //System.out.println(token);         List.cacheAdd(token); //goes to cache class and initiallizes         //System.out.println(token);     }      lineScan.close(); } //System.out.println("CACHE WAS CREATED");       fileScan.close();   and for some reason that is giving me a NullPointerException and so far everyone I have talked to has no idea why that is happening. I have a class named Cache, which initializes cache_level. Reading the text file seems to be okay as I can print out the contents being stored into token but whenever I try to add it into the list, it gives me an error.

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


I have question about if I could call a constructor in another constructor in abstract class. For example,  public abstract class Sth{   protected Sth(){}   protected Sth(int number){}   protected Sth(String word){     int number = 0;     this(number);   }   It seems that Java does not allow me to do this. I wondered if there is any way we could let this happen? Thanks  -----------------------------------------------Explanation---------------------------------------------------------------------- The goal I want to do is to call the second constructor specifically. I got error with must calling the first constructor in Java. So I wondered if we can just skip first constructor without remove any code here. Sorry for the confusion.

Is it possible to call a constructor from another (within the same class, not from a subclass)? If yes how? And what could be the best way to call another constructor (if there are several ways to do it)?


If we start from  $ m\ddot{x} = -\frac{dV}{dx} $  How could one derive/construct principle of least action? i.e. find out that this quantity  $ S = \int_{t_0}^{t_1}dt\left(\frac{m\dot{x}^2}{2} - V(x) \right)$  needs to be minimized. Assuming it's true and then proving it is is very easy and it's written in every textbook but that's not what I'm asking for. I want to go in other direction, not assuming I know the answer. All I know are Newton's laws and that $ F = -dV/dx$.  I thought of simply inverting the steps of derivation of Euler-Lagrange equation but they seem unintuitive and the reasoning behind them is unclear except that I know the answer in advance (which I want to assume that I don't).  I guess this is inverse of optimization problem? Given a solution finding out what does it optimize?

Is there a proof from the first principle that for the Lagrangian $L$,    $$L = T\text{(kinetic energy)} - V\text{(potential energy)}$$  in classical mechanics? Assume that Cartesian coordinates are used. Among the combinations, $L = T - nV$, only $n=1$ works. Is there a fundamental reason for it?  On the other hand, the variational principle used in deriving the equations of motion, Euler-Lagrange equation, is general enough (can be used to to find the optimum of any parametrized integral) and does not specify the form of Lagrangian. I appreciate for anyone who gives the  answer, and if possible, the primary source (who published the answer first in the literature).      Notes added on Sept 22: - Both answers are correct as far as I can find. Both answerers were not sure about what I meant by the term I used: 'first principle'. I like to elaborate what I was thinking, not meant to be condescending or anything near to that. Please have a little understanding if the words I use are not well-thought of. - We do science by collecting facts, forming empirical laws, building a theory which generalizes the laws, then we go back to the lab and find if the generalization part can stand up to the verification. Newton's laws are close to the end of empirical laws, meaning that they are easily verified in the lab. These laws are not limited to gravity, but are used mostly under the condition of gravity. When we generalize and express them in Lagrangian or Hamiltonian, they can be used where Newton's laws cannot, for example, on electromagnetism, or any other forces unknown to us. Lagrangian or Hamiltonian and the derived equations of motion are generalizations and more on the theory side, relatively speaking; at least those are a little more theoretical than Newton's laws. We still go to lab to verify these generalizations, but it's somewhat harder to do so, like we have to use Large Hadron Collider. - But here is a new problem, as @Jerry Schirmer pointed out in his comment and I agreed. Lagrangian is great tool if we know its expression. If we don't, then we are at lost. Lagrangian is almost as useless as Newton's laws for a new mysterious force. It's almost as useless but not quite, because we can try and error. We have much better luck to try and error on Lagrangian than on equations of motion. - Oh, variational principle is a 'first principle' in my mind and is used to derive Euler-Lagrange equation. But variational principle does not give a clue about the explicit expression of Lagrangian. This is the point I'm driving at. This is why I'm looking for help, say, in Physics SE. If someone knew the reason why n=1 in L=T-nV, then we could use this reasoning to find out about a mysterious force. It looks like that someone is in the future.


For those who don't believe it:      Though it is good for me that now I don't have to fulfill my commitment, but I'd like to do it so can you bring it back?

What does it mean for a site to have fulfilled next to its name in the ?  The reason I ask is that I moderate Genealogy & Family History and noticed that it is the only site of about a hundred which is "tagged" in that way.


I found a way how to add a context menu, when I right click in a Windows explorer, to open command line in a current directory.  It is sufficient to create two Windows registry entries:  HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt e.g. with value "Open CMD here..." and HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt\command with value  "cmd.exe /k cd /d %1"  or simple creating a file cmd.reg and executing it:  Windows Registry Editor Version 5.00  [HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt] @="Open CMD here..."  [HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt\command] @="cmd.exe /k cd /d %1"   But how can I achieve the same thing, which will force cmd.exe to "Run as Administrator"?

I don't want to install PowerToys, I'd rather a simpler solution for this specific problem.  I've tried .  I've tried , but I get the following error:     Cannot import D:\Admin\Reg\Open command window here (Administrator)\Open command window here (Administrator).reg: The specified file is not a registry script.   You can only import binary registry files from within the registry editor.   Any suggestions?  Edit:  Forgot to mention: I've tried the import facility in regedit to no avail


How can I remove comma from theese ingrediens and let them float left? I am using chosen for my taxonomyes

I style my taxonomy terms as boxes, so I don't need comma between them.  Could somebody give me any advice?


Lately I've come up with an interesting math problem to work at. I've been trying to find "factorial triples", or triples of numbers that satisfy $$A!B!=C!$$ with $A,B \ne 1$. By playing around, I've noticed that the relationship is satisfied for all $A$, $B$, and $C$ in the form $$A=K$$ $$B=K!-1$$ $$C=K!$$ And I've also proven the following, under the assumption that some $A,B$ exist satisfying the relationship with $C$:   If $C-1$ is prime, then $C$ is a perfect factorial. If $C-k$ is prime, then some number in the form $$\frac{C!}{(C-n)!}, 1\le n\le k$$ is a perfect factorial. C is not prime.   I have also conjectured (but I have not been able to prove) that $C$ cannot be a perfect power of a prime. This is my first question - can anyone give me a hint or two to start this proof?  The thing that bothers me is the triple $$10!=7!6!$$ Because it does not satisfy the form that I had come up with. This one works because  $$6!=8\cdot9\cdot10$$ and so I can conclude that if I can find other numbers of the form $$H!=J\cdot(J+1)\cdot...\cdot(J+K)$$ then another possible form is $$A=J-1$$ $$B=H$$ $$C=J+K$$ This is the second question. How can I find such $H,J,K$?  The third and final question is this: how to I prove that all factorial triples are in this form, or, if that is false, how do I find the other forms?  Thanks!

I was playing around with hypergeometric probabilities when I wound myself calculating the binomial coefficient $\binom{10}{3}$. I used the definition, and calculating in my head, I simplified to this expression before actually calculating anything $$ \frac {8\cdot9\cdot10}{2\cdot3} = 120 $$ And then it hit me that $8\cdot9\cdot10 = 6!$ and I started thinking about something I feel like calling generalized factorials, which is just the product of a number of successive naturals, like this $$ a!b = \prod_{n=b}^an = \frac{a!}{(b-1)!},\quad a, b \in \mathbb{Z}^+, \quad a\ge b $$ so that $a! = a!1$ (the notation was invented just now, and inspired by the $nCr$-notation for binomial coefficients). Now, apart from the trivial examples $(n!)!(n!) = n!$ and $a!1 = a!2 = a!$, when is the generalized factorial a factorial number? When is it the product of two (non-trivial) factorial numbers? As seen above, $10!8$ is both.


I think it would be useful/convenient if the current directory determined one's shell environment.  This would mean that the command  cd /my/projects/foo   ..., for example, would not only set the current working directory (and update $PWD, $OLDPWD, $dirstack, etc.), but would also adjust a host of other environment elements (shell options, variables, functions, aliases, etc.) in a manner appropriate to the contents of the new PWD.  At first blush this seems like a relatively simple thing to implement, especially with zsh, since it already supports a chpwd hook, and the $chpwd_functions array.  But, as they say, the devil is in the details1.  Therefore, before plunging into rolling my own, I thought I'd ask: is anyone aware of a mature implementation of this idea?  Alternatively, besides chpwd et al., does zsh provide other tools that would be helpful towards implementing such a thing?  In particular, does it provide any support for encapsulating/saving/restoring environments?  (I'm thinking of something in the vein of R's environment objects, but encompassing not only variables, but also, e.g., aliases, options, etc.)    FWIW, I am aware of Python's virtualenv, which shares some features with the idea described in this post, but of course, this is limited to Python-related settings, however.  Furthermore, it creates a new "state variable", if you will, the "current virtual environment", orthogonal (rather subsumed under) the "current working directory" state variable.    1 Once one looks into the matter more carefully one quickly meets some non-trivial questions.  For example: if cd'ing to /my/projects/foo activates a custom environment, what exactly happens after cd /my/projects/foo/modules/bar?  Can we have nested custom environments, demarcated by the filesystem's tree structure?  What about symlinks?  E.g., what if /my/projects/foo/modules/bar is actually a symlink to /my/shared/modules/bar?  Or, if I execute /my/projects/foo/some_program while $PWD is /tmp, say, what should be the environment of the resulting process?  Etc., etc., etc.  I don't find these questions necessarily intractable, but I do find them at least not-totally-trivial.

I have been working on several projects, and they require different environment variables (e.g., PATH for different versions of clang executables, PYTHONPATH for several external modules). Whenever I work on one project, I have to modify these environment variables myself (e.g., change .zshrc/.bashrc and source it); and I sometimes forget and make mistakes.  Is there a way/project that helps do this automatically, similar to what  does in Python?


I received this message form the editor "Thanks for note. We have tried 11 potential reviewers to date and have one review at hand and another that is promised. We will be in touch once the second review is acquired". What this meant? May be he rejected the submission if can't find the second reviewer

I submitted to a journal a couple of months ago. The editorial flow is somehow quick and very transparent. I receive notifications for all events happening to the manuscript.  Unfortunately, the managing editor contacted me three weeks ago. They informed me that the assigned editor could not commit to the job and left. Another editor was immediately assigned.  However, I was contacted today by the new assigned editor. I was informed that all the contacted reviewers so far either refused to review the manuscript or did not respond to the invitation. They are now looking for other reviewers.  Despite the bad luck surrounding the manuscript, all of this happened in a reasonable time and I am satisfied with how quickly they react.  Nevertheless, these events made me reflect. Even if an editorial board possesses a fair network of reviewers, there is still a little risk that all the contacted reviewers either refuse or do not reply.  What happens if no reviewers could be found for a submitted manuscript? Is the journal going to reject the manuscript because of a lack of reviewers?


I'm currently creating a small device to operate on a CR2032 battery when it is disconnected and a USB power when it is connected. I want the device to be powered by USB when it is connected, without any interruption in the power feed. So my question is: how to switch from battery to USB one the device is connected?  I thought to connect two diodes and a PNP transistor to turn the power based on the battery as soon as the USB is connected. But I wonder if this circuit consume many current when the USB is disconnected (consumption must be very low)?  The circuit :   If you have any solution which will consume less current please tell it to me !

Following an earlier question ,  I would love to implement the  as suggested by Russell McMahon.   That way I could switch between 4AA batteries (1.2V*4 or 1.5V*4) and USB power. The battery voltage would nicely be regulated to 5V too. And the idea was to use the shutdown pin of the chip IF USB power is detected. The device also has to work when no batteries are present.  I am not too experienced with this, but I thought to connect the 5V from the USB to the SHUTDOWN pin from the LDO chip. Pitywise, the pin function is inverted, if SHUTDOWN is low, Vout from the LDO chip is low.  I am now considering using an XOR gate to make the thing work:         – Schematic created using   I would love to limit the amount of components, but the number of diodes is already high, and the whole thing feels a bit crafted   My questions:    Is there a better suitable chip (with an inverted shutdown pin) is there a better circuit (without voltage drop) to get this (I would prefer to get rid of D1, but then, the XOR has no desired operation)


Which site can I go to for asking a suggestion about making an app or web application? Of course, not Stack Overflow, because I already asked there and I knew it was not the right place.

Is there a specific area for new users that are new to coding where they can go and ask questions without being blocked for asking a question they may not have the answer to or isn't sure how to correctly ask a question. I know that there is a section for FAQ to try to explain how to ask a good question but for people who are learning and want to get the opinions of experienced coders, it can be hard to come here and ask a question. So again, is there a community that is open to helping new coders that may not always know how to ask the question they are trying to get an answer to?


If a cleric falls out of line from their Deity s/he becomes a ex-cleric and loses s/he powers but if said character started worshipping a Deity that is in their new allingment would s/he have to start over with a level one cleric or would s/he regain their powers. I ask because my caimpaign may require me to do what may be wrong in order to do what's right if that makes sense, I would end up doing evil to do good in the end, This is in 3.5 btw

There are rules for a Cleric who loses faith, and how to regain his standing through atonement.  But what if he abandons one faith entirely for another? Presumably his new god/faith should be picking up where the other leaves off, so spells aren’t interrupted, and further he probably should be changing his Domains to ones used by his new faith, but does any official book actually describe this process? Does his new faith require atonement for his prior faith in another religion? Is there some kind of interruption time period, where he doesn’t get spells? Is the actual process of substituting Domains explained?  Because the lack of rules that I’m looking at almost seems to imply that a Cleric cannot change faiths.  I’m really looking for book citations here, because this is specifically for the sake of determining what the rules currently are to better judge how changes might affect them. I have plenty of my own ideas about how this sort of thing should be handled, most of which rely on eliminating as much of alignment’s mechanical impact as possible, but that’s not really relevant here.  If your answer is that there are no such rules, I’d like an idea of how certain you are of this. For example, I could not find any such rules in Player’s Handbook or Complete Divine, the first two places I looked. Knowing where the rules aren’t is useful.


I've noticed the following things while studying calculus, and would like experts to tell me if my conclusions are right. My Observations If I represent the area of a circle by $A$ and its perimeter by $C$, I can write $$C=\frac{dA}{dr}$$ Similarly, for a sphere, if I represent volume by $V$ and surface area by $S$, I can write $$S=\frac{dV}{dr}$$ I tried doing the same for other 2D and 3D figures, and saw that it worked only in case of the circle and the sphere. My questions My questions are:  Why does this happen only in the case of the circle and the sphere?  Can't I express the surface area of a solid in terms of its volume and the perimeter of a closed figure in terms of its area using calculus? Why or why not? I remember reading something of that kind in Jenny Olive's book "Mathematics: A Self-study Guide"

When differentiated with respect to $r$, the derivative of $\pi r^2$ is $2 \pi r$, which is the circumference of a circle.  Similarly, when the formula for a sphere's volume $\frac{4}{3} \pi r^3$ is differentiated with respect to $r$, we get $4 \pi r^2$.  Is this just a coincidence, or is there some deep explanation for why we should expect this?


About an hour ago I posted  under an unregistered account from my desktop. I then opened up the password email from my phone, logged in from that link, and was unable to access the question (didn't know that it would be using a cookie to keep track of everything). I panicked, figured merging with my main account could help, so I did so, and now I fear I'm forever cut off from properly editing/commenting on that question. It doesn't help that I only have 1 rep on that site.   I tried following the advice in , but this only ended up in me logging into my main account (this one).  What can I do to obtain ownership of this question?

I accidentally posted a question without being logged in. Is there a way to associate that question with my account?   For more information, visit "" in the .   a.k.a. How can you link a registered account to a cookie-based account? a.k.a. How do I merge an unregistered account with a registered account a.k.a. Merging users a.k.a. How do I associate anonymous questions I’ve asked with my registered account? a.k.a. Is there a way to claim an unregistered user? (in case anyone searches with those terms)


I am trying to draw a filled triangle where one of the edges is curved.  When I do the "obvious" thing, I find that the curved edge overshoots the vertices at either end.  Here is a minimal working example.  \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}   \coordinate [label=left:{$a$}] (a) at (5, -2);   \coordinate [label=right:{$b$}] (b) at (9, -3);   \coordinate [label=right:{$c$}] (c) at (9,0);   \filldraw [line width=2pt, color=green!70!black, fill=green!15!white] (b) -- (a) to [out=20,in=250] (c) -- (b);   \foreach \point in {a,b,c}   \filldraw [color=green!70!black,fill=green!70!black] (\point) circle     (1.5pt); \end{tikzpicture} \end{document}     As you can see in the figure, the edge overshoots the vertices at (a) and (c).  Thanks in advance!

While drawing a simple 3D (fake 3D in fact) cube, I realized that the corners end up with unwanted extensions of the line. I understand this is related to the width of the lines themselves, but how can I remove them? An alternative solution of drawing the desired figure is also welcomed.  Example:  \documentclass{article} \usepackage{tikz}   \begin{document} \begin{tikzpicture}  \draw[draw=black,fill=gray!20] (0,0) --(4.8,0)-- (4.8,5)--(0, 5)--cycle; \draw[draw=black,fill=gray!20] (4.8,5) -- (4.9,4.8)--(4.9,-0.1)--(4.8,0)--cycle; \draw[draw=black,fill=gray!20] (0,0) -- (0.1,-0.1)--(4.9,-0.1)--(4.8,0)--cycle; \draw[dashed,draw=black] (4.8,5) -- (4.9,4.8)--(0.1,4.8)--(0.,5)--cycle; \draw[dashed,draw=black] (0.1,-0.1)--(0.1,4.8)--(0.,5)--(0,0)--cycle; \end{tikzpicture} \end{document}


At the beginning of episode three we see a Padme who says she is pregnant but not showing, and at the end of the movie we see her delivering Luke and Leia. In other questions it is mentioned that the twins aren't premature, so is it ever explained what the actual timeline of events are in Revenge of the Sith? It feels like it goes one event after another with no breaks.

Inspired by this question:    Currently, the only answer there addresses the fact that the "names you first know someone by are hard to shake".  However, when thinking on this, I realized that another factor would be the amount of time during which Luke actually knew his mentor as Obi-Wan, in comparison to the length of their relationship beforehand.  Luke came to know the true name of Obi-Wan Kenobi fairly early in Episode IV.  At this time, he was about 19 years old and presumably had known (or known of) "Old Ben Kenobi" all his life.  So, to get a rough comparison of this against how long he actually knew "Obi-Wan Kenobi", we just need to know how long (in in-universe time) Episode IV was.  Starting from there, I'd like to expand the question to more generally encompass all six of the movies which are the primary canon of the Star Wars universe.  So, over what duration (and, ideally, dates) did the events represented in each movie occur?


If the public key $(e,n)$ and the private key $(d,n)$ are known, what is the easiest way to find the primes $p$ and $q$?  When $n$ and $\phi(n)$ are given this is easy to solve. But I can't manage it given just $(e,d,n)$. Thanks for any help.

Given the RSA modulus $N$ the fastest method to factor it is of sub-exponent order. But, now if I know the private key $d$ of RSA, does that mean I can factor $N$ efficiently?. It intuitively seems true as I know the public/private key pair. Can someone help me to prove this?  Please provide references so that I can read further into this subject.


I have installed Ubuntu 16.04 in my whole laptop space. But right now , i have a requirement to install Windows in the same laptop. And since i am trying to install windows side by side with this Ubuntu version i tried to partition the hard drive space the current Ubuntu is installed in. However, i cannot partition the drive. So is there any way to do that?  P.S. I already tried using g-parted and disk-utility but neither of them seems to work.

I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this? I can't lose my Ubuntu files, and I'm afraid that I might break . Go  for UEFI only!


I am trying to match a string 'hello world' to a sentence. I think that means it searches the sentence for that string and returns a value that indicates a success.   But when I try this code, all that prints out is 'None'.  import re sentence = "why do we write hello world so often?" match1 = re.match('hello world', sentence) print match1

What is the difference between the search() and match() functions in the ?  I've read the  (), but I never seem to remember it.  I keep having to look it up and re-learn it.  I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head.  Or at least I'll have a better place to return with my question and it will take less time to re-learn it.


Maybe this is the sort of question I could find the answer myself if I just knew the right search terms. I've gotten a whole bunch of search results and quite a bit of sidetracks.  In my handwritten notes, which are a little smudged and drawn from various books and journals, I have the definitions     $$f(n) = \prod_{p \mid n} p$$ is the product of primes $p$ that divide $n$   and      $$g(n) = \prod_{p \mid \mid n} p$$ is the product of primes $p$ that divide $n$ exactly   I underlined "exactly." I think those are $f$ and $g$, or they could be Greek letters, I'm not sure. This is a bit of notation I thought I copied from a Fib. Quart. article by Jean Konincke, but when I got the librarian to fetch me the article, I saw that while it does mention divisibility, it doesn't seem to distinguish between "plain" divides and "exact" divides. Also, I had the wrong author's name, though the right title.  Actually, I'm confused as to the meaning of those terms. Take $n = 28$. Wouldn't $f(n)$ be $14$ and $g(n)$ be $28$? But then what's the point of that? $f(n)$ is just the squarefree kernel of $n$, and $g(n)$ is just an identity function (presumably these are just applied to positive integers).  I'm missing something here, I must have neglected to copy the important clarifying details. Help anyone?

I am currently reading the paper "PRIMES is in p" and have come across some notation that I don't quite understand in this following sentence     Consider a prime $q$ that is a factor of $n$ and let $q^k || n$. Then...   What does the notation $q^k || n$ mean here?  The full paper can be found  and the notation described above is used in the proof on page 2


Is the use of "not to mention getting a promotion" in the following sentence natual? If not, how to rewrite it? The main idea is: working hard is a must to have a job, getting a promotion needs to work even harder.     It is a hard fact that only diligent employees who devote the majority   of their time and energy on sharping professional skills can get   themselves employed, not to mention getting a promotion

For brevity, I symbolise synonymity with ≈.  So  X ≈ Y  means  X and Y are synonyms.  From : let alone ≈ not to mention  From :  let alone ≈ much less ≈ still less.  Are these all synonyms? What are the similarities and differences between each?


Google search has interesting mechanics once you enter a keyword it remembers the keyword. The question is how are you able remove the keyword which will appear after you start typing the first character?

Ok... so this is embarrassing.  I typed in "boobs" on EncyclopediaDramatica's search because, well, it's a really funny page.  But now I've got a problem... EVERY TIME I click a search field in Chrome now, it shows "boobs" as the first suggestion in the drop down!  This is not really socially acceptable as this laptop goes with me everywhere and Chrome is my primary browser.  Is there a way I can isolate and remove just that one entry?


I saw this movie a while ago and I remember a lot of images of huge desert landscapes and a man/woman fighting over the control of a huge truck (or maybe they had a truck each and were fighting over something else, I can't remember straight).   The truck was an armored vehicle roughly the size of a semi-truck without the trailer. The movie should have been relatively recent but seemed to be quite low-budget.  I believe it should have been a post-apocalyptic movie but I can't really remember anything about the story, just those images.  The footage of the movie had colour editing and it was saturated in tones of orange, it should be easy to identify by this colour treatment since it's something you don't see very often.

I am trying to identify a sci-fi movie from the 80's or 90's, with the following parameters:  Setting:    Scenes of a red desert planet   Culture:    Either people roam fairly solo and try to acquire resources to survive, or you live in a weird society where if a stranger is captured he needs to play in a game of fight to the death.  Mobility:      One foil character has a giant battle-bot-looking tank as his form of transportation through the desert. Protagonist has a car that has a plastic half bubble on top to look out from.   Robot:      The protagonist runs around in the beginning of the film with a female robot/android whose face is melted off after it has acid touch its face.(This scene happens next to the protagonist's rover)  Love interest:      Somehow protagonist comes across female protagonist in desert. She smells really bad and is hungry. They sleep outside, and he tells her to sleep away from him. He uses a thermal blanket(the first I ever saw in my life). She wakes up next to him, smelling horrible. He bathes her in some water hole they find(as if water were not scarce and they could just waste water.)   Pupa monsters:      Scene where they are in a building and they are trying to get out. They come across a room that is white, in which multiple giant, white, snot, pupa are hanging securely from the ceiling. Through curiosity, they disturb them, and now they have to get out of that room fast.  Boss Antagonist:      Pervert bionic man, that is actually attached to a giant robotic arm, as only form of movement. He is in black and has a pale bald head as his most human looking part.


I was just wondering if you can have a swap partition that is too big. If yes, when is a swap partition too big? What are the downsides/ill-effects of having a swap partition that's too big (even if I have plenty of disk space)?  If no, what are the benefits of having more than the recommended swap space?

I read many places that the rule of thumb for swap space is to double the amount of physical RAM. However, 32 GB does seem a LOT. Do I need that much? Do I need it at all with this high amount of physical RAM?


The charge in electromagnetism seemingly plays the same role like mass in the Newtonian mechanics.But why we define the current unit (Ampere) in  as the fundamental rather than charge unit?

I always thought of current as the time derivative of charge, $\frac{dq}{dt}$. However, I found out recently that it is the ampere that is the base unit and not the coulomb. Why is this? It seems to me that charge can exist without current, but current cannot exist without charge. So the logical choice for a base unit would be the coulomb. Right?


Say $X_0, X_1$ and $X_2$ are independent Poisson random variables with means $\lambda_0, \lambda_1$ and $\lambda_2$, respectively. Define $Y_1 = X_0+X_1$ and $Y_2 = X_0 + X_2$.   How would I find an expression for the joint probability of $Y_1$ and $Y_2$, that is, $P(Y_1=y_1, Y_2=y_2)$?  Approaches I have attempted, unsuccessfully:  1) $P(Y_1=y_1, Y_2=y_2) = P(X_0+X_1=y_1)*P(X_0+X_2=y_2|X_0+X_1=y_1)$ but I am unable to solve the second probability.  2) Trying to set up a multivariate transformation with $Y_1 = X_0+X_1$ and $Y_2 = X_0 + X_2$, but I get stuck when trying to write $X_0, X_1$ and $X_2$ in terms of $Y_1$ and $Y_2$ to get the Jacobian.

I've recently encountered the bivariate Poisson distribution, but I'm a little confused as to how it can be derived.  The distribution is given by:  $P(X = x, Y = y) = e^{-(\theta_{1}+\theta_{2}+\theta_{0})} \displaystyle\frac{\theta_{1}^{x}}{x!}\frac{\theta_{2}^{y}}{y!} \sum_{i=0}^{min(x,y)}\binom{x}{i}\binom{y}{i}i!\left(\frac{\theta_{0}}{\theta_{1}\theta_{2}}\right)^{i}$  From what I can gather, the $\theta_{0}$ term is a measure of correlation between $X$ and $Y$; hence, when $X$ and $Y$ are independent, $\theta_{0} = 0$ and the distribution simply becomes the product of two univariate Poisson distributions.  Bearing this in mind, my confusion is predicated on the summation term - I'm assuming this term explains the the correlation between $X$ and $Y$.  It seems to me that the summand constitutes some sort of product of binomial cumulative distribution functions where the probability of "success" is given by $\left(\frac{\theta_{0}}{\theta_{1}\theta_{2}}\right)$ and the probability of "failure"  is given by $i!^{\frac{1}{min(x,y)-i}}$, because $\left(i!^{\frac{1}{min(x,y)-i!}}\right)^{(min(x,y)-i)} = i!$, but I could be way off with this.  Could somebody provide some assistance on how this distribution can be derived? Also, if it could be included in any answer how this model might be extended to a multivariate scenario (say three or more random variables), that would be great!  (Finally, I have noted that there was a similar question posted before (), but the derivation wasn't actually explored.)


I'm running multiple linear regression with 6 variables. For one of the variables D, the correlation coefficient between D and the response Y is - 0.34. But in the regression output, the coefficient for D is +8.9.   What is the best way to interpret D's influence on Y? Is it safe to assume that there's some confounding going on so I can ignore the fact that the correlation coefficient is negative and thus say increasing D will result in increasing Y?

The coefficient of an explanatory variable in a multiple regression tells us the relationship of that explanatory variable with the dependent variable. All this, while 'controlling' for the other explanatory variables.  How I have viewed it so far:  While each coefficient is being calculated, the other variables are not taken into account, so I consider them to be ignored.   So am I right when I think that the terms 'controlled' and 'ignored' can be used interchangeably?


For example, which is correct:     The robot can then compute it's coordinates.   or     The robot can then compute its coordinates.   What's the rule here? It seems a little inconsistent.

I know that its is the possessive and it's is the contraction, and know when to use them.  But why doesn't the possessive have an apostrophe?   "The bear's eating a fish." [contraction] "The bear's coat is brown." [possessive] "It's eating a fish." [contraction] "Its coat is brown." [possessive] "One's eating a fish." [contraction] "One's coat is brown." [possessive]    lists the etymology as "From  + ", and  says that this is actually the original form:     Originally written it's, and still deliberately spelled thus by some writers until early 1800s.   So what happened to the apostrophe?  When did people stop using it, and why did they?  It seems that it's as the possessive is more natural, as most people do this until they're taught that it is wrong (or even after).  Update: Online Etymology Dictionary has been updated to include two potential explanations:     The apostrophe came to be omitted, perhaps because it's already was established as a contraction of it is, or by general habit of omitting apostrophes in personal pronouns (hers, yours, theirs, etc.).   Can anyone back up either of these arguments?  The possessive one's still has the apostrophe, despite these.


I am getting very strange compilation problems after using the \cal command in a very simple setup:  \documentclass[12pt]{article}  \usepackage{amsmath} \usepackage{amsfonts}  \newcommand{\Pp}{\mathbb{P}} \newcommand{\Ee}{\mathbb{E}} \newcommand{\Prob}{\text{P}}  \title{STAT 535 Homework 3} \author{Sheridan Grant} \date{\today}  \begin{document}  \maketitle  \section{Theorem 2.2.8 and Proposition 2.2.9}  Here is normal stuff: $n + b$  Now I'll try to do something with ``cal'': $\cal{R}_n$  What? $\cal{R}_n \sim \frac{n + b}{1}$  \end{document}   The result (compiled with latexmk -pdf) is:   The problem is fixed if I switch to {\cal R}_n or \mathcal{R}_n but I don't understand why; I've been able to use \cal in the \cal{R} manner in the past without problems. I figure it might be nice to have an explanation easily available on here...

Why does \cal{M}_n give “M>” in parts of my LaTeX file and works correctly in other parts?


If I have a magnet and an iron object, then the object would move towards the magnet, and the energy required to do so is stored in the magnet itself, but there can't simply be an infinite amount of energy, so do magnets eventually "run out" of magnetism, and where does the magnet get the energy from in the first place?

When a permanent magnet attracts some object, lets say a steel ball, energy is converted into for instance kinetic energy and heat when attraction happens, and they eventually collide. Does this imply that energy is drawn from the magnetic field and the magnet is depleted, making it weaker and weaker for each magnetic attraction performed?  (if the answer requires Quantum Mechanical explanations, please elaborate :))


In regards to give a solution for , I tried to simplify my code presented in the answer to use RTTI and the typeid() function to retrieve a class name:  #include <iostream> #include <string> #include <typeinfo>  struct IDriver {     // Public virtual API:     virtual void func1() = 0;     // ...     virtual ~IDriver() {} };  class SpecificDriver;  template<typename Derived> class Driver : public IDriver { public:     Driver() {          std::cout << typeid(*this).name() << std::endl;          std::cout << typeid(Derived).name() << std::endl;     }       virtual ~Driver() {} };  class SpecificDriver : public Driver<SpecificDriver> { public:     // Public virtual API:     virtual void func1();     virtual ~SpecificDriver() {} };  int main() {     SpecificDriver sd; }    results in a linker error:  /tmp/ccXnTrfe.o: In function `main': main.cpp:(.text.startup+0x4f): undefined reference to `typeinfo for SpecificDriver'   Why does this result in an undefined reference error for the typeinfo rather than the missing func1() definition (where it's not even used BTW)?     Interestingly enough when I remove all the virtual stuff, it works just fine:  #include <iostream> #include <string> #include <typeinfo>  template<typename Derived> class Driver { public:     Driver() {          std::cout << typeid(*this).name() << std::endl;          std::cout << typeid(Derived).name() << std::endl;     }   };  class SpecificDriver : public Driver<SpecificDriver> { };  int main() {     SpecificDriver sd; }   Output:  6DriverI14SpecificDriverE 14SpecificDriver     So is this really related to ?

I just ran across the following error (and found the solution online, but it's not present in Stack Overflow):     (.gnu.linkonce.[stuff]): undefined   reference to [method] [object   file]:(.gnu.linkonce.[stuff]):   undefined reference to `typeinfo for   [classname]'   Why might one get one of these "undefined reference to typeinfo" linker errors?  (Bonus points if you can explain what's going on behind the scenes.)


I have already checked this post  but it doesn't seem to fit to my issue.  I want to merge multiple lists together to get a tuple for each multiplication. So let's say:  listA = ['a', 'b', 'c', 'd'] listB = [ 1 ,  2 ,  3 ,  4 , 5 ] listC = ['!', '?', '=']   The lists do not have the same length. My desired result would be:  result = [('a', 1, '!'), ('a', 1, '?'),  ('a', 1, '='),  ('a', 2, '!')...   As far as I got it, the zip() functions only joins two elements to a list together with the same index which is not what I want.

How can I get the Cartesian product (every possible combination of values) from a group of lists?  Input:   somelists = [    [1, 2, 3],    ['a', 'b'],    [4, 5] ]   Desired output:  [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...]


I'll not have access to my PC in a few days, and since I have a 270 consecutive streak going on over at SO I was wondering the following:  Does the Android SE app qualify for consecutive access? And if so, what do I need to do to gain the consecutive access to a particular SE site?  I can see an issue with that with the app you access the whole SE platform, but not your specific sites.  I haven't been able to find any up to date FAQ, apart from meta questions of a year old, hence I'm requesting the current status.

This isn't directly related to the app, but probably more on the APIs it's using. The last seen on the profile page doesn't seem to reflect that I'm actively using the Android app, or taking actions. I was able to vote on items and the last seen property on the profile page said I was last seen 50 minutes ago, when I was using a computer.  I'm assuming it won't count as a visit for the Enthusiast and Fantic badges either. I don't want someone angrily posting on Meta swearing they used the app for a day, yet they lost the consecutive days and has to prove it by showing they voted for something (we're probably far from this situation since it's alpha...)


I am usign the baposter enviroment to create a scientific poster. My question is that I am attaching images of different sizes in  \begin{center}     \includegraphics[scale=0.18]{fig1.pdf}     \includegraphics[scale=0.22]{fig1a.pdf}     \includegraphics[scale=0.22]{fig2a.pdf}     \includegraphics[scale=0.22]{fig2b.pdf}     \includegraphics[scale=0.22]{fig2c.pdf}    \captionof{figure}{\tiny{}} \end{center}   and the issue is that I would like to put the figures fig2x.pdf a little bit higher compared to where they are (such that the space between the text and these set of figures is lesser compared to the other two figures).

I want to create a table with multiple rows of the following form: a cell that contains text and then multiple cells that contain images. The text should be vertically centered and the contents of every column should also be centered horizontally. I am aware of the m{} column type but somehow this seems to fail if an image is contained in the row and determines the row height. Any ideas?  Minimal example:  \documentclass{article} \usepackage{graphicx} \usepackage{array} \begin{document} \begin{figure} \begin{tabular}{m{3cm}c} (a) & \includegraphics{some_picture.pdf}\\ \end{tabular} \end{figure}  \end{document}


( has a different focus than this. That one explicitly asks solely for the rationale behind the current design. Arguing about the design, both in favor and possibly against it -- is thus prohibited there as off topic.)  Noting that accepting and upvoting are intersecting functionalities -- both mark an answer as useful -- I wonder if accept marks should count towards tag scores as well. The purpose of a tag score is to measure a user's contribution to the tag, and they definitely both signify such contribution.   Here's a litmus test for if an acceptance mark is fundamentally different from an upvote or not: "Would you think that a vote by the OP should be excluded from tag score if there was no separate acceptance mechanic?"   One could argue that an OP would upvote a useful answer as well anyway, but this is by no means mandated by the system. Moreover, if an OP is a novice, they even can't upvote at all -- which thus unfairly disadvantages .  AFAICS, the primary motivation for the current state of affairs is solely the implementation simplicity -- which is by no means a justification for perpetuating a flaw.  Sure, if an OP both upvoted and accepted, it should probably still count as one point. This is fairly easily doable, e.g. by only counting the accept mark if the OP is not among the upvoters (or by subtracting one if they are).

For the 400 votes tag badge, does it take into consideration answers marked as the accepted answer?  The description indicates it does not.  I would think an accepted answer would be worth more, or at least the same amount, towards getting a tag badge than just a simple upvote?  Lots of users mark answers as accepted and do not bother giving an upvote since the 15 points is like and upvote and a tip.  So it's possible for a user to have 400 accepted answers with no upvotes and not get a badge where a user with 400 answers (which could be right or wrong) with a single upvote and no accepted answers ever would get the badge.  Just seems a little odd or does accounting for accepted answers make the badge calculation too complicated / slow?  Edit: Questions you ask and submit an answer to shouldn't be counted towards the total for accepted answers.  Edit: It just seems to me that the most important thing in the system is an accepted answer yet there are no badges for achieving more than one accepted answer.  If up votes were more important, and therefore far more worthy of a badge, then why do the top voted answers not appear above the accepted answer?  When it come to badges, accepted answers are second class citizens as compared to a possibly random upvote.   I have seen many upvotes on completely wrong answers but rarely do I see an accepted answer that was completely wrong.


Is there any subset of the natural numbers that is definable but not recursively enumerable?

Can someone give me an example if a not recursively enumerable set $A \subseteq \mathbb{N}$ ?   I came up with this question, when trying to show, that there exist partial functions $f: \mathbb{N} \rightsquigarrow \mathbb{N}$ that are constant for some value (when they halt), but not recursive:  Since I know that a set is recursively enumerable iff it is the domain of a partial recursive function, to find an example of such a set, I would have to show that no matter which partial function whose domain is $A$ I would take, it wouldn't be recursive. I couldn't show the above, although it seems intuitively to be true to me. But since I could not show it and the existance of such a counterexample is even stronger (because I would have to show that a whole class of those partial functions aren't recursive) it made me wonder, wether such a set can exist.


In Dummit and foote, for the proof for the simplicity of $A_5$, it claims that it is "easy" to see that $(12)(34)$ doesn't commute with any odd elements in $A_5$ and it commutes with $(13)(24)$, I have absolutely not idea why this is considered "easy", what method did the author use to quickly see this?  It further claimed that "it follows that $|C_{A_5}((12)(34)| = 4$, which again, I don't see how it follows from the above statement without also checking other two cycles do not commute with $(12)(34)$.

On Dummit's Abstract Algebra on p. 128, it says:     "It is easy to see that $(1 2)(3 4)$ ... does not commute with any non-identity element of odd order in $A_5$."   But I don't find it easy.  Any help, please?


I'm trying to get a value that's between, next or before of a comma.  For example, my string is: "value1,value2,value3,value4", sent to JS through PHP (ajax)  How do I just get value2 and value4 inside the .js file?

I have this string  'john smith~123 Street~Apt 4~New York~NY~12345'   Using JavaScript, what is the fastest way to parse this into  var name = "john smith"; var street= "123 Street"; //etc...


I've been looking through a tutorial and book but I can find no mention of a built in product function i.e. of the same type as sum(), but I could not find anything such as prod().  Is the only way I could find the product of items in a list by importing the mul() operator?

Python's  function returns the sum of numbers in an iterable.  sum([3,4,5]) == 3 + 4 + 5 == 12   I'm looking for the function that returns the product instead.  somelib.somefunc([3,4,5]) == 3 * 4 * 5 == 60   I'm pretty sure such a function exists, but I can't find it.


I'm from Tunisia and I got a Schengen visa from the Austrian Embassy for 28 days, the “duration of stay”, and the number of entries is 1 and the validity of the visa is from 02/08/2015 to 13/09/2015. So I have to stay only 28 days. I booked a fly ticket My plane is going to land in Vienna at 18h sunday the 9th of August and my departure will be at 18h30 Sunday the 6th of September.  That's mean the arrival is on Sunday the 9th of August, and the departure is Sunday the 6th of September.  It is looking like I'm going to spend 29 days that's mean one day more than “duration of stay” but I'm going to spend 28 days and 30 minutes. Is there any problem or I have to change my ticket?

Can anyone tell me if the 90 days is in fact 90 nights? Can you leave the Schengen area on the 91st day? Or are you only allowed 89 nights and you are required to leave on the 90th day?


Is there any convention what to use as placeholder for contact forms?   I came up with two possible options. One is using a fake name as placeholder, with a label on the side of the input. The other one is using the description of the input as placeholder.          – Wireframes created with   The version with the labels seems to be more clear, because you still have the description along with the field. But the placeholder fake name seems to be outdated.  The other version is neat and fits in occasions where there is not much space.  Are there some guidelines to follow? Or is this just a subjective decision?

I am familiar with research on label placement to the left or above. I tend to go with right justified with the label to the left of the field for my form designs.   However, inline placeholder text is trending and it does further reduce page clutter. Is there any research out there supporting its use? Has anyone conducted usability studies on their forms that they can share?    Research Links:


Let $V$ be the vector space of all functions from $\mathbb{R}$ into $\mathbb{R}$ which are continuous, i.e, the space of continuous real-valued functions on the real line. Let $T$ be the linear operator on $V$ defined by  $(Tf)(x)$ := $ \int^{x}_{0} f(t) \ dt $.  Prove that, $T$ has no characteristic values.

I would like to solve the following exercise:  Let $V$ be the space of continuous real-valued functions on the real line. Let $T$ be the linear map on $V$ defined by $$ (Tf)(x) = \int\limits_{0}^{x}f(t)dt.$$ Prove that $T$ has no eigen-values.  Here is my attempt:   Suppose on contrary, $T$ has an eigenvalue say $\lambda$. Then there is a non-zero $f\in V$ such that $$ Tf= \lambda f$$ i.e., for all $x\in \mathbb{R}$, $$ \int\limits_{0}^{x}f(t)dt= \lambda f(x) $$ i.e., for all $x\in \mathbb{R}$, $$ f(x)-f(0)= \lambda f'(x)$$ i.e., for all $x\in \mathbb{R}$,$$ (f(x)-f(0))^{\lambda}= e^{\mu x}$$ Take $x=0$, we get $$ 0=e^{0}=1.$$ Therefore $T$ has no eigenvalues.  Is the above argument correct?


I want the code to search for a word mid sentence and see if its first letter is lower case.   If it is, than it makes it upper case. For example: John hates using c++ daily, and it would change the C in c++ to uppercase.  Here is the code  #include <iostream> #include <string> #include<cstdlib> #include<fstream> using namespace std;  ifstream in_stream; ofstream out_stream;  int main() {     in_stream.open("in.dat");     out_stream.open("out.dat");     char s[256];     in_stream>>s;     s[0] = tolower(s[0]);     out_stream<<s;      in_stream.close();     out_stream.close();     system("Pause");     return 0; }

I want to convert a std::string to lowercase. I am aware of the function tolower(). However, in the past I have had issues with this function and it is hardly ideal anyway as using it with a std::string would require iterating over each character. Is there an alternative which works 100% of the time?


As far as I know, since the earth is spinning, centrifugal force should be throwing you off the earth. However, gravity counteracts that by being a stronger force. So if you stood an object with the exact mass and size of earth, but it wasn't spinning, would you perceive gravity to be stronger?  If this is true, wouldn't an object outside of the atmosphere not in orbit of the earth have greater acceleration than an object in orbit?

Let us say a block of mass is placed on the surface of earth. Then while drawing the forces on that body, we say:   Force $F = mg$ acting towards the center of Earth. Normal reaction $N$ offered by the surface of Earth.   If no other forces are acting, we say $F=N$. But what about the centrifugal force $m\omega^2R$ . Why don't we ever bring that into picture? What am I missing?


I’m attempting to run a regression and test whether the slope is equal to 1. Most statistical packages only test of it's equal to zero. Is there a way to bypass this ? I’ve SPSS and minitab and can run the typical regression.  Will the regression coefficients and SE be the same irrespective of whether I’m testing (slope = 0 or 1)? Meaning are the t stats and p values the only things that depend on the hypothesis.

In R, when I have a (generalized) linear model (lm, glm, gls, glmm, ...), how can I test the coefficient (regression slope) against any other value than 0? In the summary of the model, t-test results of the coefficient are automatically reported, but only for comparison with 0. I want to compare it with another value.  I know I can use a trick with reparametrizing y ~ x as y - T*x ~ x, where T is the tested value, and run this reparametrized model, but I seek simpler solution, that would possibly work on the original model.


I would like to modify (as simply as possible) the frametitle color of my frames but without changing anything else : I currently use the theme CambridgeUS and basically I would like to modify my frametitle color as it is in the Warsaw theme. I join you my current code and images to show you what I exactly want.  Wrong color but good theme :      \documentclass{beamer}      \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[francais]{babel}      \definecolor{rougefonce}{RGB}{180,1,1}     \definecolor{bleufonce}{RGB}{30,1,135}     \definecolor{vertfonce}{RGB}{0,90,0}     \definecolor{bleuleger}{RGB}{220,220,235}     \definecolor{rougeleger}{RGB}{235,220,220}     \definecolor{vertleger}{RGB}{220,235,220}     \definecolor{bleutitre}{RGB}{0,0,80}     \definecolor{bleuroi}{RGB}{0,0,180}      \usetheme{CambridgeUS}     \usecolortheme{whale}      \setbeamercolor{frametitle}{fg=white, bg = bleutitre}     \setbeamercolor{author in head/foot}{bg = black, fg = white}     \setbeamercolor{title in head/foot}{bg = bleufonce, fg = white}     \setbeamercolor{date in head/foot}{bg = bleuroi, fg = white}     \setbeamercolor{section in head/foot}{bg = black, fg = white}      \usefonttheme[onlymath]{serif}     \title{Test with wrong color}     \author{Bob}     \date{\today}     \institute{}      \begin{document}     \section{Test}     \begin{frame}{Wrong color}     \maketitle     \end{frame}        \end{document}     Right color but wrong theme :      \documentclass{beamer}      \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[francais]{babel}      \usetheme{Warsaw}     \usefonttheme[onlymath]{serif}     \title{Test with right color}     \author{Bob}     \date{}     \institute{}      \begin{document}     \section{Test}     \begin{frame}{Right color}     \maketitle     \end{frame}      \end{document}

In Beamer, I used the theme Ann Arbor. I want to achieve this type of gradient color on my title frame.    It seems that I have trouble changing the frame title background to a gradient color. I would like this part (encircled in red, with an arrow) to be changed to a cyan color going to black. [Please ignore the encircled block]. How do I do this? Thank you.  \documentclass[pdf]{beamer} \mode<presentation>{\usetheme{AnnArbor}} \usecolortheme{whale} \setbeamercolor{section in toc}{fg=red} %%%  \setbeamercolor{structure}{fg=cyan!80!black} \setbeamercolor*{block title example}{fg=blue!50,bg= blue!10} \setbeamercolor*{block body example}{fg= red,bg= blue!5} \usefonttheme{structuresmallcapsserif}  \setbeamertemplate{footline}[page number]{}   \setbeamercolor{headline}{fg=blue!90!black,bg=cyan!90!black} \setbeamercolor{palette primary}{fg=white,bg=cyan!90!black} \setbeamercolor{palette secondary}{fg=white,bg=cyan!90!black} \setbeamercolor{palette tertiary}{fg=white,bg=black} \setbeamercolor{frametitle}{fg=white,bg=cyan!50!black} %%%%   \title{Some Random Stuff} \subtitle{First time to code xD}  \begin{document} \begin{frame}     \titlepage \end{frame}    \begin{frame}{Testing} \frametitle{Test} Blah blah\\   \begin{block}{A block}     Some text \end{block}  \end{frame}  \end{document}


I am using TexLive 2015 with TexStudio. I am editing my bibliography with Jabref.   I recently updated TexStudio and face bibliography compilation troubles since then.  When I compile, the log file indicates: "empty bibliography" and "undefined references". I guess this is due to an error in the path between Jabref and texstudio or a wrong setting in TexStudio. I changed the default bibliography tool in Texstudio to put Biber rather than Bibtex but the compilation doesn't work whatsoever. My JabRef-generated literature file (thesegain2017.bib) is saved in the same folder than my tex-files.   My knwledge stops right here. Would someone have any idea on how to work this out? Many thanks !  Below my minimal working example:  \documentclass[french]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage[backend=biber,style=verbose-trad1, ibidtracker=context]{biblatex} \renewcommand{\mkibid}[1]{\emph{#1}} \usepackage{csquotes} \usepackage[perpage]{footmisc} \addbibresource{thesegain2017.bib} \usepackage[a4paper]{geometry}  \usepackage[english,francais]{babel}  \begin{document}  Blalalblla\autocite{Bourdieu1979}  \printbibliography  \end{document}   Here is the .bib file:   % This file was created with JabRef 2.10.  % Encoding: UTF8  @Book{Bourdieu1979,   Title                    = {La distinction, Critique sociale du jugement},   Author                   = {Bourdieu, Pierre},   Year                     = {1979},   Location                 = {Paris},   Pagetotal                = {670},   Publisher                = {Les éditions de Minuit},    Owner                    = {Mailys},   Timestamp                = {2014.05.14}  }   In the .bbl file I found that:   % $ biblatex auxiliary file $ % $ biblatex bbl format version 2.5 $ % Do not modify the above lines! % This is an auxiliary file used by the 'biblatex' package. % This file may safely be deleted. It will be recreated by % biber as required.  \begingroup \makeatletter \@ifundefined{ver@biblatex.sty} {\@latex@error {Missing 'biblatex' package} {The bibliography requires the 'biblatex' package.}   \aftergroup\endinput} {} \endgroup   But in the .blg file, I found that:  [0] 05015a72.pm:324> INFO - This is Biber 2.1 [0] 05015a72.pm:327> INFO - Logfile is 'my file.blg'

I'm trying to use biblatex and when I compile my document I get an error like the following:  Windows  data source C:\Users\<username>\AppData\Local\Temp\par-5061756c\ cache-890efc00b3ca6b775c7d44a325c1349fb2a3a3bd\inc\lib/Biber/LaTeX/recode_data.xml not found in .   Mac  data source /var/folders/v2/rld0ls7d2935gkvqv5hfr1x00000gn/T/par-616c616e/ cache-cdd483146f82a9655ce063f848d5139480fbf872/inc/lib/Biber/LaTeX/recode_data.xml not found in .   Linux  data source /tmp/par-6963617269756d/cache-f37ab610b7d79b2720a8ee3732849c6821705520 /inc/lib/Biber/LaTeX/recode_data.xml not found in .


Question  How can I save "settings" so that they can be used again after the application has been closed?  When I say settings I mean different properties of the controls on my form.  What is the easiest and most appropriate method? I've read you can save to the system registry or a xml file?   Background  I have a form that creates a row in a Table that changes depending on what control is set or change.  I would like to be able to save different configurations and display them in a combobox for repeated use.   Example   The end user fill in all textboxs and ticks checkboxes.  They then click add to favourites They add a favourite name and save The save is then permanently visible in the favourites combobox.   My form

What I want to achieve is very simple: I have a Windows Forms (.NET 3.5) application that uses a path for reading information. This path can be modified by the user, by using the options form I provide.  Now, I want to save the path value to a file for later use. This would be one of the many settings saved to this file. This file would sit directly in the application folder.  I understand three options are available:   ConfigurationSettings file (appname.exe.config) Registry Custom XML file   I read that the .NET configuration file is not foreseen for saving values back to it. As for the registry, I would like to get as far away from it as possible.  Does this mean that I should use a custom XML file to save configuration settings?  If so, I would like to see code example of that (C#).  I have seen other discussions on this subject, but it is still not clear to me.


On my iPad 2 (running iOS 9) there's a "Virus Detected" email popping up that I can neither delete or change. No matter what I do, the "Virus Detected" email keeps opening on my screen whenever I attempt to use Safari.  I've attempted to delete the email, change the email and to close Safari but the email keeps returning and makes using the browser impossible. I have no intention to either call the provided phone number or sending this email as it directs me to do. The email is as follows:  To: foo@example.com  Subject: Warning! Virus Detected! Immediately Call Apple Support +1-800-876-6855. Your credit card details and banking information. Your e-mail passwords and other account passwords.Your Facebook, Skype, AIM, ICQ and other.Call Apple Support +1-800-876-6855. Your private photos, family photos and other sensitive files.Your webcam could be accessed remotely by stalkers with a VPN virus.  CC: bar@example.com  Message: Apple Tech Support  How do I remove this email and regain access to my browser?

When I went to a website in Safari, it opened up another website with popups claiming my iPad has a virus.  I deleted some of my apps to try and get rid of the virus, but the popup keeps showing up every time I open Safari. Can someone help me?


I have a string with 100 characters and I want to make a code that separates and stores substrings every 10.  def windows(srt):     i = 0     n = 10     str1 = ''     for x in range(i, n):         str1 += srt[i:n]         i += n         n += n        return str1  string = 'ashusdasddsasdsdaisdauihdsuaudhsuiahcnkjacnlskndjkasdhklahcjkchaljkchskjlchaksjchjkahcsjkchalkjhscjklhaskljchlaksjhckjalshcjkaschsjklchajklhcsjkhcakljchkacjs' x = windows(string) print(x)

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


I want to know how to review guides that were shown to me when I  got a certain reputation. For example:   how to use '@' sign how to flag in posts how to edit posts how to accept answers   Some things are not shown in the FAQ sections. I don't want to search Meta for answers to questions, I want to review (or re-study.) Is there any way to get this guide again?   Specifically, I don't remember how to reply messages multiple guys by one message. I want to review (re-study) the guide for using @. I know if I want to review badges I can use my Notifications. What about for my other privileges?     UPDATE ( due to toolbar changes )   How can I view my privious privileges on meta site ?

on Ask Different.  We've been working hard on ways to help improve the experience of new users, and one of the best ways to do that is to help teach them the basics about how our sites work before they run afoul of them.  This will improve their odds of having a good first experience, speed up how quickly they can become contributing members of community, and head off the frustrations they sometimes have as a result of crashing into one of the many things that make us... different.  So We've just rolled out the first version of our new "quick start" guide. It's designed to help teach new users the absolute minimum they need to know to get started and have a good experience. How we're different from discussion boards, the basics of rep, what you can do right off the bat, why some questions aren't allowed, etc.  We spent a LOT of time on trying to get to the absolute minimum length that will still cover the key things new users need to know to be successful, but if you have feedback, please share it.