Maintaining reference to feature layer (rather than its name string) throughout Python script?

When creating a Layer in arcpy, the syntax uses a string to denote the layer name, as shown in the  sample script:  import arcpy  arcpy.env.workspace = "C:\Program Files (x86)\ArcGIS\Desktop10.2\TemplateData\TemplateData.gdb" arcpy.MakeFeatureLayer_management("city", "citiesLyr")  print(type("citiesLyr")) # => string   As far as Python is concerned, "citiesLyr" is just a string (right?). Can I instead define the feature layer as a variable?  This is an attempt to simplify a more complicated scenario. I'm trying to use the feature layer in a script which involves multiprocessing, loops and functions, and I'm finding that the reference to the layer is being lost, and all I'm left with is a string called "citiesLyr". How can I keep the reference to the feature layer throughout my script?  The example below doesn't do anything - the point is to test how to gain access to the feature layer from within the function, which has been called within the multiprocessing environment:  import multiprocessing, arcpy  def doCity(lyr):     #How to get access to the cities layer from this function?     print(lyr)     desc = arcpy.Describe(lyr) # <= this fails because the layer is just a string     print(desc.SpatialReference)  if __name__ == '__main__':      #Create a feature layer from the cities     arcpy.MakeFeatureLayer_management("C:\Program Files (x86)\ArcGIS\Desktop10.2\TemplateData\TemplateData.gdb\city", "citiesLyr")      #Create a list, so we can use the multiprocessing function     citiesList = []     for i in range(0,5):         citiesList.append("citiesLyr")      # Create a pool class and run the jobs     pool = multiprocessing.Pool()     pool.map(doCity, citiesList)      # Synchronize the main process with the job processes to ensure proper cleanup.     pool.close()     pool.join()   (The cities list itself is also pointless - it's only there to use  multiprocessing)


Is packing an executable just like encrypting it?

What's the difference between encrypting a file and packing it?  Can I encrypt a file that is already packed? Can I pack a file that is already encrypted, or does packing already do both?  If I pack a .exe file will it be considered as encrypted?


Dual monitor setup, why does NVidia 346 crash and only detect one giant screen?

I'm using:  Alienware M14xR2 laptop running Ubuntu 14.10 2 * DELL U2412M monitors attached via HDMI and VGA Optimus graphics (Intel + nVidia GeForce GT 650M) running with nvidea-346 and nvidia-prime, with Prime setup in nvidia-settings GUI to use the NVidia GPU built-in laptop monitor disabled  Problems  Ubuntu Display GUI correctly detects the two monitors, but Nvidia cannot see any displays (although it does see one X "screen" of size 3840x1200 pixels i.e. the resolution of each monitor combined) System behaves as though the two monitors are just one screen. If I maximise a window, it is maximised over both monitors and the file menu appears only at the top of the second screen which is very annoying Nvidia 346 Settings Manager crashes if I click 'Detect Displays'  Note, this follows on from a related problem I reported here:  Here you can see Nvidia does not recognize any displays: $ lspci | grep VGA 00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) 01:00.0 VGA compatible controller: NVIDIA Corporation GK107M [GeForce GT 650M] (rev a1)  $ /usr/lib/nvidia-346/bin/nvidia-xconfig --query-gpu-info  Number of GPUs: 1 GPU #0: Name      : GeForce GT 650M UUID      : GPU-8d5fcaf0-264e-39ec-f176-17a1ceb538fa PCI BusID : PCI:1:0:0 Number of Display Devices: 0  $ xrandr --query Screen 0: minimum 8 x 8, current 3840 x 1200, maximum 16384 x 16384 DP-0 disconnected primary (normal left inverted right x axis y axis) DP-1 disconnected (normal left inverted right x axis y axis) LVDS1 connected    1600x900       60.0 +   40.0   DP1 disconnected DP2 disconnected HDMI1 connected 1920x1200+0+0 518mm x 324mm    1920x1200      60.0*+ HDMI2 disconnected VGA1 connected 1920x1200+1920+0 518mm x 324mm    1920x1200      60.0*+   VIRTUAL1 disconnected


Decompose finitely generated modules and use Krull-Schmidt theorem

