I flagged an answer  that looked like this:     This is not my article but have a look at <external URL> which looks like it will work for you.   I used the "Other" flag, with a custom message: "This answer looks more like a comment to me because it does not offer much besides a link to an external resource." As far as I can tell, the answer has been  but my flag was declined with the following message:     Please use the "NOT AN ANSWER" flag type for these "answers"!   Please help me understand the decline reason. Did I do anything wrong?

Related:  (not a dupe, that's a feature request and was closed as a dupe of another one)        (old) post does indeed say that Link-only answers can be flagged as NAA, but there are a lot of posts like  which define Not An Answer is a way that it doesn't apply to link-only answers.  Can we get some up-to-date consensus on this? That link only answers are not allowed is .


Recently, I dumped my memory strings (just because I could) using sudo cat /dev/mem | strings. Upon reviewing this dump, I noticed some very interesting things:  .symtab .strtab .shstrtab .note.gnu.build-id .rela.text .rela.init.text .rela.text.unlikely .rela.exit.text .rela__ksymtab .rela__ksymtab_gpl .rela__kcrctab .rela__kcrctab_gpl .rela.rodata .rodata.str1.8 .rela__mcount_loc .rodata.str1.1 .rela__bug_table .rela.smp_locks .modinfo __ksymtab_strings .rela__tracepoints_ptrs __tracepoints_strings __versions .rela.data .data.unlikely .rela__verbose .rela__jump_table .rela_ftrace_events .rela.ref.data .rela__tracepoints .rela.gnu.linkonce.t6   These lines all seem to be related in some way: they are all (very) near each other in the memory, they all have similar .<name> prefixes, and they all seem to refer to each other.  What would cause these strings to appear, and why?

What I already know:  An ELF executable has a number of sections, obviously the .text and .data sections get loaded into memory as these are the main parts of the program. But for a program to work, it needs more info, especially when linked dynamically.  What I'm interested in are sections like .plt, .got, .dynamic, .dynsym, .dynstr etcetera. The parts of the ELF that are responsible for the linking of functions to addresses.  From what I've been able to figure out so far, is that things like .symtab and .strtab do not get loaded (or do not stay) in memory. But are .dynsym and and .dynstr used by the linker? Do they stay in memory? Can I access them from program code?  And are there any parts of an executable that reside in kernel memory?  My interest in this is mostly forensic, but any information on this topic will help. The resources I've read about these tables and dynamic linking are more high level, they only explain the workings, not anything practical about the contents in memory.  Let me know if anything in unclear about my question.


Say I have a bucket of fuel that can produce 150J of energy by combustion. No matter what frame of reference an observer or the bucket of fuel is in, since the configuration of molecules stay the same, the amount of energy produced by complete combustion of the fuel would be 150J.  Say I have a spaceship traveling at 10ms-1 relative to an outside observer A. The spaceship then burns all the fuel in the bucket, converting all the energy produced into kinetic energy without regard to thermal energy loss. Since it originally has 50J of kinetic energy, the additional kinetic energy of the fuel would increase its kinetic energy to 200J which would mean that it is now traveling at 20ms-1, so says A.  However, from the frame of reference moving at 10ms-1 in the same direction as the spaceship relative to A, the spaceship was originally moving at 0ms-1, and after burning all the fuel, now has 150J of kinetic energy, meaning that it is moving at 17.32ms-1. That means that relative to A, the spaceship should be traveling at 27.32ms-1. This is different from the value predicted by A, which seems like a contradiction.  What's wrong with my reasoning?

If the velocity is a relative quantity, will it make inconsistent equations when applying it to the conservation of energy equations?  For example:  In the train moving at $V$ relative to ground, there is an object moving at $v$ relative to the frame in the same direction the frame moves. Observer on the ground calculates the object kinetic energy as $\frac{1}{2}m(v+V)^2$. However, another observer on the frame calculates the energy as $\frac{1}{2}mv^2$. When each of these equations is plugged into the conservation of energy, they will result in 2 distinct results (I think).


So the vectors are   r  1   1  1  s   2  1  2s  2    For which values of $r,s$ in subset $\mathbb R$ is the set $\{u,v,w\}$ linearly independent? I got if $s(rs-1)(2r-1)$, does not equal $0$, thus $r$ cannot equal $1/2$, $rs $ cannot equal $1$ and $s$ cannot equal $0$....but i'm feeling $1%$ confident on my answer because the matrices was difficult to reduce to row echelon form Would appreciate any help, Thankyou!

$$u = (r,1,1), \ v = (1,s,2s), \ w = (1,2,2)$$  I know to assume the set will be linearly dependent, equate them to the $0$ vector and find the values not equal to what $r$ and $s$ is. But I can't seem to reduce the matrix to echelon form.  I've gotten to the point of:  $$     \begin{pmatrix}     r & 1 & 1 \\     1 & s & 2 \\     1 & 2s & 2 \\     \end{pmatrix} $$  $R_2 = R_2 - R_3$ $$     \begin{pmatrix}     r & 1 & 1 \\     1 & -s & 0 \\     1 & 2s & 2 \\     \end{pmatrix} $$ $R_3 = R_3 +2R_2$  $$     \begin{pmatrix}     r & 1& 1 \\     0 & -s & 0 \\     1 & 0 & 2 \\     \end{pmatrix} $$  EDIT: Thank you @LordSharktheUnknown  $R_3 = r \times R_3 - R_1$  $$     \begin{pmatrix}     r & 1 & 1 \\     0 & -s & 0 \\     0 & -1 & 2r-1 \\     \end{pmatrix} $$  And I'm stuck. I know $s ≠ 0$ for it to be linearly independent but I have no idea how to reduce the rows any further to get to $r$ by itself.  Any help is appreciated.  Thank you.


for (String fruit : list)     {         if("banane".equals(fruit))             list.remove(fruit);         System.out.println(fruit);     }   Here a loop with remove instruction. At execution time, I get some ConcurrentModificationException, below the console output:  Exception in thread "main" java.util.ConcurrentModificationException at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:449) at java.util.AbstractList$Itr.next(AbstractList.java:420) at Boucle.main(Boucle.java:14) abricot banane   Question: How to remove some element with a loop?

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.


I need to validate Username for an user for below condition.  username can contain letters, numbers or combination of both. Username must not contain any special characters such as @ $ % ^ & * () + = ‘ ~ - _"  Valid Examples: Test123 123Test T123est Invalid Examples: Test@%^&123 @#$Test Test123@#$%^ Below is the expression I tried: /[a-zA-Z\d]+/ /[^@$%^&()+=‘~-_"]/

I need to find a reg ex that only allows alphanumeric. So far, everyone I try only works if the string is alphanumeric, meaning contains both a letter and a number. I just want one what would allow either and not require both.


For a typed ArrayList list<E> , why isn't remove method is like  public boolean remove(E e) { }   remove() and contains() method takes Object o as parameter. while add() takes E. There is a likelihood someone can call remove() with different object type and get Runtime Error.

Why isn't  generic?    Seems like Collection<E> could have boolean remove(E o);   Then, when you accidentally try to remove (for example) Set<String> instead of each individual String from a Collection<String>, it would be a compile time error instead of a debugging problem later.


I am interested in learning the basics of group theory. I know a few basic theorems like Lagrange, Cauchy etc., but nothing from group actions. What would you recommend?

Which textbook is good for introductory group theory?


I'm trying to make Wheat    How to bend this object without affecting target size?  When I add this Object in Curve modifier with NurbsPath in object section my object changes sizes and moves, looking broken.  Screenshot broken object      Broken Wheat     I tried select nurbs, Ctrl+A and choose Scale and Rotation, and object still resizes and looks broken  Here is my project file

Every time I think I have the curve modifier mastered, it throws me a another curve ball (no pun intended).  Why in  can I not get the lights to follow the spiral curve? When the modifier is activated, the lights are stretched and distorted along the curve.  I created the curve by converting it from a mesh (string of verts). Why does it not display like a normal Bezier? Is that related to my problem?  I am following all the "rules" that I am aware of, as detailed here: . The curve seems to run in the correct direction. The origin point is at the first point of the curve. The curve modifier on the lights is set to -Y which is the local orientation of the curve's direction.  What am I missing?


When I first read :     Reduce to Ashes deals 5 damage to target creature. If that creature would die this turn, exile it instead.   I thought "ok, a way to deal with indestructible", but then I thought again and wondered. Because indestructible will stop you dying, and the exile only kicks in after you die.  So does it work?

says:     Annihilating Fire deals 3 damage to target creature or player. If a creature dealt damage this way would die this turn, exile it instead.   If I deal lethal damage to an indestructible creature with Annihilating Fire or after Annihilating Fire has been played on it this turn will the the creature be exiled?


I did not understand the Error i am getting;    my elements declared as following;  ListView listViewLocations; private ArrayAdapter<String> listAdapter ; ArrayList<Long> addressList = new ArrayList<Long>();   and inside onCreate;           listViewLocations = (ListView) findViewById(R.id.listViewLocations);     ArrayList<Long>  addresses = new ArrayList<>();   then the method displayed in the picture.  In my Stacktrace i made sure to log the final ArrayList by commenting the code and adding the log.i statement in order to confirm the retrieval of Data, and it is logging it as an Array;   5-08 14:28:06.265 22794-22794/net.we4x4 I/myTag: [20.4203339/84.5712178, 62.4334592/94.5716614, 22.4214592/59.5711114]   Simply i am trying to put this Array in a listView and i followed a simple tutorial on how to do so :    Then i tried declaring the ArrayList in a different way;     ListView listViewLocations;    private ArrayAdapter<String> listAdapter ;    ArrayList addressList;   to resolve the redline (error shown in the picture)  and i got this error in my stack trace;   05-08 15:12:16.790 22349-22349/net.we4x4 E/AndroidRuntime: FATAL EXCEPTION: main                                                        Process: net.we4x4, PID: 22349                                                        java.lang.NullPointerException                                                            at android.widget.ArrayAdapter.getCount(ArrayAdapter.java:330)                                                            at android.widget.ListView.setAdapter(ListView.java:486)                                                            at net.we4x4.GPSlocations.listAddresses(GPSlocations.java:228)                                                            at net.we4x4.GPSlocations.access$000(GPSlocations.java:47)                                                            at net.we4x4.GPSlocations$1.onClick(GPSlocations.java:93)                                                            at android.view.View.performClick(View.java:4508)                                                            at android.view.View$PerformClick.run(View.java:18675)                                                            at android.os.Handler.handleCallback(Handler.java:733)                                                            at android.os.Handler.dispatchMessage(Handler.java:95)                                                            at android.os.Looper.loop(Looper.java:136)                                                            at android.app.ActivityThread.main(ActivityThread.java:5584)                                                            at java.lang.reflect.Method.invokeNative(Native Method)                                                            at java.lang.reflect.Method.invoke(Method.java:515)                                                            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)                                                            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)                                                            at dalvik.system.NativeStart.main(Native Method)

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


