What's the default login for the Windows XP IE6 VPC image supplied by Micosoft?

I downloaded the Microsoft-supplied  image for Windows XP /  testing from  and tried to login using the documented credentials of IEUser / Passw0rd!   This does not work. What are the correct default login credentials?


I have a Zip archive containing a single password-protected file file.txt.  The encryption is "ZIP 2.0 Default Encryption" (ZipCrypto).  I know what kind of text (sentences) the "file.txt" contains.    Is it possible to use known-plaintext in that case? Or, Do I need exactly a second known encrypted file to use this type of attack?


Relativistic time dilation / length contraction

I follow that time dilates / distance contracts as you move faster, but sees anomalies in what happens when you slow down again. The time changes are supposedly permanent, with an identical twin ageing a lot more than the twin brother in a rocket accelerating to relativistic speeds... The problem is: Suppose we send the one twin (call him the astronaut-brother) up in a rocket, circling the earth for a day, going close enough to light-speed so that supposedly fifty years pass for the ground-logged twin. Now the rocket slows down and lands. The astronaut brother supposedly finds his brother fifty years older than himself!  BUT we know during this process only one day passed for the observer (ground-logged brother). I don't see how the astronaut-brother can possibly find his twin, tens of years older in this scenario, once they're reconciled back in the same time frame?


Java/Android- Convert InputStream to string

I am reading a constant stream of data coming from a device via Bluetooth. I'm wondering how I can convert this data to a string and print it out?  The buffer will contain an ASCII string but when I run it it prints out integers, i would like to be able to see the string.    while (true) {                 try {                     //read the data from socket stream                     if(mmInStream != null) {                        int input = mmInStream.read(buffer);                         System.out.println(input);                     }                     // Send the obtained bytes to the UI Activity                 } catch (IOException e) {                     //an exception here marks connection loss                     //send message to UI Activity                     break;                 }             }


Please help to explain meaning of  in C#

It may sound silly but I need to understand below code I saw on  YT channel. Can you explain use of <> brackets in a function.         public async Task<List<T>> LoadData<T, U>(string sql, U paramertes)     {         string connectionString = _config.GetConnectionString(ConnectionStringName);          using (IDbConnection connection = new SqlConnection(connectionString))         {             var data = await connection.QueryAsync<T>(sql, paramertes);             return data.ToList();         }     }  I cannot understand how does T, U generic return types and parameters are defined in <> while defining LoadData<T, U>() . I love watching this YT channel and have learned alot but cant figure this out. sorry for being silly


Confused about proper nouns like Dad and Mom

Im confused because well people say that sometimes you use a capital letter in mom and dad. So when do you use capital letters for mom and dad?


After some tutorials this is my first own object in blender -a race track for unity. The main object should be white, but the road itself should be red, without creating 2 objects. So I marked all the road-faces and assigned them to a new Material. But somehow the white color shines through depending on the camera angle.. even if I remove the white material, the grey default color also shines through. If I separate the road to an own object, it works fine -but I don't think that this should be the solution :/  (Object Mode)   (Edit Mode)   (Face Orientation)   (Unity)


Using Leibniz Integral Rule on infinite region

I am trying to take the derivative with respect to $a$ of some function $I(a)=\int_{0}^{\infty}f(a,x)dx$.  I would like to make sure that I am using the  correctly.  Various web sources indicate a set of conditions that must hold for $f(x,a)$ and $\frac{\partial f(x,a)}{\partial a}$ when integration is done over infinite region.  From reading  (see Theorem 10.3 on page 13) the conditions that $f(x,a)$ and $\frac{\partial f(x,a)}{\partial a}$ must obey are:   $f(x,a)$ and $\frac{\partial f(x,a)}{\partial a}$ are continuous over $x\in[0,\infty)$ and around $a$ that we are interested in. There exists an integrable function (over $x$) $g(x)$ such that $|\frac{\partial f(x,a)}{\partial a}|\leq g(x)$. There exists an integrable function (over $x$) $h(x)$ such that $|f(x,a)|\leq h(x)$.   Integrable here means $\int_{-\infty}^{\infty}g(x)dx<\infty$.  However,  seems to omit condition 3 above.  I am wondering which source is correct.  If there are "both correct", when is condition 3 necessary?


How to programmatically click a button in WPF?

Since there's no button.PerformClick() method in WPF, is there a way to click a WPF button programmatically?


What different ways can you shower with your dad?

There appear to be some unlockable game modes and some locked content (most namely noted by "Dadlockable content" and [LOCKED] in the main menu). What is it and how do you unlock it?


You have already deleted 5 of your own posts today; further deletes are blocked

I can't delete more than 5 of my own posts in a single day. Is this a bug, or intended behavior? I'm trying to clean up old, crappy posts of mine.    Similar-looking problem, but it claims to be :


Can I use Google Fonts to design my own logotype?

I am a digital marketing freelancer and I am starting to design my own logo. I would like to use two different fonts available onGoogle Fonts: "Poiret One" and "Syncopate". Therefore, I want to know if I am allowed to use them as a professional resource for my own professional career, or should I buy them instead?


Updating ubuntu server apt-get gives me - 404 Not Found

I'm trying to update a Ubuntu server and when I run apt-get update I get a number of errors like the examples below (note I added some space after http).  Err http  ://no.archive.ubuntu.com natty/main Sources  404  Not Found Err http  ://no.archive.ubuntu.com natty/restricted Sources 404  Not Found   AND  W: Failed to fetch http  ://no.archive.ubuntu.com/ubuntu/dists/natty/main/source/Sources  404  Not Found W: Failed to fetch http  ://no.archive.ubuntu.com/ubuntu/dists/natty/restricted/source/Sources  404  Not Found  I tried to replace all occurrences of http   ://no.archive.ubuntu.com/ with http  ://archive.ubuntu.com/   But seems all of these archives are gone...  Version of Ubuntu: lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 11.04 Release:        11.04 Codename:       natty  How can I cleanup this mess? Thanx for any help! j


USA visa with prior trip to Iran in previous passport: can I get away with omitting any mention of the Iran trip?

If one had been to Iran after March 2011 but one's passport was replaced in the meantime, how risky would it be to visit the USA without mentioning said trip to Iran? Let me clarify there's no sketchy motives here. The reasons for the question are: 1) Avoiding a $160 visa fee; 2) Decreasing the risk of being rejected on entry, despite having a visa just because visiting Iran could raise flags.  To put it differently: is there any way of telling you've been to Iran other than having a stamp on your passport?


I Have a toshiba c55, trying to install ubuntu 13.04 alongside windows 8.  When I get to the point where I install (partition, run along side...) it only gives me the option to wipe out the drive and do a fresh install.  it says that it doesn't recognize any existing os install.   In the bios I only have the option to disable the secure boot option.  I don't have the option to disable fastboot.  any ideas?


How do I copy to clipboard text I cut with Ctrl+U?

In an interactive shell session, how do I copy to clipboard text that was cut with Ctrl+U? Without using the mouse, obviously. Thus making it available for other GUI applications, instead of pastable only with Ctrl+Y only in the terminal where the Ctrl+U was issued.  Update: added bash tag to cover answers involving bash-only solutions.


ArcGIS Python Tool - Importing Custom Script Into ToolValidator Class

I had posted a  last week about customizing a ToolValidator class and got some very good answers.  In working with the proposed solutions, I have created a custom module that performs queries on a db, and will be called by both the ToolValidator class (to provide values for the drop-down lists) and later in the geoprocessing script (to get other parameters based on items selected in drop-down lists).  However, I can't seem to actually call the custom module in the ToolValidator class.  I have been trying to append to path with no luck.  When I try to apply these changes to the script, I get a runtime error:  [Errno 9] Bad file descriptor.  If I comment out import line, no errors.  sys.path.append('my_custom_module_directory') import my_custom_module   Many of you may be asking why don't I just implement a custom tool with ArcObjects.  The reason is that my end users don't have the privleges necessary to register ANY dlls on their computer.  UPDATE:  This was happening to me in ArcGIS 10.  Interestingly enough, I was initially appending to the path inside of the initialiazeParameters function of the ToolValidator class.  If I do the append outside (i.e., on top of) of the ToolValidator class, everything works as expected.  sys.path.append('C:/Working/SomeFolder') import somescript -------->THIS WORKS  class ToolValidator:   """Class for validating a tool's parameter values and controlling   the behavior of the tool's dialog."""    def __init__(self):     """Setup arcpy and the list of tool parameters."""     import arcpy     sys.path.append('C:/Working/SomeFolder')     import somescript -------> THIS DOESNT WORK     self.params = arcpy.GetParameterInfo()   UPDATE 2:  I think I found the true cause of my problem.  In the code snippets in this post, I have been appending what appear to be real paths (ex C:/Working/SomeFolder) to the sys.path.  In my actual ToolValidator class, I was constructing a relative path using os.path.dirname(__file__) +"\my_special_folder...".  I was anticipating that os.path.dirname(__file__) would return the path of the toolbox, since that contains the ToolValidator class.  I have come to find this is not the case.  As far as I can tell, the ToolValidator class is never actually written to a .py file, and I speculate the the this code is passed to the python interpreter in memory, so __file__ is useless, or some temp script is persisted and then execfile(path_to_script) is called, again rendering __file__ useless.  I'm sure there are other reasons I am missing as well.    Long story short, if I use a hardcoded path, the sys.append works anywhere, relative paths don't work so well in the ToolValidator class.


Analysis of queries or stored procedures which ran on the database for last 15 days

We had a site slowdown between 11.57 am and 12:02 pm on 6th Aug 2018,  To trace back the queries which were ran our production database (SQL Server Standard Edition 2012) and which might have caused a slow down , I would require help on how to find the queries which have been running on our database for last 15 days ?   If any dmv's or any other queries which can provide me the data above, kindly share.  Much Thanks!


If I multiclass into Paladin, can I use up any class's spell slots for Divine Smite?

Divine Smite: Starting at 2nd level, when you hit a creature with a melee weapon   attack, you can expend one paladin spell slot to deal radiant damage   to the target, in addition to the weapon's damage.   I'm multiclassing into Paladin/Warlock/Sorc, and I'm wondering: can Divine Smite only be used in spell slots gained specifically by taking a level in Paladin, or can all available spell slots be used?


Is there any way i can open .heic file on ubuntu? It's macos bigsurs dynamic wallpaper. Contains 8-9 wallpaper. I'm on Ubuntu20.05.


Do functions require set theory in order for us to even use them or talk about them?


I have this bit of wall here:    As you can see, it is a window frame and I want the hole between the wall and the frame to be filled. I have searched it on youtube and so on but all I can find is tutorials for creating circular holes...  Thanks for help!