I'm trying to show that if $R$ is an Artinian ring, then for finitely generated modules $M,N,N'$, we have that $M\oplus N\cong M\oplus N'$ implies that $N\cong N'$.   I'm supposed to do this by decomposing $M,N,N'$ and then using the Krull-Schmidt Theorem.  For the first part, this means writing $M,N,N'$ as direct sums of non-zero submodules. As $R$ is Artinian, finitely generated modules are of finite length (from Hopkins' Theorem) and hence these decompositions will be of finite length. Therefore, we can use the Krull-Schmidt Theorem, which says that these indecomposable components are uniquely determined up to isomorphism.  However, this only gives us information about the components of the decompositions of these modules - not about the relations between them (specifically, between $N$ and $N'$).   How can I use the Krull-Schmidt Theorem to get the desired result?


Dini's Theorem states: Let $[a,b]$ be a compact intervall. Let $f,f_{n}: [a,b] \xrightarrow{} \mathbb{R}$, $ n \in \mathbb{N}$, functions with   $f$ and $f_{n}$ are continuos for all $n$ $\lim_\limits{n \to \infty} f_{n}(x) = f(x)$ $\forall x \in [a,b]$ $f_{n}(x) \leq f_{n+1}(x)$ $\forall x \in [a,b]$ and $n \in \mathbb{N}$.   Then $\{f_{n}\}_{n \in \mathbb{N}}$ converges uniformly to $f$.   Suppose only conditions $1$ and $2$ are satisfied. Are in this case  $\{f_{n}\}_{n \in \mathbb{N}}$ also converges uniformly to $f$?  The reason why I'm asking this quesion ist that I found a variant of Dini's theorem that states if condition $1$ and $2$ are satisfied and we have that $f_{n}$ is a so called commute sequence, i.e. f_{n} has a monotonically increasing and a monotonically decreasing part, then Dini's Theorem also holds


How to flip the view from the camera horizontally?

Many Photoshop concept artists flip their canvas horizontally from time to time during painting for a few seconds to better judge the composition. Is it possible in Blender's viewport, using the camera settings maybe?  Of course I could render the image first and then flip it in compositor or any external image editor, but it would be much slower solution than flipping the viewport live.


I'm using the pattern:  var pattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;   So when I submit/send an email to myself from my contact form to test out a bunch of different email combinations, everything has worked except for:  whatever@yahoo.com && whatever@google.com   I'm not entirely sure why those two aren't being included, but I'd appreciate any assistance.


In Fermat's Principle of Least Time, how do we know that light is able to reach the end point?

From my understanding of Fermat's Principle, you decide a start point and an end point for a light ray to travel between, and the light 'chooses' whichever path takes the least time (or technically whichever path the time is 'stationary' at).  So consider the following, you set up the start point, A, and the end point, B in different mediums. Of course the path of minimum time is that which obeys snells law.    However if the light is coming from box which has only has a small hole in it (as shown in the diagram), the light is unable to follow this path of least time. But it is still the path of least time, so why is Fermat's principle no longer obeyed?    Does Fermat's Principle simply not apply for when there are objects that can block/absorb the light? Do we therefore assume that light is able to reach every point in space when using Fermat's Principle? If so, what is the point othe principle?


There is a certain user who when they press tab key to complete a file path, it takes several seconds for the machine to make the completion. They are using the bash shell.  How can I diagnose what exactly is causing the tab completion to hang for this user?


I have a Google alert on my name and this turned up the link :    If you go there you get redirected to a supposed Wordpress blogging site about cloudcomputing at url   That looks like the  technique malware sites use: if you visit them from Google search results you get different content then when following a direct link.  If you do a  you see a lot (70000) of links that look like verbatim copies of StackOverflow (including Careers), and they all redirect. (That profile page above is my SO profile).  The result also turns up some site stats .  I'm mentioning this site for two reasons:   I doubt that they properly attribute to SE (SO) when they behave like this, but I'm unable to further investigate. I have no idea if/how they are currently (mis)using the data. It could be malware using the cloaking mentioned above. They also scrape profiles and I don't see anything about that in    So my question is:  Should/can anything be done about bet6e? I have not filed a  because I think the criteria over there do not apply(Specifically, I cannot claim copyright violation with the current knowledge).


Feature selection for "final" model when performing cross-validation in machine learning

I am getting a bit confused about feature selection and machine learning and I was wondering if you could help me out.  I have a microarray dataset that is classified into two groups and has 1000s of features.  My aim is to get a small number of genes (my features) (10-20) in a signature that I will in theory be able to apply to other datasets to optimally classify those samples.  As I do not have that many samples (<100), I am not using a test and training set but using Leave-one-out cross-validation to help determine the robustness.  I have read that one should perform feature selection for each split of the samples i.e.   Select one sample as the test set On the remaining samples perform feature selection Apply machine learning algorithm to remaining samples using the features selected Test whether the test set is correctly classified Go to 1.   If you do this, you might get different genes each time, so how do you get your "final" optimal gene classifier? i.e. what is step 6.  What I mean by optimal is the collection of genes that any further studies should use.  For example, say I have a cancer/normal dataset and I want to find the top 10 genes that will classify the tumour type according to an SVM.  I would like to know the set of genes plus SVM parameters that could be used in further experiments to see if it could be used as a diagnostic test.


What is the best way to change money in Moscow?

I have Euros.   I will be in Russia along the Trans-siberian railway for about 12 days. I might go to Moscow by plane or by train.   So, what is the best way to change money? I do not know how much I will spend.


By $A$ we denote an arbitrary commutative ring. Suppose that for each $a\in A$ $(a)=(a^2)$ (i.e. $\forall a\in A$ $\exists b$ such that $ba^2=a$).   It is easy to see that this implies that each prime ideal in $A$ is maximal. For example, suppose $\rho$ is a prime ideal, i.e. $A/\rho$ is an integral domain. So, for each $\bar{a}\in A/\rho$ ($\bar{a}\ne \bar{0}$) there exists $\bar{b}\in A/\rho$ such that $\bar{b}\bar{a^2}=\bar{a}$. It follows that $\bar{a}\bar{b}=\bar{1}$ as $A/\rho$ is an integral domain.   Well, I'd like to understand if the converse is true. So, is it true that if each prime ideal is maximal then $\forall a$ $(a)=(a^2)$? I would like to add that I am assuming $R$ is reduced (no nilpotent elements).


del in Python functions deleting variable before the line?

Consider the following code:  foo=None def bar():     print(foo, flush=True) # UnboundLocalError     print('MARK')     del foo  print(foo) bar() #print(foo)   Basically I have a function that calls del in it. However, when I run the program, I get UnboundLocalError for that 'foo' referenced before assignment. If I comment out the del line, the exception is gone. I suppose the del should be called exactly on the line it is on, so that the variable is invalidated only after that. But it doesn't seem to be the case.  Is this expected behavior? (Specifically, I'm using Python 3.6.2)


How do I log out from my account?I have a problem logging out of my account because I can't seem to find the log out icon.


It may sound strange, but why is Merry not used with Easter? Is there a reason why its usage  has been so firmly fixed with Christmas?


How to change mac address of my WiFi device?

I wanted to connect to WiFi Networks With a fake Mac address. In Windows, I changed Network address in Network devices. Is there any good way of doing this?


Let $x,y,a,b~\text{and}~ c\in \mathbb{R}$ such that $a,b>0$. Then show that $ax^2+by^2+2cxy \geq 0$ and $(ab-c^2)>0$. Please help to prove this. I tried AM GM inequality but did not  succeeded.


What is the proper pronunciation of "kitten?"

The American Heritage Dictionary says 'KIT-n' but speakers in my locale (west coast US) say 'Ki with short i, glottal stop, n.' There is no 't' sound. Do we speak slang, a dialect, or are we pronouncing it correctly?  The only reference I found here was from last May: "Intervocalic /t/ almost always reduces to a single flap [ɾ] there. That’s why ladder and latter are homophonic, although kitten and kiddin’ are not. Indeed, kitten may become just [ˈkʰɪʔn̩] (sometimes written [ˈkʰɪʔən]) , often enough."  I don't understand IPA code. Thank you!


Element-wise subtraction of two lists of numbers represented as strings

I am trying to get the margin of two items in an array, the array consists of 4 float values each, and I want the first array item to be subtracted by the first array item in the second array, and so on for the rest of the array.  My current code looks like this:  buyPrice = [     '456.3',     '2346.5',     '123.5',     '43.5', ]  sellPrice = [     '426.3',     '1346.5',     '23.5',     '13.5', ]  total = 0 amount = 0  userInput = int(input("How much coins do you want to spend?: "))  for x in buyPrice:     while total <= userInput:         total += float(x)         amount += 1      for y in sellPrice:         k = float(x) - float(y)       print("Profit: " + str(k))     print("Total Cost: " + str("{:.1f}".format(total)))     print("Buy: " + str(amount))     print("----------")     amount = 0     total = 0     k = 0   And the MARGIN output is this:  Item 1: -382.8 Item 2: -1303,0 Item 3: 20 Item 4: 30.0   Output should be:  Item 1: 30 Item 2: 1000 Item 3: 100 Item 4: 30   I think my other code is interrupting this, as I am trying to get: 1. Total amount of items I can buy with the user Input (product price: 10k - userInput = 100k - total amount of items that can be bought: 10 - and so on) 2. The profit the user can make if they are selling the item for a higher price. 3. The total cost of buying all the products (total = buyprice + buyprice)  I could just be completely of right now, it is early in the morning, but I am completely lost.   EDIT: After some debugging on this I see that "X" never changed value, it kept being "426.3", most likely because of my for loop? How can I fix that?  Thanks


So, I've got this phrase: ''Far from fleeing monotony, animals crave it, and what they most dread is to see it end.''  Can someone explain me why it is written ''to see it end'' rather than ''to see it ending''?   From the same category I've got ''to see him leave'' rather than ''to see him leaving''. Why is this use of infinitive ?


I am running 13.04.  I opened Software Updater. It started OK and then came up with the following message: "Software updates are no longer provided for Ubuntu 13.04 " followed by "To stay secure, you should upgrade to Ubuntu 13.10"  Is this an error? What is happening?   Please can someone explain what is going on. I have never had this in any previous edition of Ubuntu and it has always been possible to run and update a system two releases back, let alone LTS versions.


Update help center article on search to reflect the new position of the search box

The page  says:      Enter search terms in the search box that appears in the upper right corner of every page    But the box is not there.


Question regarding (i), on page 31 of Dirac Principles of QM

Context: P.A.M. Dirac, Principles of Quantum Mechanics, 3rd Ed., Clarendon Press, 1947, p. 30-31. $\xi$ is a “real linear operator” (Dirac's terminology for what's known today a self-adjoint operator) and $|P\rangle$ is an eigenket of $\xi$. Problem: I don't understand why “the number $\left\langle P\left|\xi\right|P\right\rangle $ must be real.”


Prove that $x_1x_2x_3\cdots x_n>y_1y_2y_3\cdots y_m$ with some given conditions

$x_1, x_2, x_3,.\cdots ,x_n$ and $y_1, y_2, y_3,\ldots,y_m$ are two series of positive integers, such that $m\not=n$.     Given that  $1<x_1< x_2<x_3<\cdots<x_n<y_1< y_2< y_3<\cdots<y_m$ and  $x_1+ x_2+ x_3+\cdots+x_n > y_1+ y_2+ y_3+\cdots+y_m$, prove that  $x_1x_2x_3\cdots x_n>y_1y_2y_3\cdots y_m$.  I have tried to prove it for conservatives. I have no idea how to deal with this type of inequality properly.


Adopting SD card for Samsung S5 mini duos G800-H

Has anyone managed to adopt the SD card for S5 mini duos. I've rooted it and tried to install ASPlugin (from RE) but it doesn't install either with CWR or TWPR. Also tried to partition the SD card (Samsung 64G) but the phone sees it as corrupted.  Model: SM-G800H Android: 6.0.1 Build: MMB29M.G800HXXU1CPK1  Also I have tried all the steps here   But no success so the question is has anyone managed to get it working specifically for S5 mini duos, is there something more restrictive about this version? The post above does mention in a comment that someone might have got it working for S5 (mini duos?). Would be wonderful to know how, what exact steps.   This is after rooting the phone. Did they manage to get ASPlugin to work if so how exactly.   Any thoughts much appreciated.


I am writing a paper where I consistently write $\bigwedge_R$ in-line. However, in one place, I write $$\bigwedge_R$$ in display mode. This has the effect of placing the R underneath the wedge symbol. I would like to avoid this. I tried writing $$\bigwedge{}_R$$, which places the R to the right of the wedge like I want, but it makes the R appear too high up. I also don't want to use \textstyle since I want the \bigwedge to appear as a display-style wedge. Is there a natural way to force latex to put the R on the right of the wedge so that the vertical positioning looks correct?


Present Perfect Simple vs Present Perfect Continuous

I came across some present perfect language exercises that I question.  Choose Present Perfect Simple or Continuous:     The place looks like a bombsite! What _____________ (do) all day?   Well, I've chosen "have you done" but the answer is "have you been doing". Why?   Next:     The British Museum has also announced a forthcoming exhibition of artifacts from the Stonehenge period which they _________________ (gather) over the last five years.   The answer is "have gathered", but I can't understand why. If you have "over the last five years" it seems to me this action was in progress during this five years.  Please, help me.  Thank you in advance!  Well, thanks for the comments, but to me, it isn't a duplicated question because I understand each tense separately and the idea of completion of the present perfect and the ongoing idea of Present perfect continuous. My question is: where is the completion idea in the second example? Let me explain myself, I thought in the second example the artifacts were being collected like in different events for five years. Some artifacts were collected, then after a given time more were collected over the period of 5 years they haven't collected all at once. And they won't stop collecting after the exhibition. I don't know if I'm making myself clear enough. But I've been looking for an explanation for this and I found one on Martin Hewings' advanced grammar in use book: "present perfect suggests that the activity happened only once or on a specified number of occasions".


Checking Normality of Numerical and Categorical Data

I have come across 3 questions on the title subject.   Why is it necessary to do a normality test? To check if data is imbalanced or not? Are these 4 methods of checking if the data follows normal distribution criteria both applicable to numerical and categorical variable?  I am trying to check if the data follows normal distribution by the following 4 methods.   Checking Distribution Drawing Box Plot Drawing QQ Plot Use skewness, kurtosis criteria  Skewness for normal distribution is 0, Kurtosis for normal distribution is 3. Is there a certain bound that I can use to guarantee that the data is normally distributed? (such as, 0 +/- 1 OR 3 +/- 1)


Where can it be find?  At activation panel i can only find option to change the activation key. The current key is not presented on this screen.


How to use a .bat to open a file type with a batch configured program?

I'm trying to modify the work of a predecessor to improve our workflow. He used a shortcut to a *.bat file and *.exe to configure then start our heavily controlled engineering software. This works great for starting the program, but it means that we can't set the software as the default program to open the file type. This means we always have to open files through the engineering software's GUI, which is lacking in sorting and searching capabilities (critical in folders with thousands of engineering parts).  So currently, the shortcut goes to: %Sharedrive1%\bin\licenseconfig.bat engrCAD.exe  I figured maybe starting engrCAD.exe from the .bat would allow me to use the .bat as a default editor by creating a .bat ConfigNLaunchEngrCAD.bat which has the contents of the original .bat plus start "" engrCAD.exe to the end of the .bat file. This worked in opening the program straight from the .bat, but still goes nowhere when I try to open a file in engrCAD through ConfigNLaunchEngrCAD.bat.  I think what I need to do is make the batch script able to take the file name as a parameter and pass it to the CAD software.  But I can't find how to implement that.  Is it a parameter I can add to the start command to accept the file name and directory selected? Or am I supposed to use a different command all together to accomplish this?  Much obliged, friends.  EDIT  I'm having trouble seeing the similarity with the other question.  I'm looking for a way to run an exe after a .bat configuration through windows that will allow it to be set as a default program for a specific file type.  The other post has similarities in the keywords "pass parameters" but little else in common.  If I am wrong, I'm sorry, but I may need a little more help to see how the other solution is applicable to this situation.  This  is more similar, but instead of inputing the file name in cmd prompt, I want it to be able to get the file path from me opening the file in windows with the .bat as the default program.


I always get missing $ when using \begin{equation}

I am currently writing my master's thesis on LaTeX, and I keep getting problems each time I use the \begin{equation} syntax, this is what I'm using   \begin{equation}   DTW(X,Y)= \underset{w_x,w_y}{\text{min}}\sum_{k=1}^{K}d(x_{w_x}(k),y_{w_y}(k))    \end{equation}   and this is what I get  ! Missing $ inserted   so far I have read that \begin{equation} already opens a math environment Any help will be appreciated.


Why is there a $1/2$ factor in the surface tension for a thin film?

According to  on the surface tension of a thin film: $$ \gamma = \frac{1}{2} \frac{F}{L}$$ Where $\gamma$ is the surface tension, $L$ is the length of the movable side and $F$ is the force required to stop it from sliding. (Please refer to the picture of a thin film below, also from Wikipedia)    Why is there a $1/2$ factor included in the equation? Some books said it's because there are two layers of the liquid. But in the case of a thin film, shouldn't there be only one layer? (i.e. one molecule thick). My current understanding is that there are supposedly two layers and each layer exerts an equal amount of force and thus the $1/2$ factor.     EDIT  Here is a picture to clarify what I am thinking (although it doesn't exactly depicts a "thin" film.) It shows a huge magnification of the cross-section around the boundary between the movable rod and the liquid.    $ABCH$ is the cross-section of the movable rod and $DEFG$ is the cross-section of the liquid. The circles in the liquid are liquid molecules, named as lower case letters for the sake of conversation.   Now lets consider molecule $f$ for instance. It stays static because there is a balance of cohesive forces in every direction. Molecules on the liquid surfaces such as $a$ and $d$, however, experience a net downward liquid-cohesive force and therefore must be balanced by the adhesive force from the movable rod, resulting in surface tension. Each line of molecules (along $a$ and $d$) exerts a pulling force of $F=\gamma L$. There are two lines of molecules so $F = 2 \gamma L$.  However, molecules $b$ and $c$ also experience net downward liquid-cohesive force and therefore must be balanced by the adhesive force from the movable rod, resulting in a pulling force exerted by molecules $b$ and $c$ on the movable rod. Therefore $F$ no longer equals $2 \gamma L$ but equals $4 \gamma L$ in this case.


I am iterating an IEnumerable from EnumerateFileSystemEntries where the act of getting the next element could throw an access denied exception. So I wrap it in a try but I don't want to stop iterating just because one element in the middle is bad. There are more elements that are good after the bad one. So I put a continue in my catch but that's not valid. Is there a way to do what I am failing to do here? paths = Directory.EnumerateFileSystemEntries(RootDirectory, SearchPattern, SearchOption); try {     foreach (var path in paths)     {         // Do something with the paths     } } catch (Exception ex) {     Debug.Print(ex.Message);     continue;    // ERROR: "No enclosing loop out of which to break or continue" }  I have gone through every answer in 3 duplicate posts. They all suffer from the same problem. The only solution I have seen is to port my application to .NET core which is a long process:  If you came here looking for a FrameWork based solution, abandon all hope. Nobody here will help you. If you do come up with a good answer you can't even add it because all of the other posts have flawed solutions accepted.


Using different polysaccharides for coagulation

Would a particular type of polysaccharide be better at coagulation than another? For example, would the presence of cellulose in a bio-coagulant be more effective at coagulation than the presence of starch or glycogen? I would like to know as I am doing an experiment about it and since nobody has done this before, I don't know whether having a higher concentration or ratio of a certain polysaccharide in a bio-coagulant compared to other polysaccharides will have an effect on coagulation efficiency?


Remove intersect/touch from polygons, to making one with JTS/GeoTools

Is there a way to remove an overlap from multiple polygons to make one final polygon?..programmatically, I am using the GeoTools or/and OpenGIS/JTS.. any ideas to put me on the right path...  example initial:  final:


I was recently deported from South Africa and i was given a 12 months ban. I am flying elsewhere using SA airways can i pass through South Africa or i will be deported again on touch down again?


Using same Google Adsense units for web and mobile versions

I'm redesigning a website. This time it will be responsive, so that the same pages that are loaded into a desktop browser will be loaded in mobile browsers as well.  The question is: can I use the same adsense units from both desktop and mobile platforms? Or do I have to configure special Google Adsense for Mobile units?  Thanks


I am unable to identify the 'OpenLayer plugin' to install. I have not installed it but it is also not showing up in the list of 'Not installed plugins'.   How can I get around this and get this plugin installed or there is another plugin that performs the same function of generating a base map?


I am running Ubuntu Mate 15.10-64bit on my surface pro by booting it from a USB drive. I don't want to install it on the surface pro, I just want to keep booting it from the USB drive. I always change the display properties to make everything bigger, how do I make it save these properties? It does not save them once the system is restarted.


How to load paragraph entity on node object?

I'm using paragraphs in my content type. I've created a paragraph type and added content. Now I want to load the paragraphs in a foreach. But nothing's showing up. $paras is empty:  $node  = \Drupal\node\Entity\Node::load(1); $paras = $node->get('field_paragraph')->referencedEntities();


How to print first 5 lines of a sorted csv file?

In the code below, I need to print out the first 5 lines from the CSV file "winners.csv" and I don't know how to do it. I just know that lines 4-5 will cause all lines in the csv file to print. The code in question: wins = open("winners.csv", "r") csv1 = csv.reader(wins, delimiter=",") sort = sorted(csv1,key=operator.itemgetter(1),reverse=True) for eachline in sort:     print(eachline) wins.close()


Is there a way to restore ubuntu 12.10 to default.

I want to remove everything from the hard drive and restore ubuntu 12.10, can someone please help?


Temporary failure resolving repository URLs

How to resolve temporary failure resolving 'dl.google.com' and 'in.archive.ubuntu.com' errors?  I have tried using the nameserver for Google (8.8.8.8) but the error still remains.   I don't know what to do about this archive error.


Why does a single radiator need regular bleeding?

Almost all of the radiators (forced water) in my house heat up fine. However, a single radiator needs regular bleeding (~1/day) in order to heat. Note, this radiator is not at the highest point in the house (it's a split level; I'd say it's around 3/4 of the way up), and radiators higher up are plenty hot.  Also, there no obvious water/corrosion stains around this radiator.  What might be causing this problem, and how do I fix it?


I am stuck with understanding of simple chi-squared test on proportion. We have  $$\sum \frac{(Observed_i - Expected_i)^2}{Expected_i}$$  and say that it follows chi squared distribution (sum of squared standard normals). Observed ~ $\mathcal N$ (by central limit theorem). Expected is a true parameter so it does not follow any distribution. Why this normalisation (division by Expected) leads to standardisation? After understanding this it will be clear what are the sources of the error (why this test is approximate), I would finally like to understand this.  UPDATE: I have found  and answer by @Glen_b. However, it still sounds to me like "$F=ma$ because it is". I believe that it is not a standard normal, but why it is negatively dependent and why it converges to chi square?  UPDATE II:  tells, finally, why.


404 not found - error while updating using aptitude

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring-security/restricted/binary-i386/Packages  404  Not Found [IP: 91.189.88.153 80]  W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/raring-security/universe/binary-i386/Packages  404  Not Found [IP: 91.189.88.153 80]


How can I effectively manage a hobby game project?

How can I successfully finish a hobby game project in my free time?  How do I motivate myself to keep it up and drive right through to the finish without losing interest or motivation along the way?


I can't find a wi-fi driver for my laptop Lenovo Ideapad L340 for Ubuntu 20

I am new with Linux so I choose ubuntu, but I can't use my wi-fi. I searched and tried sudo apt update and sudo apt upgrade but nothing happened and it still not working.... I also tried lspci -nnk | grep 0280 -A3 and got this ... 07:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd.  RTL8821CE 802.11ac PCIe Wireless Network Adapter [10ec:c821]     Subsystem: Lenovo RTL8821CE 802.11ac PCIe Wireless Network Adapter [17aa:c024]  08:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd.  RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 10)   Subsystem: Lenovo RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [17aa:38cf]  Please help me!


Is a StackExchange question only valid if it it's your own problem you're describing? If not, does this still apply in beta?

Most (if not all) SE sites have something in their help centre along these lines:     You should only ask practical, answerable questions based on actual problems that you face.   My question is: Is the emphasis on it being a "problem you face" to discourage     Chatty, open-ended questions [that] diminish the usefulness of our site and push other questions off the front page.     or does it actually have to be your own question? (Let's assume it otherwise fits the criteria for being a good question.)  It's also followed up by this paragraph     If your motivation for asking the question is “I would like to participate in a discussion about ______”, then you should not be asking here. However, if your motivation is “I would like others to explain ______ to me”, then you are probably OK. (Discussions are of course welcome in our real time web chat.)   which (combined with the contrast to "chatty, open-ended questions" above) makes me feel that as long as you describe a practical, answerable question that could be a problem that you face (but in real life happens to not be), you are okay; however the letter of the rule indicates that it should be your own problem.  The main reason that I am asking is that in beta I feel like it is a good policy to ask high-quality example questions, in order to:   help define the scope of the site attract new visitors who are interested by the question and/or its answers build up a bank of good, high-quality questions in the early stages help the site show up on Google question results and drive more traffic   However, I want to know if it's discouraged from doing so.  Edit. Let's give an example to make it clearer.   I'm on Pets.SE at the moment. Here are some questions from the front page.   How can I stop my dogs from barking at animals on television? Will crickets lay barren eggs? What are the arguments against neutering a guinea pig?   If those questions didn't apply to you or a problem you faced, could you still ask them? Or does the fact that they are not an "actual problem you face" mean that it doesn't matter that it's otherwise a "practical, answerable question"?


Why do Linux command line scripts use '-' and '--' as a parameter prefix?

Why do scripts in Linux use - and -- as parameter prefixes?  What I mean is why do they use - (for example $ git --help) instead of something like >, (so it would be $ git >>help) or even something like $ git-help? I know it probably doesn't make a difference what scripts use as a parameter prefix, but why did they choose - in particular?


Can a player receive two yellow cards if advantage is played?

If a football player A fouls player B in a manner such that they will receive a yellow card, but the referee plays the advantage rule, and subsequently player A fouls another player, can the referee give him two yellow cards, and hence a red card, one for each foul, or does player A get only the one yellow?


Hi there so i am new to java and am learning it, so i put together this little script, so i was wondering why it dosent work:  public class Main {      public static void main(String[] args) {         String text;          try (Scanner input = new Scanner(System.in)) {              System.out.println("Input");              text = input.nextLine();              while (text == "sampleText") {                 System.out.println("outputText");             }         }         System.out.println("Your input " + text);      } }


Is the voting and moderation system too drastic in SE?

I'm thinking about why some communities don't have the down vote option nor "close" or put "on hold" the content created by the user.  Just having an up vote option, or "like" for that matter, would be enough to give more exposition to good content, and its creators, while having a down vote option and the possibility of closing ones question just scares the heck out of most newcomers.  It seems to me that having a voting system with just a "like" option, and leaving all questions open while they are not spam, or have questionable behavior, would leave at the end of the day the same amoung of good content and users with good clarifications, but most importantly it would be more friendly to newcomers and current members.


Why is there a comma in "Man discusses his, wife's experience"

Why is there a comma after "his" in the headline? Does this mean his AND his wife's experience? Is it correct english, or slang?  "Man discusses his, wife's experience being injured during the Boston marathon bombings."  Source:


Transcendental numbers and irrationality measure

Is it possible to generate transcendental numbers of arbitrary irrationality measure ? I am thinking of something like an infinite series which depends on a parameter fixing the irrationality measure.   All I have found so far is bounds on the irrationality measure of famous numbers, I have not been able to find something going the other way around.


How to debug a Custom Timer Job in SharePoint 2010?

I have vs 2010, moss 2010, and I'm trying to debug a custom timer job, so I've set breakpoints on the feature receiver, but when I run the project or just right click deploy, my break points are never met.   Here is the code, as you can see its just a standard feature receiver:  public class StructureImportEventReceiver : SPFeatureReceiver {     const string List_JOB_NAME = "StructureImporter";      public override void FeatureActivated(SPFeatureReceiverProperties properties)     {         SPSite site = properties.Feature.Parent as SPSite;         // Break point is set on line above ... rest of code below     } }   I guess if I could get the debugger to stop on this breakpoint, I could step through to the rest of the timer job, but alas... nothing. What am I doing wrong?


Can't get Python to import from a different folder

I can't seem to get Python to import a module in a subfolder. I get the error when I try to create an instance of the class from the imported module, but the import itself succeeds. Here is my directory structure:  Server     -server.py     -Models         --user.py   Here's the contents of server.py:  from sys import path from os import getcwd path.append(getcwd() + "\\models") #Yes, i'm on windows print path import user  u=user.User() #error on this line   And user.py:  class User(Entity):     using_options(tablename='users')      username = Field(String(15))     password = Field(String(64))     email    = Field(String(50))     status   = Field(Integer)     created  = Field(DateTime)   The error is: AttributeError: 'module' object has no attribute 'User'


Do anyone know how I can copy information via href to clipboard? I'm going for something like this;  <?php  print "Number: " . $number . "";  ?>   When something click the link the information given in $number should be copied.   Thanks!


Restore database to point in time from full backup only

I have a database with recovery mode set to FULL. It's a dev database and I have two full backups dated 19th and 27th i.e. latest.  One of the developer did some changes on 26th and I want to rollback those changes and want to restore database at a state of 25th.   restore database MyDb from disk = 'I:\MSSQL\DATA\MyDb_20160127.bak' with recovery, stopat = '2016-01-25 10:38:15.280', move 'MyDb' to  'I:\MSSQL\DATA\MyDb.mdf', move 'MyDb_log' to 'I:\MSSQL\DATA\MyDb.ldf'      The STOPAT clause specifies a point too early to allow this backup set   to be restored. Choose a different stop point or use RESTORE DATABASE   WITH RECOVERY to recover at the current point.   I am using SQL Server 2005


How to share only one application without virtualization?

How to share only one application with a remote partner without the guest taking control of the hosting machine? I have a relatively big program running on Windows 10 only and another MAC user needs access, but I would like to run this program in background and use the PC while the remote user does its work.   My understanding of Application Virtualization options like Cameyo is that it requires program installation at some stage, an option I do not have.   Is there any other solution?   Thanks.


No Wi-Fi connections to see ubuntu 16.04.1

I just installed ubuntu 16.04.1 on my parents their old computer And if I want to connect to the internet, I get no connections to see  When I want to see if Broadcom Corporation is enabled it isn't in the list


I know that there is an adjective with that meaning. I just cannot think of it or find it online. I'd be very grateful if someone pointed out a word that means "easy to dismiss" or something similar.  It intend to use it in a sentence similar to this:  "His criticism is ______."


Stuck at an assignment for conditional probability

So I'm having this assignment in probability regarding conditional probability that states the following:  Each of 25 exams papers has 2 questions written on it. Neither of the 50 questions repeats itself. The student knows the answer for 44 questions. In order for the student to pass the exam he must answer correctly either on the two questions for the paper he has chosen or on one question on the first paper he has chosen and on the first question on the second paper he has chosen.  What is the probability that the student will pass the exam?  Any ideas?  Any sort of help will be appreciated.  Thank you in advance!


Does British Airways allow the use of KneeDefenders?

Yesterday a United Flight from Newark to Denver was forced to divert to Chicago's O'Hare airport after a fight broke out between two passengers over the use of a knee defender.  Does anyone know if this is acceptable with British airways?


How to return a boolean true value when comparing a String with a StringBuilder without using equals?

I want this code to print true.  I saw this question when passing my OCA7 exam.  I know the thing about the string pool and all and I also know the difference between .   The exam question didn't offer the .equals() option. It only said to figure out a way to make this code to return true by comparing a Stringbuilder with a String "==" operator. I had to figure out 1 option among 4 other that all had used the "==". No equals –   package test.test;  public class SomeClass{      public static void main(String[] args) {          StringBuilder sb = new StringBuilder("abcd");          String str = sb.toString();         System.out.println(sb.toString() == str);      } }


How to find out how much disk space is remaining?

What is the command to find out how much disk space is being used/remaining?


Questions on "All Horse are the Same Color" Proof by Complete Induction

I'm bugged by the following that's summarized on p. 109 of .     False theorem: All horses are the same color.      Proof by induction:      $\fbox{$P(n)$ is the statement: In every set of horses of size $n$, all $n$ horses are the same color.}$   $\fbox{Base Case or $P(1)$:}$ One horse is the same color as itself. This is true by inspection.   $\fbox{Induction Step:}$ Assume $P(k)$ for some $k \geq 1$.   $\fbox{Proof of $P(k + 1) :$}$   Since $\{H_1, H_2, ... , H_n\}$ is a set of $n$ horses, the induction hypothesis applies to this set. Thus, all the horses in this set are the same color.   Since $\{H_2, H_3, ... , H_{n+1}\}$ is also a set of $n$ horses, the induction step likewise holds for this set. Thus, all the horses in this set are the same color too.         Therefore, all $n +1$ horses in $\{H_1, H_2, H_3, ... , H_n , H_{n+1}\}$ are the same color. QED.   The issue the instructor was trying to point out is clearly valid. For the case $n = 1$, there is only ${H_1}$. So this case says nothing about possible overlapping elements of each set of $(n + 1)$, for instance $H_2$ in the above proof.    But it was proposed in the class discussion that this was the only problem. Had you been able to prove $P(2)$ true, then a proof of the above format would have been fine.    My interpretation is that yes, you could prove all horses are the same color, if you can prove that any set of two horses will be the same color. But this format would not work.  Why not? The problem I see is that the above proof is for the existence of at least one particular pair of sets of horses of sizes $n$ and $n + 1$, such that in each set, all horses are the same color.  Particularly when the set of size $n$ is a subset of the set of size $n + 1$.  In order to prove the induction step, don't you need to prove that sets of sizes $n$ and $n + 1$, do not necessarily contain the same, overlapping elements?  You could prove that any horse can be added to a set of 2 horses.  Take the last two, and they must be the same color, and so on.  Wwhatever color the first two happen to be, all other horses must thus be the same color.    Am I misinterpreting the example, or am I making a logical error? Thanks in advance.


Simple task: How to recolor a list line?

I just started learning Sharepoint. I have a problem that I can’t solve. There is a list. It is necessary that for a certain value in a particular column the display of a particular row changes - the background color.  How to hook a label to check a specific column and after it repaints the row?  I found the code. I don’t understand how to adapt it to my needs:  <script type="text/javascript" src="//mysite/SiteAssets/jquery-1.11.0.min.js"></script> <script type="text/javascript">     $(document).ready(function () {         $Text = $("td.ms-cellstyle.ms-vb2:contains('Завершена')");          $Text.parent().css("background-color", "#acf0bd");         $Text = $("td.ms-cellstyle.ms-vb2:contains('В процессе выполнения')");         $Text.parent().css("background-color", "#eac117");         $Text = $("td.ms-cellstyle.ms-vb2:contains('Не начата')");         $Text.parent().css("background-color", "#c7c5bc");         $Text = $("td.ms-cellstyle.ms-vb2:contains('Просрочена')");         $Text.parent().css("background-color", "#c1374f");     }); </script>   I almost forgot. I use the utility to insert the code CISAR. Maybe I am not adding it there.


What's the difference between real and effective aperture?

I understand that the simple idea that f-stop is focal length divided by aperture really applies to a simple single-glass lens, not the compound lens systems used to provide good image quality in modern lenses.  I've heard that in this case, what matters is the ratio of the aperture as it appears through the front element. Why the front element, and not the back (which would be the "point of view" of the sensor or film)?  What about for effects such as diffraction? Does the literal physical aperture size matter, or is it the effective size?


How to make nautilus forget saved password?

I am browsing Shared folders on a Windows network through Samba.  When I first opened a system on the network I was asked for a login username, password and I checked the save-password setting. Now the shared folder opens directly without asking for authentication.  I want to browse the folder using a different user which has more access rights. How should I do that?


Lenovo Y510P: Battery wont charge past 60%

On my y510p, I set Lenovos battery software to "Optimize battery health" while I was in Windows 8.1. I forgot to change it before overwriting that partition with Ubuntu, and now my battery in Ubuntu never charges past 59~60%. I think this is due to something in the BIOS because it persists despite my Windows partition being gone.   I've searched the BIOS but there's no mention of battery anywhere!  I'm using Ubuntu 14.04 LTS.


Given an ellipse, find the equation of the set of all points from which there are two tangents to the curve whose slopes are reciprocal.

Given an ellipse $x^2/a^2+y^2/b^2=1,$ where $a\not=b,$ find the equation of the set of all points from which there are two tangents to the curve whose slopes are (a) reciprocals and (b) negative reciprocals.   First I let $P(c,d)$ outside the ellipse,then assume the linear equation: $y=(x-c)+d;$ second, according to the problem, the line must touch the ellipse, so substitute $y$ for the equation of ellipse to get the intersection, then let $D(\text{discriminant})=0.$ After all of this, I have no idea how to continue.


Is there an easy way to add a hole into an object?

If I wanted to add a hole into an object e.g. Create a tube  Is there an easy way to do that?  I haven't seen anything regarding negative space so far in Blender, and it would be really helpful for my project  Thanks in advance!


As you know this is :  $0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, \ldots$  As I noticed if you multiply $T_{n-1}$ and $T_{n+1}$ from Fibonacci numbers, you almost always get $(T_{n})^2 \pm  1$. for example:  $2 \times 5 = 3^2 + 1$   $3 \times 8 = 5^2 - 1$   $5 \times 13 = 8^2 + 1$   $13 \times 34 = 21^2 + 1$  So I was wondering, is there any algebraic proof for this?


I have the following jQuery code:  $("#file-upload").change(function () {     if (this.files && this.files[0]) {         $('#cancel-image-upload').html('<button type="button" class="btn btn-warning" id="cancel-upload-button" style="margin-right:15px;">cancel</button>');     }     else         $("#image-preview").attr("src", "http://placehold.it/200x150"); });   $('#cancel-upload-button').click(function () {         $("#file-upload").replaceWith('<input type="file" id="file-upload" name="file" accept="image/*">');     });   What this code does is to display cancel button after file has been chosen, and the button should be able to delete it when clicked. I tried the code above but it didn't work for some reason. Why and how can I fix it? thanks!


Find the volume between the two surfaces.

Find the Volume of: $x^2+y^2\le z\le \sqrt{6-x^2-y^2}$  My Attempt: So I need to find $\iint_D(\int^{\sqrt{6-x^2-y^2}}_{x^2+y^2}dz)dxdy$, while $D$ is the area of the intersection between the two sufaces. Finding $D$:  $x^2+y^2=z \Longrightarrow\sqrt{6-(x^2+y^2)}=\sqrt{6-z} \Longrightarrow z^2=6-z \Longrightarrow z^2 +z-6=0 \Longrightarrow \frac{-1 \pm\sqrt{1-4*1*-6}}{2}=-3,2 \Longrightarrow z=2$. Substitute $z=2$ to find the intersection curve:  $1=\frac{x^2}{2}+\frac{y^2}{2}$.   Moving to elliptical coordinates:  $x=\sqrt{2}rcos(a)$, $y=\sqrt{2}rsin(a)$, $|J|=2r$  And here I got a little stuck, I usually substitute in the inequalities to get  the possible values of $a, r$, but here I'm not sure what to do, feels like I've missed $z$ since if I substitute $r^2\le z$, and in the same time I don't think an ellipsoidal coordinates fits this problem.  Any help and feedback is really appreciated, thanks in advance!


Same script produces 'Specified key was too long' on one server and not on another

Senario: I have a CMS with a database .sql file.   When I try to load the .sql file on my local phpMyAdmin, its successful, it loads all the tables into phpMyAdmin. When I try to load the same file on Real CMS host(Network Solutions) phpMyAdmin, it is not loading the tables.   The error I get on the Real CMS Server is:      Specified key was too long; max key length is 767 bytes   What could cause the same script to produce this error on one server and not on the other?


Listing with mixed english and russian symbols in comments

I'm using the  package for formatting .cpp code in LaTeX. My code needs to have mixed English and Russian words in comments. The font must be monospaced (preffered Courier family).  /* Prints Hello World */    #include <stdio.h>    int main (void){        printf ("Hello World!"); // This is an english commentary        return 0; // А это русский комментарий     }   I`m using the following code as an example:  \documentclass{article} \usepackage{fontspec} \setmainfont{Times New Roman} \setsansfont{Arial} \setmonofont{Courier New} \newfontfamily\cyrillicfont[Script=Cyrillic]{Times New Roman} \newfontfamily\cyrillicfontsf[Script=Cyrillic]{Arial} \newfontfamily\cyrillicfonttt[Script=Cyrillic]{Courier New} \usepackage{polyglossia} \setdefaultlanguage{russian} \usepackage{listings}  \lstdefinestyle{CppCodeStyle}{ basicstyle=\footnotesize\ttfamily, language={[ANSI]C++}, keywordstyle=\bfseries, showstringspaces=false, morekeywords={include, printf}, commentstyle={}, }  \begin{document}  \begin{lstlisting}[style={CppCodeStyle}] /* Prints Hello World */ #include <stdio.h> int main (void){     printf ("Hello World!"); // This is an english commentary     return 0; // А это русский комментарий } \end{lstlisting}  \end{document}   As I result XeLaTeX (in MiKTeX 2.9) produces following PDF:  /* Prints Hello World */    #include <stdio.h>    int main (void){        printf ("Hello World!"); // This is an english commentary        return 0; // Аэторусскийкомментарий     }   Sorry, I don't have enough reputation to post images :( As you can see, all spaces in Russian are ignored.  How can I fix it?


rescale a vector x to lie between arguments LOWER and UPPER in R

I am trying to rescales x to lie between lower and upper  rescale <- function(x, lower = 0, upper = 1){ slope <- ?? intercept <- ?? y <- intercept + slope * x return(list(new = y, coef = c(intercept = intercept, slope = slope))) }   And this is the hint from my professor: The linear transformation should map the minimum of x to lower and the maximum of x to upper. (Hint: what is the equation for a line passing through two points?) Note in calculating the minimum and maximum that x may contain NA values; make sure your function can handle this. And the return would look like:      **> rescale(c(1:10, NA), -1, 1)     $new     [1] -1.0000000 -0.7777778 -0.5555556 -0.3333333 -0.1111111 0.1111111     [7] 0.3333333 0.5555556 0.7777778 1.0000000 NA      $coef     [1] -1.2222222 0.2222222**   So does anyone has ideas on what the "slope" and "intercept" here should be?


I have been wondering if there is a stack site for machine drawing or if not how to propose one

I believe machine drawing(technical drawing) is a language of its own and any engineer should master this art. As a learning engineer myself I have trouble understanding some of its conventions and I am having trouble communicating with my peers who also seem to be having the same difficulties.  I believe it would be a good idea to have a StackExchange site for technical drawing as I believe that this subject can be mastered if we are able to communicate with experienced people on this subject. What do you guys think of this idea? Will the site have a chance of success? How will one propose such a site?


How can I raise an event from another thread on the main (UI) thread?

I'm trying to raise an event from my worker thread in the SerialPort.DataReceived event in the main thread.  Background: I have a device connected that can send data by itself to the serial port of my PC. I need to recognize this data and when a telegram is completed, pass it to the UI thread to e.g. show received values. Because the data can arrive spontaneously I used the DataReceived Event of the SerialPort class.  The DataReceived Event creates its own background thread, this I know and this is my problem. When the telegram is complete, I raise an event on the open form of the application e.g. to update a certain text field. The problem is, this event raising is done in the worker thread of the SerialPort received Event.  Is there a way to raise this event on the main UI thread?


I see that there are 2 people in my school connected to my iTunes library. how would i go about finding out who it is, other than just the ip. Maybe try to figure out like their computer name or something like PersonA's macbook.  I'm also new to apple and all these commands. A walk through would be helpful thank you.  -s


Distribution of sample standard deviation

I understand that if $X \sim N(\mu, \sigma^{2}$), then the sample mean for a sample size of N is $\overline{x} \sim N(\mu, \frac{\sigma^{2}}{N})$ but I am not sure how was this derived $ \overline{\sigma}^{2} \sim N(\sigma^{2}, \sigma^{4}\frac{2}{N-1}) $.   Furthermore, the standard error (standard deviation of the parameter) for $\overline{\sigma}$ is  $SE(\overline{\sigma}) = \overline{\sigma} \sqrt{\frac{1}{2N}}$, and I didn't find derivation for this either. Most of what I found is on the standard deviation of the sample mean, or $\frac{s}{\sqrt{N}}$ for unknown population standard deviation.  Standard error of $\overline{\sigma}$ and standard error of $\overline{\sigma^{2}}$ are completely different and they do not connect right? (Is there an intuition behind this?)  Could you show me the derivation for those two quantities? Also, should it be $\overline{\sigma}$ or $\hat{\sigma}$?   Thanks!


What seasoning can be used to replace msg?

If you can't use msg, (due to Migraines), what other seasoning can be used to make korean yaki mandu?


Virtualbox: OS cannot use the new extended disk space (.vdi)

I am running Virtualbox. I increased the size of my hard disk (.vdi) from 10G to 15G. Now when I start my Mint vm, the hard disk reports as 7.5g (df) even though i extended it (fdisk -l). I am not sure what is the problem. Can anyone point me the problem?  $ df -h Filesystem      Size  Used Avail Use% Mounted on /dev/sda1     >>7.5G<< 7.1G   61M 100% / udev            1.5G  4.0K  1.5G   1% /dev tmpfs           581M  888K  581M   1% /run none            5.0M     0  5.0M   0% /run/lock none            1.5G   88K  1.5G   1% /run/shm  $ sudo fdisk -l Disk /dev/sda: >>16.1 GB<<, 16106127360 bytes 255 heads, 63 sectors/track, 1958 cylinders, total 31457280 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000c55a4     Device Boot      Start         End      Blocks   Id  System /dev/sda1   *        2048    15728639     7863296   83  Linux /dev/sda2        15730686    16775167      522241    5  Extended /dev/sda5        15730688    16775167      522240   82  Linux swap / Solaris  $ vboxmanage showhdinfo mint.vdi UUID:                 a94931b9-673c-440a-ab6b-2c3eedd0cf93 Accessible:           yes Logical size:         15360 MBytes Current size on disk: 7806 MBytes Type:                 normal (base) Storage format:       VDI Format variant:       dynamic default Location:             /opt/virtualization/vm/mint.vdi


Sci-fi book with HUGE trees and catlike people

Trying to identify a book I read years ago. It had one male human that was (petrified?) for thousands of years. The world had ridiculously huge trees and catlike people. The only bit of steel to be found was his switchblade. Think it was published in the 70s.


Difference in meaning between: “his son will return” and “his son would return”

The hope is that his son will/would return.    What’s the difference in meaning of the sentence when will and would are used one at a time?  Should we use only would inasmuch as hope is only hypothetical??


How to i Combine Front and back leaf Textures that is not alpha From Cgbookcase.com with Maps. on a Leaf plane front and back with two uv Map?

I have two UV Maps on the mesh but I can not get UV map 2 to show at the bottom for the back of the leaf its a plane-shaped leaf...


Pointers, smart pointers or shared pointers?

I am programming with normal pointers, but I have heard about libraries like Boost that implement smart pointers. I have also seen that in Ogre3D rendering engine there is a deep use of shared pointers.  What exactly is the difference between the three, and should I stick on using just a type of them?


If I was... If I were...   When is it correct to use "If I was" vs. "If I were" in standard English?


Attempt to invoke virtual method (Problem view in fragment)

ChatFragment.java:   public class ChatFragment extends Fragment { private FirebaseListAdapter<ChatMessage> adapter; View RootView; EmojiconEditText emojiconEditText; ImageView emojiButton,submitButton; EmojIconActions emojIconActions; @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {     View RootView = inflater.inflate(R.layout.fragment_chat,container,false);     this.RootView = RootView;     return RootView; }  @Override public void onCreate(@Nullable Bundle savedInstanceState) {     super.onCreate(savedInstanceState); //:55     emojiButton = (ImageView)this.RootView.findViewById(R.id.emoji_button);     submitButton = (ImageView)this.RootView.findViewById(R.id.submit_button);     emojiconEditText = (EmojiconEditText)this.RootView.findViewById(R.id.emojicon_edit_text);     emojIconActions = new EmojIconActions(getActivity().getApplicationContext(),this.RootView,emojiButton,emojiconEditText);     emojIconActions.ShowEmojicon();   error:  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference     at dev.edmt.chatapp.ChatFragment.onCreate(ChatFragment.java:55)   I tried another way(ChatFragment.java):  public class ChatFragment extends Fragment { private FirebaseListAdapter<ChatMessage> adapter; View RootView; EmojiconEditText emojiconEditText; ImageView emojiButton,submitButton; EmojIconActions emojIconActions; @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {     View RootView = inflater.inflate(R.layout.fragment_chat,container,false);     this.RootView = RootView;     this.emojiButton = (ImageView)RootView.findViewById(R.id.emoji_button);     this.submitButton = (ImageView)RootView.findViewById(R.id.submit_button);     this.emojiconEditText = (EmojiconEditText)RootView.findViewById(R.id.emojicon_edit_text);     return RootView; }  @Override public void onCreate(@Nullable Bundle savedInstanceState) {     super.onCreate(savedInstanceState); //:60     emojIconActions = new EmojIconActions(getActivity().getApplicationContext(),this.RootView,this.emojiButton,this.emojiconEditText);     emojIconActions.ShowEmojicon();   error:  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void hani.momanii.supernova_emoji_library.Helper.EmojiconEditText.setOnFocusChangeListener(android.view.View$OnFocusChangeListener)' on a null object reference     at hani.momanii.supernova_emoji_library.Actions.EmojIconActions.setFocusListener(EmojIconActions.java:241)     at hani.momanii.supernova_emoji_library.Actions.EmojIconActions.<init>(EmojIconActions.java:64)     at dev.edmt.chatapp.ChatFragment.onCreate(ChatFragment.java:60)   I am new and do not understand the fragment..............................................................................................................................


I frequently work with extremely unbalanced data where I care most about the edge cases. For example, right now, I'm looking at some data with almost 30,000 cases where Score is between 0 and .3 and 5,000 where Score ranges from .05 - over 8.  If my data was normally distributed (or even close), I'd run a histogram to get a feel for what the distribution is like, or maybe a summary, so I can see the quantiles, median and mean. But as it is, the histogram is unreadable since the y scale goes up to 30,000 and I'm mostly interested in the bins that are less than 100 and the minimum through the 3rd quantile are all zero.  Is there a standard technique for high-level exploration of this sort of highly skewed data in the same way that a histogram works? To be clear, I'm most interested in working around the skewness (which sabotages my standard techniques), rather than identifying/quantifying it.


Is there a limit to the resolving power of a mirror telescope?

Like, if you grabbed the asteroid  and hammered it out into a disc of  iron foil and curved it into a telescope mirror , could you resolve details on the surface of an exoplanet?  At what resolution?    Could you make the mirror arbitrarily bigger and continue to get better resolution?    What are the formulas for calculating this and what are the limits, if any?    If you make a big enough mirror could you see individual houses on ?  Could aliens with big telescopes have videos of  in their libraries?


Multinomial regression interpretation SPSS

-- start reading from the edited part --  When running a multinomial regression the two values we are really interested in are the values 'B' and B(Exp)'.  Let's say we have (fictive numbers):   B: .098 ; B(Exp): 1.98 B: -.098 ; B(Exp): 1.98   The B(Exp) is the same for both examples. But in one case the B is positive in the other negative. For the first I suppose it means the odds 'increase' by 1.98, but what about the second?   The odds 'decrease' by 1.98?  ------ edited from here ----- (forget the above). Clearly I should have been more specific. I will use actual numbers now.  So let's assume I have a dependant variable D with three categories. And I have 2 explanatory variables E with 3 categories and sex with 2 categories.  D:   D1 D2 D3 (reference)   These are the results of parameter estimates in SPSS for the category D1:  E:   E1: B= -.111 ; Exp(B)= .895 E2: B= 2.264 ; Exp(B)= 9.622 E3: (reference)   Sex:   F: B= 1.514 ; Exp(B)= 4.546 M: (reference)   Are the following statements correct?   For females the odds of being in category D1 rather than in D3 'increase' by a factor 4.546 compared to males. For E1 the odds of being in category D1 rather than in D3 'decrease' by a factor .895 compared to E3. For E2 the odds of being in category D1 rather than in D3 'increase' by a factor 9.622 compared to E3.   In addition if the Exp(B) is lower than 1 it's decrease and otherwise increase? What statement would be correct for males?


I gather from the dictionary that pen is pronounced as /pen/ and pence as  /pens/. Is the plural pens pronounced as /pens/ or /penz/?


"Open in browser" does nothing when Android app is set as default

(This may be specific to the Galaxy, which is what I'm using)  When I click a link to an SE site in the Android app, it gives me an "open with" pop-up that has three options:   Internet Chrome Stack Exchange   I can then choose to open SE posts like this "Just once" or "Always."   The problem is that when I set the SE app to "always," and I click "open in browser,"    I choose Chrome in the pop-up The Chrome app opens the link I am then redirected back to the SE app (???)   This must be because it's trying to handle the "Always open in SE app" part. But the problem is that now the "Open in browser" option is pointless!   Could this be fixed somehow?


I know that implementing/overriding equals() without also overriding hashCode() violates the equals/hashCode contract.  But what if a class implements only hashCode() and not equals()?


Disable item of ListView - I get Exception in my code

I have read several posts here about that, but I didn't understand what I'm wrong and why it doesn't work in my simple case.  My target is to disable (and also I would like to see them in light gray) the 2 items when myCondition is false.  //__________________________ /  final Context myContext = this; final AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(myContext); final ListView listView = new ListView(myContext); List myListOptions = Arrays.asList(         "item 0",  //position=0         "item 1"  //position=1 ) ; final ArrayAdapter arrayAdapter = new ArrayAdapter(myContext, android.R.layout.simple_list_item_1, myListOptions ); listView.setAdapter(arrayAdapter);  //*****HERE THE PROBLEM IS!!!********* if (myCondition == false) {     listView.getChildAt(0).setEnabled(false);     listView.getChildAt(1).setEnabled(false); }  alertDialogBuilder.setView(listView); final AlertDialog alertDialog = alertDialogBuilder.create(); listView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {     @Override     public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {         //__________________________         //__________________________         //longclick su Item 0         if (position == 0){             //Do something         }          //__________________________         //__________________________         //longclick su CopiaTesto         if (position == 1) {             //Do something         }         //__________________________         //__________________________          alertDialog.dismiss();          return true;     } }); alertDialog.show(); return true; //__________________________   I get an exception on the line if (myCondition==false):  04-17 07:06:27.471  25198-25198/com.test E/﹕ Classe 'HeaderFragment'  ----  'onClick Opzioni'  ----  Exception: null        ----  Nome Thread (che invoca il Log)='main'     java.lang.NullPointerException         at com.test.HeaderFragment$2$3.onLongClick(HeaderFragment.java:462)         at android.view.View.performLongClick(View.java:4142)         at android.view.View$CheckForLongPress.run(View.java:17031)         at android.os.Handler.handleCallback(Handler.java:615)         at android.os.Handler.dispatchMessage(Handler.java:92)         at android.os.Looper.loop(Looper.java:137)         at android.app.ActivityThread.main(ActivityThread.java:5118)         at java.lang.reflect.Method.invokeNative(Native Method)         at java.lang.reflect.Method.invoke(Method.java:511)         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555)         at dalvik.system.NativeStart.main(Native Method)   I already knew what is a Null Pointer Exception, but I didn't understand why I have it in this case, probably because I'm not familiar with arrayAdapter


Possible Duplicate:        OK, So I am somewhat new to the idea of OOP in JS.   What is the difference between these two snippets of code written below:  function animal(){     this.name = 'rover';     this.set_name = function(name){          this.name = name;     } }     function animal(){     this.name = 'rover'; } animal.prototype.set_name = function(name){     this.name = name; }   They both do the same thing, so what’s the difference?


Template class definition inside C++ library

Inside a library I have the following template class definition (this is a useless template class, it's just an example to keep the code short)  Lib.h  #ifdef PTRTESTLIB_EXPORTS #define PTRTESTLIB_API __declspec(dllexport)    #else   #define PTRTESTLIB_API __declspec(dllimport)    #endif   template<class T> class PTRTESTLIB_API TemplateType { public:     TemplateType() {}     TemplateType(T e) : elem(e) {} private:     T elem; };   In another project I want to use this template class. So, I import the Mylibrary.lib and include the necessary header file.  AnotherProject\Tester.cpp  #include <TestLib/Lib.h>  int main() {     TemplateType<double> d; }   The compiler gives me the following error  1>------ Build started: Project: TesterClass, Configuration: Debug Win32 ------ 1>TesterClass.cpp 1>TesterClass.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall TemplateType<double>::TemplateType<double>(void)" (__imp_??0?$TemplateType@N@@QAE@XZ) referenced in function "void __cdecl testPtrTestLib(void)" (?testPtrTestLib@@YAXXZ) 1>E:\Metrostaff_Software\ArcoCAD_Inspection\Sources\TesterClass\Debug\TesterClass.exe : fatal error LNK1120: 1 unresolved externals 1>Done building project "TesterClass.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========   The only way to use the template class is to define in Lib.h  template class TemplateType<double>;   or   use this class template at least one time in the code of the library.   Is there a way to write a class template inside a library without knowing which will be it's specialization?  Thank you


Why when I'm doing this simple math subtraction I get this answer ?  In[10]: 1-0.9 Out[10]: 0.09999999999999998   someone know how to fix this ?


Is Ana's immune system actually compromised or was this created as a cover story to hide her? Her job seems pretty high profile as a way to hide someone or is a case of hiding in plain sight?


Why can we use sample variance of the treatment group to estimate population variance of the controls?

Let's say you have the following basic one-sample t-test, taken from :     A neurologist is testing the effect of a drug on response time by injecting 100 rats with a unit dose of the drug, subjecting each to neurological stimulus, and recording its response time. The neurologist knows that the mean response time for rats not injected with the drug is 1.2 seconds. The mean of the 100 injected rats' response times is 1.05 seconds with a sample standard deviation of 0.5 seconds. Do you think that the drug has an effect on response time?   When reviewing inferential stats, I was rethinking an issue I didn't understand with t-testing. What if the sample standard deviation for rats injected with a drug is completely different than the standard deviation of the population of rats who are not injected with the drug?  It would make sense that this is a real possibility. Maybe the drug clusters everyone around the sample mean (i.e. every rat who takes the drug gets really close to 1.05 seconds), and the sample standard deviation is half that of the standard deviation of the population of non-injected rats. I could see this happening if you were measuring how an athletic drink affects sprint time, and the treatment sample (people who had this drink) has a very small standard deviation compared to the population (people who did not have the drink) because everyone who drinks it gets around the same very fast sprint time.  Why can we then use the treatment-group sample standard deviation to estimate the control-group population standard deviation if they have a chance of being very different from each other? Or do we just assume they aren't?


How can i record screen and also write with pen mark

I want to know how can I write in on screen in Ubuntu with screen recording also and voice recording also


Could somebody explain how this statement is derived?  $${m+1\choose{k+1}} = \sum_{i=0}^{m-k} {k+i\choose{k}}$$  This is similar to     $\binom{m+1}{k+1}=\sum_{i=0}^m \binom{i}{k}$   but I am stuck as to how this has evolved into my original post.


Why are my "other" flags not getting reviewed?

I have three pending "other" flags from February 26th (week ago) that have not yet been reviewed. Is this because of anything I have done, or are the new mods already backed up?


Asymptotics of $\max\limits_{1\leqslant k\leqslant n}X_k/n$

I found an assertion in  at the beginning of page 6, but i can't see how to justify it: Let $X_n \geq 0$ i.i.d. with finite expectation then: $$ \frac1n\max\limits_{k \leq n}X_k \to 0 \quad\text{almost surely as  } \,n \to \infty$$   As Davide posted . I was wondering if it is evident that we have almost sure convergence also.


'There isn’t a day that goes by in which I’m not trying to solve a problem.'   Question: How do you use 'in which' here? Are there any similar examples for the usage of 'in which'?


How to fix gnome-control-center test speakers function? Failed to play sound: No such driver when tested. All other sound functions work

I have lost the ability to test speakers in Ubuntu 20.04 LTS. No sound is produced when trying the speaker test icons.  Expect to hear the Front Left and Front Right sounds.  Those files are present and can be played with aplay. I have uninstalled, reinstalled ad nauseum all pulseaudio, alsa-utils and the gnome-control-center packages over and over and have not been able to reclaim this function. Other than this test utility not functioning, all other sound functions work correctly. If I invoke gnome-control-center sound in the Terminal, I can see the result of trying the test speaker icons which produce no sound output. $ gnome-control-center sound  (gnome-control-center:9013): sound-cc-panel-WARNING **: 16:36:45.345: Failed to play sound: No such driver  I found a similar post about this problem in a bugzilla.redhat.com post:  In that case it was fixed with a gnome-control-center update.  But as mentioned, reinstalling the gnome-control-center package or resetting gnome defaults has not helped. What can I do to get this "missing driver" problem for the speaker test fixed? I also ran the alsa-info script so I hope that might point out something to somebody knowledgeable enough to understand the output.


My database contains fields with **special characters**. How can I read these characters?

My database contains fields with special characters. How can I read these characters? With the next code, Ma?? (Maçã) is returned. Do I have this code:       $nome=$_POST['nome'];  $sql=mysqli_query($con, "SELECT idalimento, nome_pt FROM alimento WHERE  nome_en= '$nome'");  while($exibe = mysqli_fetch_assoc($sql)){ echo $exibe["nome_pt"]."<br>"; } ?>   Can someone help me? Thanks


When reading on the wikipedia page of  they said :   " A reverse process to regression, where instead of a future dependent variable being predicted from known explanatory variables, a known observation of the dependent variables is used to predict a corresponding explanatory variable "  Indeed, this confuses me ! For me I see calibration is a special case of regression, and not a reverse regression. So, can some one explain the  stated in wikipedia, or in general what is the difference between regression and calibration?


I have a 4 GB RAM memory. In task manager you can see tha Committed memory is 5,6/7,9 GB RAM. Why that if In use memory is just 3,1 GB ? Is Windows using the Page File ?


Two topology(norm topology and quotient topology) coincident

Let $(V,‖・‖)$ be normed space over C, and $W$ is closed subset of $V$. We can think of two topology on $V/W$ naturally, that is, ①quotient topology and ②topology induced from quotient norm ‖・‖v/w. Why ① and ② coincidence? Could you tell me the proof of this?


Find $x$ defined as a continued fraction

I have solved the above using the below method.  $$x= 12 + \frac{1}{2+\left(\frac{1}{2}+x\right)}$$  After solving for $x$, I got the answer as $11.7515$ and $-1.41824$  So what is the real value of $x$, it should be one value for the expression. Why am I getting two values? Please assist


I made a copy of the list but when I make a change to the copy, the original list still changes. I don't understand why


Algebraically prove that $\sum\limits_{k=0}^n {n+k \choose n}\mathrm{2}^{n-k} = 1/2 \cdot \mathrm{2}^{2n+1}$

write the most simple algebraic proof you can, that means no integrals and no exponential generating functions if possible.  I have tried to solve it for close to 2 hours. what I got to is almost nothing but here it is : $1/2 * \mathrm{2}^{2n+1}=\mathrm{2}^{2n}=\mathrm{4}^n=\mathrm{(2+2)}^n= \sum_{k=0}^n\binom{n}{k}\mathrm{2}^k\mathrm{2}^{n-k}=?\sum_{k=0}^n {n+k \choose n}\mathrm{2}^{n-k}  $  and that's it. this is the first time I tried to use symbols so if something goes wrong, I am terribly sorry.


By considering the conjugate of its parametric form, evaluate $$\frac{1}{2\pi i}\int_{\gamma(0;1)}\frac{\overline{f(z)}}{z-a}dz$$ when $|a|<1$ and $|a|>1$, where $f$ is holomorphic in in the disk $(0;R),  R>1$.  Typically when doing these kinds of integration and parametrization, $|z|=n$ is given, but it's different in this case (or is it not?). Can someone help me out?


The minimal polynomial of a matrix is the same computed over a larger field

I have been reading through Dummit and Foote, and they note the following result on page 477:     Corollary.  Let $K/F$ be an extension of the field $F$.  Let $A \in M_{n \times n}(F)$.  Then the rational canonical form for $A$, the minimal polynomial for $A$ and the characteristic polynomial for $A$ are the same whether these objects are computed over $F$ or over $K$.   [Note: I am not asking for a proof of this result.]  Later in this section (p. 487), they present an example where they try to find all similarity classes of matrices $A$ with entries from $\mathbb{Q}$ satisfying $A^6 = I$.  It is noted that the minimal polynomial $m(x)$ must divide $x^6 - 1$, and that the factorization of $x^6 - 1$ over $\mathbb{Q}[x]$ is: \begin{equation*} x^6 - 1 = (x - 1)(x + 1) (x^2 + x + 1)(x^2 - x + 1) \end{equation*} They note that $m(x)$ must be of degree less than or equal to 3 (by Cayley-Hamilton), and then proceed to make a list of possible minimal polynomials under these constraints.  The list they produce is:  (1) $x-1$  (2) $x + 1$  (3) $x^2 + x  +1$  (4) $x^2 - x + 1$  (5) $(x - 1)(x + 1)$  (6) $(x - 1)(x^2 - x  +1)$  (7) $(x - 1)(x^2 + x + 1)$  (8) $(x + 1)(x^2 - x  +1)$  (9) $(x + 1)(x^2 + x + 1)$  However, I was thinking about the corollary when I was reading this example.  If I am interpreting this corollary correctly, there should also only be 9 options for the minimal polynomial if we think of $A$ being in $M_{n \times n}(\mathbb{C})$.  But in $\mathbb{C}[x]$, the factorization of $x^6 - 1$ is \begin{equation*} x^6 - 1 = (x-1)(x+1)(x- \zeta_3)(x - \zeta_3^2)(x - \zeta_6)(x - \zeta_6^5) \end{equation*} where $\zeta_3 = e^{2\pi i(\frac{1}{3})}$ and $\zeta_6 = e^{2 \pi i(\frac{1}{6})}$.  From this factorization, it would seem that the polynomial \begin{equation*} (x - 1)(x - \zeta_3) \end{equation*} could be one option for the minimal polynomial.       But this polynomial does not appear in (1) - (9).  Doesn't the above corollary state that it should be there?


The interior of interior of a set is its interior

Let $ (X,d)$ be a metric space and $A \subset X$. How can I show that $(A^\circ)^\circ = A^\circ $? $A^\circ$ denotes the set of all interior points of $A$.    I know that $x \in A$ is interior if there exists an $ r>0$ such that $B_r(x) \subset A$ .  So i think to try to prove that $(A ^\circ)^\circ \subset A^\circ$ and $A^\circ \subset (A^\circ)^\circ$ , but I cannot think how to start.


Can I transfer a downloaded game from PS3 to PS4?

I recently purchased a PS4, and was told that if I had downloaded GTA V on PS3 (which I did), then it would transfer to my PS4 when I signed in, but I don't see the option to do so anywhere. Can I actually transfer a game from PS3 to PS4?


Linking Error: Unresolved External Symbol....(Tried using XCode, VS, and GCC inline commands for Terminal)

Basically in my driver.cpp, in my main method, I simply just for testing purposes, instantiate a object.  #include "SafeArray.h" #include <iostream> int main () {     SafeArray<int> a1(4); return 0; }   Basically no matter which constructor I use, I get the unresolved external symbol for the constructor and destructor.   All files in the same directory I did:  g++ -c SafeArray.cpp g++ -o driver driver.cpp SafeArray.o  (linker errors)  And for VS and Xcode, i simply placed the files in their designated directory specified for header and source code, and when I build I get hit with the linker errors.   I have a feeling its something very simple im doing wrong, and I apologize in advance   Here's my header file:  #ifndef SAFE_ARRAY_H #define SAFE_ARRAY_H  using namespace std;  template <class T> class SafeArray {  private:     int low, high;     T* p; public:     SafeArray();     SafeArray(int i);     SafeArray(int l, int h);     SafeArray(const SafeArray &s);     ~SafeArray();      T& operator[](int i);     SafeArray<T>& operator=(const SafeArray<T>& s);     friend ostream& operator<<(ostream& os, SafeArray<T> s);  };  #endif   Here's my .cpp file:  #include "stdafx.h" #include <iostream> #include "SafeArray.h" using namespace std;  template <class T> SafeArray<T>::SafeArray() {     low = 0;     high = -1;     p = NULL; }  template <class T> SafeArray<T>::SafeArray(int i) {     low = 0;     high = i - 1;     p = new T[i]; }   template <class T> SafeArray<T>::SafeArray(int l, int h) {      if ((h - l + 1) <= 0) {         cout << "Constructor error in bounds definition" << endl;         exit(1);     }      low = l;     high = h;     p = new T[h - l + 1]; }  template <class T> SafeArray<T>::SafeArray(const SafeArray& s) {      int size = s.high - s.low + 1;     p = new T[size];      for (int i = 0; i < size; i++) {         p[i] = s.p[i];     }      low = s.low;     high = s.high; }  template <class T> SafeArray<T>::~SafeArray() {     delete[] p; }  template <class T> T& SafeArray<T>::operator[] (int i) {      if (i < low || i > high) {         cout << "index " << i << " out of bounds" << endl;         exit(1);     }      return p[i - low]; }  template <class T> SafeArray<T>& SafeArray<T>::operator=(const SafeArray<T>& s) {      if (this == &s) {         return *this;     }      delete[] p;      int size = s.high - s.low + 1;     p = new T[size];      for (int i = 0; i < size; i++) {         p[i] = s.p[i];     }      low = s.low;     high = s.high;     return *this;  }  template <class T> ostream& operator<<(ostream& os, SafeArray<T> s) {      int size = s.high - s.low + 1;     for (int i = 0; i < size; i++) {         os << s.p[i] << endl;     }      return os; }


Do any of the major factions use "Carriers"?

In the Star Trek universe we do see usage of "attack wings" (as shown in many of DS9's episodes) and by Starfleet.   However are these attack wings actually housed on larger carriers or are they independent ships capable of warp?  Furthermore does anyone know of any cannon usage of carriers as a regular part of the military (I wouldn't personally count the usage of a shuttle or two as having attack ships) by the Federation or other factions such as the Klingons or Romulans (in the example of the Romulans the scimitar wouldn't count as it was only built once and not a regular vessel type -- as far as I know)  Also I know some games such as STO use carriers but I would prefer evidence from books or screen.


I know sine represents a ratio in a triangle, but when you're doing things like $\sin(x)$, when you plug that into a calculator, the output is a completely separate number, without it knowing anything else about the triangle. That would mean that you don't need the actual triangle to calculate $\sin(x)$ otherwise you'd need to plug in the measurements to your calculator when solving for $\sin(x)$, right? My general question is what equation is sin? It obviously represents some complicated function/equation/whatever that the calculator does to actually find what $\sin(x)$ equals, right? What is the equation used? How could I go about plugging in variables to possibly calculate $\sin(x)$ by hand without using any actual triangles/measurements? If you have an answer, please explain like I'm an idiot who barely knows anything, I'm just some autistic freshman in highschool who's WAY too into mathematical stuff. I probably used incorrect math jargon in this question but still, I'm really curious


Anything Faster Than Eval to Create Deep Clones?

I need to create deepclones of veryBigObject. veryBigObject needs to be init first via initVeryBigObject. This is how it looks like:  initVeryBigObject = function(){     veryBigObject = {};     ...     //Very Long Calculations to calculate the value of stuff.     ...     veryBigObject = {data:stuff} } initVeryBigObject();  var clone = JSON.parse(JSON.stringify(veryBigObject));  //slow  or  eval('createClone = function(){ return ' + JSON.stringify(veryBigObject) + '}'); var clone = createClone();  //turns out to be x3 faster   I'm not a big fan of eval but it's the only fast way I see to clone an object that requires init. Am I missing something?  EDIT: This question isn't really a duplicate of "Most efficient way to clone an object?". The methods talked in "Most efficient way to clone an object?" are about cloning different objects using the same function.   My question is about cloning one particular object multiple times and obviously, methods discussed in "Most efficient way to clone an object?" are far slower than what I'm suggesting with my eval "strategy".


I know the derivation of Hubble time goes something like this (I am an a-level student so this may not be the actual derivation): Two galaxy that is moving away from each other at speed v are now D distance apart assuming the time when they where together is t=0 i.e. at the Big Bang the time since the Big Bang is given by  $$T= \frac{D}{V}$$ $$V=\frac{D}{T}$$ Hubble's law is given by $$V=HD$$ therefore subbing the first expression into the latter gives $$\frac{1}{T}=H$$ and therefore $$T=\frac{1}{H}$$ The thing I do not understand is if we are assuming the rate of expansion is constant (as is required for this) why does that mean we can use $$t=\frac{d}{v}$$ Because as the galaxies get further apart together the space between them gets more and more hence they will move away from each other faster the further the are apart. This equation needs v to be constant which is not the case. Please can someone explain?  In the linked qestion they use the formula t=d/v just saying it is a linear extrapolation. This does not help me with my qestion as i can still not understand why this can be used as it assumes v is constant (i think) which it would not be. I am looking for this to be explained in more detail then the linked question.


Why on Ubuntu 18.04 command "sudo -u username -s" not works as on CentOS 7?

I want to use a system user to separate permissions when I run nodejs scripts.  I created node-user:  sudo useradd -r -m node-user   Then I expected that next command login me in shell node-user:  sudo -u node-user -s   But seems that it's uses my var environment:  node-user@host:~$ echo $HOME > /home/me   Why? On CentOS 7 it's print /home/node-user.  I know that I can to set password for node-user and login like this:  su - node-user   But for me it's not logical, because node-user it's system user and may not have a password.


Point specific S3 URL to another IP (EC2 instance)

I have a static website hosted in AWS S3 with a URL www.example.com. However, I need www.example.com/blog to point to an EC2 instance instead of looking for blog inside S3, since I installed Wordpress in that instance to serve the blog content. I am aware it is possible to do this by tweaking the Apache config file, as stated , but this doesn't seem valid for S3 static hosting.  So, is this possible?  EDIT  My question was flagged as possible duplicate of . However, The solution proposed there would alter the URL www.example.com/blog, which I want to preserve.


This code compiles but in preview, it shows an error Invalid selectOptions found. Use SelectOption type in Apex.   public list<student__c> myStud = new list<student__c>();    List<student__c> stud_qry = new List<student__c>();     public list<student__c> getStud(){         stud_qry =  [select Id, First_Name__c, name from Student__c];          for(student__c getEm : stud_qry){           myStud.add(new student__c(Name = getEm.first_name__c+' ' + getEm.name));            }            return myStud;    }   VFP  <apex:outputText >Select Student:</apex:outputText>                 <apex:selectList size="1">                      <apex:selectOptions value="{!Stud}"/>                 </apex:selectList>


How can I write a script to run after installation to stop GRUB from showing at boot (on a dual boot system)?)

I am trying to set GRUB to not show at startup by using the command line. For this I try editing /etc/default/grub with sudo, but I get a Permission denied error as a response:  myuser@mysystem:~$ sudo echo "GRUB_HIDDEN_TIMEOUT_QUIET=true" >> /etc/default/grub bash: /etc/default/grub: Permission denied   What I want to set:  sudo echo "" >> /etc/default/grub sudo echo "# Hide Grub" >> /etc/default/grub sudo echo "GRUB_HIDDEN_TIMEOUT=0" >> /etc/default/grub sudo echo "GRUB_HIDDEN_TIMEOUT_QUIET=true" >> /etc/default/grub sudo update-grub   Permissions of the file:  myuser@mysystem:~$ ll /etc/default/grub -rw-r--r-- 1 root root 1211 Feb 12 20:00 /etc/default/grub   Shouldn't I be able to use sudo to edit this file? Why doesn't sudo give me the permission even though the file belongs to root:root?  EDIT:  Found out that the two above GRUB settings do not work for the desired goal. To still achieve GRUB not showing the following setting needs to be added to /etc/default/grub using:  sudo bash -c "echo 'GRUB_DISABLE_OS_PROBER=true' >> /etc/default/grub"


Specifying the default behaviour of floats in Koma-Script

I want to specify the default behavior of floats to be htbp and I want to do this in a class definition for the whole document. I already found floatpos in the documentation, but this does not affect the default of existing documents does it?


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


How to split meshes created with the array modifier? It didn't split them in Edit mode with P -> By Loose Parts.


Articles confuse me very much. Please, can anyone tell me which articles should I put in these sentences and why:     __ horse in this photo is beautiful. Is that __ girl or __ boy on its back?        __ castle on that hill is very old. Is that __ bird or __ plane up there (above the castle in the sky)?    In these sentences, I think, "The" article should be in front of 'horse' and 'castle' but which articles should I put in front of the other two words in each sentence?


What does this graphs mean in linear regression?

I don't know how to interpret these graphs. Is model well fitted?  And how to analyze Cook's dist Vs Leverage plot? I would be very grateful for help.      Linear regresssion model shows dependence between drinks’ price=value ( given in $) and information about sunny day (1- it was sunny, 0- it wasn’t sunny).


How to write code in a question or answer?

How to write code in a question/answer on a Stack Exchange site?


Is factoring polynomials easier than factoring integers?

I was reading the book  Algebra: Chapter 0 , by Paolo Aluffi, and came across the following assertion, in page 290, Exercise 5.9:     It is in fact much harder to factor integers than integers polynomials.   What I want to know is:   What exactly is the meaning of easier. Why is that so? Because it seems quite unintuitive for me that finding a factorization of a high degree polynomial (with a lot of big integer coefficients) should be easier than factoring the degree of polynomial itself.


How to find $gcd(5^{100}-1, 5^{120}-1)$? The problem is numbers are really big ($5^{100}$ is 70 digits).  None of the numbers is prime. I ran Euclid's algorithm on Python and found the answer in less than a second, however it seems that there is no on-paper approach to this problem, is it?


Portable tripod recommendations for those on a budget

I'm looking for a portable tripod with a budget of < $100.  I would appreciate some recommendations in this price range, especially from people who have used a product personally.  These are the requirements:   Maximum load I'll use it with: a Nikon 70-300 mm lens, total weight with camera: 1.5 kg. (This'll put high torque on the tripod head because the lens doesn't have a tripod mount.) Reasonable portability is key.  If I can't carry it using a bicycle or on a hike, I won't carry  it most of the time.  It should fold down to no more than 40-45 cm and weigh less than 1.5 kg.   I'm willing to compromise on maximum height to gain portability.  Also I realise that this price won't get me the smallest and lightest one (note that I tried to keep the requirements reasonable): I'm looking for one of the better alternatives in this price range, and for opinions from people who have actually used one of these.  The other tripod related questions I found on this site did not address this particular situation.


Which would you place in parentheses: the expansion or the abbreviation?

When dealing with abbreviations, should you parenthesize the abbreviation or its expansion? I have seen it both ways. Can anyone make a good case for preferring one style over the other?


Prove that for any integers $a, b, c, d$ number $(a^2 + b^2)(c^2 + d^2)$ is a sum of two squares of integer.  In fact I have no idea how to do this and I'll appreciate any tips or the  solution.


Fundamental group of complement of $n$ lines through the origin in $\mathbb{R}^3$

Just a quick question to verify whether I'm right.   Claim: The fundamental group of the complement of $n$ lines through the origin in $\mathbb{R}^3$ is $F_n$, the free group on $n$ generators.  Proof: remove a line from $\mathbb{R}^3$. We may deformation retract the remaining space onto a cylinder radius $\epsilon$ about the line, and thence to a circle $S^1$. There is no trouble repeating this process with a second distinct line, except that then we will be a wedge union $S^1 \vee S^1$. Continue inductively, and recall that the wedge union of $n$ circles has the stated fundamental group.  I'm only just starting to really get my head around this stuff, so any feedback would be really useful!  Thanks!


Tossing a fair coin until two consecutive tosses are the same

A fair coin is tossed repeatedly and independently until two consecutive heads or two consecutive tails appear. What is the PMF of the number of tosses?


#!/usr/bin/env xdg-open [Desktop Entry] Version=1.0 Type=Link Name=ShareFolder Icon=/usr/share/icons/DPL/NetworkShare.png Name[en_US]=ShareFolder URL=smb://servername/sharefolder   This is my .desktop file which has a URL. How do I execute this desktop shortcut in the terminal? If i double click it works perfectly, but I need to execute this in terminal.  I tried . That didn't work for me either but it does if its an "application" shortcut. I'm trying here to execute "link" .desktop file, where you define in the type section (Type=Link) and (URL=smb://servername/sharefolder)


I'm currently disabling password authentication on all my ssh servers (good idea of the day!). Some of my servers are shared with other people and I want to force them to use a ssh key with a passphrase. Is it possible to disallow ssh login for ssh keys without passphrase?


I have a long list of vectors written between the signs $ $, the problem is that the list is so long it does not fit the page. I want to make the list break at some point and continue in the following line, how could I do this?   THis is my script.  $G(B)=\left \{ \begin{pmatrix}0 & 4 & -17 & 24 \end{pmatrix}^T,\begin{pmatrix}1 & 0 & -3 & 3 \end{pmatrix}^T,\begin{pmatrix}1 & -4 & 14 & -21 \end{pmatrix}^T, \begin{pmatrix}2 & -4 & 11 & -18 \end{pmatrix}^T, \ \begin{pmatrix}3 & -4 & 8 & -15 \end{pmatrix}^T,\begin{pmatrix}4 & -4 & 5 & -12 \end{pmatrix}^T, \begin{pmatrix}5 & -4 & 2 & -9 \end{pmatrix}^T, \begin{pmatrix}6 & -4 & -1 & -6 \end{pmatrix}^T\right \},   \begin{pmatrix}11 & -8 & 1 & -15 \end{pmatrix}^T, \begin{pmatrix}17 & -12 & 0 & -21 \end{pmatrix}^T, \begin{pmatrix}7 & -4 & -4 & -3 \end{pmatrix}^T,  \begin{pmatrix}8 & -4 & -7 & 0 \end{pmatrix}^T \right \} $   Thanks!


What is the difference between " from ～to～" and "from ～ through～"? For example,  are the following sentences same?  I work from Monday to Friday. I work from Monday through Friday.