I have been trying to convert a numpy array back to raster after doing some calculation on it and i keep running into errors. Basically I am trying to find flooded areas below a certain sea level eg 2 meters. Here is my code :  import arcpy ,os ,sys import numpy as np  #conditioning the raster data    outputRaster = Con(inRas1>=0 ,inRas1,1) outputRaster.save(outputgdb + rasterName)   #clip the raster layer to study area clipppedRaster = arcpy.Clip_management(outputRaster,"#",clipRaster,inputFeature,"#","ClippingGeometry","MAINTAIN_EXTENT") #clippedRaster.save(outputgdb+ outputclip)  #convert raster to numpy array num_array = arcpy.RasterToNumPyArray(clipRaster,nodata_to_value=0)   floodedAreas = num_array[np.where(num_array <= 2)] arcpy.AddMessage(np.array(floodedAreas)) rasterflood = arcpy.NumPyArrayToRaster(floodedAreas,x_cell_size=1) floodedAreas.save (outputgdb + "numpyarray1")  rasterflood = arcpy.NumPyArrayToRaster(floodedAreas,x_cell_size=1) rasterflood.save(str(floodedArea))  arcpy.AddMessage(np.min(num_array))   But i keep running into the following error:  Traceback (most recent call last):   File "C:\Python27\dealingwithraster.py", line 57, in <module>     rasterflood = arcpy.NumPyArrayToRaster(floodedAreas,x_cell_size=1)   File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\__init__.py", line 2299, in NumPyArrayToRaster     return _NumPyArrayToRaster(*args, **kwargs) ValueError: Argument in_array: A two or three dimensional NumPy array is required.   What am I doing wrong here?

I'm trying to save filled raster object to geo database by my specified filename.  import arcpy from arcpy import env from arcpy.sa import *  env.workspace = r"C:\GIS Data\Cameron_Run\Topo_NED\Projected"  # Set local variables surfaceRaster = "raw_10m_dem"  # Check out the ArcGIS Spatial Analyst extension license arcpy.CheckOutExtension("Spatial")  # Execute FlowDirection fillRaster = Fill(surfaceRaster) arcpy.RasterToGeodatabase_conversion(fillRaster, r"C:\GIS Data\Cameron_Run\Topo_NED \Projected\fillRasterGDB.gdb")   But this code is saving raster file by its own specified name, for this case Fill_raw_10m1 is the default name of saved raster file.  Is there any way so that I can specify the name of saved raster file?


Sorry for the cuality of the post is my first time posting on StackOverflow. I was working on my homework, it consist in create a bank account simulation, makeing deposits and retires, when i finished my program the console show me this: Exception in thread "main" java.lang.NullPointerException      at java.desktop/java.awt.Container.addImpl(Container.java:1117)      at java.desktop/java.awt.Container.add(Container.java:436)      at Banco.createGUI(Banco.java:29)      at Banco.main(Banco.java:16)  Process finished with exit code 1  This is my code, i spend some time trying to fix it, i couldnt find where is my variable with the value null, thats why im looking for some help. import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener;  public class Banco extends JFrame implements ActionListener {      private JLabel label1, label2;     private JTextField Square1, Square2, Square3;     private JButton Button1, Button2;     private Account account;      public static void main(String[] args) {         Banco Ventana = new Banco();         Ventana.setSize(300,300);         Ventana.createGUI();         Ventana.setVisible(true);     }      private void createGUI() {         setDefaultCloseOperation(EXIT_ON_CLOSE);         Container window = getContentPane();         window.setLayout(new FlowLayout());          label1 = new JLabel("Balance");         window.add(label1);          Square1 = new JTextField(5);         window.add(Square2);          label2 = new JLabel("State");         window.add(label2);          Square2 = new JTextField(9);         window.add(Square2);          Button1 = new JButton("Deposit");         Button1.addActionListener(this);         window.add(Button1);          Button2 = new JButton("Retire");         Button2.addActionListener(this);         window.add(Button2);          Square3 = new JTextField(5);         window.add(Square3);          account = new Account();     }      public void actionPerformed(ActionEvent event) {         int balance;         int Amount;          balance = account.getBalance();         Amount = Integer.parseInt(Square3.getText());          if(event.getSource() == Button1){             account.setBalance(balance);             account.depositBalance(Amount);             balance = account.getBalance();         }          if (event.getSource() == Button2){             account.setBalance(balance);             account.retireBalance(Amount);             balance = account.getBalance();         }          if (balance < 0){             Square2.setText("Overdrawn");         }         else {             Square2.setText("OK");         }         Square1.setText(Integer.toString(balance));     } }  class Account{      int Balance=0;      public void setBalance(int Amount){         Balance = Amount;     }      public int getBalance(){         return Balance;     }      public void depositBalance(int Amount){         Balance = Balance + Amount;     }      public void retireBalance(int Amount){         Balance = Balance - Amount;     } }

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


I have two sentences that I was unsure if I needed to use "do not" or "does not". Now I know that the correct one is the one with "does not" but I don't understand the reason why. The two sentences are as follows:  Nevertheless, having those skills does not automatically guarantee their performance as marketers.  Nevertheless, having those skills do not automatically guarantee their performance as marketers.  The rules is that you use "do not" with words that are plural and "does not" with words that are singular. In my mind, "those skills" is "they". And they do not.  I don't understand why "those skills" is "It". It does not.  Someone told me that the reason that "does not" is the correct option is because of the word "having". But I don't understand the reason or if there is a rule. Is this correct? If so, why? And if not, can anyone please explain? Thank you.

Making adult decisions are/is really not fun.     What is the proper answer and why? My gut says "is" but I can't explain why.


A related question:   This problem is a little different, because I receive a change in a filter rather than a question from another filter:    Steps to reproduce:   Go to "Review-Close Votes" page Click on a tag that you normally don't answer One question from that tag will be displayed. Decide on it Next question will be from your default filter, not the filter that's displayed.   As you see on a screenshot, I've chosen the [mysql] tag, got one question then bam, filter got changed to [actionscript-3] which I remember being displayed to me ever since I'm determinately crawling on close votes. The displayed filter is [mysql] while it's not in effect.   A workaround is re-applying the filter via "filter" menu.  UPDATE: Once you set the filter via filter tool in close votes page, that filter will apply whenever close vote page will display a new question. So, while the workaround is still valid, the problem is narrowed to the filter request when submitting user decision on closing the given question.

When browsing questions for a given tag, a review indicator has recently started showing up that links to the open review tasks for that tag.  For example, this is what I see when viewing :    The number 187 in the screenshot above would link to    However, clicking on that often opens review tasks that do not have the tag in question.  For example, it opened the following on successive attempts:   (c)   (java)  It seems that the filters are broken.  A sample screenshot (note the mention of the filter on the review page):


I understand that in order to avoid overfitting we need to reduce the complexity of the network. Or, in other words we can reduce the degree of polynomial. L1-norm does exactly this - reduces the degree of polynomial by making the solution sparse.  In L2-norm case the weights don't become zero but small. Thus, the degree of polynomial does not decrease, meaning the network does not become less complex, meaning it did not solve the overfitting. So, I don't understand how limiting the weights to not grow to big numbers help to avoid overfitting.

I completed Andrew Ng's Machine Learning course around a year ago, and am now writing my High School Math exploration on the workings of Logistic Regression and techniques to optimize on performance. One of these techniques is, of course, regularization.  The aim of regularization is to prevent overfitting by extending the cost function to include the goal of model simplicity. We can achieve this by penalizing the size of weights by adding to the cost function each of the weights squared, multiplied by some regularization paramater.  Now, the Machine Learning algorithm will aim to reduce the size of the weights whilst retaining the accuracy on the training set. The idea is that we will reach some point in the middle where we can produce a model that generalizes on the data and does not try to fit in all the stochastic noise by being less complex.  My confusion is why we penalize the size of the weights? Why do larger weights create more complex models, and smaller weights create simpler/smoother models? Andrew Ng claims in his lecture that the explanation is a difficult one to teach, but I guess I am looking for this explanation now.  Prof. Ng did indeed give an example of how the new cost function may cause the weights of features (ie. x^3 and x^4) to tend towards zero so that the model's degree is reduced, but this does not create a complete explanation.  My intuition is that smaller weights will tend to be more "acceptable" on features with greater exponents than ones with smaller exponents (because the features with small weights are like the basis of the function). Smaller weights imply smaller "contributions" to the features with high order. But this intuition is not very concrete.


I want to print a hexdump in my document, where i color some specific bytes. I tried working with escapeinside then doing textcolor in my lstlisting but this changes the format of the text. The bytes need to stay aligned. Exampleoutput:  Examplecode: \lstset{escapeinside={<@}{@>}} \begin{lstlisting}[language=none, basicstyle=\scriptsize] 01b0    00  00  00  00  00  00  00  00  78  56  34  12  <@\textcolor{blue}{00}@>  <@\textcolor{blue}{00}@>  00  01 01c0    <@\textcolor{blue}{01}@>    <@\textcolor{blue}{00}@>    <@\textcolor{blue}{83}@>   <@\textcolor{blue}{fe}@>     <@\textcolor{blue}{ff}@>    <@\textcolor{blue}{ff}@>    3f  00  00  00  41  29  54  02  00  fe 01d0    ff  ff  82  fe  ff  ff  80  29  54  02  fa  e7  1d  00  00  fe 01e0    ff  ff  83  fe  ff  ff  7a  11  72  02  fa  e7  1d  00  80  fe 01f0    ff  ff  05  fe  ff  ff  74  f9  8f  02  0c  83  6c  04  <@\textcolor{red}{55}@>     <@\textcolor{red}{aa}@> \end{lstlisting}  Is there a way i can keep my font style of my listing within the escapeinside?  Or is there a better way?

How can you set various words in your lstlisting to various text colors?  For instance, I want the word "fail" to appear in red and the word "pass" in green.   I have the feeling there should be some easy escape possibility!?  What did not work  I tried using the parameter   escapeinside={(*@}{@*)}   and then within the lstlisting  (*@\color{red}@*) fail (*@\color{black}@*)   But this has no effect.  Therefore, I've tried   $\textcolor{red}{\lstinline!fail!}$   but listings does not like nested lstinline within lstlistings.  Complex solution  a not quite suitable solution is described in : it is intended for one color only, so I would have to add something like  moredelim=**[is][\color{red}]{@}{@},   for every color I use :(