MD5 hash for ubuntu .iso (14.04 through 18.10)

I cant find the MD5 hash for ubuntu-14.04.1-desktop-amd64.iso on  website.  Am I looking in the right place?


I'd like to prove that if I consider $X$ Banach space with $\dim X =\infty$, then $X$ can't have a countable Hamel's basis. Someone can give me a hint? Even a counterexample is enough. I think this can be linked with Baire's theorem about Banach's space, but I'm not really sure... Thanks!


Hatched a Grimer - caused a crash with a lot of following crashes

Hatched a Grimer which caused the game to crash during the hatch-animation. Clicking on Grimer afterwards, results in a freeze at the stats-screen of Grimer. It also results in freezes for every pokemon I caught after Grimer.  Crashed happened initially on the non-updated version. Tried a re-install (and now am updated to the latest version, i.e. 0.31.0) and still not working.  The phone I was playing on is a Sony Xperia Compact Z1.   Any ideas how to get rid of that bug ?  Bug summary: clicking on Grimer (either in the Pokédex or in the list with all your Pokémons) results in a freeze, so does clicking on the Pokémon left or right (before and behind), likely because the app is already trying to load the image of Grimer.  Update 1: I can click on any pokemon except on Grimer now without a crash but none of the images of any pokemon is loading. The images are only there when the pokemon stats are automatically showing up directly after you caught them. (see Update 3 for an explanation).  Update 2: Android Version 4.4.4  Update 3: After a few crashes and restarts, the pokemon images are back.  Update 4: After a little bit of research, I found that for  (did not work for me and for most of the other users.). Also, I , just to let them know (they might read it, maybe...).  Update 5: Bug is still there in current version (0.33.0)  Update 6: Version 0.35.0, bug is still there  Update 7 (as requested from @Vemonus): in my opinion, it is not a duplicate of  since that question was specifically addressing the arenas (when somebody else put a Grimer there) whereas here we are talking about the situation when you own a Grimer (although the origin of the bug is, of course, the same: Grimer's heavy animation).


Stop Android from "reminding" me about updates?

With the new Android update now avalible, Android has been notifying me each day about updating to the latest version. Each time I press "remind" me later and the notification goes away temporarily. Is there a way to completely remove this reminder?  I am running Android 4.4.4


Ubuntu 18.04 stuck after login in purple screen

After putting credentials laptop stuck in purple screen ... I have AMD driver so I can't install proprietery driver either... need help


References to Monty Python's Holy Grail in A Song of Ice and Fire

In A Dance with Dragons, when the sellswords of the      Windblown    talk between themselves, one says about  Daenerys' Unsullied that they are      the kind that don't break and run when you fart in their general direction.   It seems to me a reference to Monty Python's Holy Grail when the insulting Frenchman says to King Arthur and Ser Galahad:     I fart in your general direction   So, is it a reference to the Holy Grail, and are there any other references in ASoIaF to Monty Python's work?


How to prove this for a self-complementary graph?

I couldn't understand how to prove that a self-complementary graph could only have 4n or 4n+1 vertices with n being a positive integer.


PHP PDO STMT Fetch - specify table in $row variable?

I'm using PDO's fetch to return data from two tables (orders and order_items).    The issue is I would like all the order_item row data to be nested as arrays inside each order data row.  Whilst looping through the rows is it possible to do the following?  $variable = $row[tablename.columnname]   I've tried this with and without specifying an alias for in my query (SELECT * FROM orders as orders WHERE ...etc..) and I'm getting an 'Notice: Undefined index:' error. Any ideas?  EDIT - THIS QUESTION IS DIFFERENT


Note: This is not a duplicate of ! This is a more general question which links to what is the accepted answer to that one and clearly says it doesn't solve the problem. Additionally, whether Holdo knew about Crait while she was in command is not really relevant here, as there was only one direction of travel anyway.  Near the beginning of The Last Jedi, the Resistance jumps into hyperspace to get away from the First Order. It seems reasonable to assume they jumped to a random, unpredictable location in deep space to lose the First Order and regroup. There seems to be no plan for further action at this point. These points are evidenced by the following conversation:     FINN: We're really nowhere.      [...]      FINN: Alright, so until she gets back, what's the plan?      LEIA: We need to find a new base.   Immediately after, First Order ships catch up. As a result of the confrontation, there's only one thing the Resistance can do: speed away from the enemy ships using their standard engines.  The main premise of the movie is the desperate chase in space, and the feeling of hopelessness coming from the fact the Resistance apparently has nowhere to run. So the revelation that there was actually an abandoned Rebel base, with anti-orbital bombardment shields, gigantic blast doors and powerful antennas, exactly on their course, within 24 hours of sublight travel, comes as a complete deus ex machina.  The chances of this happening are mindbogglingly small, so it seems it must have been the plan all along. This is what the Visual Dictionary states (taken from ):     THE LAST GASP of hope for the Resistance is the otherwise uninviting   mineral planet of Crait, tucked in a remote sector of the Outer Rim   Territories. This has been Leia Organa and Amilyn Holdo's secret   endgame - bunkering down on a former rebel world that had fallen off   most modern starcharts. The Resistance's penchant for using old   rebel-era caches and facilities is part of Leia's strategy, for she   alone has a store of navigational information from the early days or   the Rebellion that she has never shared.   But this just raises more questions:   If they aimed for Crait, why did they exit hyperspace so far away from the planet, especially as they barely had enough fuel to actually reach it? Why did Leia say "We need to find a new base" if they already travelled to one?   And there's the fact that once First Order ships appeared, there was only one direction of travel available. It's still extremely lucky that Crait was exactly there...  Is there any explanation for this?


In ArcGIS, is it possible to change the polyline symbology to show vertices? Or do I need to extract the points via ? This becomes a pain if I want to edit the source polygon/polyline features.  Here is what I'd like to see (this is from GMS), as I can clearly see start/end nodes and interior vertices.    I  that pressing the V key while editing will show vertices. But it is only useful while editing and pressing V.


Is there an idiom for: "a list of things that you know will not be completed but you are asking anyway"?

Sometimes in a written text I express a ton of things I would desire for something to have even though I know it is absolutely impossible to fulfill those desires.  For example in Spanish we can use: "La lista de los reyes magos" which means something along the lines of: "Santa's letter". It has a small component of irony in it.  The purpose in the context I'm using the sentence is: "I know that I'm asking for too much. I'm adding a lot of requirements for you to have more context in the direction I want to take. I know this is unfeasible.". That is why I want to give that small component of expressing that the result is impossible to reach.


Tag badge not granted in long time, more than a few weeks

I seem to be due a tag badge on  tag for a long time now, more than a few weeks I think, but I've yet to receive it. I'm the first one that made the cut there.    Yes, I did retagged many of the posts now in the tag, but not all of them were with my answers, and all of them were valid edits IMHO.  says it's OK and "improves the site" as long as "edit is accurate". Naturally it was easier for me to find such posts among my answers, but I did manage to find a few others and tagged them as well.  Is this a bug?


Let $ S = \{(x,y) \in \mathbb R^2 : x^2+y^2 < 1\}$ be the unit circle in $\mathbb R^2$. Let $(X_1, Y_1), (X_2, Y_2),$ be independent, both having uniform distribution over $S$. Let $D$ denote the Euclidean distance between $(X_1, Y_1)$ and $(X_2,Y_2)$. Show that $E(D^2) = 1$. Here I integrated $$\int_0^1 \int_0^1 \int_0^{\sqrt{1-Y_2^2}}\int_0^{\sqrt{1-X_1^2}} (X_1 - X_2)^2 + (Y_1 - Y_2)^2 dX_1 dY_1 dX_2 dY_2$$


Finding max value of second order variable SQL

I have a table in my database in the following form:  Name   Value  Count Angus   B   70 Angus   C   2054 Angus   D   418 Betty   B   16 Betty   C   2 Betty   T   37 Betty   E   683 Colin   K   85 Colin   L   297 Colin   M   810   I need to be able to pick the highest count per name and retain the values - I would do this with an order by but the 'Count' column is a count of other unique values within the table so can't do a GROUP By on Count.  Any tips greatly appreciated


How do I delete a file or folder in Python?


In my program, the name of the file with the values (at most 2-digit numbers) to be read is given in the terminal and my main() is as below:  int main ( int argc, char *argv[] ) {    //assume argv[1] is a filename to open    ifstream the_file ( argv[1] )    if ( !the_file.is_open() ){       cout<<"Could not open file << endl;       return 0;    }     char x;    int array[10];    int x_int;    while ( the_file.get ( x ) ){         for (int i=0; i<10;i++){              array[i] = (int)x;         }    }  }   However, I am getting some odd number.   My mistake is definitely at array[i] = (int)x; line, but   how can I convert read char value to int? Or is there any other method to read them as int type?  I want to have the values taken from input file work as integers, not as a single digit  My actual input file (.txt) is:  75 95 1 2 45 65 98 6 7 9


Strange string appended to typeName in DataContractResolver.ResolveName for generic type

I have implemented a custom DataContractResolver for my WCF service, which takes a known list of types and looks them up by name. In most cases it works (including for generic arrays, e.g. "ArrayOfMyClass"). However, for other generic types a seemingly random eight-character string is appended to the end of the typeName parameter in . In this example the string is AevzrKY9:     Error in line 1 position 345. Element 'http://services.contoso.com/QueryService:QueryResult' contains data from a type that maps to the name ''. The deserializer has no knowledge of any type that maps to this name. Consider changing the implementation of the ResolveName method on your DataContractResolver to return a non-null value for name 'PagedListResultsOfPersonSearchResultAevzrKY9' and namespace 'http://schemas.datacontract.org/2004/07/Contoso.Services.Contract.Infrastructure'.   I have also encountered the string MZHTWXIT.  My hacky workaround is to first check if the type is registered and if not, check again without the final eight characters. This seems pretty unreliable and I'd like to have a more foolproof way to deal with this odd appendage.  The actual question: What is this string which is appended to the typeName and how can I stop it from being appended (or deal with it some other way)?    Full source for the DataContractResolver is below:  public sealed class KnownTypesDataContractResolver : DataContractResolver {     private readonly Dictionary<string, Type> _knownTypes;      public KnownTypesDataContractResolver(IEnumerable<Type> types)     {         _knownTypes = (             from type in types.Distinct()             group type by type.FullName into g             select g.First())             .ToDictionary(GetName);     }      public override Type ResolveName(string typeName, string typeNamespace, Type declaredType,         DataContractResolver knownTypeResolver)     {         // I have no idea why this string gets appended to PagedListResult generic typename but removing it seems to work...         var genericTypeName = typeName.Contains("MZHTWXIT");         var knownTypeName = genericTypeName ? typeName.Substring(0, typeName.IndexOf("MZHTWXIT")) : typeName;          Type type;          if (_knownTypes.TryGetValue(knownTypeName, out type))             return type;          if (knownTypeName.StartsWith("ArrayOf"))         {             if (_knownTypes.TryGetValue("ListOf" + knownTypeName.Substring(7), out type))                 return type;         }          var withoutFinalEightChars = typeName.Substring(0, typeName.Length - 8);         if (_knownTypes.TryGetValue(withoutFinalEightChars, out type))             return type;          return knownTypeResolver.ResolveName(typeName, typeNamespace, declaredType, null);     }      [DebuggerStepThrough]     public override bool TryResolveType(Type type, Type declaredType, DataContractResolver knownTypeResolver,         out XmlDictionaryString typeName, out XmlDictionaryString typeNamespace)     {         if (!knownTypeResolver.TryResolveType(type, declaredType, null, out typeName, out typeNamespace))         {             typeName = new XmlDictionaryString(XmlDictionary.Empty, type.Name, 0);             typeNamespace = new XmlDictionaryString(XmlDictionary.Empty, type.Namespace, 0);         }          return true;     }      private static string GetName(Type type)     {         return type.IsArray             ? "ArrayOf" + GetName(type.GetElementType())             : type.IsGenericType ? GetGenericName(type) : type.Name;     }      private static string GetGenericName(Type type)     {         var typeDef = type.GetGenericTypeDefinition();         var name = typeDef.Name.Substring(0, typeDef.Name.IndexOf('`'));         return name + "Of" + string.Join(string.Empty, type.GetGenericArguments().Select(GetName));     } }


I have a file structure:  A | main.py |_B   |a_funcs.py   A is the main folder while B is a sub-folder inside A. In my main.py filer, I have from B.a_funcs import *. This statement imports all functions from the a_func.py file. Is it possible to list out all the functions inside that a_func.py file`? How do I do that?  I tried dir(a_func) but that says a_func is not defined.


Does $ \sum^\infty_{n=1} \frac{e^n \cdot n!}{n^n}$ converge?

By ratio test,  $$ \sum^\infty_{n=1} \frac{n!}{n^n}$$  converges as the limit will become $e^{-1}$. If I add $e^n$ to it, the ratio test then fails:  $$ \sum^\infty_{n=1} \frac{e^n \cdot n!}{n^n}$$  How would I be able to show that this series is convergent/divergent?


Verification: Determining the order of factor group $G=(\mathbb Z \oplus \mathbb Z)/\langle(2,2)\rangle$. Is the group cyclic?

I proceeded as follows: Let's assume on the contrary that order of $G$ is finite i.e., $|G|=m$ for some $m \in \mathbb N $. Hence, for any $(x,y)\in \mathbb Z \oplus \mathbb Z$, we have that: $m((x,y)+\langle (2,2) \rangle)=e_G$, where $e_G=\langle (2,2) \rangle$ is the identity of $G$. Hence, \begin{align*} m((x,y) + \langle (2,2) \rangle)&= m(x,y) + \langle (2,2) \rangle\\ &=(mx,my) +\langle (2,2) \rangle\\ &=\langle (2,2) \rangle \end{align*} Since $(1,0)\in \mathbb Z \oplus \mathbb Z$, we must have \begin{align*} (m,0) +\langle (2,2) \rangle&=\langle (2,2) \rangle\\  \implies (m,0)&\in  \langle (2,2) \rangle\\ \implies (m,0)&=(2r,2r) \end{align*} for some $r\in \mathbb Z$. Hence, $r=0$ whence $m=0$ which is a contradiction. Hence, $|G|$ is infinite. Now for the cyclic part, let $G$ be, on the contrary, cyclic. Hence, let $G=\langle (a,b)+ \langle (2,2) \rangle \rangle$ for some $(a,b)\in \mathbb Z\oplus \mathbb Z$.  Thus there must exist an element of infinite order in $G$. We have: \begin{align*} 2((1,1) +\langle (2,2) \rangle )&=(1,1)+(1,1)+ \langle (2,2) \rangle\\ &=(2,2)+\langle (2,2) \rangle\\ &=\langle (2,2) \rangle\\ &=e_G\\ \implies |(1,1) + \langle (2,2) \rangle|&=2. \end{align*} But all cosets have same no. of elements. That is, in particular, we must have, $$|(1,1) +\langle (2,2) \rangle|=2=|(a,b) +\langle (2,2) \rangle|,$$ which is a contradiction as the element on right hand side must have an infinite number of elements. Therefore, $G$ is not cyclic. Is my proof above correct? Please let me know. Thanks.


Singleton class vs static methods and fields?

Why are Singleton Classes used in Android/Java, when the same functionality looks to be provided by using a class with static fields and methods?  e.g.  public class StaticClass {     private static int foo = 0;      public static void setFoo(int f) {         foo = f;     }      public static int getFoo() {         return foo;     } }   vs  public class SingletonClass implements Serializable {      private static volatile SingletonClass sSoleInstance;     private int foo;      //private constructor.     private SingletonClass(){          //Prevent form the reflection api.         if (sSoleInstance != null){             throw new RuntimeException("Use getInstance() method to get the single instance of this class.");         }          foo = 0;     }      public static SingletonClass getInstance() {         if (sSoleInstance == null) { //if there is no instance available... create new one             synchronized (SingletonClass.class) {                 if (sSoleInstance == null) sSoleInstance = new SingletonClass();             }         }          return sSoleInstance;     }      //Make singleton from serialize and deserialize operation.     protected SingletonClass readResolve() {         return getInstance();     }      public void setFoo(int foo) {         this.foo = foo;     }      public int getFoo() {         return foo;     } }


JFrame error. Error in entering data into datebase using GUI

I know there are a lot of answers given to this error but I couldn't find the solution. I've found the line generating the error. String dbop="INSERT INTO employees.workers (ID,First_Name) VALUES ('6',"+name+"')"; is generating the error. the GUI runs smoothly but it should also insert the data in employee.workers database (Database: Employee, Table: workers) but it generates a lot of errors I'll paste errors.  Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at javaapplication13.NewJFrame.jButton1ActionPerformed(NewJFrame.java:78) at javaapplication13.NewJFrame.access$100(NewJFrame.java:5) at javaapplication13.NewJFrame$2.actionPerformed(NewJFrame.java:42) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6533) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6298) at java.awt.Container.processEvent(Container.java:2236) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2294) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466) at java.awt.Container.dispatchEventImpl(Container.java:2280) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)   Whenever I execute the program it shows the GUI pop-up that I generated using swing but whatever I enter something in JTextField and press the button to enter data in the database. these errors come right to my face. I've tried specifying the exact syntax of MySQL but same errors  private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                               try {         String name=input.getText();         Statement stat=con.createStatement();          String dbop="INSERT INTO employees.workers (ID,First_Name) VALUES ('6',"+name+"')";         stat.execute(dbop);         stat.close();      } catch (SQLException ex) {         Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);     }  }


Showing that a group of order $pq$ is cyclic if it has normal subgroups of order $p$ and $q$

This is question 2.9 #9 from Topics in Algebra by Herstein:     If $o(G)$ is $pq$ where $p$ and $q$ are distinct prime numbers and if $G$ has a normal subgroup of order $p$ and a normal subgroup of order $q$, prove that $G$ is cyclic.   Let $N$ denote the normal subgroup of order $p$ and $M$ denote the normal subgroup of order $q$. Here are a couple things I noted while exploring the problem:   $N$ and $M$ are cyclic, since they have prime order. $G = NM$ [1].   Any hints where to look next?    [1] Since $N,M$ are normal, $NM \le G$. Then $o(NM) \mid o(G)$, so $o(NM)$ is either $1$, $p$, $q$, or $pq$. The first three don't work because they force one of $N$ or $M$ to be $(e)$, so we have $o(NM) = pq$. Therefore, $NM = G$.


Create RAID-Z2 in degraded state possible?

I am moving from one server to another and want to bring some of the disks with me. Unfortunately, I do not have enough storage to back up all of the data on the old server.  Old server 4 disk RAID5  Bringing two disks from old server to:  New server 6 DISK RAID-Z2 (4+2)  Old server can take losing one disk but not two.  Could I set up the new server as RAID-Z2 (4+2) lacking one disk? Move all data and then add the last disk?  Or is there any other way around this?


We have the following code and Apex Test Class, and for some reason during Apex Test Execution (Developer Console-->Run Test) it is throwing the following error message below. Any ideas why the field could not be writable? The field in question is a   Long Text Area(32768). I checked that the user has CRUD on the object as well as FLS read/write on the field. I even gave the profile "Modify All" on the object and still the error below. System.SObjectException: Field is not writeable: My_API_Logs__c.My_Request__c EDIT: It seems like the only way to go around is to set the apex to "Without Sharing". This is strange and seems like a bug.     public with sharing class My_API_Log {  public static My_API_Log__c setErrorLogs(String strRequest, String strResponse, String strCode, String strErrorDetails, Id strContactId, String strType){         try{             My_API_Logs__c objError = new My_API_Logs__c();             objError.My_Request__c = strRequest;             objError.My_Response__c = strResponse;             objError.My_Status_Code__c = strCode;             objError.My_Error_Details__c = strErrorDetails;             objError.My_Contact__c = strContactId;             objError.My_Type__c = strType;             return objError;         }catch(Exception e){             throw e;         }     }    }  And the line of code that is failing is where the "insert" statement line is below: (DISCLAIMER: this is just a code snippet for simplicity) public with sharing class MyClass {     public static list<My_API_Log__c> lstLogs = new lits<My_API_Log__c>();          @AuraEnabled     public static string myMethod(){        string strresult = 'test';         HttpRequest req = new HttpRequest();        if(req.getStatusCode() == 200){                    insert My_API_Log.setErrorLogs('Test', 'Test,'Test', 'Test',null, 'Test'); //This is where its erroring out!        }             return strresult;     } }  Apex Test Class @isTest(seeAllData=false) public class MyClassTest{     static testMethod void testMyMethod(){         //Created Account         //Created Contact         //Created the Contact as a User (CustomerCommunityUser).           System.runAs(CustomerCommunityUser){         Test.startTest();          Map<String, String> headers = new Map<String, String>();         headers.put('Content-Type','application/json');                    MyClassMock mock= new MyClassMock(             200,             'success',             'success',             headers         );         Test.setMock(HttpCalloutMock.class, mockFailure);          String str = MyClass.myMethod();         Test.stopTest();          }     } }


Occasionally, I have inline math in my text (e.g., $Y^{(0)}$). This will make the line on which it appears taller and introduce an extra space between that line and the previous one. This has the undesired effect of making that line stand out. The solution is to use \smash{$Y^{(0)}$} instead. But I don't want to have to do this manually for all the inline math that I have.  So, is there a way to \smash everything by default? I.e., I want my line height to be fixed and not adjust to things like $Y^{(0)}$.


how to change language with alt+shift ubuntu 13.10

With older ubuntu changing languages with alt+shift was easy to enable but on 13.10 I can not do this task at all can any one help me ??


Derivation of the polarization identities?

For a real (or complex) inner product space $V$, the inner product can be expressed in terms of the norm as either $$ \langle x,y\rangle=\frac{1}{4}(\|x+y\|^2-\|x-y\|^2) $$ or $$ \langle x,y\rangle=\frac{1}{4}(\|x+y\|^2-\|x-y\|^2+i\|x+iy\|^2-i\|x-iy\|^2) $$ respectively.  These identities are not hard to verify directly once they are given. I would like to know, is there a systematic way one would derive these from scratch without knowing them beforehand, or are both polarization identities just clever observations?


i want to use a big bracket (\left( , \right)) in an align-enviroment over two lines, so that  \begin{align} 0=\left(a+b+c \\   +d+e\right) \end{align}   which is not possible, because Latex want me to close the bracket in the same line. Anyone an idea?  Greetings Michael


Can I travel to France & Italy with a valid schengen visa issued for business purpose by Netherlands in an expired passport . Biometrics done in 2018. Visa is valid till 2021 with multiple entry allowed.  Now I am travelling to France & Italy with family as a tourist. Is the visa valid for entry into these countries


Add a "Magic 8-Ball" feature to the Ask a Question page

So many interesting questions get asked on Stack Overflow and then immediately closed (or worse yet, closed and re-opened for days on end) because they're subjective, argumentative, and fundamentally unanswerable due to our lack of omniscience: without the ability to see into the future and/or know the secret motivations of companies and their developers, we are left to make wildly varying (un)informed guesses. The obvious solution to this is to add a  feature to the Ask a Question page. Similar to the current "Related Questions" feature, this could be used to answer otherwise-unanswerable questions before they're asked, thus saving everyone time and frustration. I propose a simple system whereby a web cam is aimed at an ordinary  device, long recognized as one of the most accessible and accurate fortune-telling mechanisms available to modern society. A simple  could be placed under this rig and triggered in response to the user's typing. Once focus leaves the Title input field, a short delay will be triggered, followed by a bit of logic to capture the 8-ball's result and feed it through a simple OCR routine to produce the result.  So far as I'm aware, SO would be the first major Q&A site to implement such a feature...  Examples:            ...another UV resurrection...


Is it weird that a journal spend two weeks to evaluate for suitability of the manuscript before assigning it to the editor?

Usually when I send a manuscript to a journal, in about 1 or 2 days, the status changes to "with editor" and after a maximum of 3 weeks the status changes to "with referee". This is the first time that a journal already spent two weeks until now to evaluate the paper for suitability before assigning it to the editor. Is it normal and what is the maximum logical time for me to wait? p.s., my field is physics and the quartile for this journal is Q1 (IF: 3-4).


Offline reading of posts in SO android app

Sometimes, I really feel the need for having offline reading of posts ( Just like the Wikipedia's android app). Is it possible with SO in present release ? If not, can this be made as an improvement ?


I recently read through Graham's The Intelligent Investor and am looking at what index ETFs or Index Mutual Funds it makes sense for me to invest in.  As I was considering this I realized that, at least as I understand ETFs, some of the principles from value-based investing still may need to be considered.  As such I am wondering how to determine whether an ETF is trading at a good value?  As I understand it, when I contribute to a open-end mutual fund, I buy at a rate determined by the current value of the holdings of the fund, and more shares in the fund are simply created if needed, so it should accurately reflect the underlying value of the assets.  ETFs are traded like stocks and have a more fixed share count.  Thus, I imagine their price has potential to diverge from the underling value of the stock assets indexed.  The fourth point on  seems to corroborate my suspicion.  This would seem to make ETFs more risky than index funds?  Assuming the above is all correct, how do I assess whether an ETF is undervalued or overvalued?  NOTE: I do not know whether this question needs to be specific to index ETFs or whether the same advice is good for all ETFs.


Unable to see ubuntu partition on windows

I have dual-booted windows 7 and ubuntu 14.04 on my laptop. I can browse files stored in windows partition in ubuntu os but I cannot browse or see ubuntu partition in 'my computer' in windows. Please help how can I access my files of ubuntu partition in windows 7 partition?


List of malicious sites that proxy logins

Is there a publicly available list of known malicious clones of Stack Exchange sites that proxy logins?  It would be a very useful feature to have a community-maintained list of all known proxy sites that pose a significant security vulnerability/phishing risk to any users.  As pointed out by  in the comments below, a similar .    Note: I have just found a site which proxies your login and reported it as :


I just noticed the Copy Editor badge progress indicator on ,    Can we have this for more badges please?   In particular the badges where it's not clear to the user how they're doing.   Announcer  Archaeologist  Booster Generalist Pundit Sportsmanship Taxonomist Tenacious Unsung Hero   It would also be nice to put it somewhere in stackoverflow.com/badges (tool tip maybe?)


Prove that a set of nonzero real numbers is a group under the operation $a*b$

prove that the set of nonzero numbers is a group under the operation $*$ defined by $a*b = \{ab \text{ if } a > 0 \text{ or } \frac{a}{b} \text{ if } a < 0\}$. Show that it proves closure, identity, inverses and associative properties of a group.


Is there significance to the way the White Walkers/Others arrange dismembered body parts in patterns?

I just started watching Game of Thrones again and noticed something that I had never noticed previously. In the very first episode of the first series during the opening segment (just before the title sequence), there is a scene where one of the Rangers (in the books I think it is Gared) comes across a collection of the dismembered body parts from slaughtered Wildlings. The scene shifts to an aerial shot and it appears that those body parts are arranged in a crude circle with a line through the centre.  After noticing this it made me also recall that in a later episode there is a similar scene where severed horses heads and bodies are arranged in a pattern (I can't remember exactly but it was something like a spiral arrangement).  Are there any known reasons for White Walkers to arrange body parts in these geometric patterns? I certainly cannot recall anything mentioned in the TV series itself but I wonder if perhaps in any interviews with the TV show creators it is mentioned/explained? I thought it might simply be to create an additional sense of unease around the scenes and to perhaps enhance the sinister nature of the White Walkers but that is pure speculation on my part. I can't recall this behaviour mentioned anywhere within the books so the question applies just to the TV series.


I'm trying to manually install the . It's a package to write documents in the Stata Journal style and it's not part of any repository so I cannot install it via the MiKTeX package manager. I have put all the files that come with the package in   C:\Program Files\MiKTeX 2.9\texmf\tex\latex\sjlatex  refreshed FNDB and updated format files. But when I run a simple document that calls up the stata package, I get the error message that stata.sty cannot be found, even though I can see stata.sty in  C:\Program Files\MiKTeX 2.9\texmf\tex\latex\sjlatex  Here's a MWE:  \documentclass{article} \usepackage{stata} \begin{document}  An example:  \begin{stlog} \input{example2_1.log.tex} \end{stlog}  \end{document}   stlog is an environment specified by the stata package, but I don't even get that far before the error message hits. I'm on Windows Vista and running MiKTeX 2.9 in WinEdt.  Also, I checked the file dependencies listed  and, as far as I can tell, I have correctly installed all the required files (using the MiKTeX package manager).  I was hoping someone would have an idea of things I could try? Sorry if there is something obvious that I have missed ...


How do I invoke a Java method when given the method name as a string?

If I have two variables:  Object obj; String methodName = "getName";   Without knowing the class of obj, how can I call the method identified by methodName on it?  The method being called has no parameters, and a String return value. It's a getter for a Java bean.


If order of group is even then solutions of this equation are even

This particular question was asked in a previous year exam and I have trouble proving it.  Let G be a finite group of order n, where n is even. Then equation $x^2=e$ has even number of solutions.  If there exists a solution a, then $a= a^{-1}$ , so $a^{-1}$ will also be a solution but it is equal to a so I don't think it is a right argument that for every a, $a^{-1}$ is also a solution as both are equal. So, how should I approach this question? Kindly guide


Using Cauchy's integral theorem to prove a inequality

I am trying to solve this question:    Let $f(z) = c_0 + c_1z + \ldots + c_nz^n$ be a polynomial. If the $c_k$'s are real, show that   $$\int_{-1}^1 f(x)^2 dx \le \pi \int_0^{2\pi} \left | f(e^{i\theta})\right |^2 \frac{d\theta}{2\pi} = \pi\sum_{k=0}^n\left | c_k\right |^2\ .$$ $Hint.$ For the first inequality, apply Cauchy's theorem to the function $f(z)^2$ separately on the top half and the bottom half of the unit disk.  I have taken the top half of the unit disk to be the domain $D$ as given in the hint. Since $f(z)^2$ is analytic in $D$, by Cauchy's integral theorem, $\int_{\partial D}f(z)dz = 0$. I can't understand how to proceed from here. Can I break the integral into the sum of the integrals along the semicircle, $|Z| = 1 $ and $Im(Z) \gt 0$, and along the straight line, $-1 \lt Re(Z) \lt 1$ and $Im(Z) = 0$?


When should you use a class vs a struct in C++?

In what scenarios is it better to use a struct vs a class in C++?


Intel Graphis card not updating. Problem with ppa?

I'm trying to update my graphics card. Info:     description: VGA compatible controller    product: 2nd Generation Core Processor Family Integrated Graphics Controller    vendor: Intel Corporation    physical id: 2    bus info: pci@0000:00:02.0    version: 09    width: 64 bits    clock: 33MHz    capabilities: vga_controller bus_master cap_list rom    configuration: driver=i915 latency=0   I tried doing this in two ways:  1 . Command Line:  First add repository:   sudo add-apt-repository ppa:glasen/intel-driver   Second, update:  sudo apt-get update   This updates everything, then eventually I get a problem:  W: Failed to fetch http://ppa.launchpad.net/glasen/intel-driver/ubuntu/dists/trusty/main/binary-amd64/Packages  404  Not Found  W: Failed to fetch http://ppa.launchpad.net/glasen/intel-driver/ubuntu/dists/trusty/main/binary-i386/Packages  404  Not Found  E: Some index files failed to download. They have been ignored, or old ones used instead.   2 . Intel(R) Graphics Installer for Linux:  I downloaded it from    Then ran the program, and let it do it's thing. Eventually I got this error:  W:GPG error: https://download.01.org trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A902DDA375E52366, W:Failed to fetch http://ppa.launchpad.net/glasen/intel-driver/ubuntu/dists/trusty/main/binary-amd64/Packages  404  Not Found , W:Failed to fetch http://ppa.launchpad.net/glasen/intel-driver/ubuntu/dists/trusty/main/binary-i386/Packages  404  Not Found , E:Some index files failed to download. They have been ignored, or old ones used instead.   Both error look the same, but I don't quite understand it.  How do I upgrade my graphics card driver?


Is a North Carolina driver’s permit also valid in South Carolina?

In both states, the required age is 15 to get a permit. Does that mean that a permit issued in North Carolina also allow you to drive legally in South Carolina?


Problem with Chapters in appendix mode not having a label

I have a main file where I include several chapters including a couple of appendices, like this:  \usepackage{appendix} \begin{document} ...  \include{chapter1} \include{chapter2} ... \include{chapter7}  \backmatter  \include{appendixA} \include{appendixB}   Inside the appendixA.tex, I have:  \appendix \chapter{Appendix A: my Title} \label{app:A}   When I reference \ref{app:A} I get the label   7.3.3   which is the label of the last subsection of the chapter before the Appendix A also, tables in the main sections appear as  Table 1   instead of:  Table A.1   It looks like the top level (chapter) numbering doesn't start at all, since the label refers to the last subsection. How do I make the appendix have a lable of its own?  Thanks in advance


Proving that continuous periodic function on R is bounded and uniformly conutious on R

So using the definition of periodic function which is there exist $p \neq 0$ such that $f(x+p) = f(x)$ for all $x\in \mathbb{R}$. I know that I only need to prove on the interval $[a,b]$ which other part of the function just repeats what it looks like on the interval $[a,b]$. Where do I go from here?


What is the difference between the compact U(1) group and non-compact U(1) group?

Is compact $U(1)$ and non-compact $U(1)$ just two different representations for the same group or the same gauge theory? If not, what the difference of them? Or are there any properties that are special for compact $U(1)$?   These probably are naive questions, but I don't know a reference explain me these. Any hits or reference are warmly welcome.


Trying to use TikZ to draw a diagram, I used the example below, but I see that I could not start the beginning point from a bit left of the page. I checked  question but it's too long and I don't see a solution for my problem there  \documentclass[11pt,a4paper,twoside,openright]{report}  \usepackage{tikz} \usetikzlibrary{calc,intersections,through,backgrounds}  \begin{document}  \begin{tikzpicture} \coordinate (A) at (-15,0); \coordinate (B) at (-14,1); \draw[black] (A) -- (B); \end{tikzpicture}  \end{document}


What happens when a charged capacitor is connected to an uncharged capacitor

I had this doubt about what would happen when a capacitor of capacitance $C_1$ with a charge Q was connected to an uncharged capacitor of capacitance $C_2$. I took to researching this question in Google and found answers in several places. However every answer talked about Kirchoff Voltage Law, which I could not understand or relate, till I realised that the connection that I meant and what the answers meant was different. The answers meant that the capacitors were connected to each other at both the ends. However what I want to know is what would happen if they were connected only at one side and the other side was left unconnected. I felt like there should be a difference but I'm not that sure about the consequence. Please help if you can! And if you require more clarification you can comment and I'll clarify the question more.


Switching languages in bibliography with biblatex

I would like to have a bibliography with both Cyrillic and Latin and the main document language being English. How can I make biblatex to automatically switch between languages? (without using XeTeX as suggested by some) The minimal example returns an error if the main language is English. However, with the main language being Russian the document works.  \documentclass{article}  \usepackage[utf8]{inputenc} \usepackage[russian,english]{babel}  \usepackage[backend = biber,babel=other]{biblatex} \usepackage{csquotes} \addbibresource{library.bib}  \begin{document} %\selectlanguage{russian} %if the main document language is Russian the bibliography is compiled without any problem. This is a test. \parencite{Bara2006,Baranov2001}  \printbibliography  \end{document}   The .bib entries are  @book{Bara2006, address = {New York}, author = {Bara, Judith}, publisher = {Routledge}, title = {{English Citation entry}}, year = {2006} }  @book{Baranov2001, address = {Санкт-Петербугр}, author = {Баранов, Николай А}, title = {{Эволюция взглядов}}, year = {2001} }


I am trying to set up a Ubuntu server on Raspberry Pi 2, but at the moment I am stuck with this:  sudo: unable to resolve host ubuntu   /etc/hostname says this:  ubuntu   /etc/hosts says this:  127.0.0.1 localhost  # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts   I have seen solutions where one can go into recovery mode and change the password and change the hosts, but I don't think I can do that on server version on Raspberry Pi 2. Or can I?  Thanks


How to use awk to count the total number of input lines in a file?

How can I use awk to count the total number of input lines in a file?


How can I test a Python module that I ran in the the text editor in the Python console?

I have a Python script that I named moduleA.py in the text editor. I ran the script by clicking the "Run Script" button. Then I expected to be able to import the module in the console with "import moduleA" but I get an error saying that the module does not exist.  How does one test functions etc. from a Python script in the text editor in the Python console?


apache2 mod_rewrite redirect without http body

I am currently using Apache mod_rewrite to redirect to HTTPS, but I would like to remove the body from the response.  How it is currently:    Example: How I would like it to be    My redirect configuration:  <IfModule mod_rewrite.c>   RewriteEngine on   RewriteCond %{HTTPS} off   RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] </IfModule>


What is the :0 terminal in the who command's output?

When I type who in my console terminal, I get the following output:  hubert   :0           2014-05-16 21:40 (:0) hubert   pts/0        2014-05-16 21:46 (:0)   From info who I know that both :0 and pts/0 should name instances of the terminal. It is clear to me what pts/0 means but I have no idea how to interpret the first line of the output.  What is even more confusing, when I type who hubert :0, I get:  hubert   pts/0        2014-05-16 21:46 (:0)


I often buy Chinese tea by weight in some local stores and at times I find some inclusions that should not be there. Up to this date I have found:   A human hair Some sand Some white dots (presumably parts of a plant) that always come with Pu'er stones and float on the surface Parts of other plants or a trunk parts of the tea plant that was not meant for tea Some kind of fluff ()   Finding the fluff finally got me and I decided to ask here.  Is it normal for tea to contain various inclusions like that? I understand that tea processing is a complex process performed by humans at factories in huge batches. So is it common for something like that to get into the process?  I ask because, for example, if you consider some kind of grain, there are often inclusions of other things (other grains or something else) too, and this is known and normal for lower quality (cheaper) grain. You don't throw away the pack if there are some other kind of grains and you simply remove them. Various manufacturers differ in quality and you can choose. You know that the more expensive grain should be better processed and have no inclusions, when a cheaper one is ok to have them. Now this is not the case with the Chinese tea. There's no (obvious) choice of the manufacturer, it simply comes from a particular part of China. I can only choose a local vendor and which tea grade to buy (where tea grade tells what part of the tea plant was used in the making, and nothing more, not the quality of the manufacturing).  I have started drinking Chinese tea not so long ago, and I don't have much experience of it. So my question is: are the inclusions that I have described above common and known for tea, or should I consider buying at a different store, from a different vendor? If the tea is coming from China, will it be different, or is it the same in all the shops? What would you do in a situation like this?


Proving that an entire, bounded function is a polynomial

I am trying to prove the following : Let f be entire and assume that $$|f(z)| \leq M|z|^n$$ for large z, for a constant M, and for some integer. Show that f is a polynomial of degree $\leq$ n  Here are my thoughts on the problem so far: Since we have the inequality above we know that f must be bounded by $M|z*|^n$ where z* = argmax(f) and n large enough to satisfy the inequality. Given that f is bounded and entire I think I can use Liouville's theorem which says that f should be constant. I am currently not sure how to go from f being constant to f being a polynomial, however.


Can you use "in person" for inanimate objects, as in "the car looks completely different in person" implying the car is different than the picture?


Experimental design for optimizing a machine producing candles

I have the following problem that I would like to solve, but I don't know where to look. I have a Machine A that produces candles. According to the pre-setting of the machine, the color, the height, and the width of the candle that is being produced, the machine builds a certain number of candles per minute. E.g., a candle without color, and with a width of 2cm and a height of 10cm, and with a single candle wick, and with the pre-setting mode 1 of the machine, the machine produces 10 candles per minute. If we have a red candle, with a width of 5cm and a height of 15cm, and with a triple candle wich, the machine produces 5 candles per minute. The goal of my model is to find out what is the best configuration setting that it is possible to have for a specific candle type so that we can increase the number of candles to be produced per minute. I created a Neural Network model that takes several features as input, and the dependent variable is the number of candles to be produced per minute. The goal of this model is to predict the dependent variable based on machine pre-settings and candle characteristics. I also use Bayesian optimization to obtain the best hyperparameters of the model. Now, I want to find if there is any other pre-setting of the machine so that we can increase the number of candles to be produced. What can I do to find this pre-setting? The only way that I found to do is the following:  Use a brute-force mechanism that tries different configuration settings of the machine in the already trained model, and keep the ones that predicted a higher number of candles to be produced.  I don't know if Bayesian optimization could also help me, and what should I do. Can someone give me some directions so that I could start to research it?


'A' or 'an' against optional (bracketed) part?

If I have a statement : "She provides a (easy) path to information," should I use a or an ?    I know I could re-write the optional adjective to be something that starts with a consonant sound, i.e.? "She provides a (simple) path to information," but in my case it must be the word easy, which starts with a vowel sound.  Does the article follow the optional or the formal declaration, i.e., 'information?' Or is it not allowed, and the sentence MUST be rewritten?


I have a Samsung Note 8. I took my phone to the store yesterday, and now I have a second lock screen with ads. I have gone through all of my apps that I dont regularly use, and have tried cleaning up junk files off of my phone, but nothing has worked. Does anyone know a way to get rid of this screen?


Why do I see only 50 volts on my live wires?

I'm trying install a lamp to my apartment but it didn't light up as I expected. I recently moved in and this is the first time I'm trying to install a lamp here. The spot where I'm trying to install the lamp is just a hole in the ceiling with three wires hanging out: Two brown (live?) and one blue (neutral?). Some Googling revealed to me that the separate live wires can be used to control specific bulbs in a multi-bulb lamp. Nearby there is a switch on the wall with two buttons which I assume is for these wires. So apparently the idea is that current flows from each live wire through the bulbs to the common neutral wire when to buttons are toggled on. One live wire and the neutral were connected in parallel to a connection strip, while the other live wire was connected alone to its own connection strip.  My lamp has a spring-powered connection strip with L and N labeled holes so I simply took one of the brown wires to L and the blue wire to N.  I removed the connection strips and tried to measure the voltage to see if the problem was somewhere else in the circuit, and I noticed that each of the live wires measures around 50-54 volts with respect to the neutral, even though the AC line voltage in my country is 240 volts. Even stranger, I measured this voltage regardless of the positions of the switch buttons! Only when I removed the fuse I got 0 volts.  So I assume the reason why the lamp didn't light up was that the voltage was way too low. Could somebody point what is it that I'm doing wrong, or is there something wrong with the wiring on my apartment?


How to fix Shellshock vulnerability on Debian Squeeze?

How do you fix the shellshock bash vulnerability on Debian Squeeze? (I originally posted just the answer but that got modded, go figure), so now I'll post the answer below...


Should "everyone's" be followed by a singular or plural noun?

Ex. What would be right:   ... that caught everyone's eye. ... that caught everyone's eyes.


What is the generalisation of the wave differential equation in curved spacetime?


I don't know how to connect this limit with number $e$. Limit of $\arctan x$ in infinity is $\pi$/2 so we have $1^x$. How can you solve this ?  $$\lim_{x\to \infty} \left(\frac{2\arctan x }{\pi}\right)^x$$


Find the sum of reciprocals of divisors given the sum of divisors

Let $d_1, d_2, \cdots d_k$ be all the factors of a positive integer '$n$' including $1$ and $n$. Suppose $d_1 + d_2 + d_3+\cdots+d_k = 72$. Then find the value of $\frac{1}{d_1}+\frac{1}{d_2}+\cdots + \frac{1}{d_k}$.  Attempt: Consider, $d_1, d_2, \cdots d_k$ are the factors of $n$ ascending order. Then  $d_1d_k=n$, $d_2d_{k-1}=n$, $\cdots$, $d_kd_{1}=n$    ............... (1)  Assume, $\frac{1}{d_1}+\frac{1}{d_2}+\cdots + \frac{1}{d_k}=P$ Then $\frac{n}{d_1}+\frac{n}{d_2}+\cdots + \frac{n}{d_k}=nP$  i.e  $d_k+d_{k-1}+\cdots +d_2+d_1=nP$  (using 1) i.e $72=nP$, or $P=72/n$.  Problem: I have considered that number of divisors of $n$ are even as every divisor $d$ of $n$ has a twin divisor $n/d$. But it is not true if $n$ is a perfect square i.e $n=d^2$ as in this case $n$ has odd number of divisors (for example, $4=2^2$, $4$ has three divisors $1,2 ~\&~ 4$).


I have a polygon-layer with the boundaries of a field and a point-layer with several points inside the polygon. I want to divide the polygon into as many polygons  as points ( 1 polygon with 3 points -> 3 polygons with almost same size). And if that works - is it possible to do it with a multi-polygon-layer?


How to install wireless drivers Ubuntu 16.04.1 LTS

I have just installed Ubuntu 16.04.1 LTS on my Desktop PC that has a built in wireless adapter in the motherboard (Broadcom 802.11ac 14e4:43b1).  Right now I do not have the installation disk nor access to ethernet so the below post did not work for me.   I found this drivers   and i am wondering how do i install this offline.   Please help, I am a complete beginner and would be really helpful if you can elaborate.  Thanks Avinash


Encourage users to retract their downvote

Most downvoters quickly express their opinion, navigate away, and never come back. That's an issue because even though a poor answer or question has been edited for the better, downvotes are rarely reverted. If the view traffic wasn't dropping as the question ages, the community would probably counterbalance the votes, but that isn't the case.  Perhaps users should get notified if an answer/question they downvoted gets edited?   Obviously, we would have to avoid getting too many notifications when multiple edits occur.   Here's a few ideas:   Send notifications if the question/answer gets modified, but only within a limited timeframe Implement an "ignore future notifications for that answer/question" feature Implement a "notify me if that question/answer gets edited" feature, which would allow users to track a question/answer's state (checked by default?) rather than forcing notifications.   I think that having some mechanism in place to encourage people to review their downvotes would make that measure more accurate in general.


Thank you for your time reading this.  I am from China and have learned British English for years from my middle school to undergraduate time. I normally take 'would' as the past form of 'will', though I know 'would' may also work as an auxiliary verb which could be used in subjunctive mood.  Now I come to the United States and have got confused about 'would' and 'will' very much. In the past, whenever it came to something related to the future, I would use 'will'. Now in the USA, people use 'would' a lot. For example, if we are talking about MIT, some guy may say 'I would go to MIT someday'. For me, I prefer to say 'I will go to MIT someday and I will surely make it!' There are many similar examples.  I know grammatically both sentences must be correct but I just can't understand the usage of 'would' here.  I have looked up some information online. They helped a lot. For example, people say'would' can be used to express your desire or hope. However, from my memory of middle school, it is 'will' that could be used to express your willingness to do something.   According to Merriam-Webster dictionary, both words can be used to express a desire or wish. Then why people prefer 'would' to 'will'?  I am totally lost! People keep using 'would' under those circumstances which I will use 'will' and this really annoys me a lot.  Help!


Why do the RAM requirements for a Visual Studio in a virtual machine leave so little for the host that i'd expect would require more?

1 GB of RAM (1.5 GB if running on a virtual machine)   Does it mean the host requires 1.5GB and will probably use 0.5GB and allow visual studio to run in a 1GB virtual machine?  That is very little for the host, since Windows 7 itself on the host is said to require 1GB.  Looking at a similar question , the questioner did not have that in mind and so didn't request an answer to that in any answers.


Late 70's TV movie - woman sacrifices herself for child (neanderthal?) with blanket

I'm looking for the name of a late 70's/early 80's SFF tv movie or episode where a woman scientist sacrifices herself for a child (who may be neanderthal?) and they travel back in time or get beamed somewhere, never to return.  The memory is hazy (perhaps the neanderthal child is a chimp?) but a group of neanderthals or chimps have been beamed into a laboratory. At first this is a great achievement but the neanderthals or chimps do not adjust well. Eventually they must be sent back. In the meantime a woman scientist has formed a bond with a child subject. The woman has given the child a (blue?) blanket which the child finds soothing. It might not even be a blanket but some other calming token.  Just before the 'return' beaming (there might be a countdown) a crisis ensues where the child is freaking out, perhaps because it wants its blanket. The child touches the woman or the woman goes into the beaming room. In any case the step is irreversible and the woman and child get beamed or disintegrated together as the other scientists look on in despair.  Any help identifying this story would be most appreciated.


I am trying to create a version of pong for the MacOS terminal. However, I cannot seem to get single key input (my version of saying detecting which key is pressed at certain times.). I have tried everything, (even using the getch() function used in the depreciated library conio.h. I am looking to use it in a function like this:  void detect_w() {     int ascii_key_pressed_code = <some function to get pressed keys>;     if (ascii_key_pressed_code == 0xa9)     {         // the ascii code for "A" triggered.         // do something...     }     // .... }   For anyone who thinks "just use cin", I want unbuffered input.


Is it possible to completely go into fullscreen?

I have hidden everything except the top header with the menus. Is there a way to hide that? Would scripting this require a lot of work ?   Edit:   thanks for the reply. It still leaves the top header with the menus.alt + f9 hides the bottom '''footer'''. Isn't there a button for hiding the top one? Would scripting of that be complicated ?  Edit2: here's what i would like to hide in the 3d view


How the spring constant changes when a spring is cut into equl or rational halves? What is the relation with the original K?


I know  I can have pager with db_select as example   $query = db_select('node', 'n')       ->condition('type', 'article')       ->fields('n')       ->extend('PagerDefault')       ->limit(30);   is this possible has pager with EntityFieldQuery ?


C function does not return the correct array size

I defined a function in C as below: int *face_2_cells(int boundary_field_id) { int b_cells_field[4]; if(boundary_field_id==1) {   b_cells_field[0]=1;   b_cells_field[1]=2;   b_cells_field[2]=3;   b_cells_field[3]=4; } else{   b_cells_field[0]=0;   b_cells_field[1]=0;   b_cells_field[2]=0;   b_cells_field[3]=0; } return b_cells_field; }  Then I called this function in another function and then printed the size of the array like below: void cs_user_extra_operations() {   {                                                                                int *face_22_cells = face_2_cells(1);     printf("\n SIZE = %i""  ", sizeof(face_22_cells)/sizeof(face_22_cells[0])); } }  But the code outputs the SIZE = 2, while the correct value for SIZE is 4. Where is the problem?


Here is my data set.  public class StudentData {      public static List<Student> getData() {         //student id,name,std, and hobbies         return Arrays.asList(new Student(1, "a1", 1, Arrays.asList("cricket", "football", "basketball")),                 new Student(2, "a2", 1, Arrays.asList("chess", "football")),                 new Student(3, "a3", 2, Arrays.asList("running")),                 new Student(4, "a4", 2, Arrays.asList("throwball", "football")),                 new Student(5, "a5", 3, Arrays.asList("cricket", "basketball")),                 new Student(6, "a6", 4, Arrays.asList("cricket")), new Student(7, "a7", 5, Arrays.asList("basketball")),                 new Student(8, "a8", 6, Arrays.asList("football")),                 new Student(9, "a9", 8, Arrays.asList("tennis", "swimming")),                 new Student(10, "a10", 8, Arrays.asList("boxing", "running")),                 new Student(11, "a11", 9, Arrays.asList("cricket", "football")),                 new Student(12, "a12", 11, Arrays.asList("tennis", "shuttle")),                 new Student(13, "a13", 12, Arrays.asList("swimming")));     }  }   From data set , i am finding , how many student based on hobbies and display the value in asc/desc order. For example : cricket ,4 and swimming: 2 and so on. here is the code for group by hoppies .  Map<String, Integer> collect8 = data.stream()                 .flatMap(x -> x.getHobbies().stream().map(y -> new SimpleEntry<>(y, x)))                 .collect(Collectors.groupingBy(Entry::getKey, Collectors.mapping(entry -> entry.getValue().getId(),                         Collectors.reducing(0, (a, b) -> a + b))));   output of collect8  :{running=13, swimming=22, shuttle=12, throwball=4, basketball=13, chess=2, cricket=23, boxing=10, football=26, tennis=21}  After that i am doing  asc sorting by value .  Map<String, Integer> collect9 =                  collect8.entrySet().stream().sorted(Map.Entry.<String, Integer>comparingByValue()).                 collect(Collectors.toMap(e->e.getKey(), e->e.getValue()));         System.out.println(collect9);   output of collect9 : {running=2, swimming=2, shuttle=1, throwball=1, basketball=3, chess=1, cricket=4, boxing=1, football=5, tennis=2}  1.it is not sorted and giving the same result.any idea?  2. i am writing separate code for sorting. is it possble to do in collect8 itself?


What is the largest complexity class that a non-Turing complete proof assitant, like Coq, can achieve?

Given that all functions in Coq will terminate, it cannot cover the entire $RE$. So what is the class it can achieve? Is it $R$?


Installing a package with apt-get for a single user

Is it possible to install a package for just the current user (placing files in locations that the user can write to, such as their home directory)?


Let $G$ be the group  of all $2 \times 2$ matrices of the form $\begin{pmatrix} a & b \\ 0 & d\end{pmatrix}$ where $ad \neq 0$ under matrix multiplication. Let  $N=\left\{A \in G \; \colon \; A = \begin{pmatrix}1 & b \\ 0 & 1\end{pmatrix} \right\}$ be  a subset  of the group $G$. Prove that  $N$ is  a normal subgroup of $G$ and prove that  $G/N$ is abelian group.   Here is my attempt!  To prove $N$ is normal I consider  the group homomorphism $f \colon G \to \mathbb R^*$ given by $f(B) = \det(B)$ for all $B$ in $G$. And I see that $f(N)$ is all the singleton $\{1\}$ since $\{1\}$ as a subgroup of $\mathbb R^*$  is normal, it follows that $N$ is also normal. Is this proof helpful  here? Then how to prove that $G/N$ is Abelian? I know $G/N$ is a collection of left cosets.   Thank you.


I'm running Ubuntu 17.10, and I can not extract a certain tar file. When trying to extract the file, I get the following message:  There was an error while extracting”amdgpu-pro-17.40-492261.tar.xz” “Not an archive”   Any help would be appreciated.


I would want what is the meaning of death. Some people have different opinions:   Death is an enfeeble form of life. Death is a continuation of life. Death is perpetual development. Death is waiting.


If I control a  and a few other creatures of power 2 or less and my opponent uses , can I get back creatures that are dying to the wrath or do they have to have been in the graveyard before the wrath was cast? I'm unsure how the stack should work here


Problem in solving a question concerning real analysis.

The question is :  Does there exist any function $f : \mathbb R \longrightarrow \mathbb R$ such that $f(1) = 1$, $f(-1) = -1$ and $|f(x) - f(y)| \leq |x - y|^{\frac {3} {2}}$?  It is clear that $f$ is continuous over $\mathbb R$ by the given condition and hence it attains all the values between $-1$ and $1$ in $(-1,1)$.Now how can I proceed?Please help me.  Thank you in advance.


Adding items to page template dropdown on Page Edit Screen

I am developing a WP theme with MVC approach. It only have index.php, functions.php and styles.css on the parent directory. So, I do not want to place page templates on it rather then I want to programmatically provide them from View classes while functionality from edit screen stays the same.   Users need to have page templates select option on the edit screen. How do I successfully add Items to the template dropdown?  I tried to hook into  filter.   Example code:  add_filter( 'theme_page_templates', function($templates){      $templates['my-page-template.php'] = "My Page Template";      return $templates;  });   This does not work because of the use of  on the filtered array, which removes the added page template item. I don't understand why this function is used. It seems you can only remove page template from the list but can not add a new one using the given filter.  Is there any other way around?


Brand Identity Guideline colors not matching

I have hired a design company to help with our logo colors. I picked the  Pantones we wanted (3165c and 7408c).  When I did a search on Pantones website it gave values for Hex, RBG, and CMYK conversions. Sure enough they match when I use them. This new company gave me a brand identity guideline and their numbers for those values are different.  He keeps telling me his are right and mine are wrong. What am I not understanding? Specifically, for Pantone 3165c it gave me:  RGB: 0-79-89, HEX: 004f59, and CMYK: 100-16-33-66.  Their brand guidelines give  RGB: 0-79-88, HEX: 004f58, and CMYK: 100-53-53-33.  His last email said that photoshop converts the Pantone to the values he gave me and those are accurate. I don't understand why he is going with those values and not the ones I have. What am I missing or not understanding?


In 2268, Spock's brain has been stolen by hostile aliens and later re-transplanted by Dr. Leonard McCoy. But 10 years earlier, Spock talks to his self from 2387 about future things and how to tackle them. In these discussions, did Spock learn about his brain being at risk or did he not?  At least, one would expect the older Spock would warn his younger alter ego to avoid removal of his brain, since Dr. Leonard McCoy ran into severe complications while finishing the surgery, so probably the whole procedure caused secondary damages to his nervous system.  Still, to my knowledge there are no historical records about such a dialog, so did Spock in fact conceal this information to his younger ego and, if so, why?


Why are the arms of the LIGO interferometer so long?

The  experiment consists of two interferometers, where each one of them has two 4 km long arms.  Within these, light is further trapped via Fabry-Pérot cavities to achieve a total path length of about 1,600 km.  Why does the path have to be so long? Isn't the phase that governs the interference pattern constant throughout the arm, since it just depends on the path difference between the two arms? Making them both long surely should not change this...?


Stretching figure size in a double-y plot

I'm trying to learn how I can stretch the width of my plot both when showing (plt.show()) it and saving (plt.savefig) it.  More precisely, the plot has two y-axes that I have written as follows:  fig , ax1 = plt.subplots() ax2 = ax1.twinx() ax1.plot(x,y) ax2.plot(x,y2) plt.show()   Now the question is, how can I specify the size of the plot, e.g., how do we stretch the width/height?  When using plt.show() and the plot appears, I can manually take one corner and resize the box however desired, but that manually customised size will not be the saved one.


Equation exceeds one column of IEEE pattern in LaTeX how should I correct it? Please help, the code is attached herewith.  \begin{equation}\label{eq11}         p\left( {v,h|u,y,...} \right) = {\rm{RelU}}\left( {\left[ {\hat b + {w^h}\left\{ {\left( {{v^T}{w^v}} \right) \circ \left( {{y^T}{w^y}} \right)} \right\}} \\ \right]*\left[ {\hat a + {w^v}\left\{ {\left( {{h^T}{w^h}} \right) \circ \left( {{y^T}{w^y}} \right)} \right\}} \right]} \right) \end{equation}


I am looking for a preferably introductory text on Yang-Mills theory with mathematical basis and language. (Differential forms) I have a background in QCD and QED, however, I want to go more in details in geometrical interpretations of Yang-Mills theory. I am sorry if this question has asked before. Thanks in advance.


The identity det(A) = exp(Tr(ln(A)) for A general

I understand the proof of the identity in the title for $A$ Hermitian. One uses that any Hermitian matrix can be diagonalized as $A = X \Lambda X^{-1}$, such that $$ \det{A} = \prod_i \lambda_i, $$ and we have $$ \exp(Tr(\log(A)) = \exp(Tr(X\log\Lambda X^ {-1}) = \exp(\sum_i\log(\lambda_i)) = \prod_i \lambda_i. $$  However, is it possible to show the identity for $A$ not Hermitian? My motivation for this question is that in physics the identity is often used without it being clear that $A$ is Hermitian.


In Deathly Hallows, why is Cho Chang still at Hogwarts?

Cho is suposed to be a year older than Harry, but she’s in the Room of Requirement before the Battle of Hogwarts with the other students. Harry should have been in his final year (if he’d still been at Hogwarts), so shouldn’t Cho have finished the previous year?


Prevent rotation of the bevel object (Should stay parallel to the XY plane)

How to prevent bevel shape rotation in extrusion operations? I would like the final shape to remain "parallel" to the XY plane. At the end of the extrusion (Due to the change of Z along the path) my profile shape has rotated:  Here is my code def create_rectangular_curve(objname, lenX, lenY):     # create the Curve and the spline     ratioY=lenY/lenX     mycurve = bpy.data.curves.new(objname, type='CURVE')     mycurve.dimensions = '2D'     spline = mycurve.splines.new(type='POLY')     #add points to the spline     spline.points.add(4)     spline.points[0].co=(-lenX/2,-lenY/2,0,1)     spline.points[1].co=(lenX/2,-lenY/2,0,1)     spline.points[2].co=(lenX/2,lenY/2,0,1)     spline.points[3].co=(-lenX/2,lenY/2,0,1)     spline.points[4].co=(-lenX/2,-lenY/2,0,1)         #create Object     myobject = bpy.data.objects.new(objname, mycurve)     bpy.context.scene.collection.objects.link(myobject)     return myobject  def create_saw_curve(objname, nbPeriode, sizeX, sizeY):     # create the curve and the spline     ratioY=sizeY/sizeX     mycurve = bpy.data.curves.new(objname, type='CURVE')     mycurve.dimensions = '3D'     spline = mycurve.splines.new(type='BEZIER')     #add points to the spline     spline.bezier_points.add(nbPeriode*4)     #the first one     spline.bezier_points[0].co=(0,0,-1)     spline.bezier_points[0].handle_left =(-1,-ratioY,-1)     spline.bezier_points[0].handle_right =(1,ratioY,-1)     #the others points     for i in range(1, nbPeriode*4,4):         spline.bezier_points[i].co=(i*sizeX,sizeY,0)         spline.bezier_points[i].handle_left =(i*sizeX-1,sizeY-ratioY,0)         spline.bezier_points[i].handle_right =(i*sizeX+1,sizeY-ratioY,0)         spline.bezier_points[i+1].co=((i+1)*sizeX,0,1)         spline.bezier_points[i+1].handle_left =((i+1)*sizeX-1,ratioY,1)         spline.bezier_points[i+1].handle_right =((i+1)*sizeX+1,-ratioY,1)         spline.bezier_points[i+2].co=((i+2)*sizeX,-sizeY,0)         spline.bezier_points[i+2].handle_left =((i+2)*sizeX-1,-sizeY+ratioY,0)         spline.bezier_points[i+2].handle_right =((i+2)*sizeX+1,-sizeY+ratioY,0)         spline.bezier_points[i+3].co=((i+3)*sizeX,0,-1)         spline.bezier_points[i+3].handle_left =((i+3)*sizeX-1,-ratioY,-1)         spline.bezier_points[i+3].handle_right =((i+3)*sizeX+1,ratioY,-1)     #create Object     myobject = bpy.data.objects.new(objname, mycurve)     bpy.context.scene.collection.objects.link(myobject)     return myobject  profileObject = create_rectangular_curve("profil", 4, 2) curveObject = create_saw_curve('saw_curve',2,10,20) curveObject.data.bevel_object = profileObject curveObject.data.use_fill_caps = True  curveObject.data.bevel_mode = 'OBJECT'


Network subnets of class b private IP 172.16.0.0/20

I am fairly new to networking i have a simple query on how I can work out the network, broadcast, first usable, last usable and the subnet mask for the IP in the title for 9 subnets.


Glass material not working properly... When I add a light source it makes these colored dots

I need help with my glass material. For some reason when I add glass to my scene it makes these little dots which I can´t get rid of.      This is the node editor for my glass material.


java.lang.NullPointerException error witt @Test

I am new to this java Selenium. I have 2 classes. 1 parent and 1 child. I have some methods in the parent class. I pass 2 of them to the child class. The problem is only 1 method (from the parent) executes and the 2nd failed. can you help me to understand why I am getting the error and how to resolve it please  : "java.lang.NullPointerException" Parent class : public class SignUp {  public WebDriver driver;      public void go(WebDriver driver)     {     driver.findElement(By.id("id_sign_up")).click();     }         @Test         public void signup(WebDriver driver)                  {             driver.findElement(By.linkText("I’m an advertiser")).click();         }                       public void FormSign (WebDriver driver)                          {                 driver.findElement(By.xpath("//span[@css='1']")).sendKeys("Miron");             }            } Child class : public class OpenBrowser extends SignUp{   @Test public void Start() throws InterruptedException {             System.setProperty("webdriver.chrome.driver", "C:\\Program Files\\Selenium\\chromedriver.exe");     WebDriver driver = new ChromeDriver();     driver.get("https://account.admitad.com/en/sign_in/");     SignUp sg = new SignUp();     sg.go(driver);     //sg.signup(driver);      }  @Test public void miron () {     SignUp mi = new SignUp();     mi.signup(driver); }  Can someone please help me? Thanks in advance


Will deleting/flagging my own post give me back my reputation?

I created a post which was down-voted multiple times. If I delete or flag my post and it is deleted by a moderator, will I get my reputation back?


Preventing DDOS/SYN attacks (as far as possible)

Recently my CENTOS machine has been under many attacks. I run MRTG and the TCP connections graph shoots up like crazy when an attack is going on. It results in the machine becoming inaccessible.  My MRTG graph:   This is my current /etc/sysctl.conf config  # Kernel sysctl configuration file for Red Hat Linux # # For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and # sysctl.conf(5) for more details.  # Controls IP packet forwarding net.ipv4.ip_forward = 0  # Controls source route verification net.ipv4.conf.default.rp_filter = 1  # Do not accept source routing net.ipv4.conf.default.accept_source_route = 0  # Controls the System Request debugging functionality of the kernel kernel.sysrq = 1  # Controls whether core dumps will append the PID to the core filename # Useful for debugging multi-threaded applications kernel.core_uses_pid = 1  # Controls the use of TCP syncookies net.ipv4.tcp_syncookies = 1  # Controls the maximum size of a message, in bytes kernel.msgmnb = 65536  # Controls the default maxmimum size of a mesage queue kernel.msgmax = 65536  # Controls the maximum shared segment size, in bytes kernel.shmmax = 68719476736  # Controls the maximum number of shared memory segments, in pages kernel.shmall = 4294967296   net.ipv4.conf.all.rp_filter = 1 net.ipv4.tcp_syncookies = 1 net.ipv4.icmp_echo_ignore_broadcasts = 1 net.ipv4.conf.all.accept_redirects = 0 net.ipv6.conf.all.accept_redirects = 0 net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.all.rp_filter = 1 net.ipv4.tcp_max_syn_backlog = 1280   Futher more in my Iptables file (/etc/sysconfig/iptables ) I only have this setup  # Generated by iptables-save v1.3.5 on Mon Feb 14 07:07:31 2011 *filter :INPUT ACCEPT [1139630:287215872] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [1222418:555508541]   Together with the settings above, there are about 800 IP's blocked via the iptables file by lines like:  -A INPUT -s 82.77.119.47 -j DROP   These have all been added by my hoster, when Ive emailed them in the past about attacks.  Im no expert, but im not sure if this is ideal.  My question is, what are some good things to add to the iptables file and possibly other files which would make it harder for the attackers to attack my machine without closing out any non-attacking users.  Thanks in advance!


Wave function on bound state expectation value is zero

My book states the following, "when a particle, in a stationary state, is bound the expectation value of its momentum is zero" but it never elaborates why.    I know that $$\int\Psi^*(x,t)\hat{Q}\Psi(x,t)dx$$  but why would that necessarily mean that the expectation value of its momentum is zero?


I'm developing a mobile app and dealing with various UI/UX issues. I'm open to all kinds of ideas at this stage, however some designers I consult with seem to be zealots for bottom-navigation and are hesitant in actually analyzing whether the bottom-nav is actually best for my app; they just want me to use the bottom tabs navigation as if it's some UI law.  One point I try to bring up is that my business model has users who aren't typical one-handed mobile users, are tech savvy, would use my app more of a tool, and would spend only a few minutes in it. The app isn't a typical lazy-content-browsing experience where you want to minimize fingers-over-top-of-screen interference, and where you want to keep the use transfixed and spending time in the app.  Anyways, I'd like to hear about situations where a bottom nav was decided-on, or started-with, and you had good reason to eliminate it and go with another navigation design.  Most articles out there talk about eliminating hamburger menus and diving into bottom nav. Is the converse simply going back to hamburger menu?


Can a squib or muggle produce a potion with wizard help?

Could a squib or muggle produce a potion if a wizard did the wandwork for them?


Is it possible for a hash function, SHA256 for example, to be a cyclic hash function, where the hash of the hash returns the original value? Example: SHA256(a) = b SHA256(b) = a  Or in another form: SHA256(SHA256(a)) = a  A math example would be f(x) = 1/x  because f(5) = 1/5, and f(1/5) return the original 5. f(f(5)) = 5.


I've launched the calculator in my Ubuntu V14.04. I must do some hexadecimal calculations. But I don't know how to switch from the standard calculator to calculator for programmers? Any advise is very much appreciated. Thanks in advance. Erhard.


how can I prove negative times negative is positive.

Well, I know the fact that negative times negative is positive. It would be interesting to question this fact and try to prove it.


On the derivation of the Euler-Lagrange equations

Goldstein's Classical Mechanics proposes two ways to derive the Euler-Lagrange (E-L) equations. One is by the D'Alembert's Principle of virtual work and the second is by Hamilton's Principle of Least Action. They are both motivated quite differently. The D'Alembert's principle is one that tries getting rid of the constraint forces by considering 'virtual displacements' -- for whom the work done by constraint forces is zero. He then procedes to change coordinates to a linearly independent set using the holonomic equations of constraint, which leads us to the E-L equations. Hamilton's principle is motivated quite differently. It looks at all possible paths in configuration space and picks the one in which the action is extremised. This, too, leads to the E-L equations. I wanted to know how/if the two methods are equivalent. As in, how does using virtual displacements and changing variables equate to extremizing a functional of a Lagrangian?


Thermodynamic process with a decrease in entropy

I've done some searching on google and wikipedia, but I can't seem to find anything. What is the quasi static process on an ideal monatomic gas where there is a decrease in entropy?  Thanks


Is $n\in\mathbb{Z^{+}}$ or $n\in\mathbb{N}$ more appropriate for proof by induction?

Some textbooks say that proof by mathematical induction is applicable when $n$ is a positive integer, while others say $n\in\mathbb{N}$. Which one of ‘em is correct tho? (since set of positive integers doesn't include 0)


Is there something we can do against "Ask this on xyz.SE" comments?

TL;DR: Can we do something against comments of the "ask on $othersite" kind?   Every once in a while – probably at least a couple of times a week – we get questions on Super User that were cross-posted from Stack Overflow. The main reason why this happens is:   New user posts off-topic question on Stack Overflow Another user tells them that their question "belongs on superuser" (sic), or that they "should ask on ask ubuntu", et cetera The OP doesn't know that migration votes are already trickling in, and cross-posts their question   Now, what we on Super User have to do is:   Be suspicious for every single question that could have been cross-posted from another site * Check out the user's Stack Overflow profile, and find the original question Add a comment warning others not to migrate the post since it's already been cross-posted Flag the question so it gets deleted on Stack Overflow Reply to the user(s) who told the OP to ask elsewhere that this is not encouraged Hope that they (and others) read it   Want an example? See here:         Not a programming question - better suited to Super User – brettdj Jun 27 at 7:44     Do not migrate this to Super User. The user has already cross posted. – slhck Jun 27 at 11:35   @brettdj In the future, please don't post these kinds of comments. Tell users how a question can be migrated, or just let it be and vote to close. There's really no point in telling them to ask elsewhere. This will only lead to cross-posting and confusion. Thanks. – slhck Jun 27 at 11:36   I am sorry, I am new to this world and hence all the confusion. I usually try reading everything up to avoid all this, but this somehow failed this time! – Maddy Jun 27 at 12:33      It should be noted that this involved a user with 11k reputation, who probably should know better than sending users around and obviously causing confusion.  Here's , and here's  which involves a user with 338,811 reputation. No kidding, 338k. Here's one that went the . Wait… . Here's .    If you are somewhat active on Stack Overflow or other sites where crossposted questions land, then you will know that these are not single incidents — it happens all the time, and it seems some Stack Overflow users, even the high reputation ones, do not know how much moderation overhead they cause with such a simple (and unnecessary) comment.  The main problems I have with these situations are:   High reputation users don't seem to know how the sites work or how much trouble they cause The users who posted the question end up being sorry for their mistake – but how could they have known? They were told to, right?   So, what can we do against that?   * Although we can be thankful that some users explcitly say "A moderator on Stack Overflow told me to ask here" – yes, this really happened. More than once.


Why does the Community user wear the 'Ooh, Shiny!' hat on Meta Stack Exchange?

I just noticed on  that the  user wears the 'Ooh, Shiny!' secret hat on Meta Stack Exchange. This is not the case on other sites, like  and a handful of others I checked.    It probably earned this hat      due to the  script, or when an OP confirmed a duplicate   but why does it wear a hat, and only here?


Why am I seeing the message "Some of your recent flags have been decline" when flagging?

I am seeing the warning that "Some of your recent flags have been declined." on Stack Overflow.  However, looking at my flag history, this is how it is laid out:  38 Flags overall   7 Active Flags 1 Declined yesterday 1 Declined 2 days ago 1 Declined on Jan 23rd 1 Disputed on Feb 18th 27 Helpful since Jul 19, 2013   Do 2 declined flags within 2 days really trigger this warning? It seems like if I had a larger string of declined flags that this would trigger it, but 2 in a row shouldn't trigger it IMHO.