I know how to do it using strptime, but how do I account for +0530  d = '2015-04-11 21:23:39+0530' d = datetime.strptime(d,'%Y-%m-%d %H:%M:%S')   Note Please dont suggest to slice 0530 off.

I need to parse  strings like "2008-09-03T20:56:35.450686Z" into Python's datetime type.  I have found  in the Python standard library, but it is not very convenient.  What is the best way to do this?


First of all, I found an implementation of GetHashCode for a 3D integer vector, but I can't figure out if this is a good one or not (at least I'm not 100% sure):  public struct Vector3i {     public int x;     public int y;     public int z;      public override int GetHashCode ()     {         return x.GetHashCode () ^ y.GetHashCode () << 2 ^ z.GetHashCode () >> 2;     } }   From this, I would like to create a pair of 3D vectors (let's call them A and B) with a hashcode which is independent from the order of Vectors A and B. In other words I want the pair (A, B) to have the same hashcode than the pair (B, A). I thought of something like this:  public struct Vector3iPair {     public Vector3i a;     public Vector3i b;      public override int GetHashCode ()     {         return a.GetHashCode () ^ b.GetHashCode ();     } }   Do you think this would have the correct behavior?

In .NET, the  is used in a lot of places throughout the .NET base class libraries. Implementing it properly is especially important to find items quickly in a collection or when determining equality.  Is there a standard algorithm or best practice on how to implement GetHashCode for my custom classes so I don't degrade performance?


There seems to be a strange side-effect in \maketitle in beamer; see the following MWE:  \documentclass[12pt]{beamer} \usetheme{madrid} \setbeamercolor{titlelike}{fg=orange}  \usepackage[american]{babel} \usepackage[utf8]{inputenx} \usepackage[T1]{fontenc} \usepackage{lmodern}  \title{List of Donald Duck universe characters} \author{Walt Disney}  \begin{document}  \frame{\maketitle}  \begin{frame}{Testslide} Text before the columns in black \begin{columns}[t] \begin{column}{0.62\textwidth} Some text in \texttt{titlelike} color \end{column}  \begin{column}{0.38\textwidth} Some more text in black \end{column} \end{columns} \end{frame}  \end{document}   Only the text in the first of both columns has the same color as the title. It also happens without the \setbeamercolor{titlelike}{fg=orange} statement, but who sees white text on a white background? It does not happen if \maketitle is not invoked. \titlepage instead of \maketitle has the same effect.  Any work-around for this?

I have been trying to figure out why isn't the text color in a titleless tcolorbox frame rendered black in some cases in a beamer presentation. This occurs only with certain themes (Madrid, Ilmenau, Copenahagen, ...).  Consider the following MWE:  \documentclass{beamer} \usetheme{Copenhagen} \usepackage{tcolorbox} \begin{document} \title{Title} \author{Author} \date{\today} \frame{\titlepage} \begin{frame}   \begin{tcolorbox}     This is a text that should have been black.   \end{tcolorbox} \end{frame} \end{document}   The second slide is rendered thus:    However, if I add a title to the tcolorbox frame, the text color turns out black. Also, and strangely enough, if I remove the presentation's titlepage, the text color is also rendered black. Like so:  \documentclass{beamer} \usetheme{Copenhagen} \usepackage{tcolorbox} \begin{document} \begin{frame}   \begin{tcolorbox}     This is a text that should have been black.   \end{tcolorbox} \end{frame} \end{document}   Which is rendered:    Any ideas as to what might be going on in here?


I'm far from a DBA, and don't really have a great understanding of backup chains, but I was asked the following question by a network administrator, and wanted to be sure that my answer was correct.  We have Symantec Backup Exec 2012, which currently takes care of full backups for databases either every day or every week, depending on the usage of that database.  As well as the fulls, BE is also doing incremental backups of the transaction logs either every 30 mins or every 2 hours, again depending on the usage of that database.  Our BE server is also responsible for other storage, cluster and virtual machine backups, and only has so many slots available to run jobs simultaneously.  I have been asked if it is possible for BE to be responsible for the full backups, but have SQL natively handle log file backups (with BE probably then backing up the actual .bak file every couple of hours).  I know that if I try to do an incremental backup in BE, and the last backup was not done by BE, it will fail because the LSN is off (rather, I think this is the reason). However I am not sure how the chain is impacted if all the transaction log backups are done in one device, and the full is done in another. Do transaction log backups work from the last log backup and then also from the last full backup if that occurred later?  If this question needs any clarification (because I've used terms incorrectly, for example) then please just let me know and I will modify as appropriate.  Thanks in advance for your time and advice.

I have inherited a database server with SQL Server 2005.  The databases have full recovery mode with hourly transaction log backups.  There are two sources taking full backups overnight and hourly transaction log backups: Tivoli Data Protection (TDP) which is part of IBM's Tivoli Storage Manager (TSM) as well as a regular SQL Server Agent job.  If a disaster occurred and I needed to recover the database from backup, would I be missing data?  I was thinking that if the SQL transaction log backup fires off, it will mark the committed transactions in the log file as ready to be overwritten.  After that happens, users will commit more transactions.  When TSM/TDP comes in, it will mark the committed transactions in the log as ready to be overwritten.  If I were to do a restore from either backup (unless it's using only the full backup), then it would not include all of the data.


I want to install Ubuntu alongside Windows 8.1 but instead of installing it on the same hard drive, I want it to be installed on my spare hard drive (160GB). So Windows 8.1 will be on my 500Gb Hard Disk and Ubuntu will be on my 160Gb hard disk. Will this work and how?

I need my pre-installed version of Windows 7 (or any other version of Windows), how could I install Ubuntu without erasing it?


i am fairly new to Ubuntu. so i don't really have much knowledge about the command lines and Os. I have been trying to use the command : sudo apt-get update  But its showing these errors.   I don't understand a single thing.Any help would be appreciated.

I added some extra repositories with the Software Sources program. But when I reload the package database, I get an error like the following:     W: GPG error:  trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8BAF9A6F   I know I can fix it using apt-key in a terminal, according to the official Ubuntu documentation. But I would have liked to do it graphically. Is there a way to do this without using a terminal?


Vector multiplication, there are two types one scalar or dot as $A\cdot B=\vert A \vert \vert B \vert \cos \theta$ and vector or cross $A\times B = \vert A \vert \vert B \vert \sin\theta$ in geometric form and there respective algebric or component form. But what property of vectors makes them work as ways of vector multiplication and other possible ways don't. Basically what is motivation behind the scalar product and vector product how and why they perfectly justify multiplication of vectors.

As far as I've seen, there are only two types of vector multiplication defined, dot product/inner product which is defined in a vector space of any dimension, even infinite, and cross product, which is only defined in three dimensions. Are there more definitions of vector products?


I am looking for a nicely priced touchscreen laptop (not netbook) that works great with Ubuntu. can you help me out?  -Thanks!!-

Before I buy my next laptop, I'd like to make sure that it will work perfectly with Ubuntu. Is there a list of completely supported computers anywhere?


┌──(badoukone㉿LAPTOP-6GSFE4DV)-[~] └─$ apt update Reading package lists... Done E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission de E: Unable to lock directory /var/lib/apt/lists/ ┌──(badoukone㉿LAPTOP-6GSFE4DV)-[~] └─$ apt upgrade E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permissio E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), ar ┌──(badoukone㉿LAPTOP-6GSFE4DV)-[~] └─$

I cant update msf console in kali linux,how can i fix that ? I used this command apt update; apt install metasploit-framework   and got this error #E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)


I would like to know when you should represent a particular character as its coded character in HTML, i.e. when (and WHY) should you use &#36; instead of '$' ?  Here is the list I am looking at:

This has been confusing me for some time. With the advent of UTF-8 as the de-facto standard in web development I'm not sure in which situations I'm supposed to use the HTML entities and for which ones should I just use the UTF-8 character. For example,   em dash (–, &emdash;) ampersand (&, &amp;) 3/4 fraction (¾, &frac34;)   Please do shed light on this issue. It will be appreciated.


I hold an official Philippine passport (government official) and will travel from Manila to Athens through Amsterdam (transit). I do not need to get a visa for entry to Athens, Greece. Do I need to get an airport transit visa for Amsterdam?

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


There are $5$ combinations of $4$ numbers from $1-9$. If you write these on two coins, so there are $2$ numbers on each coin. Then you flip the coin. The sum of the two numbers add to $8,9,10,$ or $11.$  In other words, you can combine $2$ numbers to make $8,9,10,$ or $11.$  What are the combinations

Dr Math told his family to write 4 different integers from 1 to 9 on to the 4 ]


My question is related to index rebuilding, mainly the SORT_IN_TEMPDB  option.  BOL  that:     Even if other users are using the database and accessing separate disk addresses, the overall pattern of reads and writes are more efficient when SORT_IN_TEMPDB is specified than when it is not.   On the other hand, one of the users :     When rebuilding an index you would need twice the space of the index + 20% for the sorting. So in general to rebuild every index in your db you only need 120% of your biggest index in your DB. If you use SORT_IN_TEMPDB, you only win 20%, you still need an aditional 100% in your data file. Further more, using sort in tempdb increases your IO load drastically, since instead of Writing the index one time to the datafile, you now write it one time to the tempdb and then write it to the data file. So that is not always ideal.   Would you like to share your own experience about this option? Have you ever had to use this option while rebuilding indexes? What was the performance result?