I just bought a new monitor (the LG 27UL500) which should support 4K to connect with my Macbook Pro. I've connected my Macbook Pro with an Mini DisplayPort to HDMI connector (which should support 4K) to my monitor.   But now my Macbook only gives me the option to set it to 1080p. I've tried to 'hack' my monitor with SwitchResX to 2560x1600 but the quality seems to stay the same.   Is it my Macbook Pro video card that can't handle the 4K? Because on  it says that my Macbook should be able to handle a second screen of 2560x1600. It’s not 4K but still better then the 1080p I have right now.  Having a 4K monitor which only displays 1080p is kinda useless. Can someone help me get this monitor to display the max possible resolution?  Specs of my Macbook Pro: MacBook Pro (13-inch, Late 2011) Processor: 2,8 GHz Intel Core i7 Memory: 16 GB 1333 MHz DDR3 (was originally only 4GB) Videocard: Intel HD-video 3000 512 MB

How do I find out the number, type, resolution & refresh rate of additional monitors I can attach to my MacBook or MacBook Pro?  This is an attempt at a canonical QA, as per the Meta QA -   to try prevent the myriad "same but different" questions we get on every possible combination of computers, cable & monitors There are perfectly good resources out there that Ask Different should not have to duplicate the efforts of.


I met a sugar daddy online who claims he cannot use cashapp or paypal to compensate me and can only use bitcoins. I made a coinbase account and now he is asking for my coinbase login so he can "load my account with his cryptography watcher and it will be loaded"  I am just skeptical because i have read about cases of people getting scammed with money laundering in regards to bitcoins since it leaves a digital trail of where the bitcoins gets transferred.   Could he be attempting to scam me? What could he do with my bitcoin account if he were to have access to my login?

I met a guy on a sugar daddy dating site and we talked, I told him my situation and he said he would help.   He asked for my bank account information and I told him you can use cash app or PayPal to go through. He said his account manager deals with his finances. So I set up an account with a bank that I don’t use so that my primary account isn’t used.  Eventually he was in the process of sending me money and we had agreed on a amount that wasn't crazy. But then he asked for my address and I asked why and he said just wondering. Then said he wanted to send me a surprise for being his baby. Which I didn’t give.  Then later on he sent the money and said he sent me a bonus and that I was supposed to use that to pay his mothers caregiver, which he didn’t mention until after.  I kept questioning him and he was saying that he works in construction and he’s trusting me to carry out the errand. Then he said don’t let him down and I asked him if he was threatening me and he kept saying I need this done but didn’t really answer my question.  Am I being scammed? I’m about to change my password but is this a scam?


Hi fairly new to python and I cant get my head round why this isn't working. I want to have an object the user to input something as a string, if the string can also be a float, I want the object type to be a float. def Representsfloat(s):     try:         float(s)         return True     except ValueError:         return False   item_finder = input("Enter an Item to find: ")   def account_finder():     if Representsfloat(item_finder) == True:         item_finder = float(item_finder)     else:         pass  Thanks

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


I've seen some external hdd-cases(for 2.5 inch) with two-head usb:    However, all hdd's are working with 1 usb-head.  I know that they are not enough to power 3.5inch hdds, so , what are use of two-usb heads?

I've recently bought an external hard drive enclosure and it had arrived with an USB cable, with one USB connector on one side and two on the other. Why do some USB cables have two connectors while others do not?


How can I get the 10th previous line from a match? I think using grep with the option B and then piping it into head would work, but is there a simpler way to do this?  For example, if I had a text file like this  a b c d e f g h i j k l m   and if I chose the pattern to be "l", I'll get the 10th previous line, which is "b".

I'm trying to print only the <N>th line before a search pattern. grep -B<N> prints all the <N> lines before the search pattern. I saw the awk code  that can print only the <N>th line after the search pattern.  awk 'c&&!--c;/pattern/{c=N}' file   How to modify this to print only the <N>th line before each line that matches pattern ? For example, here is my input file  ... ...    0.50007496  0.42473932  0.01527831    0.99997456  0.97033575  0.44364198 Direct configuration=     1    0.16929051  0.16544726  0.16608723    0.16984300  0.16855274  0.50171112 ... ...    0.50089841  0.42608090  0.01499159    0.99982054  0.97154975  0.44403547 Direct configuration=     2    0.16931296  0.16553376  0.16600890    0.16999941  0.16847055  0.50170694   ...   I need a command that can give me back the 2nd line before the search string Direct configuration. I'm trying to run this in SUSE-Linux


Just to be clear, I'm NOT trying to insert into SQL Server directly from C#.   I'd like to convert a C# byte array into a binary string so that I can paste it into a SQL Script like the following:  insert into Files (FileId, FileData) values (1, 0x010203040506)   How can I do this?

How can you convert a byte array to a hexadecimal string, and vice versa?


How to predict the movement of the body when a force is applied on it like in the   I have attached screen shot as reference.

I am making a game with Andengine and Box2D. I have a dynamic body and I apply linear impulse on the body to move it around when the user have touched the screen.  Now I want to show the path where the body will go when the user have touched. If you have played Angry Birds or Basket Ball Shoot or any other which have projectile motion with a path shown you will get my point. I want to show the white dots which are shown in those games.


I keep bouncing into the following result. Let $X$ be a random variable with a cumulative distribution function $P(X<x)$. We draw $n$ independent values from this distribution, and the minimum of these $n$ values is $x_{min}$. Then for large $n$, it is true that:  $P(X< \langle x_{min}\rangle) = 1/n$  where $\langle x_{min}\rangle$ denotes the mean of $x_{min}$ over many trials. Can anyone please provide a proof and an intuitive understanding of the above relation?

If $X_1, ..., X_n$ are independent identically-distributed random variables, what can be said about the distribution of $\min(X_1, ..., X_n)$ in general?


Let $A_{ij}=1$ if $i=j$ and let $A_{ij}=\frac{1}{2}$ if $i \neq j$. How can I formally argue that $A$ is an invertible matrix? I can made for particular examples, but I don't know how to argue for the general case.

This question aims to create an ""  of numerous questions that ask about determinants of specific matrices (I may have missed a few):              The general question of this type is  Let $A$ be a square matrix of rank$~1$, let $I$ the identity matrix of the same size, and $\lambda$ a scalar. What is the determinant of $A+\lambda I$?  A clearly very closely related question is  What is the characteristic polynomial of a matrix $A$ of rank$~1$?


Any suggestions on figuring out this crash?  The below code intermittently crashes between logging <part>14 and logging <part>15.  Plaintext is a path string (in this case it is "C:\Documents and Settings\Brian\Desktop\Joy\", despite a clear lack of such joy.  I have a sinking feeling this is a symptom of some sort of evil memory issue.  I tried with both Capicom 2.1.0.1 and 2.1.0.2, both of which crash.  The latter gives a standard error-reporting message, the former dies silently (i.e. the program closes itself).  I tested it on someone else's XP machine with the same issue, though it worked fine on Vista.  Const curMthd = "EncryptStringWrap" Dim Message As CAPICOM.EncryptedData Set Message = New CAPICOM.EncryptedData Dim oUtil As CAPICOM.Utilities Set oUtil = New CAPICOM.Utilities E.ErrorLog "<PART>14" Message.Content = plaintext E.ErrorLog "<PART>15"   Edit: It's not the data that is causing the problem. I have been manually passing the data in to test for this; it works fine normally. Annoyingly, the bug went away when I put the test code in the initialization. Evil heisenbug :( . Probably a memory issue :(  Edit 2: Rewritten and whatnot , and closed.  Not really the same question as this per se, but this question was based on a serious misunderstanding of the problem.

Related to .  Any advice on fixing the problem below?  After a lot of experimentation with the program, I have discovered several things.   It crashes relatively consistently (90% of the time or so) upon running the line of code, Set Message = New CAPICOM.EncryptedData.  Note that the line above this is merely Dim Message As CAPICOM.EncryptedData. The function that makes that call does not crash when called earlier in the program's execution.  Binary search for error does not work to find the problem, since calling the function in some places mysteriously, unreliably prevents the bug from happening.  Sometimes rebuilding the program seems to impact if the bug shows up.  Yes, it is a heisenbug.  The same issues apply with temporal binary search for error.  Spending 5 hours comparing two versions of the program only to discover that both versions have the bug even though only one of them is currently showing the symptoms is not very productive. The crash is due to an access violation 0xC00000005 Running WinDbg (the windows debugger) shows that there is only one line of code which reads this memory location, LoadPicture(szTmpBMP).  It is called at the end of a scary function which grabs the picture out of a resource and sticks it in a temp file.  I was scared enough of this function that, for the sake of testing, I replaced it with a call to LoadPicture("testcra.bmp"), then didn't call the scary resource function for that bitmap.  This did not help.  Removing this call to loadpicture entirely also did not help, though the debugger could no longer find any points where the affected memory was being read, and the affected memory was no longer at the same location.  This testing was done on a VM, so some memory reads are not necessarily going to be visible to the debugger. Everything works perfectly on Vista (both my local machine and a Vista VM).  The access violation only occurs on XP. I'm using VB6 Version 8176, 6.0.8169


I understand the basic principles of bivariate distributions and their marginal counterparts. I am stuck on a slightly more sophisticated question however.  Given the following bivariate distribution:  $$ f(x,y) =       \begin{cases}        q &\quad 0 \leq x \leq 1, \ 0 \leq y \leq x\\        0 &\quad\text{otherwise} \\      \end{cases} $$  determine the parameter $q$ and the marginal distributions $f_X(x), f_Y(y)$.  I am aware that the marginal distributions in this case would be: \begin{align} f_Y(y) &= \int^{1}_{y} f(x,y)dx  \\[8pt] f_X(x) &= \int^{x}_{0} f(x,y)dy \end{align} But I am not sure how I can go about calculating $q$ to get to that point.

Suppose $X_1$ and $X_2$ have the joint pdf  $$f_{X_1,X_2}\left(x_1,x_2 \right)=4x_1 x_2,\quad\text{for}\quad 0<x_1<1, 0<x_2<1$$  From that I found the joint pdf of $Y_1=\frac{X_1}{X_2}$ and $Y_2=X_1 X_2$ to be  $$f_{Y_1,Y_2} \left(y_1,y_2 \right)=2 \frac{y_2}{y_1}\quad \text{for}\quad \left(y_1,y_2 \right) \in \mathcal{T}$$  where $\mathcal{T}=\{ \left(y_1,y_2 \right): y_1,y_2>0,y_2<\frac{1}{y_1},y_2<y_1 \}$  That is, in the $ \left(y_1, y_2 \right)$ plane, the area of the pdf is bounded by the 45 degree line and the hyperbola $\frac{1}{y_1}$. Based on that I can easily derive the marginal of $Y_1$ for the two cases   $0<y_1<1$ $1<y_1<\infty$   But what about the marginal of $Y_2$? $Y_1$ is not bounded above and is bounded below by zero, right? How can I integrate out $Y_1$ if the integral from 0 to infinity diverges? Which begs the question, have I done something wrong in the above?


Update # 2:  Is it me? (Yes, it is. I just fired up my laptop and I don't have this issue, so it's something new with my desktop!) Running Vista, IE9, no software changes since a couple of Microsoft .Net security updates three days ago - problem started TODAY -- on StackOverflow.com site. So far I have done the following - without helping:  Reset IE settings Rebooted Backed out the two Microsoft security updates to .Net (from 3/1) Cleared cookies, temp internet files, etc. Disabled all IE Add-On's Uninstalled IE9, reinstalled (errors - left me with IE7); updates; then could install IE9 Reboots; same problems exist; research switch to Chrome / Firefox  Then as magically as they appeared, with no changes by me, the gremlins moved on... Out of the clear blue, on 3/5 ~ 10:00AM the problems disappeared. A. When I click on 'Add Comment' link, it just jumps to the top of the screen and unable to enter info. See last 'Add Comment' link at the bottom of the following screen:  B. Another issue is if I click on link "Add / show 6 more comments" on the following link, it also justs jumps to the top of the page.  C. If I click on 'Recent Inbox Messages', the first time I see the list, second time I get no response. Unable to respond using desktop, but laptop works!!  Thanks!

Starting about an hour ago: on Stack Overflow I can no longer enter comments (clicking add/show 4 more comments does nothing) and I can no longer get the Help menu to display (e.g., get to Meta).   I'm using IE8 on Windows 7 (similar problems have been reported on IE9 and IE10 as well), and no, I am not using Compatibility mode.   When I click comment nothing happens, except the browser page is redisplayed to show the top of the page. When I click Help in the top bar, nothing happens in Stack Overflow: no menu -- unless I am on my user homepage. When I click StackExchange in the top bar, instead of the drop-down menu, it takes me to a generic welcome page for StackExchange, which says "expert answers to your questions". I've tried logging out and back in, and even closing the browser and reopening it. I've tried deleting my browser cache.   I've tried clearing the browser cache and cookies for the StackExchange domain.   Behavior appears to be intermittent. If I go here:  and I reload the page, then the site switcher works momentarily. But if I then go here: , even if I reload the page, the site switcher no longer works (likewise comment).  Here is an image showing an error with IE10 on SU. The site kicks the browser into compatibility view (mode). I turn off compatibility view. It comes back on again... Then this. (I'm using Chrome to be able to post this now etc.)


I'm trying to make a render for a YouTube banner-thingy. I tried to change the camera resolution to 2048x1152, for some reason during the render process it minimizes to 1024x577, Any idea for the fix?

I have a problem. I'm trying to render an image and the resolution is 500x280. After I render the image and save it, for some reason the image gets resized to 250x140. I'm unsure why it happends.


I'm looking to buy a prime lens, and not sure which to get, for the price range I'm looking at (about £75) I can find these two:   Canon EF 40mm f/2.8 STM Lens Canon EF 50mm f/1.8 II Lens   Ikinda want to try my hand a little at street photography, but most pictures I take at the moment are architecture, with some nature and pictures of my friends. I understand the 50mm might be a little too tele for street photography, but I'm not sure..  Any advice that would help me make a better decision?  P.S.: I thought about a 30mm or 35mm but the prices are a little too steep for me.

I have a Canon EOS 600D, and I already have 18-55mm,55-250mm.  I plan to buy a new lens for street photography.  I already have picked out one of the following lenses:   40mm STM(pan cake).  EF 50mm f/1.8.   Which is best one to buy for street photography use?


What is a fast way to subtract two lists. The lists may be small, maybe a direct way in shell works. Or the lists may be long, maybe external tools are the faster way.  Assume you have two lists:  list1=( 1 2 3 4 5 6 7 8 9 10 11 12 ) list2=( 1 2 3   5   7 8 9    11 12 )   How to remove all elements of list2 from list1 to obtain a resulting list (listr) equivalent to:  listr=( 4 6 10 )   The lists could be inside files also, as the should if the list is big (it may use too much memory).  To make this question brief, I am placing all algoritms in a community answer.    Please read the multiple tests done in there.  Multisets  The original question was meant to find the missing elements of a complete list (list1) in list2, without repetitions.  However, if the lists are:  list1=( a a b b b c     d d   ) list2=(     b b   c c c d d e )   And the definition of  subtraction is as , the expected result is:  listr= ( a a b )   Only algorithms 1 and 3 work correctly. Neither algorithms 2 or 4 can do this. Algorithm 5 (comm) could match this definition by doing comm -23. Algorithm 6 (zsh) fails. I do not know how to make it work. Algorithm 7 (comm). As said above, using -23 works.  I have not analyzed all the algorithms for the  definition which should yield:  listr=( a a b c c e )   But comm -3 list1.txt list2.txt | tr -d ' \t' works.     Yes, I know that it is a bad idea to process a text file (list of lines) in a shell, it is slow by design. But there are . I (we) am (are) open to suggestions.

Does anyone know of any linux tool specifically designed to treat files as sets and perform set operations on them? Like difference, intersection, etc?


my Java (libgdx) application/game throws me java.util.ConcurrentModificationException.  My code:  for (Lod lod : lode) {     if (!pause){         lod.move();     }     if (lod.isDestroyed()){         lode.remove(lod);     } else {         lod.draw(game.batch);     }        }

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


I'm new to java and trying to make a simple Banking class. My do while loop has a switch statement that checks the user input. Everything works fine, but the loop never ends. The loop should terminate once 6 is entered, but it doesnt.         String answer = "";         do{             System.out.println("Would you like to do?");             answer = scan.nextLine();             switch (answer){                 //get balance                 case "1":                     System.out.println("Your balance is: $" + getBalance());                     break;                 //make a transaction                 case "2":                     System.out.println("Enter deposit amount: ");                     double depositAmount = scan.nextDouble();                     makeDeposit(depositAmount);                     break;                 //make a withdrawal                 case "3":                     System.out.println("Enter withdrawal amount: ");                     double withdrawalAmount = scan.nextDouble();                     makeWithdrawal(withdrawalAmount);                     scan.nextLine();                     break;                 //show previous transaction                 case "4":                     System.out.println("Your previous transaction was: $" + getPreviousTransaction());                     break;                 //return to menu                 case "5":                     showMenu();                     break;                 //exit application                 case "6":                     break;                 //for invalid input                 default:                     System.out.println("Invalid option.");                     break;             }         }         while(answer != "6");             System.out.println("Goodbye.");     }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Is the cofinite topology on a countable set first countable? I know it is not first countable on R but I don't know how to prove that it is first countable on a countable set.

Is the cofinite topology on a countable set first countable? I know it is not first countable on R but I don't know the case of a countable set.


After the new update for Windows 10, my Media Feature Pack is missing.  I can't connect mobile devices to the PC, and I can't use Groove and other applications from the store.  I've installed the Windows Media Feature pack for Windows 10 Pro N (KB3010081), and it does not work.  My PC is a HP 4530s.  How can i choose the correct version of Windows Media Feature pack?

I'm running Windows 10 Pro N on my desktop PC and I've installed the media feature pack (  ) because it is apparently needed to connect to android devices via usb.  But when I open the Control Panel and browse to Programs->Enable/Disable Windows Features, media player features are missing entirely from the list.  Furthermore, when I open  (the new) Settings->Updates and browse to see the installed updates the Feature Pack for Windows (KB3010081) is shown. However, when I click on deinstall updates I see a new update list (in the old Control Panel) und the Feature Pack is again missing...    Do you know any way to install the Media Feature Pack properly?  Edit: To make it a little easier I've added an image related that shows the discrepancy between Settings and the Control Panel. Keep in mind that it is german though (I've installed the german version of the feature pack, but in order to make it simpler for english speaking users I've postet the link to the english version above)


Given a: $a_0>0$, and $a_{n+1}=\sin(a_n)$.  I need to prove that the sequence $a_{n=0}^\infty$ converges, then calculate the limit. I have proved that is crescent, then I got stuck.

I need your help with evaluating this limit:  $$ \lim_{n \to \infty }\underbrace{\sin \sin \dots\sin}_{\text{$n$ compositions}}\,n,$$  i.e. we apply the $\sin$ function $n$ times.  Thank you.


I've been reading some guides and results that google throws at me but I am still not sure how to go about to reduce the following changes to one single reflow.  var el1 = document.getElementById("one"); var el2 = document.getElementById("two"); var el3 = document.getElementById("three"); var variable1 = getSomeDynamicValue();  function doChanges() {   el1.style.cssText = "width: " + variable1 + "px;";   el2.style.cssText = "top:50px; left: 50px; position: fixed;";   el3.style.cssText = ""; }  doChanges();   As I understand, cssText causes a reflow, so with this code there will be three reflows? Or does it depend on other circumstances?  Edit: The articles and similar post's don't really give a definitive answer to  my question. Is it possible? Which is the method?

What kinds of activities will trigger reflow of web page with DOM?  It seems there are different points of view. According to ,  it happens   When you add or remove a DOM node. When you apply a style dynamically (such as element.style.width="10px"). When you retrieve a measurement that must be calculated, such as accessing offsetWidth, clientHeight, or any computed CSS value (via getComputedStyle() in DOM-compliant browsers or currentStyle in IE).   However, according to , taking measurement triggers reflow only when there is already reflow action queued.  Does anybody have any more ideas?


While recently reading the 1976 novelization of Star Wars penned by none other than George Lucas himself, I have found that there are several inconsistences between the novel and the 1977 version of Star Wars and some additions that were included in the 1997 version of Star Wars: A New Hope. While I know that the movies basically trump anything written in a book, I was wondering about this certain occasion. The novel is written by George Lucas, and the screen play is by him also; if (and there are) parts which are different from each other, which one is actually considered canon?

For all types of derivative works, namely:   Movies Novels Comic books Other written works (including RPG materials) Cartoons Video games Derivative movies (such as the infamous Ewok movies and even more infamous )   According to what rules does something become "canon" and who is responsible for the evaluation of a published work?


I'd like to access a static map that is stored in a seperate class and iterate through and print the contents.    So I have three files:  HasGlobals.cpp which has the global map.  /* HasGlobals.cpp */  #include <string> #include <map> #include <iostream>  class HasGlobals{     public:         static std::map<int, std::string> globalData;          HasGlobals(){             globalData.insert(std::pair<int, std::string>(0, "data"));         };          ~HasGlobals(){         }; };   WantsGlobals.cpp which has a method that needs to use the map from HasGlobals.cpp for one of its methods.  /* WantsGlobals.cpp */  #include "HasGlobals.cpp" #include <string>  class WantsGlobals{     public:         WantsGlobals(){         };          ~WantsGlobals(){         };          //THIS IS THE METHOD THAT I CAN'T GET TO WORK         void printContentsOfGlobal(){             HasGlobals * globalRetriever = new HasGlobals();             for(std::map<int, std::string>::iterator it = globalRetriever->globalData.begin(); it != globalRetriever->globalData.end(); ++it){                 std::cout << it->first << " " << it->second << std::endl;             }         };     };   Main.cpp which simply tries to call the printContentsOfGlobal() method in WantsGlobals.cpp.  /* Main.cpp */  #include <iostream> #include "WantsGlobals.cpp"  int main(){     WantsGlobals * globalRetriever = new WantsGlobals();     globalRetriever->printContentsOfGlobal(); }   Right now this code doesn't compile and gives me     undefined reference to 'HasGlobals::globalData'   How would I implement printContentsOfGlobal() so that I can retrieve the data in the map[globalData] in the seperate HasGlobals.cpp file?  EDIT: Thanks for the help everyone.  Below is the code I created with everyone's help.  Yes it's still not perfect but it compiles and performs the desired behavior:  HasGlobals.hpp  #include <string> #include <map> #include <iostream>  class HasGlobals{     public:         static std::map<int, std::string> globalData;          HasGlobals(){};          ~HasGlobals(){};          static std::map<int, std::string> createDummyData(){             std::map<int, std::string> m;             m[0] = "Help";             m[1] = "Me";             m[2] = "Stackoverflow";             m[3] = "You're my only hope.";             return m;          } };  std::map<int, std::string> HasGlobals::globalData = HasGlobals::createDummyData();   WantsGlobals.hpp  #include "HasGlobals.hpp" #include <string> #include <map>  class WantsGlobals{     public:         WantsGlobals(){};          ~WantsGlobals(){};          void printContentsOfGlobal(){             for(std::map<int, std::string>::iterator it = HasGlobals::globalData.begin(); it != HasGlobals::globalData.end(); ++it){                  std::cout << it->first << " " << it->second << std::endl;              }          }; };   Main.cpp  #include <iostream> #include <"WantsGlobals.hpp">  int main(){     WantsGlobals * globalRetriever = new WantsGlobals();     globalRetriever->printContentsOfGlobal(); }

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


I'm in the process of writing a piece of code that connects to a server spawns a bunch of threads using that connection and does a bunch of "stuff".  There are certain instances where the connection fails and I need to stop everything and start from scratch with a new object.  I wanted to clean up after the object but calling thread.stop on the threads, but this method is seemingly deprecated.  What is the recommended alternative to doing this? Should I write my own cleanup and exit method for each of the threads? Set the thread to null? or something else?

Here is my problem: I've got a dialog with some parameters that the user can change (via a spinner for example). Each time one of these parameters is changed, I launch a thread to update a 3D view according to the new parameter value.  If the user changes another value (or the same value again by clicking many times on the spinner arrow) while the first thread is working, I would like to abort the first thread (and the update of the 3D view) and launch a new one with the latest parameter value.  How can I do something like that?  PS: There is no loop in the run() method of my thread, so checking for a flag is not an option: the thread updating the 3D view basically only calls a single method that is very long to execute. I can't add any flag in this method asking to abort either as I do not have access to its code.


I made a huge mistake. My application is submitted and biometrics are done. Application is on it's way to UKVI. I answered "No" when I should have answered "Yes". In 2015, I was refused a residence permit to study in Denmark because the school I applied to wasn't approved by a government authority. I didn't know that it wasn't a government affiliated or approved school, and applied anyway. There was nothing wrong with my application though. While filling out my UK Tier 4 application, I completely forgot about this. It was an honest mistake. What should I do? Should I contact UKVI? I have already got admission in a HEI in London and attached my CAS and everything with the documents. P.S - I'm from India.

I'm from Lebanon and I've been working in Saudi Arabia for nine years. In 2012, I put the money that I collected from my job as a teacher in my father's Lebanese account since I didn't have one in Lebanon. During the interview, my interviewer told me that my application will be rejected because I don't have proof that this money is mine and clearance officer will think someone else gave me the money. I didn't know that I had to bring with me from Saudi Arabia an employment letter and bank statements to prove that this money is mine and I earned it by working in Saudi Arabia. Anyways, my visa did get refused as my interviewer had told me it would be.    Last May, I was granted a US visitor visa Multi Entry for 5 years. I wanted to visit the US in August for 10 days but my mom entered the hospital so I had to postpone it. Now I'm applying for a teacher training program in the UK. I received an invitation letter from Brighton University and so I applied for a UK Standard Visitor visa. After I paid and printed the application, I realized that I answered the question Any previous visa rejections ... with "NO" and I don't know how should I fix this.  Please note that I still didn't give my biometrics, I still didn't use my US visa which I received on May 2016, I paid for my application so I can't amend it online. I'm supposed to give my biometrics and submit my documents this Monday.  If I don't say anything will they check it and refuse me?    Will my US visa be an advantage and they will disregard the previous rejection or should I correct it when I submit my documents this Monday?


e.g. 3rd degree nesting:  $$\sum_{a=1}^{10}\sum_{b=1}^a\sum_{c=1}^bc$$  I may need to nest up to degree 10.  Answer at  seems sub-optimal.

As the festive seasons is coming to a close and we've seen out all twelve days of Christmas I found myself thinking about the famous carroll of the same name. Namely, how many presents  in total did my true love give to me? This is can be given by the nested summation $\sum \limits_{i=1}^{12} (\sum \limits_{j=1}^i j)$ , where the inside sum is the number of presents received each day (i.e a partridge in a pear tree on the first day, two turtle doves and a partridge in a pear tree on the second day, etc.) and the outside summation sums over the days. This can be found to be 364, but what about in general for $n$ days of Christmas?  Well we can generalise the summation by just inserting $n$ into the summation and solving it. $\sum \limits_{i=1}^{n} (\sum \limits_{j=1}^i j)$ Using the well known solution of the sum $~ \sum \limits_{i=1}^{n}i = \frac{n(n+1)}{2}  ~$ we can obtain a non-nested sum, $ = \sum \limits_{i=1}^{n} \frac{i(i+1)}{2} = \sum \limits_{i=1}^{n} (\frac{1}{2}i^2 + \frac{1}{2}i )$ , which we can split into separate summations $ = \frac{1}{2} \sum \limits_{i=1}^{n} i^2 + \frac{1}{2}\sum \limits_{i=1}^{n}i = \frac{n(n+1)(2n+1)}{12}+ \frac{n(n+1)}{4} = \frac{n(n+1)(2n+1) + 3n(n+1)}{12} = \frac{2n^3 + 6n^2 + 4n}{12} = \frac{n(n+1)(n+2)}{6}$ which we notice can be written as the binomial coefficient, $ = {n+2\choose3}$. This doesn't really come as any surprise since this kind of problem seems like the prime candidate for one which could be solved using some fancy combinatorics to yield a binomial coefficient. But if we notice now that we can write the standard arithmetic series sum as a binomial coefficient, eg., $~ \sum \limits_{i=1}^{n}i = \frac{n(n+1)}{2} = {n+1\choose2} ~$ we might notice a similarity between them.   Similarly it can be shown that for a twice nested sum we have, $\sum \limits_{i=1}^{n} (\sum \limits_{j=1}^i (\sum \limits_{k=1}^j k)) = {n+3\choose4} $.  In general it seems for an $(m-1)$-th nested sum (i.e, one which has $m$ summation symbols) we have, $\sum \limits_{i_1=1}^{n} \sum \limits_{i_2=1}^{i_1} \sum \limits_{i_3=1}^{i_2} \dots \sum \limits_{i_m=1}^{i_{m-1}}i_m = {n+m\choose1+m} $ and this is likely provable with induction.    My question is to you is, how can this relationship between binomial coefficient and summations be thought of? That is to say, why would taking the number of possible pairs of $n+1$ elements happen to give you the sum from $1$ to $n$? And how does this somehow seem to extent with nested summations; the number of ways you can take 3 elements from $n+2$ gives you the first nested summation and so on? I'm sure some combinatorics whizz will be able to rearrange the way we count these sums somehow to yield the answer. Anyway at the very least it's interesting to think about - happy holidays!


As the title says, can support for oneboxing Vimeo links in chat be added?  Here's one to test with:

Some sites are . What additional sites should the chat support?  One suggestion per answer.


Typing a message:    Typing some more:   Browser: Firefox 23

I was attempting to create a bounty for a question over on Stack Overflow and ran into a rendering glitch on the last page. After entering a sentence that exceeds the length of a single line, the popup contents scroll slightly to the right and strange characters start showing up:    There is no '(' in my sentence so it's strange that it's showing up in the textarea. When you move the cursor it around the line edge, the textarea scrolls from right to left and back.  Here's what I've got:   Ubuntu 12.10 64-bit Firefox 18.0.2   This is also occurring on Firefox 24.0 on Windows 7 Enterprise Service Pack 1.    The data entry starts out fine:    Then it goes all wacky as I complete the second line:


The sql injection will work only when my query looks like below sample  SELECT * FROM login WHERE id = $my_id_va;   Assume if my query is  SELECT * FROM login WHERE id = $my_id_va ORDER BY id DESC   Than I will get following error     #1064 - You have an error in your SQL syntax; check the manual that   corresponds to your MySQL server version for the right syntax to use   near 'order by id desc' at line 1   So, this 1 or 1=1; SHOW TABLES will not work, correct?  My site was hacked successively many times.  I want one quick answer: When my query looks like the following one, what ways or which types of query can they use to hack my site?  SELECT * FROM login WHERE id = $my_id_va ORDER BY id DESC   What are the ways to  execute the show table in the following query  SELECT * FROM login WHERE id = $my_id_va ORDER BY id DESC   I am  also using escaping function to handle the query string values, like mysql_real_escape_string($my_id_va). Yes, obviously this for single related hack, but not sure.  Added some more  SELECT EventActuallyCharged, EventDate FROM tblevent WHERE EventDate between '2011-07-21 or 1=1; SHOW TABLES --' and '2011-07-31' ORDER BY EventDate DESC   but show table not worked

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


Let $X$ be a metric space and $f\colon X \rightarrow \mathbb R$ be a continuous function. Let $G = \{ (x , f(x) ) : x \in X \}$ be the  graph of $f$. Then which one is true?       $G$ is homeomorphic to $X$   $G$ is homeomorphic to $\mathbb R$ $G$ is homeomorphic to $X \times \mathbb R$   $G$  is homeomorphic to $\mathbb R \times X$    Please help me how to solve this problem.  Thank you

Let $f: X \to Y$ be a function. The graph of $f$ is defined to be the set $G = \{(x, f(x)) : x \in X\}$. Prove that if $f$ is continuous then $G$ is homeomorphic to $X$.     an anyone suggest  me the process of solving this problem, thanks.


I want to use the mod I've installed. I have Forge installed and I have ended the task "Java", but everytime I delete META-INF it keeps coming back everytime I open the Minecraft Launcher 1.2.1. But I know YouTubers have their mods working fine on 1.6! Someone please tell me the answer to this, it's very annoying. Just to confirm, it regenerates when I try to play Minecraft. I already deleted the entire file, so why does it keep coming back!?

I've recently changed to the new Minecraft launcher, and I have noticed a change in the .minecraft folder layout. I can no longer install mods just by copying it over into the versions/1.6.1 jar file, as this file refreshes every time it is launched.  For those who don't know what I am talking about, here is the new layout:    I am specifically trying to install Optifine, which does work with 1.6.1. Where do I drag in the mod files now? I can't seem to find a jar file that is suited to it, except in the version folder, but as I stated above, this refreshes every time.  After copying a recent version and renaming it in the version folder, I get this error in the development console:   Unexpected exception refreshing version list java.lang.IllegalArgumentException: Version '1.6.1' is already tracked     at net.minecraft.launcher.updater.VersionList.addVersion(VersionList.java:91)     at net.minecraft.launcher.updater.LocalVersionList.refreshVersions(LocalVersionList.java:44)     at net.minecraft.launcher.updater.VersionManager.refreshVersions(VersionManager.java:47)     at net.minecraft.launcher.Launcher$2.run(Launcher.java:164)     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)     at java.util.concurrent.FutureTask.run(Unknown Source)     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)     at java.lang.Thread.run(Unknown Source)


I am having trouble with the question above.  Since $[G:H]=2$, I know there are 2 cosets of $H$ in $G$, which partition $H$.  I know I'm supposed to use the index of $H$ and potentially Lagrange's Theorem, but I am not seeing how I can get $g^2\in H$ for any $g\in G$.   Thanks for your help

I'm having some trouble understanding cosets.  If I understand it correctly, cosets form a partition. So, if I have $|G:H| = 2$, then $G = H \cup xH$. Right?  In an exercise, I'm asked the following:  "For $G$ group and $H \le G$ such that $|G:H| = 2$, prove that $x^2 \in H$ for any $x \in G$"  If $x \in H$, then $x^2 \in H$ because $H$ is a group. But, if $x \notin H$, then $x \in gH$ for any $g \in G$, right? Then $x^2$ = $(gh)^2$ but I can't see why this is in $H$.  Can you give me some hint? Thanks for stopping by.


I wish to write a formal proof of the following statement: For any infinite set $X$, there exists an injection $f:\mathbb{N}\to X$.  I'd like the proof to explicitly use the full axiom of choice (for every family of sets $\{S_\alpha\}$ there exists a family of elements $\{x_\alpha\}$ such that each $x_\alpha\in S_\alpha$). When this was asked , none of the answers were explicit about where choice is invoked.  Motivation: I'm TAing a course in discrete math and was embarrassed to find that I can't prove this homework question.

I'd like to show that if a set $X$ is Dedekind finite then is is finite if we assume $(AC)_{\aleph_0}$. As set $X$ is called Dedekind finite if the following equivalent conditions are satisfied: (a) there is no injection $\omega \hookrightarrow X$ (b) every injection $X \to X$ is also a surjection.  Countable choice $(AC)_{\aleph_0}$ says that every contable family of non-empty, pairwise disjoint sets has a choice function.   There is the following theorem:     from which I can prove what I want as follows: Pick an $x_0 \in X$. Define $G(F(0), \dots, F(n-1)) = \{x_0\}$ if $x_0 \notin \bigcup F(k)$ and $G(F(0), \dots , F(n-1)) = X \setminus \bigcup F(k)$ otherwise. Also, $G(\varnothing) = \{x_0\}$. Let $F: \omega \to X$ be as in the theorem. Then $F$ is injective by construction.   The problem with that is that I suspect that the proof of theorem 24 needs countable choice. So what I am after is the following: consider the generalisation of theorem 24:     (note the typo in $(R^\ast)$, it should be $F(z) \in G^\ast (F \mid I(z), z)$), and its proof (assuming AC):     I want to modify this proof to prove the countable version of the theorem. But I can't seem to manage. I need a countable set $\{G^\ast \mid \{\langle f,z \rangle \} : \langle f,z \rangle \in dom(G^\ast) \}$. Ideas I had were along the lines of picking $f_0(x) = x_0$ the constant function and then to consider $\{G^\ast \mid \{\langle f_0,n \rangle \} : \langle f_0,n \rangle \in dom(G^\ast) \}$ but what then?  Thanks for your help.


I have tried the following code with various alterations to the positioning index: \begin{figure}[!ht] \includegraphics[width=5cm,trim={0 0cm 0 0cm},clip]{Img/CustomerDevelopment.pdf} \centering \caption{The figure shows an example of how a customer changes the policies affiliated with the company and how that changes his segment over his first 3 years.} \label{fig:CustomerDevelopment} \end{figure}  However, whatever I do my figure will always go to the end of the chapter and I would like them to stay near the text. If I open the PDF-document in Adobe Reader and save it as a .png that I then import in LaTeX it works perfectly. I would like the PDF-format though seeing as I want to be able to zoom in on the figures. Does anyone know how to solve this so I can use .pdf? I've included an image below using the \fbox{ command to illustrate the issue.

How to influence the position of float environments like figure and table in LaTeX?   This is a general question and should collect useful answers for all users. I hope we can use this as a reference


I am new to DSLR camera and just purchased a Nikon D3400.  Is autofocus determined by the lens or the camera? I'm using the 18-55 kit lens and the 70-300 ASP Lens.

How does auto focus work on modern cameras? How accurate is it?


What is a word for a person who reiterates without adding any new content? (This person is not necessarily talkative per se.) Example of a conversation by such a person would be:     "You know if we do this xyz, it will be good. No one has done xyz so it is going to be great if we finish xyz, I don't think anyone has done this.  By summer if this is done then we can send xyz, of course we have to do it before and it's gonna be great and we have to keep doing xyz unless someone will do it, but no one has done it yet, it is going to be great if we do xyz."   It is not overzeal; it is just my example which came out to be like this.

What is the opposite for the straight talk idiom? How do I best call the activity when someone makes a very long preamble before he says what he wants?


I'm very inexperienced with computers and new to Linux. I'm trying to load Steam but this message keeps popping up:  Running Steam on ubuntu 16.04 64-bit STEAM_RUNTIME is enabled automatically Installing breakpad exception handler for appid(steam)/version(0) libGL error: unable to load driver: r600_dri.so libGL error: driver pointer missing libGL error: failed to load driver: r600 libGL error: unable to load driver: swrast_dri.so libGL error: failed to load driver: swrast   I don't know what to do, need someone to describe it to me in layman's terms.

When I start steam in a terminal, I get the following error messages   charlie@SteamMPL:~$ steam rm: no se puede borrar «/home/charlie/.steam/steam»: Es un directorio rm: no se puede borrar «/home/charlie/.steam/bin»: Es un directorio Running Steam on ubuntu 14.04 64-bit STEAM_RUNTIME is enabled automatically [2014-08-03 11:50:13] Startup - updater built Jul 15 2014 18:14:26 Installing breakpad exception handler for appid(steam)/version(1405474565_client) libGL error: failed to load driver: swrast Looks like steam didn't shutdown cleanly, scheduling immediate update check Installing breakpad exception handler for appid(steam)/version(1405474565_client) [2014-08-03 11:50:14] Checking for update on startup [2014-08-03 11:50:14] Buscando actualizaciones disponibles... Installing breakpad exception handler for appid(steam)/version(1405474565_client) [2014-08-03 11:50:14] Download skipped: /client/steam_client_ubuntu12 version 1405474565, installed version 1405474565 [2014-08-03 11:50:14] Nothing to do [2014-08-03 11:50:14] Verificando instalación... [2014-08-03 11:50:14] Performing checksum verification of executable files [2014-08-03 11:50:15] Verification complete Gtk-Message: Failed to load module "overlay-scrollbar" Gtk-Message: Failed to load module "unity-gtk-module" Installing breakpad exception handler for appid(steam)/version(1405474565_client) Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 70: non-double matrix element Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 78: saw unknown, expected number [0803/115015:WARNING:proxy_service.cc(958)] PAC support disabled because there is no system implementation libGL error: failed to load driver: swrast Error: OpenGL GLX context is not using direct rendering, which may cause performance problems.   Hardware information:   CPU: AMD Athlon x4 760k  GPU: AMD Radeon R7 250 1 GB GDDR5 (Driver: Catalyst 14.4) RAM: 8 GB DDR3 1600   What can I do to circumvent this issue?


I'm curious to find out what the best practice is for caught exceptions that aren't used. The irony is that this is going against best practice in the first place. I've found myself in a position to be doing this, perhaps it's just my inexperience, but I'm wondering what is commonly done.  I've written a small console application that grabs list information from one Sharepoint site to share it on another farm. The function in question queries the list into an XElement and I am catching any errors along the way. Here is the snippet.  ...     try     {        return lists.GetListItems("Global Announcement", null, null, viewFields.GetXmlNode(), null, null, null)                  .GetXElement().Elements().First().Elements().First();     }     catch (Exception ex)     {         throw;     } } catch (Exception ex) {     ErrorLogging.SaveErrorToEventLog("Encountered an error when attempting to connect: ", ex); }   I was advised by a senior to use just the throw for the inner exception to keep the stack information in proper order. In cases like this I'm curious to find out what the best practice is for the Exception ex or if breaking the best practice of try catch in the first place should just never happen?