We are debating whether to use the SORT_IN_TEMPDB option for our DW tables. My understanding is that there are more writes when using this option, although they are more sequential. We have a SAN (which has has been notoriously slow at times), so in our case we want to limit the number of writes as much as possible. I believe tempdb is on a separate LUN (set of disks).  We have plenty of disk space in our data file and on our tempdb file. In this case, would we benefit from using SORT_IN_TEMPDB?   One thing that struck me was this comment on this      When rebuilding an index you would need twice the space of the index +   20% for the sorting. So in general to rebuild every index in your db   you only need 120% of your biggest index in your DB. If you use   SORT_IN_TEMPDB, you only win 20%, you still need an aditional 100% in   your data file. Further more, using sort in tempdb increases your IO   load drastically, since instead of Writing the index one time to the   datafile, you now write it one time to the tempdb and then write it to   the data file. So that is not always ideal.   We definitely don't want to increase our IO load with our slow/possibly misconfigured SAN.  What would be the best way to test this? By simply rebuilding the table with and without the option and log the times?  Edit: We have 8 tempdb files, each 15GB. We do have TF 1117/1118 flags set and IFI is enabled. We currently do a mixture of rebuilding with the sort_in_tempdb option and without it.   Thanks!  SQL Server 2012 Enterprise


I am sure that what I am trying to do is very simple but I am new to regex.  I am searching through millions of lines of code. What I need to find are <cffunction> tags that are missing the output= attribute. For instance this should match:  <cffunction name="qrySelectQuestions" access="public" returntype="query">   However, this should not:  <cffunction name="qrySelectQuestions" access="public" output="no" returntype="query">   Note, the output attribute could be anywhere within the tag definition.

I know it's possible to match a word and then reverse the matches using other tools (e.g. grep -v). However, is it possible to match lines that do not contain a specific word, e.g. hede, using a regular expression?   Input:  hoho hihi haha hede   Code:  grep "<Regex for 'doesn't contain hede'>" input   Desired output:  hoho hihi haha


We can replicate a Singleton behavior my making a Class with Static Methods and Member Elements. Other than serialization What's the harm of implementing a singleton using static Body only.

What real (i.e. practical) difference exists between a static class and a singleton pattern?  Both can be invoked without instantiation, both provide only one "Instance" and neither of them is thread-safe. Is there any other difference?


I would like to access external QGIS plugins through a python script. I have been able to access the built in QGIS processing and vector toolbox, but have been unsuccessful with external plugins such as the topology checker plugin. I have tried this both using the built in QGIS python console, and an external IDE, but attempts have failed.  I am sure that there is a way to do this, has someone done this before?

Is there a way to access QGIS plugins in Python?   I'd like to write a script to do some geoprocessing, and I'd like to use the clip, regular points and convex hull tools in fTools, as well as the Road graph plugin. The latter is probably a different can of worms because it is a C++ rather than Python plugin.


OK, this question may already be answered but I do not quite understand all of it. So I have understood that scores loadings and principal components are different concepts: Scores: Are the new coordinates of the observations in the new space defined by PC. (There is no such thing as first principal component score) Loadings: They are the coefficients of the linear combination of the original variables in orher to form the principal components. Then in a   they mention that a principal component is a linear combination of what ? Is a linear combination of loadings and the original observed variables ? Then, a score is what ? the component of the PC vector ?

What are principal component scores (PC scores, PCA scores)?


As the title suggests, I need to construct a continuous function on $\mathbb{R}$ whose 2nd order derivative exists at $x=0$, but $\forall \delta>0$, this function’s first order derivative is not continuous on $(-\delta,\delta)$. I have been told to use functions like $f(x)=x^2[sin(1/x)] $as components for construction, but have no idea about the function that satisfies the requirement. Can you give me an example?

Is there a counterexample?  Proposition: Let $f:\mathbb{R} \longrightarrow \mathbb{R}$ be a differentiable function  such that $f':\mathbb{R} \longrightarrow \mathbb{R}$ is differentiable at $a\in\mathbb{R}$ (possibly differentiable at a single point). Then $f':\mathbb{R} \longrightarrow \mathbb{R}$ is continuous at an interval $(a-\delta,a+\delta)$ for some $\delta>0$.  Any hints would be appreciated.


Can we write  ternary operator in DIV tag on LWC as below.  <div class = if:true= {showleftDiv} ? slds-size_4-of-6 : slds-size_4-of-6 >

How can expression functions similar to Visualforce and Lightning Aura Components be achieved within lightning web components?   For example, <template if:true={index % 5 == 0}>
</template> expression index % 5 == 0 is not compyling at all.  accountList.html  <template>     <template if:true={accounts.data}>         <template for:each={accounts.data} for:item='item' for:index='index'>                                       {item}         </template>     </template> </template>   accountList.js  import {LightningElement, wire} from 'lwc'; import getAccounts from '@salesforce/apex/TestController.getAccounts';  export default class AccountList extends LightningElement {      @wire(getAccounts) accounts;  }   Since LWC doesn't support Expression Functions, I'd like to know how to implement them.


In the recent EHT press release of the image of the super massive black hole at M87, I am curious to know why the super massive black hole at the centre of milky way has not been imaged yet.

The first image of a black hole has been released today, April 10th, 2019. The team targeted .  Why didn't the team target  at the center of our own galaxy? Intuitively, it would seem to be a better target as it is closer to us.


I have the following code. I initialized 2 pointers, one at the beginning and another at the ending of a string. After every step, I increment the 1st pointer and decrement the second pointer. I copy the value of first pointer into the second if the value obtained by dereferencing 1st pointer is less than the value obtained by dereferencing 2nd pointer.  #include <stdio.h> #include <string.h>  int main() {    char *word="aacdbc";    char *p=word;    char *q=word+(strlen(word)-1);    printf("\n%s\n",word);    int i;    for(i=1;i<=strlen(word)-1;++i) {       if(*p<*q) {          *q=*p;       }       ++p;       --q;    }    printf("\n%s\n",word);    return 0; }   But the code shows a "Segmentation fault error". In which line did I make a mistake?

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


I am unsure whether turning count data into density still makes Poisson as the appropriate distribution for modelling.  If a given response data are, for example, counts of animals, then such data are best modelled using a Poisson (or quasi-Poisson) distribution.  If the response data are continuous (but bound by zero), then the gamma distribution is likely appropriate.  But what happens when data from counts are turned into density (number of animals per unit area) or encounter rate (number of animals per unit of effort)? Is Poisson distribution still appropriate? Or would one need to use a gamma (or some other) distribution?  I assume it should still be Poisson (or quasi-Poisson, in case of overdispersion).

I am carrying out research to look at differences in fish density and fish species richness when using two different underwater visual census methods. My data was originally count data but then typically this is changed to fish density but I have still decided to use a Poisson GLM, which I hope is right.   model1 <- glm(g_den ~ method + site + depth, poisson)   My 3 predictor variables are method, site and depth which I ordered as factors when I input them.   My response variables are grouper species richness, grouper density and the same for other fish groups. I am aware that density is not an integer and it is numerical data e.g 1.34849. I am now however getting this error:      In dpois(y, mu, log = TRUE) : non-integer x = 0.037500   I've been reading up and many people suggest using an offset, is this the most advisable thing to do?