What are the best practices to consider when catching exceptions and re-throwing them? I want to make sure that the Exception object's InnerException and stack trace are preserved. Is there a difference between the following code blocks in the way they handle this?  try {     //some code } catch (Exception ex) {     throw ex; }   Vs:  try {     //some code } catch {     throw; }


I'm trying to answer this question from my calculus 1 exam I did last December. The question asks us to compute a definite integral by using the following change of variables $$ x=R \sin(w)$$ in the following equation: $$\int_{-R}^R \sqrt{R^2-x^2} \  dx $$ The thing that's confusing me is how to do this change of variable if the equation is already expressed in terms of $x$?

I'm learning Trigonometric Substitutions, they gave us the following example in the book:    I'm confused about how exactly we make the substitution $x= a\sin(\theta)$  In regular substitution we have to take something from the integrand and substitute it for u. Why is it in this case we can use $a\sin(\theta)$ when I do not see it in the integrand?


Consider a deck of $52$ cards. Let $X$ be the number of cards that are drawn until the first ace is chosen (e.g., if the first two cards are not an ace and the third card is an ace then $X=2$). Find $E(X)$.  Hint: Let $I_j$ denote be the indicator variable that is $1$ if the $j$th non-ace is chosen before the first ace and $0$ otherwise for $j=1,…,48$.  I don't really know how to approach this problem, the hint makes it sound more confusing to me.

Suppose we draw cards out of a deck without replacement. How many cards do we expect to draw out before we get an ace?


I've been having issues finding a real answer to this question as the response is always "Don't do this, it's a bad idea, that space was obviously needed and it will just get used up again in quick order." But that response doesn't apply to me - I have a copy of the production database that I am using solely for developmental purposes - my read/write activites to be limited to a small amount of the database, but I will need to constantly restore the database to overwrite my changes, so I want to reduce the size of the database - I can achieve this by deleting the data in a handful of tables. Here is what I have done so far:  Made sure database was in simple recovery mode Ran DELETE FROM TABLE_NAME queries Tasks > Shrink > Files > File Type: Log, Release Unused Space - this step was successful and reduced the .ldf to its initial minimum size. Tasks > Shrink > Files > File Type: Data, Release Unused Space - this step did not do anything. It "executed" in half a millisecond and the .mdf is just as big as it was before running the DELETE queries...  Any input appreciated.

I am working with a 500 GB SQL Server database. I need to reduce the size of the database data file after removing a large amount (50%) of the data.  I tried re indexing, it's good the database has de-fragmented. But the DB size is not reduced.  I am not prepared to use shrink database. I have already tried compression and DBCC UpdateUsage but no space gain. Please advise me any other ways to reduce the database size.  Our client will not allow us to take the DB Offline. It might take 5 hr to shrink the database and then re indexing will take 3 hrs, so in total we would need 8 hr down time. I am looking for a solution without downtime.