I read this before 1992 or so.  It was more of a 'B' novel.  Humans make contact with aliens who begin invading.  A human hero, I think he's a military officer (US Navy?), gets to a human scientist with a very fast space ship.  They head towards the alien home planet which circles Barnard's Star with aliens chasing them (I think).  Alien and human ships use some sort of field drive (not a reaction drive).  Ships of both species travel FTL but the trip takes weeks or months.  The alien world is wild / jungle like.  Some human crew members get chomped by the native fauna / flora(?).  They discover the aliens have a weakness (which I don't recall).  Humans travel home and free the world.

I am searching for the title of a book I read a long time ago, from the style I would say that it was "golden age" sci-fi. The Earth is attacked by a race of aliens who have set up camp on the moon and are bombarding Earth with poison gas shells. Ordinarily this would not be a problem as Earth is protected by a superweapon called AKKA, that can easily see off any threat. However due to fear of it falling into the wrong hands it is stored dismantled, and the aliens have cleverly kidnapped the scientist(s) who can can reassemble it. Our heroes, who are out on space patrol beyond Pluto survive the initial attack and travel to the aliens homeworld and rescue at least one scientist and return him to Earth. There, using just bits of random junk, he constructs an AKKA device and points it at the moon, which simply vanishes along with all the aliens on it. The meaning of AKKA is never revealed in the book, as far as I can remember.   I also remember that before setting off, the heroes take a bit of time out to tune up their 6-cylinder space engine for maximum performance, that was some good thinking.


If you take a general complex number x+iy and raise it to the power i, what does this mean and what is the resulting value i.e. what are the real and imaginary parts? I need to apply this to z=-1-i

Greetings!  I am trying to understand what it means to have an imaginary number in an exponent. What does $x^{i}$ where $x$ is real mean?  I've read a    on this issue, and they all seem to boil down to the same thing:   Any real number $x$ can be written as $e^{\ln{x}}$ (seems obvious enough.) Mumble mumble mumble This is equivalent to $e^{\cos{x} + i\sin{x}}$    Clearly I'm missing something in step 2. I understand (at least I think I do) how the complex number $\cos{x} + i\sin{x}$ maps to a point on the unit circle in a complex plane.  What I am missing, I suppose, is how this point is related to the natural log of $x$. Moreover, I don't understand what complex exponentiation is. I can understand integer exponentiation as simple repeated multiplication, and I can understand other things (like fractional or negative exponents) by analogy with the operations that undo them. But what does it mean to repeat something $i$ times?


I have macbook pro mid 2012 edition. I want to disable sound at the time of boot that comes while turning on..

How can I permanently disable the startup sound (or chime) in Yosemite?  (I am using a late-2014 13" macbook pro)  I already tried several options found here and there :    installed StartNinja.app => did not work installed Auto-Mute.app  => did not work tried to install the old StartupSound prefPane => did not work tried the command "sudo nvram SystemAudioVolume=%80" => volume does not change (I also tried other values than 80, such as 00, 01, or nothing)   NOTE: I know that it is possible to mute the next startup sound by turning the volume down, but this is not a permanent solution.


Why is not it possible to write "company files" as "company's files"?  I am not quite sure whether it is correct to say "company's files".

How would you explain to a person who is learning English, and whose native language does not have attributive nouns, when the possessive should be used instead of an attributive noun?  In particular, how would you explain it referring to the following list of sentences?   Today's news is bad This week's schedule has been changed Tomorrow's lunch will be at the French restaurant This year's report will be communicated in the reunion room Last summer's vacations were memorable Last year's meetings were a complete disaster


I have geocoded points in long, lat format, and I want to calculate the distance between them using R.  This seems pretty straight forward, yet I can't find a function that will do it easily.  I've been attempting to do it with the gdistance package, but it seems very convoluted and oriented to graphing, I just need a number.  Something like distanceBetween(pointA,pointB) that returns a number.

How do I calculate the distance between two points specified by latitude and longitude?  For clarification, I'd like the distance in kilometers; the points use the WGS84 system and I'd like to understand the relative accuracies of the approaches available.


I am trying to get a single answer to the question.  If I leave the eu on a resident permit from Poland that expires while I am out of the E.U. can I return to the E.U. at anytime following the expiration as a visitor on short term visit up to 90 days?   Thanks in advance

I have a 1-year residence permit from one Schengen country that is now expiring. Upon its expiration, I would like to get my 90/180 days validity as a tourist to stay, or return here as soon as possible.  I understand that the tourist short-stay scheme is based on the 90/180 days "counter". But what happens if my previous stay was not tourism but residence (as searching year). Wouldn't that mean that I can quickly exit and re-enter the Schengen area to activate my tourist stay?   Also, is there a way to change this purpose of stay without exiting the Schengen area?


What's the difference with following codes:  Code #1: Using Binary Mode  int main() {     std::fstream w("D:\\file.txt", std::ios::out | std::ios::binary);      char *p = "Hello World\r\nHi";      w.write(p, strlen(p));      // Close the file     w.close(); }   Code #2: Using Text Mode  int main() {     std::fstream w("D:\\file.txt", std::ios::out);      char *p = "Hello World\r\nHi";      w.write(p, strlen(p));      // Close the file     w.close(); }   Does it matter whether I use binary or text mode in case of writing strings like this?

What translation occurs when writing to a file that was opened in text mode that does not occur in binary mode? Specifically in MS Visual C.  unsigned char buffer[256]; for (int i = 0; i < 256; i++) buffer[i]=i; int size  = 1; int count = 256;   Binary mode:  FILE *fp_binary = fopen(filename, "wb"); fwrite(buffer, size, count, fp_binary);   Versus text mode:  FILE *fp_text = fopen(filename, "wt"); fwrite(buffer, size, count, fp_text);


Without understanding the mathematics, I have learned that  the uncertainty principle precludes being able to precisely measure the position and velocity of a particle at the same time. So my question is, would two different people be able to measure a particle at the same time, one measuring the velocity and the other the position. And so by sharing their results be able to circumvent the uncertainty principle?

My understanding is that an observer can measure the precise location of a particle so long as the corresponding uncertainty in momentum measurement is not an issue and vice-versa.    Say there is such an observer, interested in the precise position of a particular particle.  Now, consider a second, independent observer, unbeknownst to the first, who is trying to measure the exact momentum of the same particle without caring about the position.  As a thought experiment, we assume that the two observers are somehow able to access the same particle at the same time in some way without being aware of each other.  Can both observers get their desired results?


Why do some people say:     You better save some of them kids for jack.   While others say:     You better save some of the kids for jack.

I've seen a lot of times the pronoun them used like an article. For example, in the title of the Delta Rhythm Boys Them bones, or in the first sentence of "Money for nothing":     Now look at them yo-yo's, that's the way you do it.   I know that it's not "proper English" (i.e., not something you'll use in a serious writing), but I'd like to know when it's commonly used, and why. Is there any difference between using it and using the?


When I need to know the seconds in Windows 10, I need to click on the clock to open it, but that is annoying if I need to do it multiple times or I need to wait for the next minute to be reached.  I would like the taskbar clock to have the seconds (HH:MM:SS) instead of only hours and minutes (HH:MM).

How do I show seconds on the Windows tray clock? I've tried the advanced options in the control panel, but I'm not sure how do I do it. Is it like hh:mm:ss or is it something else?


I am connecting to my iMacs running OS X Mavericks remotely. For security purposes I have fast user switched to a dummy account before leaving work, so that my remote connection doesn't allow anyone near my machine when I connect to get unauthorized access.  This works fine, but when I test the process from another machne in my office, I notice that when I first connect, the screen comes on (powers up) and it prompts for the dummy user's password. After a few seconds it times out and goes back to sleep, and if that were it I could deal with it, but this is not the end of it. Whenever there is activity in the VNC session, the screen comes back on again! I am not constantly typing, so the reult is that the screen keeps going on and off over and over and over.  Aside from the concern of wear and tear (the whole display essentially being turned on and off over and over) there is also somewhat of a security concern as well. This constant cycling can attract unwanted attention. For instance, at night when the office is dark, one office suddenly becoming light and then going dark over and over can attract the attention of security.  During the day, if the display is in a common area, the screen going on and off can interrupt meetings as people try to figure out why the machine is behaving strangely or are just distracted by it.  It may be undesirable to have an indication that the machine is in use, and this continual waking is very indiscreet.  Is there some way to disable this? I have tried several VNC clients to no avail. I don't recall for sure, but I don't think OS X Mountain Lion had this problem.  This  is similar, but the asker is apparently okay with solutions that involve dimming the screen.  This is not acceptable in this situation, because while the computer in question usually is idle, it is conceivable that another user on a different account might be trying to use the machine when I VNC in.  Therefore, any attempts to dim the screen would potentially be fighting against a different user on the machine.  Additionally, in my situation I need to VNC into my Mac from an Android device, so solutions specific to Mac OS X clients (which seem to cover most of the remaining answers) are not applicable here.  I have tried both clients which require the generic VNC password, and those that automatically log me in separately from the logged in user, but the screen wakes up in all situations I have tried.  Having to install a special VNC server on my Mac when there is already one that comes with OS X is also undesirable, as it is really more trouble than is saved by eliminating the problem.  Edit: ok, edited to explain how my question is different from and not answered by the question it is marked as a "duplicate" of. Now what?

I have an iMac mid 2011 at home. When I was not home, I may need to access my mac with Screen Sharing. However the iMac display will turn itself on when I connect via Screen Sharing. The problem is I don't want to scare my family at home (with the elders and kids) as the iMac "turn itself on suddenly".   This is a problem specific for iMac. On MacBooks (Pro, Air, whatever) I can set the brightness to the lowest setting so the screen is black (i.e. the LED light is off). However on an iMac you cannot turn off the LED backlit by setting brightness. The display is still bright and everything is clearly visible even on lowest brightness setting.  Therefore these solution are not working as the display will turn on as soon as you move your mouse or hit any key on the keyboard via Screen Sharing.   Sleep Display (by Ctrl+Shift+Eject) Using the code listed on    Question: Is the a way to keep the iMac display off entirely while you accessing it with Screen Sharing?


tried the workaround posted here  but not even after rebooting, updating grub or kilall unity-panel-service commands do reset unity but no hibernation is available on "start" button.  when sudoedit file saves as /vm etc etc, tried chaging this name to the /etc/polkit loclauth etc etc but wouldnt let me save the file there must be doing something wrong, because I browse to /etc/polkit-1/localauthority/50-local.d and there are no files there

In Ubuntu 12.04 and newer, . How can I enable this back?


Please fill in the blank with the correct word and explain your choice.  I am __ G-d made me.  A. who  B. whom    Some people have suggested I elaborate on this question so here goes.  The above was not copied from any test. It is a question about basically two things: (1) whether an objective complement should be in the same case as the subject ("I" => "who") or as the object of the verb ("me" => "whom"); and (2) whether the verb to "make" [someone into something] should properly be considered a linking verb (~a form of "to be") (or, if not, whether this sentence has an implied nonfinite linking verb, and, if so, whether that would indeed exige the predicate nominative: "I am who G-d made me [to be]" => "I"? Or conceivably--since "me" becomes the subject[?] of the complement clause-- =>"me"?).   There are many other implications, just some of which are discussed . It is a serious question that seems not to be addressed by any general overview of who/whom on this site.  There is another question about a similar construction, "", but the answers there don't address the topic of case.  My question may be addressed  and may have different answers according to different .     Cf. "She is with whom I practice." "It is she I want to be like." "That's who I want to be like."     Related:

Which is correct?     I'm what you made me   or     I'm who you made me


(I am a 13 year old so when you answer please don't use things that are TOO hard even though I actually can understand quite complex stuff)  I was studying Infinite sets and their cardinality (not in school, but just for fun), and I know that card($\mathbb N$)=$\aleph_o$ and card($\mathbb R$)=c I now know that c=$2^{\aleph_o}$ which may or may not be $\aleph_1$.   Is there any proof that c=$2^{\aleph_o}$?

$\aleph_0$ is the cardinality of the set of natural numbers, $\aleph_0 = |N|$. $c$ is the cardinality of the continuum, i.e. the set of real numbers $c = |R|$.  I know that $|P(A)| = 2^{|A|}$. This means that the cardinality of the power set of a set is 2 raised to the power of the cardinality of that set.  This basically means that to prove  $2^{\aleph_0} = c$, I need to prove $c = |P(N)|$. I've seen the Cantor diagonal argument, although I have no idea on how to use it to prove this.   Could anyone suggest ideas of the simplest way to prove that $2^{\aleph_0} = c$?


When I try to run the following command in Ubuntu 13.04:  sudo apt-get update   I got following error:  W: Failed to fetch http://ppa.launchpad.net/upubuntu-       com/xampp/ubuntu/dists/raring/main/binary-i386/Packages  404  Not Found  E: Some index files failed to download. They have been ignored, or old ones  used      instead

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


I have a problem with compiling and linking the main.cxx and Vec.cxx files, which are shown below.  To compile, I am using g++ with the following command:g++ -std=c++11 -c main.cxx Vec.cxx. To link, simply g++ main.o Vec.o. But doing this I get undefined reference errors to the create and uncreate functions, which are used by the constructors and the destructor.  Vec.cxx:  // Vec.cxx // Source file for Vec template class header.  #include "Vec.h"  #include <memory>  template <class T> Vec<T>& Vec<T>::operator=(const Vec& rhs){    if(&rhs != this){      // free array in the left hand side     uncreate();      create(rhs.begin(),rhs.end());    }    return *this; }  template <class T> void Vec<T>::create(){   data = avail = limit = 0;    return; }   template <class T> void Vec<T>::create(size_type n, const T& val){   data = alloc.allocate(n);   limit = avail = data + n;   std::uninitialized_fill(data,limit,val);    return; }   template <class T> void Vec<T>::create(const_iterator b,const_iterator e){   data = alloc.allocate(e-b);   limit = avail = std::uninitialized_copy(b,e,data);    return; }   template <class T> void Vec<T>::uncreate(){   if (data) {     // Destroy (in reverse order) the constructed elements;     iterator it = avail;     while(it != data){       alloc.destroy(--it);     }      // Return all the space that was allocated     alloc.deallocate(data, limit-data);   }    data = limit = avail = 0;    return; }   template <class T> void Vec<T>::grow(){   size_type new_size = std::max(2* (limit-data), std::ptrdiff_t(1));    iterator new_data = alloc.allocate(new_size);   iterator new_avail = uninitialized_copy(data,avail,new_data);    uncreate();    data = new_data;   avail = new_avail;   limit = data + new_size;    return; }   template <class T> void Vec<T>::unchecked_append(const T& val){   alloc.construct(avail++,val);    return; }   Vec.h:  #ifndef VEC_H #define VEC_H  #include <memory>  template<class T> class Vec{   public:   // define names    using iterator = T*;   using const_iterator = const T*;   using size_type = size_t;   using value_type = T;    // Size and index operators   size_type size() const { return avail - data; }   T& operator[] (size_type i) { return data[i]; }   const T& operator[] (size_type i) const { return data[i]; }     // Constructors   Vec() { create(); }   explicit Vec(size_type n, const T& val = T()) { create(n, val); }   Vec(const Vec& v) { create(v.begin(),v.end()); }    // Destructor   ~Vec() { uncreate(); }    // Assignment operator   Vec& operator=(const Vec&);    // push_back function   void push_back(const T& val){     if(avail == limit){       grow();     }      unchecked_append(val);     return;   }    // Iterators   iterator begin() { return data; }   const_iterator cbegin() const { return data; }   const_iterator begin() const { return data; }    iterator end() { return limit; }   const_iterator end() const { return limit; }   const_iterator cend() const { return limit; }   private:   iterator data;    // First element in Vec   iterator avail;   // One past the last allocated memory element   iterator limit;   // One past the last element in Vec    std::allocator<T> alloc;    void create();   void create(size_type, const T&);   void create(const_iterator,const_iterator);    void uncreate();    void grow();   void unchecked_append(const T&); };   #endif   main.cxx:  #include "Vec.h"  int main(int argc, char **argv){    Vec<int> v(10,2);     return 0; }   Edit: Thankyou for marking as duplicate, the link resolved my question. I moved the functions into the header file and everything works now.

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I have written a program that needs to quit if it encounters a certain event.  I can raise exceptions, but how do I raise a fatal exception that ends the program?

I am aware of the die() command in PHP which exits a script early.  How can I do this in Python?


I've already tried clicking and holding the left button of my mouse, and it just won't work! Whenever I press it, it opens the game menu instead.

Every time I hold button 1 to break a block it sends me to the menu screen.  I can't figure it out so its impossible to play classic.  I've tried re installing Java 7 but that didn't change a thing, and changing game quality didn't do anything either.  I want to play minecraft but can't unless this is fixed.


I have an asp.net mvc application, and I'd like to send an email :   MailMessage mailMessage = new MailMessage();             var smtpClient = new  SmtpClient();             {                 smtpClient.Host = "smtp.gmail.com";                 smtpClient.Port = 587;                 smtpClient.EnableSsl = true;                 smtpClient.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;                 smtpClient.Credentials = new NetworkCredential("myemail@gmail.com", "password");                 smtpClient.Timeout = 20000;             }             mailMessage.To.Add(model.Email);             mailMessage.From = new MailAddress("support@team.com");             mailMessage.Subject = "Modification de mot de passe";             mailMessage.Body = "Vous avez modifié votre mot de passe de votre Compte ";             mailMessage.Body += Environment.NewLine;             mailMessage.Body += "le nouveau mot de passe est : ";             mailMessage.Body += newPassword;              smtpClient.Send(mailMessage);    I get this exception :     La réponse du serveur était : 5.5.1 Authentication Required.    in last line of code.  I need to know what is the reason of this problem? How can I resolve it?

I create new ASP.NET web application that use SMTP to send message. The problem is the smtp was not authenticated from who send the message.     How can I make SMTP authenticated in my program? does C# have a class that have attribute for enter username and password?


$f \in K[X]$ is irreducible and separable. $L$ the splitting field of $f$. Show:  $[L:K] > \text{deg}(f)$  $\Rightarrow$ $\text{Gal}(L|K)$ is not abelian

Let $f(x)\in  \mathbb Q[x]$ irreducible of degree $n$ and $K$ its splitting field over $\mathbb Q$. Prove that if $\operatorname{Gal}(K/\mathbb Q)$ is abelian, then $|\operatorname{Gal}(K/\mathbb Q)|=n$.  How can I prove this?


My Toshiba Satellite with Windows Vista is a couple years old.   The battery lately is completely shot. Even after charging for a long time, it barely lasts five minutes when you unplug it. I'm assuming it's related to this new problem.   Anyway, the last couple days it's been saying "plugged in, not charging", and it's down to 0% now. I've already tried taking out the battery and reinstalling the battery in device manager. Is there anything else I can do?

My 1.5 year old Dell Studio 15 notebook computer has a battery and I keep it attached to the notebook but 98% of the time I just plug in the power adapter.  Lately when I unplugged the power adapter, the battery was only good for 10 minutes, and a few days ago, when I unplugged the power adapter, the computer simply turned off.  When clicking on the battery icon on Win 7, it says "Plugged in, not charging":    is the battery dead?  Or can Windows 7 have any option to not charge the battery?  It is a Dell Studio 15, I wonder if in such case, it looks like it can be a manufacture's defect, would Dell replace the battery? (if there was a recall, then they probably would, i think).  The notebook is 1.5 year old.


As UK citizens, if we bought an RV to travel through the US for several months, longer than 90 days, would we have to exit the country and return for periods?

I want to travel to the USA (I am UK Citizen) and I am only allowed 90 days.  Is it possible for me to stay longer - say 6 months to a year, and how?


Of course the speed of light is constant relative to everything. Its frequency can change, but its speed is constant. Photons may be absorbed by atoms or release by atoms as energy, but as soon as it is released, does it have infinite acceleration to 300,000 m/s instantaneously as soon as it is released (assuming it is released basically at rest)?

An excited electron loses energy in the form of radiation. The radiation constitutes photons which move at a speed $c$. But is the process of conversion of the energy of the electron into the kinetic energy of the photon instantaneous? Is there a a simple way to visualize this process rather than math?


Do "don’t need to" and "needn’t" mean the same or not? This is a question from an English test:     We’ve got plenty of time. We ... hurry.         don’t need to   needn’t      What's the right answer?

When I studied English at school (in Italy, more than 35 years ago), we were taught a rule according to which one should say, e. g., "He needn't (need not) say", but NOT "He doesn't need to say".  If I'm not mistaken, it was explained to us that the rule holds good with the following limitations:  1) only in the negative form: thus, "He needn't say", but "He needs to say", and "Does he need to say?";  2) only in the present tense: thus, "He needn't say", but "He didn't (won't, wouldn't, etc.) need to say";  3) only when an infinitive follows: thus, "He needn't see a doctor", but "He doesn't need a doctor".  But, if I google "doesn't need to", I find 125,000,000 occurrences.  I was wondering: does the rule hold good more for British than for American English?  Also, perhaps it isn't an absolute rule, and both constructions ("He needn't say" and "He doesn't need to say") are possible.  Is the rule at least a good description of the circumstances when we CAN (but needn't necessarily) use this construction?  Thank you very much, for this and the other answers.


Setting of the experiment: Triplets Alice, Bob, and Carla have plenty of entangled electrons when they depart from Earth. Alice stays behind, Bob goes to Zeta Reticuli, and Carla goes to Andromeda. All three continuously make a video of everything around them, assuming they could even see each others clocks. Because of time dilation (including relativistic Doppler-shift) they all see each others clock running slow. However, if Bob returns to Alice she will be older because he accelerated. In Carla her reference frame, she thought that Bob was travelling anti-parallel to the motion of the Milky Way when he was on his way to Zeta Reticuli. The velocity of Alice was greater than Bob's according to Carla, concluding Alice her clock was running slowest. Outside the lightcones of certain events, Carla might even see a different sequence of events than Alice or Bob would. The experiment: The triplets have distributed entangled pairs of electrons among them so that each pair is separated after departure. They have agreed to make a position measurement at the end of every week (7 days of exactly 24 hours on their own clock). The "collapse of the wavefunction" happens instantaneously, while relativity denies the notions of absolute time: there is no "now-moment". The question is: when does the other electron collapse, "after" the position measurement? Could the triplets carry out this experiment, and see regularities in the wavefunction collapses caused by their siblings? I know it's correlation rather than causation, but what if the triplets agreed to a secret code? Since they might be able to predict each others clocks, they could agree that a postion measurement between 0-30 min of some hour represents 0 while 30-60 min represents 1.

It is often stated, particularly in popular physics articles and videos, that if one measures a particle A that is entangled with some other particle B, then this measurement will immediately affect the state of the entangled partner.  For example, if Alice and Bob share an entangled pair of electrons and Alice measures her spin in the $x$ direction, then Bob's spin will also end up spinning in that direction, and similarly if she measures in the $z$ direction. Moreover, the effect will be instantaneous, regardless of the spatial distance between the two particles, which seems at odds with special relativity.  Can I use a scheme like this to communicate faster than light?


I was presented with this problem: $$x,y \in \mathbb{Z}$$ $$k = \frac{x}{y} + \frac{y}{x}$$ $$\text{Prove that if } k \in \mathbb{Z}\text{, then } k = 2.$$ I began by rewriting the equation. $$k = \frac{x^2 + y^2}{xy}$$ I then reasoned that if k is an integer, then $$x^2 + y^2 = nxy$$ where $n \in \mathbb{Z}$. I continued to rewrite this to find some relation. $$x^2 - nxy + y^2 = 0$$ $$x^2 - 2xy + y^2 = (n-2)xy$$ $$(x-y)^2 = (n-2)xy$$ I figured this proved that $(n-2)xy \in \mathbb{Z}^2$, but I'm not sure how to use this fact to help me.

Can sum of a rational number and its reciprocal be an integer?   My brother asked me this question and I was unable to answer it.   The only trivial solutions which I could think of are $1$ and $-1$.  As to what I tried, I am afraid not much. I have never tried to solve such a question, and if someone could point me in the right direction, maybe I could complete it on my own.  Please don't misunderstand my question.   I am looking for a rational number $r$ where $r + \frac{1}{r}$ is an integer.


I am using a django formset containing forms that specify user friendship preferences.   My form fields are:      siteuser_id = forms.IntegerField(widget=forms.HiddenInput())     subscribed = forms.BooleanField(required=False)     ally = forms.BooleanField(required=False)     enemy = forms.BooleanField(required=False)   The goal is to display all of a person's friends and that person's status within the game.  When I display the forms in the formset, I'd like to display the nickname (nicknames are not unique or I would just use it instead of siteuser_id) of the person alongside the friendship preference for that person.   I tried making username a form field, but that makes it editable, and I just want it to display within the table, not be editable.  Help?

In a Django form, how do I make a field read-only (or disabled)?  When the form is being used to create a new entry, all fields should be enabled - but when the record is in update mode some fields need to be read-only.  For example, when creating a new Item model, all fields must be editable, but while updating the record, is there a way to disable the sku field so that it is visible, but cannot be edited?  class Item(models.Model):     sku = models.CharField(max_length=50)     description = models.CharField(max_length=200)     added_by = models.ForeignKey(User)   class ItemForm(ModelForm):     class Meta:         model = Item         exclude = ('added_by')  def new_item_view(request):     if request.method == 'POST':         form = ItemForm(request.POST)         # Validate and save     else:             form = ItemForm()     # Render the view   Can class ItemForm be reused? What changes would be required in the ItemForm or Item model class? Would I need to write another class, "ItemUpdateForm", for updating the item?  def update_item_view(request):     if request.method == 'POST':         form = ItemUpdateForm(request.POST)         # Validate and save     else:         form = ItemUpdateForm()


1) Assume that there exist homomorphisms $f:\mathbb{Z} \rightarrow S_{3}$ where $\ker(f)\neq \mathbb{Z}$? What are the possible kernels? Explain. 2) Lest at least two non-trivial homomorphisms $f:\mathbb{Z} \rightarrow S_{3}$ whose kernel are not $\mathbb{Z}$.

I recently had my second abstract algebra exam returned to me and I missed this particular question (unfortunately I left the problem blank, just a bad test day). I've been trying to figure out the problem though and could use some help.  a) Does there exist a surjective homomphism $\phi: \mathbb{Z} \rightarrow S_3$? Explain.  What I'm thinking: Let $\phi: \mathbb{Z} \rightarrow S_3$ be a homomorphism.$\mathbb{Z}$ is a cyclic group and thus $\phi(\mathbb{Z})$ is cyclic. However, $S_3$ is not cyclic. Thus $\phi(\mathbb{Z}) \neq S_3$ and $\phi$ cannot be surjective.  b) Assume that there exist homomorphisms $\phi: \mathbb{Z} \rightarrow S_3$ where Ker$(\phi) \neq \mathbb{Z}$. What are the possible kernels? Explain.  What I'm thinking: Since $1$ generates $\mathbb{Z}$, if $1\in$ Ker$(\phi)$, then $\mathbb{Z}=$Ker$(\phi)$. So could Ker$(\phi)$ = $n\mathbb{Z}$ for $n \in \mathbb{Z},  \; n\neq1$?  c)List at least two non-trivial homomorphisms $\phi: \mathbb{Z} \rightarrow S_3$ whose kernals are not $\mathbb{Z}$.  $\phi_1(n) = (1\; 2)^n$  $\phi_2(n) = (1\; 3)^n$  Any input is much appreciated!


I have a function that functions as a countdown timer for a simple pomodoro clock I'm building. Now I want to stop this function when the user clicks a reset function. I though I'd pass it a simple if statement that returns something and therefore terminates the function before the countdown iterates again but the function keeps on going. Any idea what's going on here is appreciated. Code below, can also check the whole thing on .    function countdown(blocker) {     if (blocker === true) {       return true;     }      else {       setTimeout(function() {         time -= 1;         updateTimer();         if (time > 0) {           countdown();         }       }, 1000);     }   }   calling the function like this doesn't stop it once it gets going:  countdown(true);

I have a few places where I use the line below to clear out a status, for example.  I have a few of these that hang out for 10 seconds or more and if the user gets clicking around the action can occur at incorrect time intervals.  window.setTimeout(function() { removeStatusIndicator(); }, statusTimeout);   Is it possible to cancel or kill this with some jQuery or JavaScript code, so I don't have this process hanging around?


I want to send a pdf file via email, the file arrives but it damaged, any idea?      Dim buffer As Byte() = New Byte(6499) {}     Dim bytesRead As Integer = 0              bytesRead = file.FileByteStream.Read(buffer, 0, buffer.Length)     Dim ms As New MemoryStream(bytesRead)     ms.Seek(0, SeekOrigin.Begin)     mail.Attachments.Add(New Attachment(ms, "test.pdf", "application/pdf"))     mail.IsBodyHtml = False     mail.From = New System.Net.Mail.MailAddress("xxxxx@gmail.com")     mail.To.Add("yyyyyy@gmail.com")     mail.Subject = "test subject"     mail.Body = "test body"     mail.Priority = System.Net.Mail.MailPriority.Normal     Dim smtp As New System.Net.Mail.SmtpClient     smtp.Host = "smtp.gmail.com"     smtp.Credentials = New System.Net.NetworkCredential("mymail@gmail.com", "pass")     smtp.Port = 587     smtp.EnableSsl = True     smtp.Send(mail)

I have an excel document represented as a byte[] and I'm wanting to send it as an attachment in an email.  I'm having a bit of trouble constructing the attachment.  I can create an Attachment which has the following constructors:  (Stream contentStream, ContentType contentType) (Stream contentStream, string name) (Stream contentStream, string name, string mediaType)   My idea at the moment is to create a MemoryStream from the byte[] and pass it to the method which creates the attachment.  Unfortunately I can't see a way to obtain the intended filename and content type from the MemoryStream and I also can't see how to supply the correct content type. There are options for plain text, Pdf, Rtf etc but none that I can see that immediately jump out at me as the one I should use for an Excel document.   The closest I can find is  which states:      The Octet member designates that the   attachment contains generic binary   data.   However, even if this is the one to use, unless it can be passed as a property of the Stream then my method for sending emails will only be able to send a byte[] as an Excel document...  Is there perhaps some other sort of Stream I could use? Or will I have to create my own type of Stream that has the details I need.  Surely someone out there has done this thing before and surely Microsoft would have thought this through to this level....  Any help would be much appreciated.  Update: Please don't vote for any answers that use the constructors that take the filename as a string. I'm really needing help using the ones that take a Stream...I want to avoid having to write the file to disk, email it, and then immediately delete it. Since there is a method that allows me to do that I'd like to use that one if at all possible.  Solution Update  Conrad managed to find what I was looking for! Thanks heaps man!  I'll just document the suggested solution just in case something happens to the content at the supplied link.  Credit for this solution goes to   static void AttachmentFromStream() {  //create the mail message MailMessage mail = new MailMessage();  //set the addresses mail.From = new MailAddress("me@mycompany.com"); mail.To.Add("you@yourcompany.com");  //set the content mail.Subject = "This is an email"; mail.Body = "this content is in the body";  //Get some binary data byte[] data = GetData();  //save the data to a memory stream MemoryStream ms = new MemoryStream(data);  //create the attachment from a stream. Be sure to name the data  //with a file and  //media type that is respective of the data mail.Attachments.Add( new Attachment( ms, "example.txt", "text/plain" ));  SmtpClient smtp = new SmtpClient("127.0.0.1"); smtp.Send(mail); }   In my case, it just means I'll have to change my method to take the filename and fileformat as strings. I'll try using the Octet one...but failing that I'll just pass in the official MIME type.  All things considered, this is a pretty obvious solution...but I do appreciate the help in solving it...and the good thing is this solution will be documented for future programmers who have the same problem.  Thanks again everyone for you help!


Therefore, World History was conceived of in European terms, the rest of the world merely pivoting around free and rational Europe. Is the use of the gerund 'pivoting' correct in the latter part of the sentence?

Which is correct, and why?     some days we went on adventures — him maneuvering our scooter, me resting my chin …   or     some days we went on adventures — he maneuvering our scooter, I resting my chin …


I've been trying everything under the sun to do the simple following:  1) Receive an input string from stdin.  2) Convert it to a char pointer so I can pass to a tabling/palindrome finding function.  I'm confident in the latter part of step 2, but it's the type agreement I can't hack. Below is my main body in question. The prototype of the palin function is int palin(char *str).  int main() {     string input;     cin >> input;     char seq[] = input.c_str(); //Error here, invalid initialization?     int len = strlen(seq);     int result = palin(seq);     cout << result;     getchar();     return 0; }   Any ideas? c_str() conversion also presents a problem as it expects a constant pointer char, but my char pointer will change.

How can I convert an std::string to a char* or a const char*?


I'm looking to ask a question about recommendations for a language and/or framework which I can use to write a cross-platform program requiring OpenGL support. Where exactly should I ask this?  I tried 'Software Recommendations', but it got down-voted by at least one person, presumably as it's not really a question about software. I can't ask it in Stack Overflow, due to the strict 'no opinions' question policy there.  Any help much appreciated.

I've been searching through SE-Meta and,from what I can gather, the general consensus is that questions that ask for API & Framework recommendations that can help solve a particular problem are typically marked as "Too Localized" or "Off Topic".  I can understand this reasoning because posting answers to these questions can be problematic.  One of the big reasons (which I do agree with) is that as time progresses, an API can lose support or better APIs could come along and initial answers may become invalid.  Yet, as a developer, I need to find an API or Framework for a specific need in which I'm not to familiar with and having a good recommendation from an expert is invaluable.  Of course, in such a case I start by Googling associated keywords and I tack on "API" to the end of my search.  This usually helps but it doesn't always provide useful results.  For specific needs, it can be difficult to even get a result for an API or framework.    Even worse, there have been occasions where I have found an API, started to use it, and after a month or two of getting my bearings with the API, I'd find out that another API exists, which almost all other developers use and is a considerably better API choice!  Have an expert  or two recommend an API could have saved me weeks (or possibly months) of work if I had started out with the best tool for the job.  With that stated, within the Stack Exchange community is there any away that a user can ask for API recommendations?  It doesn't have to be on Stack Overflow.  If such questions are acceptable on Stack Overflow, what guidelines dictate which API recommendation requests are acceptable and which are not?  I'm a bit confused but I'd imagine there is a way within SE that I can get these types of questions answered by those who are quite familiar within the area of my new development needs.


Is a surjective homomorphism between two (abstractly) isomorphic finitely generated abelian groups necessarily an isomorphism? I know this is true if the groups are torsion (finite) or torsion-free. What about for rings?   The question I really care about is the following.  I have a deg 1 map $f: X \rightarrow Y$, where $X,Y$ are oriented manifolds,  so that $f_*: H_*(X; \mathbb{Z}) \rightarrow H_*(Y; \mathbb{Z})$ is a surjective map. I also know that  $H_*(X; \mathbb{Z}) \cong H_*(Y; \mathbb{Z})$. So I am wondering whether this implies that $f_*$ is an isomorphism.

Let $A$ be a finitely generated abelian group and $f:A\rightarrow A$ a surjective homomorphism. How do I prove that $f$ is an isomorphism?  And if $f$ were injective instead of surjective would the statement still hold?


Prove that, $$\sum\limits_{s=0}^\infty \frac{1}{(sn)!}=\frac{1}{n}\sum\limits_{r=0}^{n-1}\exp\left(\cos\frac{2r\pi}{n}\right)\cos\left(\sin\frac{2r\pi}{n}\right)$$  I don't have a real idea on how to start approaching this question, some hints and suggestions would be helpful.

Does a closed form exist for      $$\sum \limits_{n=0}^{\infty} \frac{1}{(kn)!}$$   in terms of $k$ and other functions? The best that I have been able to do is solve the case where $k=1$, since the sum is just the infinite series for $e$. I would guess that any closed form must involve the exponential function, but am at a loss to prove it.


There are very few animals with polyploidy like salamanders. Why is it that polyploidy is so uncommon in animals? On the other hand there are numerous examples of polyploid plants. If ut something to do with the gene dosage, how does it not affect plants?

is the multiplication of number of chromosomal sets from 2n to 3n (triploidy), 4n (tetraploidy) and so on. It is quite common in plants, for example many crops like wheat or Brassica forms. It seems to be rarer in animals but still it is present among some amphibian species like Xenopus.  As I know in mammals polyploidy is lethal (I don't mean tissue - limited polyploidy). I understand that triploidy is harmful due to stronger influence of maternal or paternal epigenetic traits that cause abnormal development of placenta, but why there is no tetraploid mammals?


I am just learning about databases and I want to be able to store user inputs. What would be a basic example on how to get form data and save it to a database using PHP?   Also making the form secure from .

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


These are the two errors:      I need help removing them Please help i want to check for updates Ubuntu 13.04  it still goes through but i want to get rid of them

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


When there are too many tags associated with a single user, they got cut. It's a UI Issue.

I just noticed . Hey! I'm there! But that's beside the point.  The point is that Nick Craver is there too. Nick seems to like really long tag names, so his profile shows up like this:    Akk! Diamonds everywhere!  It seems that the page is optimized for only two lines of tags per user. One tag per line means three lines. Three lines means that Nick's reputation (tag) is cut in half.  Let's not cut Nick's rep (tag) in half on the Users page, no?


I'm using javascript to convert string to what I want!! Can I use Regular Expression and use what  Regular Expression?? Is there anyone that can help me?

What is the easiest way to match non-ASCII characters in a regex? I would like to match all words individually in an input string, but the language may not be English, so I will need to match things like ü, ö, ß, and ñ. Also, this is in Javascript/jQuery, so any solution will need to apply to that.


I have a requirement of appending the string " 1" at the end of every line of the file. After the execution of below two commands, an empty file is created.  awk '{ print $0 " 1" }' < file.txt > file.txt    using sed  sed 's/$/ 1/' file.txt > file.txt   What is the mistake attempted here, can you please advise ? I am executing these commands in mac terminal.

I have one input file and run some command but want the output to be saved with the same name as the input file has.  I tried below command but it makes the output file blank:  cat file1 | grep "YISHA" > file1


The question is as follows:  The power series $$\sum _{ k=0 }^{ \infty  }{ k{ z }^{ k } } $$ represents an analytic function $f$ in its disk of convergence, the disk of radius $R=1$, centered at the origin. Find $f$.  The answer is:  $$f\left( z \right) =\frac { z }{ { (1-z) }^{ 2 } } $$    I proceeded by a hand-crafted method, ie. I wrote down the beginning of $\sum _{ k=0 }^{ \infty  }{ k{ z }^{ k } } $, and just below the $\sum _{ k=0 }^{ \infty  }{ { z }^{ k } } $ and take the sum of them term by term. It yielded into an expression already known:  $$f(z) (= \sum _{ k=0 }^{ \infty  }{ k{ z }^{ k } }) = \sum _{ k=0 }^{ \infty  }{ (k+1){ z }^{ k } } - \sum _{ k=0 }^{ \infty  }{ { z }^{ k } } $$  As,  $$ \sum _{ k=0 }^{ \infty  }{ { z }^{ k } } =\frac { 1 }{ 1-z } \quad (1)$$ and $$ \sum _{ k=0 }^{ \infty  }{ (k+1){ z }^{ k } } =\frac { 1 }{ { (1-z) }^{ 2 } } \quad (2)$$  I reached the solution.  But I feel like cheating, because the conclusion about $(2)$ was evaluated in the course; also my instructor used another method for this question: She differentiated the power series and manipulated analyticity. I also tried to integrate first, then differentiate by regrouping terms, but neither could I achieve nor could I understand the professor's method.  I'd much liked you help me to find alternative solution -as my professor did- to this?

Given $$1\cdot 2^1 + 2\cdot 2^2 + 3\cdot 2^3 + 4\cdot 2^4 + \cdots + d \cdot 2^d = \sum_{r=1}^d r \cdot 2^r,$$ how can we infer to the following solution? $$2 (d-1) \cdot 2^d + 2. $$   Thank you


A user with low reputation . He then found a solution himself, and . When suggested to not do that, and instead post the answer as a real answer, he say he couldn't due to his reputation and quoted the following error message:     Users with less than 10 reputation can't answer their own question for   8 hours after asking. You can answer 2/2/2014 12:33:45 AM. Until then   please use comments, or edit your question instead.   This wording seems to convey the entirely wrong message: that it is acceptable to use comments or edits as replacements for answers when (for whatever reason) you are not allowed to post answers yet.  Ignoring the issue of the restriction on low-reputation self-answers (), why is this error message presented this way? It seems to suggest exactly the opposite behavior we want out of StackExchange. Further, the wording doesn't seem to actively discourage the posting of comments as answers, which is apparently the reason this reputation limit exists at all (per the above-linked meta topic).  Can this wording be adjusted to include more accurate guidance, such as "If you have follow-up information, please edit your post or use comments. If you have found an answer to your question, please wait until X and post the answer then," or something along those lines?

I saw  that the user had self-answered by editing the question. I pointed out that they should really answer the question. I know they wouldn't be able to straight away, but I assumed they'd tried and got the "you need to wait a bit" prompt. However, what I didn't realise was that the message says:  Oops! Your answer couldn't be submitted because: Users with less than 100 reputation can't answer their own question for 8 hours after asking. You may self-answer in 7 hours. Until then please use comments, or edit your question instead  (my bold). Should we really be suggesting that people put the answer in the question even as a temporary measure? What's the next step for this? Is there any agreement that this phrase should be removed? If there is how do I turn it into a feature request without asking a new question? Should I just ask a new question which is a feature request?


In the some sentences there are several verbs that goes by one another, e.g.:     You both have to go get dressed before ... (something happens)   Subject phrase: "you both"  Verb phrase: "have to go get dressed"  Main verb: "have to go"   What the grammar function of the remaining part of the verb phrase "get dressed"? Should the particle "to" precede the verb "get" in order to form "to get dressed" phrase?

For instance:      “Go eat your dinner.”    It appears that the word “go” is being used as a helping verb. Is it being used a helping verb? If so, can “go” only be used as a helping verb in imperative sentences?


Someone asked "When is your job interview?" And the other answered "A week on Monday."  What does it mean by using "a week" before Monday? Does it mean Monday next week?

Possible Duplicate:          When I refer to the very next Monday that will occur in the future, I say "next Monday". Some colleagues refer to it as "this Monday", with "next Monday" meaning the second Monday which will occur in the future (I would refer to that as "Monday week", "this Monday" to me would mean the most recent Monday in the past).  Are these both acceptable usages, or is one more correct than the other?


I used sudo mkfs.vfat /dev/sdb to format  a flash drive (I didn't notice /sd*) but accidentally my Seagate external hard disk (/dev/sdb) started being formatted and immediately after few seconds I cancelled that command. I was still able to use the hard disk as it was already mounted to my Ubuntu machine, but when I unmounted it and tried to access it Ubuntu didn't detect it anymore. Results of sudo mount /dev/sdb /media/backup: mount: /media/backup: wrong fs type, bad option, bad superblock on /dev/sdb, missing codepage or helper program, or other error.  Results of sudo fdisk -l # pasting the last few paragraphs: Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors Disk model: ST1000DM003-1ER1 Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: dos Disk identifier: 0x7f7a3175  Device     Boot     Start        End    Sectors   Size Id Type /dev/sda1  *         2048  199999487  199997440  95.4G 83 Linux /dev/sda2       200001534 1953523711 1753522178 836.1G  5 Extended /dev/sda5       200001536 1953523711 1753522176 836.1G 83 Linux  Partition 2 does not start on physical sector boundary. Disk /dev/sdb: 3.65 TiB, 4000787029504 bytes, 7814037167 sectors Disk model: BUP Portable     Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes  Results of df -h: Filesystem      Size  Used Avail Use% Mounted on udev             12G     0   12G   0% /dev tmpfs           2.4G  1.8M  2.4G   1% /run /dev/sda1        94G  9.4G   80G  11% / tmpfs            12G  197M   12G   2% /dev/shm tlsblkmpfs           5.0M  4.0K  5.0M   1% /run/lock tmpfs            12G     0   12G   0% /sys/fs/cgroup /dev/loop0       56M   56M     0 100% /snap/core18/1988 /dev/loop2       32M   32M     0 100% /snap/snapd/11036 /dev/loop1       65M   65M     0 100% /snap/gtk-common-themes/1514 /dev/loop3      219M  219M     0 100% /snap/gnome-3-34-1804/66 /dev/loop5       33M   33M     0 100% /snap/snapd/11107 /dev/loop4       52M   52M     0 100% /snap/snap-store/518 /dev/sda5       823G  716G   65G  92% /home tmpfs           2.4G   28K  2.4G   1% /run/user/1000  Results of lsblk: NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT loop0    7:0    0  55.5M  1 loop /snap/core18/1988 loop1    7:1    0  64.8M  1 loop /snap/gtk-common-themes/1514 loop2    7:2    0  31.1M  1 loop /snap/snapd/11036 loop3    7:3    0   219M  1 loop /snap/gnome-3-34-1804/66 loop4    7:4    0    51M  1 loop /snap/snap-store/518 loop5    7:5    0  32.3M  1 loop /snap/snapd/11107 sda      8:0    0 931.5G  0 disk  ├─sda1   8:1    0  95.4G  0 part / ├─sda2   8:2    0     1K  0 part  ─sda5    8:5    0 836.1G  0 part /home sdb      8:16   0   3.7T  0 disk   My PhD career is based on data inside it. Please help to restore my data.

I have just formatted an ext4 partition to fat32 using gparted.  In which directions should I tread in my attempt to recover?


I am very new to Regular Expressions and I am completely clueless at the moment.  I am trying to create a regular expression in Java that will only allow alphabetical characters.  Integers and special characters are not allowed.  The minimum length possible is 2 and the maximum length is 10.

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


I am new to OOP in PHP and I am trying to understand how it work. I am trying to implement PDO into a my own class.  This is what I am doing:  class db {      private $options;      function __construct() {         $this->options = array(             'database_host' => DATABASE_HOST,             'database_name' => DATABASE_NAME,             'database_user' => DATABASE_USER,             'database_pass' => DATABASE_PASS         );      }      private function connect() {         try {             $pdo = new PDO('mysql:host=' . $this->options['database_host'] . ';dbname=' . $this->options['database_name'], $this->options['database_user'], $this->options['database_pass']);             $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);             $pdo->exec("set names utf8");         } catch (PDOException $e) {             echo 'ERROR: ' . $e->getMessage();         }     }      public function select($table, $what, $where, $custom) {          $query = "SELECT " . $what . " FROM " . $table;         $child = "1";         $param = array();         if ($where)             foreach ($where as $data => $value) {                 if ($child == "1") {                     $query .= " WHERE " . $data . " = '" . $value . "'";                     $param[":" . $data] = $value;                     $child = "next";                 } else {                     $query .= " AND " . $data . " = '" . $value . "'";                     $param[":" . $data] = $value;                 }             }          if ($custom)             $query .= ' ' . $custom;          $statement = $pdo->prepare($query);         if ($statement->execute($param))             return $statement->fetchAll(PDO::FETCH_ASSOC);         return false;     }  }   The problem is that I don't know how to make the function connect() communicating with the below one select() When I try to call the select() function, I get this error:  Fatal error: Call to a member function prepare() on a non-object in /Applications/MAMP/htdocs/game/api/class.db.php on line 47   I would like that when I call the select() function, the connect() one connects to the DB and makes all its variables available for the other functions of the class...but I am lost.

So I'm refactoring my code to implement more OOP.  I set up a class to hold page attributes.  class PageAtrributes  {   private $db_connection;   private $page_title;      public function __construct($db_connection)      {         $this->db_connection = $db_connection;         $this->page_title = '';     }      public function get_page_title()     {         return $this->page_title;     }      public function set_page_title($page_title)     {         $this->page_title = $page_title;     } }   Later on I call the set_page_title() function like so  function page_properties($objPortal) {         $objPage->set_page_title($myrow['title']); }   When I do I receive the error message:     Call to a member function set_page_title() on a non-object   So what am I missing?


Can you help me prove that: sin(A+B) = sinA cosB + cosA sinB?  Thanks!

The "" formulas often come in handy, but it's not immediately obvious that they would be true.  \begin{align} \sin(\alpha \pm \beta) &= \sin \alpha \cos \beta \pm \cos \alpha \sin \beta \\ \cos(\alpha \pm \beta) &= \cos \alpha \cos \beta \mp \sin \alpha \sin \beta \end{align}  So what I want to know is,    How can I prove that these formulas are correct? More importantly, how can I understand these formulas intuitively?   Ideally, I'm looking for answers that make no reference to Calculus, or to , although such answers are still encouraged, for completeness.


$\int \sec ^4(x) ~\mathrm dx$  I did this in two ways:  1)  \begin{align} \int\sec^4(x) ~\mathrm dx & = \int \sec^2(x)\sec^2(x) ~\mathrm dx \\ & = \sec^2(x)\tan(x) - 2\int \sec(x) \tan(x) \sec(x) \tan(x) ~\mathrm dx \\ & = \sec^2(x) \tan(x) - 2 \int \sec^2(x) (\sec^2(x)-1) ~\mathrm dx \\ & = \int \sec^4(x) ~\mathrm dx \\ & = \sec^2(x)\tan(x)-2\int \sec^4(x) ~\mathrm dx +2\int\sec^2(x) ~\mathrm dx \\ & = \int \sec^4(x) ~\mathrm dx \\ & = \frac{\sec^2(x)\tan(x)}{3}+2\tan(x) / 3 +C \end{align}  2) \begin{align} \int \sec^4(x) ~\mathrm dx & = \int (\tan^2(x)+1)^2 ~\mathrm dx \\ & = \int \tan^4(x) + 2\tan^2(x) +1 ~\mathrm dx \\ & = \int \tan^4(x) ~\mathrm dx +2\int \tan^2(x) ~\mathrm dx + x \\ & = (...) \\ & = \frac{\tan^3(x)}{3}-\tan(x) \end{align}  So... which one is wrong( or both?)

Evaluate   $$\int\sec^4(u) \operatorname d \!u$$  I don't know what to substitute: I've tried $1+\tan(u)$ and integration by parts. I know the general formula for $\sec^n(u)$, but I want to be able to do this integral on my own.


I am essentially trying to work out if a specified index is a list or not. I have a list embedded into an index.    This is what I have so far      if len(hashTable[hashed-1])>1:         hashTable[hashed-1].append(inVal)     else:         tempTable = [hashTable[hashed-1], inVal]           hashTable[hashed-1] = tempTable         print(inVal,hashed)         print(hashTable)   The output of the list is: (the 0's an 10 are irrelevant)  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, [1, 3], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10]   The error is:      if len(hashTable[hashed-1])>1: TypeError: object of type 'int' has no len()

How do I see the type of a variable whether it is unsigned 32 bit, signed 16 bit, etc.?  How do I view it?


I would like to understand what exactly this "Priority Seat" represents:    Image credit: .  At first I thought this "Priority Seat" is an abbreviated form of "A Priority Seat"; "A" is simply omitted because it is a sign. But when I imagine a sign that reads "A Priority Seat" in this context (adjacent to a priority seat) I feel so wrong. The text wouldn't work to create the right nuance. So I had to drop this idea.  The next idea that I came up with was that this is an abbreviated form of "The Priority Seat." "the" is used here to talk about a particular type of things, not about a particular thing, just like "the" in "I want to play the guitar." But I can't be sure if my interpretation is correct.  Could anyone explain what this "Priority Seat" represents?

I would like to understand what exactly this "Priority Seat" represents.    Image credit:   For a long time, I was thinking "Priority Seat" is the name of an adjacent  priority seat so that "A" is not required. Just like the name of your iPhones is "iPhone" not "an iPhone," But someone told me that "Priority Seat" is not a proper noun. The words are capitalized because it's a title.  Then I came up with a new explanation, that is, this "Priority Seat" is simply an abbreviated form of "A Priority Seat"; "A" is omitted because it is a sign. But when I imagine a sign that reads "A Priority Seat" in this context (adjacent to a priority seat) I feel so incorrect. The text wouldn't work to create the right nuance. So I had to drop this idea as well.   Could anyone explain what kind of grammatical structure is used for this "Priority Seat" so that I could clearly understand what it represents?


I am writing a Java program and I am using the following code for assigning some variables to an array:  for(int j=1;j<P.maxNetworkPow;j++){     node.succList[j]=node.succ.succList[j-1]; }   Who knows how can I assign the all values to the array without for loop?

I know how to do it normally, but I could swear that you could fill out out like a[0] = {0,0,0,0}; How do you do it that way? I did try Google, but I didn't get anything helpful.


Is it possible to say that $\|u\|_{H_{0}^{2}(\Omega)}$ is equivalent to $\|\Delta u\|_{2}$?

I have found that the $H^2(D)$ norm of a field with zero Cauchy data on $\partial D$ (i.e. in $H_0^2(D)$) is equivalent to the $L^2(D)$ norm of its Laplacian, where D is simply connected with smooth boundary in $\mathbb{R}^n$. How can i prove this using Poincare inequality;


I work in an IT area and sometimes I need a suggestion on what library or framework to use in certain situations. But when I read what topics I can and cannot ask on a site (especially on Stack Overflow), I see that I cannot ask for suggestions like this. So, on what site can I ask for this kind of suggestions that are related to programming?

I have a list of requirements for a program, but I don't know what program meets these criteria. That's about general-purpose software, for example, not a programming IDE or statistical workbench, questions about which would certainly go to respective sites.  Is this question appropriate on Stack Overflow? Where should I ask about it? On Super User or elsewhere?


I wrote the next sentence: "Oh Dad, you think my room is a mess? You should see my life". But then I remembered that in questions obviously you have to put the verb "be", and the doubt came, is the sentence correct or I should write; "oh dad, do you think my room is a mess? You should see my life.  Thank you for your help :)

I hear and read them all the time. I mean stuff like:      You're just going to stay here?   Instead of:      Are you just going to stay here?    Then I write like this out of habit and get called out on my grammar issues by people who speak English much worse than I do. That's kinda embarrassing. So, could someone please explain to me whether it's correct or not? Are they acceptable at all, and if so, in which situations?      So, what? You're gonna kill me now?