If we left Schroedinger's cat in a superposition for a week would it begin to start smelling 50% like a dead cat and 50% like a living cat? Would the smell of death immediately disappear if we opened the box and saw that it was alive?  My hunch is that the box would need to be impermeable to smells but would like this confirmed.

So if I understood correctly, Schrödinger's Cat is a thought experiment that puts a cat inside a box, and there's a mechanism that kills the cat with 50% probability based on a quantum process. The argument is that the cat now must be in a superposition of dead and alive.  This makes sense at first, but the state of the cat inside the box will affect the outside world in an observable way, right? For example if the cat dies, it might meow loudly which would be audible. If it didn't meow, it would produce a thud on the ground when it dies. And even if the ground was very solid, the redistribution of mass inside the box will affects its gravity field which means the whole universe theoretically immediately observe's the cat's death.  So extending this argument to all superpositions, the different states would cause different effects on the rest of the universe, usually a slight change in the gravity field is the minimum. This gravity perturbation would propagate throughout the universe, and even all the experimenters go to sleep with thick, thick earplugs, somebody or something in the universe is going to inadvertently observe the event and the superposition immediately collapses. Thus superpositions cannot exist beyond an extremely short amount of time.  What's wrong with my reasoning?


I'm currently creating a database and I'm facing a little issue. I want to add a column containing the date. So I create it like this :   create table comments (     id serial not null,     id_user integer not null,     content text not null,     id_thread integer not null,     date date default now() );   The problem is that the date is just like this : 14-06-2017 and I want to have the hour of the creation.  How I can do that ?  Thanks in advance

Would you recommend using a  or a  field, and why (using MySQL)?   I'm working with PHP on the server side.


Windows can run Connectify Dispatch (no longer available to download BTW), and both MacOS and Windows can run Speedify which proves that Link Aggregate with Ethernet and Wi-Fi is possible on macOS...too bad Speedify doesn't connect to the Internet directly...instead it connects to a VPN server. In theory we can create a virtual Ethernet port that is actually a Wi-Fi port and then use macOS' native Link Aggregation to combine bandwidth...Is there a software that does this?

Is there a way on OSX or with a 3rd party software to use both a Wi-fi and an ethernet connection, thus having the sum of the connection speeds?  Or maybe making some applications connect to one connection and other apps connect to the other?    P.S. I don't want to bridge one connection over the other. P.P.S. Both are different connections with two different ISPs and both are paid for, there's no wifi stealing if you might ask.


In The Avengers, Loki says to Thor, “The humans think us immortal; let’s put that to the test”, and drops the glass chamber.  Loki clearly knows that Thor is an immortal and he is doing this to scatter the Avengers, so what would have happened if the glass chamber reached the ground before Thor could break it??   Would Thor have been killed or injured?

in the , Loki manages to trap Thor in a huge glass capsule and jettisons him out of a moving cargo ship.   Why is that supposed to "test" Thor's immortality?   How is this act different from throwing Thor (if one can) out of a moving plane?   - from avengers movie


I'm watching this video from the Judge's Corner on YouTube: . One example shows these cards being played:    Middle first, left second, right third. The video says that once they resolve the left card wont have a valid target so it can't even be played. Does this mean that the card just stays in the persons hand as if it didn't happen?

When you have a card like  which reads "Exile Target Creature with power 3 or less", as I understand it, it becomes untargetable if the opponent's creature power increases thanks to a pump spell like .  But what if the Disregard is already on the stack and targeting; and they respond with Brute Strength? I'm pretty sure (and my opponent with Brute Strength was certain) that it won't exile the creature, but I don't know which rule states this, and there's no gatherer ruling on the spell.


How can I add multiple virtual network interface cards on Windows 10 and connect them to local network using one physical network interface card?  In my use case I need to concurrently use multiple public ip addresses on one computer. My ISP's DHCP server assigns one public ip to each mac address connected to their network. One solution is to get switch, NIC with multiple ports and physically connect multiple network cables to the computer. Such approach would however be messy and unnecessary because only one device would be actually connected to switch. Hence I would prefer using virtual NICs each with different MAC.  I tried Microsoft KM-TEST loopback adapter and openvpn's TAP-Windows adapter but I never got it actually connected to local network. It only shows "unidentified network"

How can I create a virtual interface, that connects to the same network as the physical interface? I tried searching around but all I found is loopback. I need the other end of the wire recognizes this as two interface, so loopback won't do it. Hypervisors like VMWare have an option to do exactly this (VM and host are recognized as two devices on router's arp table), but in my situation using a VM is pretty much overkill. I just want another connection, or maybe some apps that can behave as a "virtual switch".  I'm on Windows, and it should be like this.     Seems like I'm not the only one having this problem. Someone  and  have also asked but there's no acceptable answer. My apologize, but it is extremely hard to search for this problem.


I would like to know how I find what app an icon relates to on top left of android phone please. Thanks :)   Looking for the second icon

I'm concerned about an app on my child's phone. I saw an app icon in the notification area that looked strange (Andy Android head, slightly tilted as its icon).  How can I find out what app it is from just having seen that icon in the notification bar?


I'm working through an Abstract Algebra book to teach myself, and came across the problem:  Prove: If $G$ is a finite group of even order, then there exists a $g\in G$ such that $g^2 = e$ and $g \ne e$.  (In this book, $e$ is used as the identity element.  I don't know if that's standard or not...) I have a proof outline, but don't really know how to write it in a formal way.  My idea is as follows:  First, note that this problem is equivalent to saying that "there exists a $g\in G$ such that $g = g^{-1}$.  Also note that the identity element is its own inverse. Since the identity element is its own inverse, we have an odd number of elements remaining in the group that need their inverse "assigned."  Assign all but one of the remaining elements an inverse so that none satisfy $g = g^{-1}$. You have one remaining element left; the rest of the elements already have inverses.  As inverses are unique, this element must be its own inverse.  My question is twofold:  Am I even close to being on the right track as far as a proof outline goes? If so, what can I do to make this proof rigorous, and not just an outline?

Prove that any finite group $G$ of even order contains an element of order $2.$[ Let $t(G)$ be the set $\{g\in G|g\neq g^{-1}\}$. Show that $t(G)$ has an even number of elements and every nonidentity element of $G-t(G)$ has order $2$.]   My proof:  Observe that for any $g\in t(G)$ there exists $g^{-1}(\neq g)\in t(G)$ since every element in a group has an inverse. Thus if there are $n$ elements that belong to $t(G)$ we must have another $n$ elements that belong to $G$. Hence, $t(G)$ has an even number of elements. Now any $g\in G-t(G)$ must also have inverse $g^{-1}(=g)\in G-t(G)$ since all $g\neq g^{-1}$ belong to $t(G)$, so all the elements except the identity in $G-t(G)$ have $g=g^{-1}$ thus $g^2=id$ i.e., every element of $G-t(G)$ has order $2.$ Therefore, we can conclude that there is atleast one element of order $2.$ in $G$.     Can anyone check my proof? Thank you.


Show that, there are no integers $(m, n)$ such that, $m^2 + (m + 1)^2 = n^4 + (n + 1)^4$ . I really don't know how to approach this one i tried factorizing but it didn't seem to help , any hint would be appreciated .

$m^2+(m+1)^2=n^4+(n+1)^4$  Integral (integer) solutions needed I could find only four, are there others  -1 & 0 give both sides as 1.


I'm trying to rewrite my URL's subdomain.  http://username.domain.com will show content of username but URL stay as http://username.domain.com . (I mean url masking)  (Username's can contain a-z 0-9 and hypens) Also if subdomain is www or api, don't redirect them  I'm using this for my .htaccess  RewriteEngine on RewriteCond %{REQUEST_URI} !^/index\.php$ RewriteCond %{HTTP_HOST} !^www\.domain\.com RewriteCond %{HTTP_HOST} ^([^.]+)\.domain\.com RewriteRule .* /user.php?u=%1 [L]   (After @mfarver's advice) I'm trying this   RewriteEngine on RewriteRule .* /user.php?u=%1 [L]   but this time getting 500 Internal Server error:  [Mon May 30 20:10:44 2011] [alert] [client 81.6.xx.xxx] /home/blablabla/public_html/.htaccess: AllowOverride not allowed here   (from error log)  My server's httpd.conf file's virtualhost settings  <VirtualHost 109.73.70.169:80>     <IfModule mod_userdir.c>         UserDir disabled         UserDir enabled USERNAME     </IfModule>     <IfModule concurrent_php.c>         php4_admin_value open_basedir "/home/USERNAME/:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"         php5_admin_value open_basedir "/home/USERNAME/:/usr/lib/php:/usr/local/lib/php:/tmp"     </IfModule>     <IfModule !concurrent_php.c>         <IfModule mod_php4.c>             php_admin_value open_basedir "/home/USERNAME/:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"         </IfModule>         <IfModule mod_php5.c>             php_admin_value open_basedir "/home/USERNAME/:/usr/lib/php:/usr/local/lib/php:/tmp"         </IfModule>         <IfModule sapi_apache2.c>             php_admin_value open_basedir "/home/USERNAME/:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"         </IfModule>     </IfModule>     ServerName DOMAIN.net     ServerAlias *.DOMAIN.net <Directory "/home/USERNAME/public_html">     Options FollowSymLinks     Allow from all     AllowOverride All </Directory>     DocumentRoot /home/USERNAME/public_html     ServerAdmin webmaster@DOMAIN.net     UseCanonicalName Off     CustomLog /usr/local/apache/domlogs/DOMAIN.net combined     CustomLog /usr/local/apache/domlogs/DOMAIN.net-bytes_log "%{%s}t %I .\n%{%s}t %O ."     ## User USERNAME # Needed for Cpanel::ApacheConf     <IfModule mod_suphp.c>         suPHP_UserGroup USERNAME USERNAME     </IfModule>     <IfModule !mod_disable_suexec.c>         SuexecUserGroup USERNAME USERNAME     </IfModule>     ScriptAlias /cgi-bin/ /home/USERNAME/public_html/cgi-bin/       # To customize this VirtualHost use an include file at the following location     # Include "/usr/local/apache/conf/userdata/std/2/USERNAME/DOMAIN.net/*.conf"  </VirtualHost>   Also *.DOMAIN.net added to my DNS ZONES as A record.

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


Do the following sentences make sense in modern English if I replace the word "Television" with "Tube"?   Any ball games on the tube tonight? I was watching a horror movie on the tube.

I searched Google's "YouTube", it seems like "tube" is a nickname for "television". So, when did television get this nickname, and why?  EDIT  I have once considered tube as TV cube, does it make sense?


I am working on a C++ reference manual for myself and want good looking listing code blocks.  This stack overflow question was very helpful:   But for the life of me I can't find anywhere on the internet for information regarding how to remove the "Listing #" part of the listing captions.  Below is a screenshot of what I have:    I want to remove the front part of the listing caption but still have a caption because i want to say the filename.

I am working on a C++ reference manual for myself and I want good-looking listings.  The Stack Overflow question entitled  was very helpful but, for the life of me, I can't find anywhere on the Internet how to remove the "Listing #" part of the listing captions.  Below is a screenshot of what I have at the moment. I want to remove the front part of the listing caption; I don't want to remove the caption altogether, though, because I want to use it to show the name of the source file. Any ideas?


Function $f : \mathbb{R} \to \mathbb{R}$ defined for all $x\in\mathbb{R}$. It is also continuous and has derivative for all $x \in \mathbb{R}$. Does the condition that there are no points $x\in \mathbb{Q}$ such that $f(x) \in \mathbb{R}\setminus \mathbb{Q}$ and no points $x \in \mathbb{R}\setminus\mathbb{Q}$ such that $f(x) \in \mathbb{Q}$ imply that  $f$ is a linear function?   I tried to construct a counterexample, however I did not succeed. Are there any ideas, please?

Let $f$ be an everywhere differentiable function whose domain consists of all real numbers. Assume that $f(x)$ is rational for rational $x$ and irrational for irrational $x$. Can we conclude that $f$ is a linear function?


so im working with a MMORPG Map editor at the moment, and having trouble loading my cache, and, to be honest, trouble loading the editing software itself.  Now i believe im reasonably close, as ive been using tutorials on stackoverflow to help with the problems ive found(thank you stackoverflow) but ive come to a complete halt caused by an import error which has thrown a bigger error(this is the general error eclipse is giving me):  Badseek - pos:70502120 len:112014898 SOMESHITWRONGWITHNEXTFILEtrue true true Dec 07, 2015 7:35:34 PM com.jme3.app.Application handleError SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main] java.lang.NullPointerException at com.runescape.net.Buffer.get24BitInt(Buffer.java:152) at com.runescape.cache.Archive.<init>(Archive.java:28) at org.fabian.rsmt.RSMapTool.getArchive(RSMapTool.java:74) at org.fabian.rsmt.RSMapTool.loadCache(RSMapTool.java:296) at org.fabian.rsmt.RSMapTool.simpleInitApp(RSMapTool.java:125) at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:226) at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130) at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:209) at java.lang.Thread.run(Unknown Source)   so when i follow the links, the only thing they all have in common is the imports my source file is using (RSMapTool.java)  This element has no attached Javadoc and the Javadoc could not be found in the attached source.  Now based off that error, im not 100% if my imports are causing in, and if not, then in that case ive got an even bigger error im gonna need help with o.O, but if it is the imports, and someone can make enough sense out of my details provided to give me a run-down on how it should be, that would be great  Things i have tried:  I attached the imports to their respected sources, and figured out how to build a javadoc path(if thats correct) and validated said path, but still got both errors.

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


Using oracle 11g  How do I get 00000 when the results are empty. I have tried coalesce and nvl - not working.    select lpad(movie_id, 5, '0') as MOVIE_ID from schema_A where movieB='642354';

I need to know how to return a default row if no rows exist in a table. What would be the best way to do this? I'm only returning a single column from this particular table to get its value.   Edit: This would be SQL Server.


In many languages (C#, Javascript, CSS, and so on) I can't declare this variable:  123test   but I can declare this:  test123   What's the real cause of it?

I was working with a new C++ developer a while back when he asked the question: "Why can't variable names start with numbers?"  I couldn't come up with an answer except that some numbers can have text in them (123456L, 123456U) and that wouldn't be possible if the compilers were thinking everything with some amount of alpha characters was a variable name.  Was that the right answer?  Are there any more reasons?  string 2BeOrNot2Be = "that is the question"; // Why won't this compile?


Is the species for Rosa indica and Mangifera indica 'indica' as you can see is the same in both. What does this signify. It is obvious that it has different species as they have different genus.

In my textbook, it is written that the binomial name of mango is Mangifera indica and the binomial name of a bee is Apis indica. Now in the name the second part is the name of species. But mango and bee are not the same species. One is a tree and the o,ther is an animal. Then why is their second name the same?


How long can I keep a beer in the secondary before it won't be able to be bottle conditioned?   How can I tell if it has been too long and need to pitch fresh yeast to bottle condition?   but the answer is a general guideline.  Do I just put it in the bottle and hope?  In theory, there would be some yeast still in suspension for quite a while and I would be able to condition but it would just take longer.  I am looking for a more specific way to make the determination other than waiting and opening flat bottles of beer for a while.

How long is too long to condition a beer in secondary without having to pitch bottling yeast? What factors do I need to consider when deciding whether or not to pitch yeast at bottling?


I am attempting to install pgAdmin4 on 20.10  When I do the first step: curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add  I get this message: Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).  Moving to the second step: sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'  I get this message: E: The repository 'https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/groovy pgadmin4 Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.```   I have encountered this issue with two or three other public repositories recently. At first I thought it was just a problem with the repository, but I'm beginning to think otherwise.

i want to remove a repository but every time i get the error "Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8))." ive tried updating apt-key and apt-get just to be sure but didnt solve the problem. please help. like this command $ sudo apt-key del 7D8D08F6 .


My dad and brother got into a big fight on wednesday, it got physical. My dad and brother haven't been talking and Thursday morning my mom told my dad to live with my grandpa. Hes staying in our camper tonight but I'm scared my parents will split up, I've been crying nonstop and I dont know what to do. My life is falling apart and I know my mom is upset with everything that happened and that she misses my dad. They haven't had a real conversation in a while and I'm so scared.. please help me

I am a young teenager, younger than 16. (I do not want to give my age online)    My dad told me he wants a divorce, but I don't want my parents divorced. My dad says he can't stand my mom anymore.  My dad is older than 45 and my mom is older than 40.    If it happens, I would choose to stay with my mom. My dad can cook and drive, but my mom can't. There's a school bus in high school though.    What can I do to prevent this divorce?


I have this fragment of text: "Realizado el:2019-03-13 00:00:00.0,  2019-03-13 00:00:00.0   en Edmonton   - Students' Union Building Productos asociados" I'm using regex on python to extract the fragment: "en Edmonton - Students' Union Building Productos asociados" but I just can't, the regex expression I used is: country = re.search('en (.*?)Productos asociados', text, re.MULTILINE)  Any idea of how to do it? Thanks

For example, this regex  (.*)<FooBar>   will match:  abcde<FooBar>   But how do I get it to match across multiple lines?  abcde fghij<FooBar>


I'm perplexed why the grammar check considers this a grammatically complete sentence:  Not happy or content.  To me, it's missing both a subject and a verb.  Could someone shed some light on this for me? Thanks.

I thought I heard my teacher said: 'Don't construct a sentence without a verb.'  Is there such rule in english grammar?     She looks like 70 years old. Perhaps older.   How about the question above? Is it correct? Is there any book that can be used references for wide range of topics in grammar(including syntax, morphology et cetera)? I have finished oxford grammar in use recently and think it wasn't enough for me.


I'm trying to make a render of a minecraft charterer. This would be simple enough, but I am a total noob with blender. I texture mapped it just fine, but it comes out blurry and the alpha chanel (that shows up perfectly while editing) is pure white. I need it to look like does in editer when I render it. I am at a total loss, I don't know how to fix this. I really need some help  picture on the right is the texture, the picture on the middle is how it looks in the editer, and the picture in the middle is how it looks when rendered.

I have a problem. I am going to make a minecraft animation in blender. But when I put a minecraft texture on a 3d cube that is 16x16x16 it is very low resolution is there a way to get the texture in a better resolution or is there a way to make blender make the texture better?  I hope you have an answer. Thanks in advance


I have tried to install synaptic package manager and in the terminal it is showing me some error.  E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

I get this error when trying to use apt-get:  E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?     How can I fix this?


As you know, in Eclipse you can turn on "Unnecessary 'else' statement" check that will trigger on if-then-else with premature return. And, from my experience, there are two most possible situations when use such statement:  1) Pre-check:  if (!validate(arg1)) {     return false; } doLotOfStuff();   2) Post-check:  doLotOfStuff(); if (condition) {      return foo;  } else {     return bar;  }   In the second case, if the trigger is on, Eclipse will suggest you to change the code to:  doLotOfStuff(); if (condition) {      return foo;  }  return bar;    However, I think that the return with else statement is more readable as it is like direct mapping of business logic. So I am curios if this "Unnecessary 'else' statement" code convention is widespread or code with else statement is more preferable?

Are there good reasons why it's a better practice to have only one return statement in a function?   Or is it okay to return from a function as soon as it is logically correct to do so, meaning there may be many return statements in the function?


As part of an early quest, my PCs are likely to face off against a wizard.  The problem here is that the stat block for Mage NPCs listed in the Basic Rules has a Challenge Rating of 6, while the PCs are going to be five Level 1s. So, instead of messing with the stat block and risk weakening it too much/too little, I'm choosing to create a Level 1 Wizard PC and use it as an NPC for this quest.  The problem with that is that, as far as I can tell, there aren't any designated rules for assigning either Challenge Ratings or XP values to a PC. So, should I just give the wizard a Challenge Rating equal to his level (and thus have him give 200 xp when killed), or is there a better way to do this?  (This is different from , because he's asking for a way to assign a level to an NPC, while I'm asking for a way to assign an XP value/Challenge Rating to a PC (for use as an NPC). Similar questions, but different.)

Hypothetical party:  1st level human wizard (PC) 3x guard NPC 1x acolyte NPC    This is the player's first time, and it's a solo campaign. The first mini-adventure involves recovering the cargo of a supply caravan that didn't make it to her magic academy due to bandit hijacking (as a sort of graduate-test). The guards and healer are on contract from the school to assist her. The acolyte is essentially just to hang back and tend to wounds and probably won't engage in combat unless someone goes down or the PC is seriously wounded.  So, with that "party" makeup, how do I determine the XP budget for a "medium" or "hard" encounter since there's no clear CR->level mapping in 5e for those NPCs (who will certainly factor into any combat as meatshields and melee damage)? I was thinking about reverse-engineering them as crumby lvl2 fighters (given the 2 HD worth of HP they have), but they certainly aren't on par with a lvl2 fighter, given the lack of action surge, second wind, etc., so the encounters would end up being too hard compared to PCs or DMPCs.   Could they be lvl1-equivalents, essentially trading any abilities a PC would have for extra HP? How would this work at later levels with higher CR NPCs (veteran, priest, mage, etc.)? I'd rather not have to build a bunch of DMPCs as hirelings, because I want the NPCs to be a bit vanilla compared to the versatility of my player. I'm already introducing 1-2 DMPCs to the game for her to take control over as she gets a feel for the flow of the game (for now, she'll handle them out of combat, and I'll effectively show her how to utilize them until she's ready).     Just to be clear, I'm comfortable with the monster-generation rules for crafting NPCs as enemies to determine their CR, but I'm confused on how to use them in the adventuring party when budgeting encounter difficulty XP.


I'm a beginner in programming and I need to write some kind of own LinkedList, but only with add(E element) method and with Iterator's hasNext() and next(). Here is my code:    public class LinkedArray<E> implements Iterator<E> {          private int size = 0;          private int current = 0;          private Node<E> first;          private Node<E> last;          private Objects[] objects = new Objects[10];          public void add(E value) {             Node<E> element = new Node<E>(last, value, null);             if (last != null) {                 element.next = element;             } else {                 first = element;             }             last = element;             size++;         }          @Override         public boolean hasNext() {             boolean result = false;             try {                 if (objects[current + 1] != null) {                     result = true;                 }             } catch (ArrayIndexOutOfBoundsException e) {                 result = false;             }             return result;         }          @Override         public E next() {             E result;             try {                 current++;                 result = (get(current - 1));             } catch (ArrayIndexOutOfBoundsException a) {                 throw new NoSuchElementException("No more elements in list.");             }             return result;         }     public E get(int position) throws NullPointerException {         Object result;     if (this.objects[position] != null) {         result = this.objects[position];     } else {         throw new NullPointerException("Position is empty.");     }     return (E) result; }           private class Node<E> {              private E element;              private Node<E> next;              private Node<E> prev;              Node(Node<E> prev, E element, Node<E> next) {                 this.element = element;                 this.next = next;                 this.prev = prev;             }         }     }   But when I started to test add(E value)...  @Test     public void test() {         LinkedArray<String> arr = new LinkedArray<>();         String string = "Test";          arr.add(string);         String result = arr.next();          assertThat(result, is("Test"));     }   ...I only get an error. What the problem is, why am I getting it wrong?

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


Suppose $f$ is a function defined on $\mathbb{R}^{2}$ as follows:  $$ f(x,y) = \frac{x^{3}-y^{3}}{x^{2}+y^{2}} \text{ if } (x,y) \neq (0,0)$$  and $0$ if $(x,y) = (0,0)$.  I am asked to prove that the function is not differentiable at $(0,0)$.  I calculated the partial derivatives and they are $1$ and $-1$ respectively, in the $x$ and $y$ directions. I am unable to proceed from here.  Could any shed some light?  EDIT:  Based on the comments below, this is what I did:  We must show that  $$ \frac{\frac{x^{3} - y^{3}}{x^{2} + y^{2}} -x + y}{\sqrt{x^{2}+y^{2}}}$$  does not tend to zero as $(x,y) \to (0,0)$. Now, if we take $y = \alpha x$, we get that this expression is equal to some non-zero constant involving $\alpha$ and hence does not tend to zero.

Let  $$f(x,y)=\frac{x^3-y^3}{x^2+y^2}$$  My solution manual says that this function is not diffb. in $(0,0)$ because it is not linear. Well my problem is that I don't see why this function is linear, and I also don't see why that would imply that $f$ is not differentiable.


I would like to know if it is possible to develop standalone map applications with QGIS without installing QGIS software or embedding QGIS. Most instructions ask to either install QGIS or embed in to the final executable. Is it possible to call QGIS functionalities by using shared libs? According to this () answer there's one example application,  which requires py2exe to be installed.  Is there a promising way to achieve the objective without installing QGIS?

I am building a standalone python application that has its own GUI, i would like to use qgis.core/pyqgis as a map display only. But from my searches on this topic, it seems that the full QGis software has to be installed on both developer and prospective users' machine to have this work. Is there not a way to embed Qgis map display without installing the full version of Qgis software?


Is there any way to query a dns server to find out all the domains it is the authoritative server? [all domains it has configured?]  (I can use dig or any other tool)

Up until now, I was pretty confident that it was pretty much impossible to list all the domains handled by a nameserver.  But apparently, there exists a couple of websites on the Internet that are able to list all the domains registered in a namerserver.   For example:      Or all domains pointing to a specific IP :      (These DNS/IP were picked at random)  Do you know how it's done ?