I am using JFrame for my program . When you enter value of a quantity in the text field and selects another item from the Jlist, the value stays and doesn't empty the text field. So what i want to happen is emptying the text field when I am about to choose another item from the list.  Here is the code for that portion:  if (selected == "SBCA Jacket"){         photo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/jacket.jpg")));         double p = 700;         String price = Double.toString(p);         priceField.setText(price);         int s = 500;         String stock = Integer.toString(s);         stockField.setText(stock);         int qty = Integer.parseInt(qtyField.getText());         int rstock = s - qty;           rstockField.setText(Integer.toString(rstock));         double total = p * qty;         totalField.setText(Double.toString(total));      }else if (selected == "SBCA T-shirt"){     ...

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?


I need a Java program that subtracts 5 years from the current year. Everything is working fine but after I run the program:  DateFormat dateFormat = new SimpleDateFormat("yyyy"); Calendar cal = Calendar.getInstance(); cal.add(Calendar.YEAR,-5); Date today = new Date(); String start = dateFormat.format(cal.getTime()).toString(); String end = dateFormat.format(today).toString(); double start_doub = Double.parseDouble(start); double end_doub = Double.parseDouble(end); System.out.println(start_doub); System.out.println(end_doub);   The result is:  2012.0 2017.0   I don't know the reason why the program adds .0 after the year?  How can I remove the last part?

I need to determine the current year in Java as an integer. I could just use java.util.Date(), but it is deprecated.


I want to create a pokemon text game. Obviously I will use various stuff that belongs to Nintendo, like pokemon, professor, region names and sprites from the games. Can Nintendo sue me or take down my game and for what? What are the possibilities? I think it's important to note that:  It is a text adventure game that lacks any mechanics of known official games It is going to be absolutely non-profit, I won't accept any money, including donations, for my creation It is going to be based on a website I'm not expecting more than 1000 users per day to visit it To sum up, the IP of Nintendo I want to use are pokemon sprites and various names, copyrighted by Nintendo There are a lot of pokemon web-games operating like neopets that weren't currently shut down  I would be very thankful for any advice or help! p.s. Sorry for my bad English, that's not my mother tongue. :^)

I've played around in the past of the 2D Flash fan-made version of the popular Valve game Portal.  It has basically the exact same mechanics, but as a 2D side-view flash game.  Lately I've toyed around with creating a simplified flash version of some of my favorite franchises (such as Zelda, Mario, Splinter Cell, etc.).  Of course, nothing is "stopping" me from just using the same mechanics and just changing the name to something not copyrighted.  I have witnessed projects that have tried to directly port a 3D game into a 2D simplified version, with the exact same plot and puzzles (Ocarina of Time in 2D comes to mind), and I have seen them being shut down.  But I am not likely going to exactly duplicate any game...just borrow some of the source material and basic underlying mechanics.  For example, if I were to make a Zelda-influenced fan game, I would have items such as the Hookshot, Boomerang, and all other sorts of ones from the Gameboy Zeldas; just with a custom plot and dungeons.  With likely the same mechanics.  What are the legal issues involved in this?  I used to think it was a "Don't do this ever; it's a bad idea."  But then I've seen the Portal clone, and now I'm curious.


Do I need 50mm lens If I have ef 24-105mm f/4l is usm lens for canon 6d? What should be my next lens? I mostly interested in landscapes.

Everyone I speak to says that a 50mm lens is the best and beats them all as an all-rounder. I was wondering whether to get myself a decent, fast 50mm as well. However I'm still not 100% sure whether I really need such a lens.  I use a Pentax K10D and mainly shoot people (kids, portraits, some street shots). The lens I love and use most is the DA 70mm f/2.4 Limited. I often also use a DA 40mm f/2.8 Limited. They are great little lenses that produce very high quality images but they could be a bit faster.  Is is worth spending 400 quid on a Sigma 50mm f/1.4 in my situation? It seems like a good compromise between the 40mm and 70mm and much faster (in fact, 2 f-stops faster than the DA 70mm f/2.8!). On the other hand would the lens be sufficiently different from my current lenses?


I've recently seen a bullet (.22, vertically oriented, block rises against gravity) and block experiment on YouTube. There are two parts the first being an on CG impact and the second being an off CG impact. The conclusion after some fiddling with the video runs which were not conclusive in MHO, is that though the off-CG strike rotates the block, the linear momentum imparted to all blocks no matter where impacted, are the same...the block always rises the same amount. I'm still wondering about this and wish to ask about it. Is this correct?   I think there are too many uncontrolled parameters in the backyard experiment including different wood densities in different blocks. I'm assuming the ammunition is consistent in energy imparting a known mass with the same velocity at the muzzle and impacting the block.   I suggest an alternative experiment, but haven't set it up and run it: a very long block is struck by a dart, the dart launched by a consistent system such as a spring, the dart able to strike without damaging the target. First it strikes the target cross wise on it's CG, second, it strikes the block near the end of it most assuredly imparting considerable spin. Is the linear momentum of the block/dart combo always the same? Reason (whatever that is) suggests to me that, no, one would fly forward fast and the second would spin and not fly forward as quickly.   With the bullet and block, a huge amount of kinetic energy (bullet) is lost in the interaction (friction? Breaking wood fibers? distorting the lead bullet? all of these?)...40 grain bullet, 1255 f/s velocity...1# block, that block winding up with something like 1/70th of the kinetic energy of the bullet... so perhaps some of it could be put into spinning the block while the linear momentum transfer remains the same. Since total energy will be conserved, I'd expect a sophisticated experiment has been done that measures these kinds of energy exchanges and shows them adding up to the same initially and finally in the closed system.  A corollary: The bullet hits a 1# block and the block moves off at a velocity, p = mv. Then the block is replaced with a cardboard box filled with sawdust total weight is the same as the block. This time the bullet is slowly captured and does damage to untold fibers along the way dissipating it's energy as it does so. Does the box move off at the same velocity? I think it must. p = mv no matter what happens to the bullet.   In real life (the collapse of the WTC1 on 9/11/01, for example) a small block of (12) floors collapses onto a large block of floors (98) and they crush each other, The falling block pushes down on the remainder of the building and the remainder of the building pushes back slowing the falling block (Newton's third law.) And the crushing (steel being distorted) absorbing energy. There is a p = mv aspect to this. And also mass is lost, tossed aside so it can't participate in subsequent driving of the event downward. The event should lose huge energy even with the first impact, the drop of the block the 12 or 24 feet to the awaiting top floor of the lower section. Conservation of linear momentum says that the event couldn't have continued downward. An egg dropped on a stack of eggs can't crush all the eggs in the stack. In fact, it hardly does much to the first egg it hits.

Assume there is a rigid body in deep space with mass $m$ and moment of inertia $I$. A force that varies with time, $F(t)$, is applied to the body off-center at a distance $r$ from its center of mass. How do I calculate the instantaneous acceleration, rotational acceleration, and trajectory of this object, assuming it starts from rest?


First Query:  SELECT      d.id,     d.brand_name,     count(*) AS no_of_time_used FROM content oc LEFT JOIN drama d ON d.id = oc.drama_id LEFT JOIN orders o ON o.id = oc.order_id     AND o.fundraiser_id IS NOT NULL GROUP BY drama_id ORDER BY no_of_time_used DESC;   Second Query:  SELECT      d.id,     d.brand_name,     count(*) AS no_of_time_used FROM content oc LEFT JOIN drama d ON d.id = oc.drama_id LEFT JOIN orders o ON o.id = oc.order_id WHERE o.fundraiser_id IS NOT NULL GROUP BY drama_id ORDER BY no_of_time_used DESC;   There is only one difference in these queries that's AND vs WHERE. In First Query, I have used AND just after the second JOIN Statement whereas in the second query I have used WHERE in place of AND.  Edit:  Both Queries are returning different result.

After reading it, this is not a duplicate of . The answer may be related (or even the same) but the question is different.    What is the difference and what should go in each?  If I understand the theory correctly, the query optimizer should be able to use both interchangeably.


I would like to allow a group of user to rename the name of folder, but cannot delete it (in Windows 2012 server environment). So far, I found:   from the web, I got "rename = delete the folder and create a new one", so there is no way to allow rename but deny delete by NTFS permission. What I tried is when I untick the "delete" permission at advance permission settings, the "modify" permission is also disappered.   Is this really the case? There is no way to achieve through permission?

We have a folder for employees to scan contracts to. After scanning, they're supposed to rename them according to our conventions so they can be processed further. In response to a recent incident, these folders have had their security locked down (they're granted write, but not modify, permission) and now they are unable to rename the files.  Is there a technical way to accomplish what I'm trying to do? From what I've read, I don't think this is possible.  If not, can you suggest any workarounds? One possibility is to set the name of the file as it's being scanned in. Another is to have a trusted person in management be given sufficient permissions to rename.


Suppose that $Y_1,...,Y_n$ is an IID sample from a uniform distribution $U(\theta,1)$  The method of moments estimator is $\hat \theta=2\bar Y-1$.  Find an unbiased estimator, call it $\hat \beta$, of the quantity:  $$\frac{1-\theta}{\sqrt{3n}}$$  I noticed that if I take the expected value of this arbitrarily chosen estimator: $$\frac{1-\hat \theta}{\sqrt{3n}}$$ I end up with $$E\left( \frac{1-\hat \theta}{\sqrt{3n}} \right)=E\left( \frac{1-(2\bar Y-1)}{\sqrt{3n}} \right) =\frac{1-\theta}{\sqrt{3n}}$$  So I don't quite understand if the goal here is for the expected value of my estimator to equal EXACTLY $\theta$ or if it's supposed to equal the original function of $\theta$.  So this abitrarily chosen estimator of mine; is an an unbiased estimate of the given quantity; is it the $\hat \beta$ I seek?

Suppose that $Y_1,...,Y_n$ is an IID sample from a uniform $U(\theta, 1)$ distribution.  The method of moments estimator for $\theta$ is $\tilde \theta=2\bar Y-1$.  The standard error of $\tilde \theta$ is   $$\sigma_{\tilde \theta}=\frac{1-\theta}{\sqrt{3n}}$$  Find an unbiased estimator of $\sigma_{\tilde \theta}$ and show that it is unbiased.  So normally I know how to find the estimator of a parameter of a distribution, but I don't quite understand how I'm supposed to find an estimator of the standard deviation of another estimator of a parameter of a distribution... so I really don't know how to go about this.  What do I do?


This question is loosely related to . The basic idea is that OP had - in filename which broke ls *.vcf. What happened is clearly understood, but the question is then, how could one 'protect'  or anticipate such filenames with the wildcard expansion ? I know one could use find , but what about wildcard expansion in shell specifically ?

How do you remove a file whose filename begins with a dash (hyphen or minus) -?  I'm ssh'd into a remote OSX server and I have this file in my directory:  tohru:~ $ ls -l total 8 -rw-r--r--    1 me  staff  1352 Aug 18 14:33 --help ...   How in the world can I delete --help from a CLI?  This issue is something that I come across in different forms on occasion, these files are easy to create, but hard to get rid of.  I have tried using backslash  rm \-\-help   I have tried quotes  rm "--help"   How do I prevent the minus (dash or hyphen) character to be interpreted as an option?


I have the follwing Python code  import re  regex = r"SRC=(?P<src_ip>[\d\.]*).*?PROTO=(?P<proto>\w*).*?(SPT=(?P<src_port>\d*).*?DPT=(?P<dst_port>\d*)|TYPE=(?P<icmp_type>\d*).*?CODE=(?P<icmp_code>\d*))" input = "<4>Nov 25 12:00:13 ubuntu kernel: [  574.036758] iptableslogIN=enp0s3 OUT= MAC=44:85:00:ec:eb:2b:00:21:55:ef:8c:7f:08:00 SRC=10.24.136.232 DST=10.23.85.76 LEN=44 TOS=0x00 PREC=0x00 TTL=52 ID=5250 PROTO=TCP SPT=56325 DPT=55 WINDOW=1024 RES=0x00 SYN URGP=0" m = re.match(regex, input) print(m.groupdict())   which fails with a   Traceback (most recent call last):   File "C:/scratches/scratch.py", line 6, in <module>     print(m.groupdict()) AttributeError: 'NoneType' object has no attribute 'groupdict'   because input was not matched.  The exact same regex and input is . Why?

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


Is it possible to stop execution of a python script at any line with a command?  Like  some code  quit() # quit at this point  some more code (that's not executed)

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


I was reading about implicit or explicit interface methods implementation, but I still not understand how it works and what are the benefits.  Having the code:  interface InterfaceOne {     void MethodOne(); }  class ClassOne : InterfaceOne {     public void MethodOne()     {         Console.WriteLine("hello from the class method");     }      void InterfaceOne.MethodOne()     {         Console.WriteLine("hello from the interface method");     } }   And the code from the main method:      var c1 = new ClassOne();     c1.MethodOne();      InterfaceOne i1 = new ClassOne();     i1.MethodOne();     Console.ReadLine();   And here is the output:     hello from the class method      hello from the interface method   My questions:   Why I don't have an error having a class with two methods with the same name and signature? When I'm using var keyword, how does the compiler choses which method to call? What are the benefits?

I recently implemented a class like:  class TestClass : IDisposable {     RegistryKey m_key;     public TestClass()     {         m_key = Registry.CurrentUser.OpenSubKey("Software", false);     }      public void Dispose()     {         // m_key.Dispose();         IDisposable disp = m_key;         disp.Dispose();     } }   If I uncomment the direct call to Dispose, I get error CS0117 ("'Microsoft.Win32.RegistryKey' does not contain a definition for 'Dispose'").  Some Googling led me to , where I learned what was going on, so I now understand the mechanics of it.  The  documentation suggests that the author would prefer that I call Close() instead of Dispose(), but doesn't explain why.  What is the purpose of this pattern (which I think I've seen it in the IO classes as well)?  In light of the fact that this was an intentional decision by the class author, how bad is the code above (the call to Dispose through the IDisposable interface)?  It can't be too bad - after all, it's what would happen in a using statement, right?  [edits: 1) changed title from "non-public" to "explicit" 2) removed the explicit implementation from my code, accidentally left in from experimentation]


What is the SciFi story where a guy has to traverse a deadly alien 'trap' (it says in the story that it's possibly a trap or a puzzle but the tech is so advanced that they can't understand it) where the man dies a usually grisly death but is reanimated to test it again and again, each time getting a little further into the maze?

I'm trying to find the title and author of the short story that seems to have predicted computer games.  The main character was a macho adventurer who was recruited by a scientist to enter a strange other-dimensional realm in which death came suddenly and unexpectedly.   The adventurer would enter the realm, learn a little bit and then die violently only to reawaken in the real world, to try again repeatedly.


Please consider the following sentences: He is one of the best players who has played for India. Can I use a singular verb if I am referring to the "one" of many? He is one of the best players that have played for India. Does this sentence mean that I am referring to all the great players who have played?

In the construction "one of the [plural noun] who ...", should the verb agree with "one" or "[plural noun]"?   For example, which of the two following sentences is grammatically correct? Or are both acceptable?        She was one of the several children who was sold at the auction    She was one of the several children who were sold at the auction.


I am trying to save the value of a command into a variable but it gives an error var = `cat $1 | grep "STAN: \[$2\]" | awk -F '|' '{print $3; exit}'`   It gives me the error var: command not found

I am writing a script which loops into recent files in a folder and executes a command...   #!/bin/bash cd /home/Downloads recent_files = ($(ls -t | head -20)) for file in "${recent_files[@]}" do     ./cmd $file done   I get the following syntax error:  line 3: syntax error near unexpected token `(' line 3: `recent_files = ($(\ls -t | head -20))'


Given an ideal $\mathfrak{a}$, Matsumura defined the height of $\mathfrak{a}$ as: $$\text{ht}(\mathfrak{a})=\inf_{\mathfrak{p}\in V(\mathfrak{a})}\text{ht}(\mathfrak{p})$$ He states that: $$\text{ht}(\mathfrak{a})+\dim(A/\mathfrak{a})\leq \dim(A)$$ Any ideas on how to show this? I know I have to use the correspondence theorem. I'm just having a hard time writting it properly with the definitions of height and dimension. Thanks in advance!

Which of the following inequalities hold for a ring $R$ and an ideal  $I\subset R$?  $\operatorname{height}I\leq\dim R-\dim R/I$ $\operatorname{height}I\geq\dim R-\dim R/I$


I have a following sentence:      $$\forall x~(Fx \to \forall y~(Fy \to Gy)) ~\vdash~ \forall x~(Fx \to Gx) $$   Why I cannot use UI twice and get:      $$Fa \rightarrow (Fa \rightarrow Ga) $$   This is my proof:  1) $\forall x~(Fx \to \forall y~(Fy \to Gy))$  $\quad$2) $Fa \to (Fa \to Ga)$  $\qquad$3) $Fa$ (Assumption)  $\qquad$4) $Ga$ (From 2,3)  $\quad$5) $Fa \to Ga$  6) $\forall x~(Fx \to Gx) $  And the second line was marked as the wrong one by somehow.  Thanks in advance.

I have the following premise:      $$\forall x (Fx \vee \neg Fx) \rightarrow Ga$$   Why I cannot use UI and get: $(Fa \vee \neg Fa) \rightarrow Ga$ And what is the difference between the first premise and the below premise:     $$\forall x ((Fx \vee \neg Fx) \rightarrow Ga)$$   Thanks in advance.


It just seems like they put all those symbolism for no reason, and it sounds and looks pretty stupid IMO. The series would have been a lot better without all the nonsense.

I've noticed references to the Kabbalah in a couple of anime I've watched.  One of them is Neon Genesis Evangelion.  Neon Genesis Evangelion has it in the sky in both the opening credits and in the series itself:     I also remember it was on the ceiling at NERV, but the best screencap I could find of that was too tiny to be visible.  So, my question is, Is there any deeper meaning to the use of the Kabbalistic tree of life, or is it just used because it looks cool?


The following MWE making a plot by pgfplots shows xticktables in wrong position along the x-axis. I think this is caused by lost data. So, is there a approach to make these xticktables in right position regardless lost data.   PS: the given soluntion above   does not solve my problem. I tried by adding xtick=data, the lost data still causes wrong position of xticklable from "c".  \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepackage{filecontents}   \begin{document} \begin{filecontents}{test.dat}  id,note,a 1,a,1 2,b,4 3,c, 4,d,16 5,e,25 \end{filecontents}  \begin{tikzpicture} \begin{axis}[ table/col sep=comma, title={example}, xlabel=id, ylabel={$data$}, xticklabel style={rotate=90}, xticklabels from table={test.dat}{note}, % xticklabels={a,b,c,d,e} % I also tried this, but still fail. ] \addplot [blue,mark=*] table[x=id,y=a] {test.dat}; \end{axis} \end{tikzpicture}  \end{document}


I have configured Ubuntu 16.04 with OpenVPN and when connected to the tunnel Ubuntu is using DNS servers from my VPN (which is what I want) but it is also using one DNS server from network/interfaces which is causing a DNS leak.  I removed dnsmasq and checked resolv.conf and I can see 3 DNS in the list, the first two from my VPN and third from network/interfaces.  How do I configure the system to only use DNS provided by my VPN provider?

I have configured PPTP VPN connection on Ubuntu 16.04.3 LTS via NetworkManager (nm-pptp-ppp-plugin) and it works. My configuration:   VPN   Gateway User name Password Advanced - set some options on PPTP Advanced Options  IPv4 Settings    Method: Automatic (VPN) addresses only   DNS servers : 192.168.1.1 (internal IP address of VPN's default gateway)   IPv6 Settins    Method: Ignore    I commented out #dns=dnsmasq in /etc/NetworkManager/NetworkManager.conf, ran sudo dpkg-reconfigure resolvconf and sudo resolvconf -u.  Without VPN connection my /etc/resolv.conf contains the following line:  nameserver 192.168.3.1   where 192.168.3.1 is IP of my router. After that, VPN connection /etc/resolv.conf changes to:  nameserver 192.168.1.1 nameserver 192.168.3.1   But as far as I can understand it should contain only 192.168.1.1.  Is it possible to remove my router's IP (192.168.3.1) from /etc/resolv.conf programmatically? I mean by  or similar.  It seems that I do not have the  with my current configuration.  P.S. I understand that my question may have been discussed before, but possible duplicates do not fit my needs.  Update 1. On my other 16.04 laptop I also needed to disable systemd-resolved.service with:   sudo systemctl stop systemd-resolved.service sudo systemctl disable systemd-resolved.service


I've an existing StackExchange account with the following myOpenId: sidharth-panwar.myopenid.com  But I'm not able to log in with this account. Whenever I try to log in it gives me the following error message:       No OpenID endpoint found.     I've logged in with a temporary account (using my GMail account). Is it possible to link my GMail account with my myOpenId account so that my profile remains intact?  I've gone through the following threads already before posting:

Is there any way to get my old account + metadata back if I have lost an account ties to MyOpenID?


I've trying to clean topology in certain shapefiles.  When I use v.clean command from GRASS 7 in QGIS, the results is a shapefile with a different CRS from original shapefile. Also, when I try to ejecute another commands over v.clean output (as buffer, i.e), results are vectors with no features.  For example:  I'm working in ETRS89 / UTM 30N by default and without "on the fly" reprojection (1).  Result of v.clean (green line) is accord with original vector (red lines)(2).  But when I check CRS in properties (3), it doesn't have one. Also, v.clean doesn't save a .qpj file with cleaned shapefile, but save a .prj file.  Checking the arguments of .prj file, it's completely different from original shapefile, project CRS and CRS configuration for new layers (original in top, result in bottom, 4).  Setting projection from properties box doesn't work, I can't ejecute basic geoprocesses over the "cleaned" layer.  I've tried in OS X and Windows QGIS 2.18 version without positive results. Is this a bug of last version or I'm doing something wrong?

I am experiencing a strange problem by using the GRASS toolbox on QGIS 2.14.3 Essen.  Even if in settings>options>CRS I select to use the project CRS when creating new layers, the results of GRASS toolbox tools, like r.watershed and r.fill.dir,  have an "user-defined CRS" with code 100000, even if the project CRS is EPSG 20137.  How can I solve this?


I want to ask, what is the meaning of this symbol in red circle?

I'm reading the textbook Stochastic Calculus for Finance: Volume I by Steven Shreve, and on page 101 (incase somebody has it on hand) I am unsure of the notation.  There is a I where the top and bottom horizontal lines are connected by two vertical lines, instead of just one.  There is then a subscript saying {τ<=N}, denoting that this mystery operator applies to all tau less than or equal to N.    The I looks very similar to the E meaning expectation and P meaning probability measure, in that there is a doplication of vertical lines to make the letter look hollow.  What is this mystery operator?


I'm creating one Object and assign null value then push some values into created object now i want check object is null or not?  here is my code  var data = {};     if(typeof first_name != 'undefined'){         data['first_name'] = first_name;     }      if(typeof last_name != 'undefined'){         data['last_name'] = last_name;     }  //checking value is null or not  if(typeof data !== null){     console.log(data);     }     else{     console.log('No Any values');        }   its give O/P this: Object {}

After an AJAX request, sometimes my application may return an empty object, like:  var a = {};   How can I check whether that's the case?


When I bought a new laptop it had 4 GB RAM. Then after 1 month I added 4 GB RAM in the second slot. And it shows 7.88 GB RAM usable. After some time it showed 6.4 GB RAM usable and 1.4 GB hardware reserved. So I formatted and installed Linux. Now in Linux it shows only 6.2 GB RAM usable. I have talked to Dell customer care. And read many forum. I searched Google a lot, but nothing helped me.

I have Ubuntu 18.04 dual booted with Windows 10. Windows 10 shows full 8 GB RAM.   But in Ubuntu it shows only 6.8 GB.    Is there any way to make it near 8 GB or is this natural?   ~$ free               total        used        free      shared  buff/cache   available Mem:        7097484     1775180     3633172       67964     1689132     4994508 Swap:       1000444           0     1000444   After turning the swap area off,   ~$ free               total        used        free      shared  buff/cache   available Mem:        7097484     1776700     4761256      111464      559528     4949096 Swap:             0           0           0   Output   ~# dmesg | grep -i memory: [    0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff] [    0.000000] PM: Registered nosave memory: [mem 0x00087000-0x00087fff] [    0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000bffff] [    0.000000] PM: Registered nosave memory: [mem 0x000c0000-0x000fffff] [    0.000000] PM: Registered nosave memory: [mem 0x09b00000-0x09dfffff] [    0.000000] PM: Registered nosave memory: [mem 0x09f00000-0x09f09fff] [    0.000000] PM: Registered nosave memory: [mem 0x6427a000-0x64b79fff] [    0.000000] PM: Registered nosave memory: [mem 0x6b58f000-0x6b78efff] [    0.000000] PM: Registered nosave memory: [mem 0x6b78f000-0x6d78efff] [    0.000000] PM: Registered nosave memory: [mem 0x6d78f000-0x6f78efff] [    0.000000] PM: Registered nosave memory: [mem 0x6f78f000-0x6f7fefff] [    0.000000] PM: Registered nosave memory: [mem 0x6f800000-0xafffffff] [    0.000000] PM: Registered nosave memory: [mem 0xb0000000-0xf7ffffff] [    0.000000] PM: Registered nosave memory: [mem 0xf8000000-0xfbffffff] [    0.000000] PM: Registered nosave memory: [mem 0xfc000000-0xfebfffff] [    0.000000] PM: Registered nosave memory: [mem 0xfec00000-0xfec00fff] [    0.000000] PM: Registered nosave memory: [mem 0xfec01000-0xfec0ffff] [    0.000000] PM: Registered nosave memory: [mem 0xfec10000-0xfec10fff] [    0.000000] PM: Registered nosave memory: [mem 0xfec11000-0xfed7ffff] [    0.000000] PM: Registered nosave memory: [mem 0xfed80000-0xfed80fff] [    0.000000] PM: Registered nosave memory: [mem 0xfed81000-0xfedfffff] [    0.000000] PM: Registered nosave memory: [mem 0xfee00000-0xfee00fff] [    0.000000] PM: Registered nosave memory: [mem 0xfee01000-0xff7fffff] [    0.000000] PM: Registered nosave memory: [mem 0xff800000-0xfff4ffff] [    0.000000] PM: Registered nosave memory: [mem 0xfff50000-0xffffffff] [    0.000000] Memory: 6929972K/7238032K available (12300K kernel code, 2472K rwdata, 4248K rodata, 2408K init, 2416K bss, 308060K reserved, 0K cma-reserved) [    0.039763] Freeing SMP alternatives memory: 36K [    1.147121] Freeing initrd memory: 54212K [  141.519341] Freeing unused kernel memory: 2408K [  153.310684] Freeing unused kernel memory: 2008K [  153.317976] Freeing unused kernel memory: 1896K [  153.869546] [TTM] Zone  kernel: Available graphics memory: 3548742 kiB [  153.869547] [TTM] Zone   dma32: Available graphics memory: 2097152 kiB


I'm an undergrad getting familiar with some notions of commutative algebra by reading Atiyah-McDonald. On the exact sequences part, a part of the proof of (2.9) is proving that if $\hom(M'',N)\xrightarrow{\overline{v}}$ is injective for all $N$ (where $\overline{v}(f)=f\circ v)$ then $v$ is surjective.   Any idea on how to prove this? Atiyah makes it seem obvious, I don't see why.

The following simple claim is used without proof in Proposition 2.9 of Atiyah and MacDonald (p.23). Although I believe I can prove it with a fairly involved argument, the claim is treated by the authors as a triviality so I feel like there should be a simple argument. Is there such an argument?      Let $M, N$ be $A$-modules. Let $v\colon M \to N$ be a homomorphism. Suppose that for all $A$-modules $P$, the dual maps $v^*\colon\operatorname{Hom}(N,P) \to \operatorname{Hom}(M,P)$ are injective. Then $v$ is surjective.   (Note that the claim is trivial for free modules, but I am looking for a general proof).


I'm trying to read this list of names and phone numbers in. But the the program keeps throwing nullpointerexception. Why is it doing this?  int i=0;         Datab[] b = null;          //b = null;          // The name of the file to open.         String fileName = "datt.dat";          try {             // Use this for reading the data.             byte[] buffer = new byte[1000];             FileInputStream FileIS = new FileInputStream("datt.dat");             ObjectInputStream input = new ObjectInputStream(FileIS);              for(i=0; i<b.length; i++)              b[i]=(Datab)input.readObject();              input.close();

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'm aware of the documentation badges in SO issue, I lost 3 of them so this isnt about this. My network profile shows a drop in another 61 bronze badges depending where you see it (264 to 205), and if you count them manually they still add the former figure (264). So what's this about, am I going to see a disappearence in my other communities bronze badges soon so that's why they still add up to 264, or it's a bug in the badges counter?

I've got 28 bronze badges on Stack Overflow, 10 on Astronomy and 15 on Software Recommendations, making it a total of 53. Yet, my combined flair doesn't show that. It just shows the combined badges from my SO and Astronomy SE sites. The reputation has no problem. I can see the correct combined rep. Why is it happening? Is it because Software Recommendations is in private beta?  Here are the flairs (Combined and that from Software Recommendations):     The rep on my combined flair is the sum total of my rep from all three sites. But the badges aren't.


There's a question in American English:     Who has an extra ticket?   How to answer more correctly:     That guy has.   or      That guy does.

She has the same book as I have.  Isn't it supposed to be She has the same book as I do?  But I often hear the former.  Why?


Software Updater performed a partial upgrade today and removed the gnome-tweak-tool and I think one of the depencies - gir1.2-handy-0.0.  I've tried installing in the Terminal and with Synaptic, but I got a broken package error with both. Installed gir1.2-handy-0.0, but still get this error when installing the tweak tool:  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  gnome-tweak-tool : Depends: gnome-tweaks but it is not going to be installed E: Unable to correct problems, you have held broken packages.   I also tried:    Fixing the broken install  sudo apt --fix-broken install  Purging the tweak tool and reinstalling it:  sudo apt-get purge gnome-tweak-tool sudo apt-get autoremove && sudo apt-get autoclean sudo apt-get install gnome-tweak-tool  Installing the package from the Focal repository    Still getting the same result.

When I run sudo apt-get update I get the following error:  W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/main/binary-armhf/Packages  404  Not Found [IP: 91.189.91.15 80]  E: Some index files failed to download. They have been ignored, or old ones used instead.   I've tried looking in /etc/apt/sources.list.d/ to see if anything in that directory can be removed but all that is in there is  nodesource.list nodesource.list.save   In my sources.list file I have:  deb http://ports.ubuntu.com/ubuntu-ports/ trusty main deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty main deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main deb http://ports.ubuntu.com/ubuntu-ports/ trusty-security main deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-security main deb http://archive.ubuntu.com/ubuntu trusty main # deb-src http://archive.ubuntu.com/ubuntu trusty main   Can anyone recommend a way of fixing this error?


I've been using Windows 8 as my laptop since it came out, though I hate it, I really didn't really have a choice since my school only allowed Windows, and since my mom bought me windows 8, I just put it on. I've used Linux since the summer of 2012 so I'm still a bit of a newbie. I use Linux a lot, much more than windows, it's just that I run Linux on virtual machines so I can get the Linux experience, and since I have 8 gigs of RAM, I can spare about 5 for the virtual machines. My main Linux distros are Arch, Ubuntu, and Mint. Though I use Arch the most because I love the customization it offers because I'm a diy kind of guy. And since my laptop crashed because windows experienced a problem and restored everything, I'm thinking of installing linux on my computer, so I have to choose a distro to download, I can't really decide which to put on. I really like Linux Mint because it's simple and uses apt-get, but I don't like MATE or cinnamon because of their simple interfaces. I like Fedora because its always on the latest software, but yum is a bit too slow. I like Arch becuase it has a really fast boot up, pacman is awesome,almost all packages are vanilla, but I don't like that it doesn't have defaults, but I'm probably still going to install it. But I need to find special drivers during installations for hibernating and nvidia. My laptops specs are: i7 3.3 Ghz 8gb RAM 2gb nvidia GTX 660 gpu 1TB hdd  So my questions are: Should I use Arch as my main laptop distro? If not, what should I use? What drivers should I include so Arch can run on the laptop? What drivers do I need to allow my laptop to hibernate safely? What nvidia driver do I need, is it possible to allow dual-booting of Arch and Windows?

This question exists as it fills a specific criterion.  While you are encouraged to help maintain its answers, please understand that "big list" questions are not generally allowed on Ask Ubuntu and will likely be closed per the . More information on the .   What kind of desktop environments or shells are there for Ubuntu users to install?  Please list a desktop environment or shell for each:   a description on why you like or suggest it (features, performance, etc.). a good screenshot, preferably of it running on Ubuntu and showing off some of its features. the minimal requirement for it to be usable, If there's any setting to lower it's requirement (Like kde's low-fat profile); how to enable the said setting some instructions on how to set it up if in the repositories, please provide a software centre link


I just upgraded to Ubuntu 20.04. But I'm now stuck with problems with display managers. GDM3 (preferred DM for me) and xdm are just stuck at a black screen (with a blinking cursor/underscore). Next idea was to start in recovery mode and try lightdm, which finally leads me to the login screen. Just as I think my problems are gone and enter my login credentials at the login screen, the screen gets black and soon after that the login screen comes back. This keeps on happening for all desktop environment options except LXDE and Openbox. I tried looking at answers provided for similar issues but they didn't work. Some had suggested sudo apt remove chrome-remote-desktop But I don't think it's installed in the first place for me as I get: Unable to locate package chrome-remote-desktop If someone could help me by giving out a few pointers, that'll be really helpful.

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


I would like to know if I get it correctly: also with this keyword I can distinct between fields and variables? Like this:  class X {   int x;   public X(int x)   {     this.x=x;   }  }

I was curious about how other people use the this keyword. I tend to use it in constructors, but I may also use it throughout the class in other methods. Some examples:  In a constructor:  public Light(Vector v) {     this.dir = new Vector(v); }   Elsewhere  public void SomeMethod() {     Vector vec = new Vector();     double d = (vec * vec) - (this.radius * this.radius); }


I need to prove that let R be an PID ring every pair of nonzero elements of R has a lcm and a gcd. I already proved that theres a lcm(a,b)=e  , I am missing finding the gcd. someone told me that the answer might be proving that e*gcd(a,b)=ab, but I am a little lost on this

Let $R$ be subring of integral domain $S.$ Suppose $R$ is $\text{PID}.$ Let $a\in R$ be a greatest common divisor of $r_1,r_2$ in $R$. ($r_1,r_2 \in R$, not both zero). Could anyone advise me on how to prove $a$ is greatest common divisor of $r_1,r_2$ in $S?$   Hints will suffice, thank you.


Trying to parse a CHANGELOG.md with the following pattern (?<=##\s\[\d\.\d\.\d\]\s-\s\d{4}-\d{2}-\d{2}\n)(.+?)(?=##\s?\[\d\.\d\.\d\]) Which seems to work fine in  But, when trying to run the same regex in grep / pcregrep pcregrep -M "(?<=##\s\[\d\.\d\.\d\]\s-\s\d{4}-\d{2}-\d{2}\n)(.+?)(?=##\s?\[\d\.\d\.\d\])" CHANGELOG.md  yields no results. What's wrong with my command?

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


Suppose I have those two implementations of a singleton:  1)  class Singleton {     private static Singleton singleton;      private Singleton(){}      public static synchronized Singleton getInstance() {             if(singleton == null ){ singleton = new Singleton(); }         return this.singleton;     } }   2)  class Singleton {     private static Singleton singleton;      private Singleton(){}      public static Singleton getInstance(){         synchronized(Singleton.class){             if(singleton == null ){ singleton = new Singleton(); }         }         return this.singleton;     } }   What is the difference between those? In other words, is there a difference between using a synchronized block and using the synchronized keyword on the method for this case?

Can any one tell me the advantage of synchronized method over synchronized block with an example?


Do you know what his name is?      Do you know what is his name?   I saw this in grammar text book. The first is the correct one because "Subject + Verb". The second is wrong.  We do usually say "What is your name?", "What is his name?", why the sentence is wrong when the front of the question is "Do you know..."

Which of the following is a correct sentence:   Does anyone know where's Linda?  Does anyone know where Linda is?    Does anyone know why and how to use above usage if #2 is correct. Also please let me know this kind of specific structures.


When I execute the following statements:  var string = "1 1 1 1 1 1 0 1 1" console.log(string) var strings = string.split(" ") console.log(strings) var numbers1 = strings.map(parseInt) console.log(numbers1) var numbers2 = strings.map(function(i){ return parseInt(i, 10) }) console.log(numbers2)   I get the following output in the console:  1 1 1 1 1 1 0 1 1 ["1", "1", "1", "1", "1", "1", "0", "1", "1"] [1, NaN, 1, 1, 1, 1, 0, 1, 1] [1, 1, 1, 1, 1, 1, 0, 1, 1]   I wonder why the second element in numbers1 is NaN. Why does it work on all the other elements except this one?

From the :  [1,4,9].map(Math.sqrt)   will yield:  [1,2,3]   Why then does this:  ['1','2','3'].map(parseInt)   yield this:  [1, NaN, NaN]   I have tested in Firefox 3.0.1 and Chrome 0.3 and just as a disclaimer, I know this is not cross-browser functionality (no IE).  I found out that the following will accomplish the desired effect. However, it still doesn’t explain the errant behavior of parseInt.  ['1','2','3'].map(function(i){return +i;}) // returns [1,2,3]


I 'd like to calculate the integral of the following expression in cube $$\int_{0}^{1}\int_{0}^{1}\int_{0}^{1}\left\{\frac{y}{x}\right\}\left\{\frac{z}{y}\right\}\left\{ \frac{x}{z}\right\}\,dx\,dy\,dz$$ When I calculate this integral I finally find that this integral has the relation with the infinite sum of $1/n^3$ But I don't know the exact way to calculate this some. Any one can help me to find the answer?

$$\begin{equation}     \int_{0}^{1}\int_{0}^{1}\int_{0}^{1} \left\{\frac{x}{y}\right\} \left\{\frac{y}{z}\right\}\left\{\frac{z}{x}\right\} dx\space dy\space dz \end{equation}$$  I am struggling with the above, I can deal with the case of double integrals but here due to my poor knowledge of triple integrals I am unable to decide what the limits should be in the transformed integral when I apply the substitution $\displaystyle \frac{x}{y}=u\space,\frac{y}{z}=v $ .  The integral turns to $\displaystyle \iiint \left\{u\right\}\left\{v\right\}\left\{\dfrac{1}{uv}\right\}z^2v\space du\space dv\space dz$ , but I have no idea about the limits.   Or even I am doing some mistake in these  steps only.   {.} Denotes Fractional Part


Sorry for my simple question but it is important . I have many ideas for ubuntu . How can I give them all to ubuntu team . Is there Any webpage for that Or just an email ?

Where can I send feature requests? Both for Ubuntu as a whole and individual (supported) apps?


I have a 3d face and i need to animate it like blinking eyes, and i do not know how to do it using bones. I tried to set weights to the mesh and an error appears. .

Here is the .  Picture:   It's nothing special but I cant figure out why I get problems rigging this mesh. It would be important and a great Help! Thanks for reading and I know there are a lot of guides answering this question but I tried all and it doesn't seem to work.


Watching one of the shows on discovery channel, I got to know that during the starting phase of universe its speed should have been faster then speed of light. But then didnt einstein say that nothing can go faster then the speed of light. IF it is true then the universe should have not expanded at that rate? note that I searched for this post but couldnt find any that solves my questions, except for one which is closely related to my question "Why is the age of universe 13.7 billion years?" Thank You

just after the Big Bang and before inflation the currently observable universe was the size of a coin. One millionth of a second later the universe was the size of the Solar System, which is an expansion much much faster than speed of light. Can space expand with unlimited speed?


I have some spare keys that I want to trade for an unusual hat.   What are the prices of all the unusual hats? And is there an unusual within the price range of 5-10 keys?

As someone who doesn't play Team Fortress 2, I occasionally get people asking me to trade, but I have no idea what's a "fair" price for these items. I don't really get this whole trading thing (I've seen people ask for "63 buds", I have zero idea what that means), but I don't want to get ripped off.   Some recent  examples would be:        How can I figure out how much an item is worth? What "lingo" do I need to know in order to trade?


sample_dir |-- cambridge |   |-- library |   `-- security |       |-- annex |       `-- parking |-- faculty |-- history.online |-- markham |   `-- annex |-- oxford |   |-- outline.doc |   `-- programming |       `-- report.pdf `-- stenton     `-- lib_arts         |-- english.txt         `-- match.doc   Your current directory is stenton. Make a copy of the file named parking (from the security directory), name it parking2, and place it in your current directory, using relative pathnames:

I have read about copying files with terminal but these examples will help me a lot. So here is what I want to do:  Examples:   I have a file in /home/levan/kdenlive untitelds.mpg and I want to copy this file to /media/sda3/SkyDrive and do not want to delete any thing in SkyDrive directory. I have a file in /media/sda3/SkyDrive untitelds.mpg and I want to copy this file to /home/levan/kdenlive  and do not want to delete any thing in kdenlive directory  I want to copy a folder from home directory to sda3 and do not want to delete any thing on sda3 directory and opposite I want to cut a folder/file and copy to other place without deleting files in that directory I cut it into.


This is just an idea I had while looking through some threads so take it as you will.   Given a plaintext of any length and a key that a specific hash function is capable of taking as input(I mention this as I know bcrypt has issues with extremely large inputs), what would be the potential issues/attacks of hashing the key and then xoring the resulting key with a plaintext block of the same length? For the next block you would hash the previous hash created via the key and xor that with the next plaintext block. Repeat till you reach the end of the plaintext, pad it to the needed length, and commit the last xoring  I would imagine that it would make for a high speed stream cipher that is reasonably capable as long as the initial key is sufficiently strong.  Thanks.

I've come up with this little routine for doing encryption using the SHA-2 (in this case SHA-256) hash function. As such it is a block cipher with a 256 bit (32 byte) block size and an arbitrary key length. It's easy to see that you could replace the hash function and get an entirely new type of algorithm.  I want to know if there are any problems, especially flaws, in this construction, and whether algorithms of this type have been studied.  Initialization with key:  $$ S_0 = H(k) $$  Encryption for plaintext blocks $P_1, \dots P_n$:  $$ S_i = H(S_{i-1})$$   $$ C_i = P_i \oplus S_i $$  Decryption for ciphertext blocks $C_1 \dots C_n$:  $$ S_i = H(S_{i-1})$$   $$ P_i = C_i \oplus S_i $$  Here is some sample C source code using SSL:  #include <openssl/sha.h>  struct sha_crypt_state {     unsigned char digest[SHA256_DIGEST_LENGTH]; };  void sha_crypt_set_key( sha_crypt_state *state, unsigned char *key, int key_length ) {     SHA256( key, key_length, state->digest ); }  void sha_crypt( sha_crypt_state *state, unsigned char *block ) {     sha_crypt_state temp;     SHA256( state->digest, sizeof(state->digest), temp.digest );     memcpy( state->digest, temp.digest, sizeof(temp.digest) );      for ( int i = 0; i < sizeof(state->digest); ++i ) {         block[i] ^= state->digest[i];     } }  void sha_crypt_test() {     const char *key = "secret";      // prepare a test block     char block[SHA256_DIGEST_LENGTH];     memset( block, 0, sizeof(block) );     strcpy( block, "Hello, testing encryption!" );      // test encrypt     sha_crypt_state state;     set_key( &state, (unsigned char *)key, strlen(key) );     sha_crypt( &state, (unsigned char *)block );      // test decrypt     set_key( &state, (unsigned char *)key, strlen(key) );     sha_crypt( &state, (unsigned char *)block ); }


I bought a bluetooth headset and Im trying to connect it to my ubuntu computer, the problem is, first time I tried it showed my device under Device Search but when I selected the device and then clicked next it said failed to connect and now it doesn't even show the device anymore, I have Ubuntu 15.04, the headset works fine with my phone.  These are some outputs:  victor@victor-G46VW:~$ pactl list short | grep -i bluetooth 7   module-bluetooth-policy      8   module-bluetooth-discover     victor@victor-G46VW:~$ uname -a; lspci -nnk | grep -iA2 net; lsusb; dmesg | grep -i bluetooth; dmesg | grep -i firmware; lsmod | grep bluetooth Linux victor-G46VW 3.19.0-47-generic #53-Ubuntu SMP Mon Jan 18 14:02:48 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux 03:00.0 Network controller [0280]: Broadcom Corporation BCM4352 802.11ac Wireless Network Adapter [14e4:43b1] (rev 03)     Subsystem: AzureWave Device [1a3b:2123]     Kernel driver in use: wl 04:00.0 Ethernet controller [0200]: Qualcomm Atheros AR8151 v2.0 Gigabit Ethernet [1969:1083] (rev c0)     Subsystem: ASUSTeK Computer Inc. Device [1043:200f]     Kernel driver in use: atl1c Bus 004 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 005: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader Bus 003 Device 004: ID 13d3:5188 IMC Networks  Bus 003 Device 003: ID 13d3:3404 IMC Networks  Bus 003 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 002: ID 046d:c526 Logitech, Inc. Nano Receiver Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub [    4.591161] Bluetooth: Core ver 2.20 [    4.591176] Bluetooth: HCI device and connection manager initialized [    4.591181] Bluetooth: HCI socket layer initialized [    4.591184] Bluetooth: L2CAP socket layer initialized [    4.591191] Bluetooth: SCO socket layer initialized [    4.643538] bluetooth hci0: Direct firmware load for brcm/BCM20702A0-13d3-3404.hcd failed with error -2 [    4.643543] Bluetooth: hci0: BCM: patch brcm/BCM20702A0-13d3-3404.hcd not found [    6.673533] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [    6.673536] Bluetooth: BNEP filters: protocol multicast [    6.673541] Bluetooth: BNEP socket layer initialized [    6.681066] Bluetooth: RFCOMM TTY layer initialized [    6.681073] Bluetooth: RFCOMM socket layer initialized [    6.681078] Bluetooth: RFCOMM ver 1.11 [    0.246266] [Firmware Bug]: ACPI: BIOS _OSI(Linux) query ignored [    1.615916] psmouse serio4: elantech: assuming hardware version 4 (with firmware version 0x460f02) [    4.643538] bluetooth hci0: Direct firmware load for brcm/BCM20702A0-13d3-3404.hcd failed with error -2 bluetooth             491520  22 bnep,btusb,rfcomm

Bluetooth is on but can't find or be found by any other devices.  Output of sudo service bluetooth status:  ● bluetooth.service - Bluetooth service    Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)    Active: active (running) since ხუთ 2015-06-04 22:33:18 GET; 13min ago  Main PID: 26678 (bluetoothd)    CGroup: /system.slice/bluetooth.service            └─26678 /usr/sbin/bluetoothd -n  ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled   Output of lsusb:  Bus 003 Device 005: ID 0a5c:21d7 Broadcom Corp. BCM43142 Bluetooth 4.0   How can I fix it?


Suppose that I have a linear regression: $ y = \beta_{0} + \beta_{1}x_{1} + \beta_{2}x_{2} + \epsilon $ I would like to demonstrate that one regression coefficients is significantly greater than the other:  $H_{0} = \beta_{1} > \beta_{2}$ or $H_{0} = \beta_{1} - \beta_{2} > 0$. Therefore, I would conduct a t-test: $t = \mu_{d} / \sigma_{d} $  with $\mu_{d} = \beta_{1} - \beta_{2} $ and $\sigma_{d} =  \sqrt{\sigma_{\beta_{1}}^2 + \sigma_{\beta_{2}}^2 - Cov(\beta_{1}, \beta_{2})}$ and $Cov (\beta_{1}, \beta_{2}) = \sigma_{\beta_{1}} * \sigma_{\beta_{2}} * \rho_{\beta_{1}, \beta_{2}} $ As $\beta_{1}$, $\beta_{2}$, $\sigma_{\beta_{1}}$ and $\sigma_{\beta_{2}}$ are known from the regression results, the only mising part is the correlation of $\beta_{1}$ and $\beta_{2}$. However, I don't know how this can be computed and would be really thankful for any help!

I am reading a book on linear regression and have some trouble understanding the variance-covariance matrix of $\mathbf{b}$:    The diagonal items are easy enough, but the off-diagonal ones are a bit more difficult, what puzzles me is that  $$ \sigma(b_0, b_1) = E(b_0 b_1) - E(b_0)E(b_1) = E(b_0 b_1) - \beta_0 \beta_1 $$  but there is no trace of $\beta_0$ and $\beta_1$ here.


It seems to me that if $f^{'}$ exists in an open interval $I$, then $f^{'}$ is continuous in the interval.  I can't come up with an example that $f^{'}$ exists, but $f^{'}$ not continuous.  Thanks for your help in advance.

Let $f(x)$ be a real-valued differentiable function on an interval $I$ of $\mathbb R$, then is $f'(x)$ necessary to be continuous? I don't think so and I'm trying to construct a counterexample. $\sin\frac{1}{x}$ may be the key element but $x\sin\frac{1}{x}$ failed me.


Give a combinatorial proof that $\displaystyle\sum_{i=0}^n {n+i\choose i}\frac{1}{2^i} = 2^n$.  I'm not sure if Pascal's identity is useful here. Or perhaps there is a way involving binary strings? $2^n$ is the number of binary strings of length $n$, so if there was some way to decompose these strings into disjoint sets $B_i$ with cardinality ${n+i\choose i}\frac{1}{2^i}$, a proof using that method might work. ${n+i\choose i}$ is the number of binary strings of length $n+i$ with exactly $i$ ones, since one can choose $i$ of the $n+i$ positions to be ones in ${n+i\choose i}$ ways and make the rest zeroes in one way. Then we divide by the number of binary strings of length $i$, though I'm not sure how to deduce the combinatorial significance of this. I'm most likely thinking of this the wrong way.

How does one show that $$\sum_{k=0}^{n}\binom{n+k}{k}\frac{1}{2^k}=2^{n}$$ for each nonnegative integer $n$?  I tried using the  but I guess I am applying it incorrectly. With the snake oil technique we have $$F(x)= \sum_{n=0}^{\infty}\left\{\sum_{k=0}^{n}\binom{n+k}{k}\frac{1}{2^k}\right\}x^{n}.$$ I think I have to interchage the summation and do something. But I am not quite comfortable in interchanging the summation. Like after interchaging the summation will $$F(x)=\sum_{k=0}^{n}\sum_{n=0}^{\infty}\binom{n+k}{k}\frac{1}{2^k}x^{n}?$$ Even if I continue with this I am unable to get the correct answer.  How does one prove this using the Snake oil technique?  A combinatorial proof is also welcome, as are other kinds of proofs.


I have been reviewing flags and the vast majority are flagged as "Not an answer". However, many clearly represent attempts to answer the question (even though they mostly fail with very poor quality answers).   So I disagreed and flagged them as "Invalid flags", but this almost always gets disputed.   I read  But this doesn't seem to answer my question. Am I correct what I'm doing or not?  Examples:        I can understand that these answers may not be good quality and could be flagged as such, but they are certainly "answers".

What is the "Not an Answer" flag and what is its purpose? When should I use this flag? When should I not use this flag? But I'm still not sure if I'm using the flag correctly... An answer is "Not an Answer", but the flag was declined or disputed!   See also:


I'm wondering if I've got the right strategy at all. There seems to be an awful lot of (admittedly fun) grinding and no visible end in sight to get to complete the story. How long, rough average, in hours, does it take to beat Disgaea?  Are the figures shown  believable? I'm doubtful for story mode...

I'm going down my huge backlog of unplayed Steam games and I'm thinking the best way to tackle the list is to go through the shortest games first and then concentrate on the 20+ hour ones. I'm wondering if there's a website or something else that has an estimated amount of gameplay time for games.   Is there anything like that?


I remember exceedingly little about this story. I think it was some sort of sci-fi.   Written circa 2000 +/- 10. Two main characters are young adult males in modern day USA. When telecommunicating (phone? email? text?) they use a particularly absurd slang, where the code phrases sound blatantly criminal. For example, if one wants the other to go to the bar, he might say "Let's assassinate the President tonight".

I'm looking for a weird film with people using drugs in order to access some kind of super power to fight evil.    My brain cannot put a title on it because the title was not related to the movie, and the only description of the movie I can think of is, "shooting up wasabi, fighting a frozen chicken meat demon, matrix dodges, gunfire, arachnids, the end of the world, a dog catches the ball, the end".  The dog catching the ball was an important part of the movie, or perhaps eating it.   I saw it around 2008. It was Direct to DVD, not a theater film, a . Psychedelic.   If Raoul Duke (Johnny Depp) from Las Vegas Parano took drugs after reading H. P. Lovecraft, with The Matrix playing on the TV, while he was petting his dog, the dream that would result would be the movie.


Is the  actually a principle of least action or just one of stationary action? I think I read in Landau/Lifschitz that there are some examples where the action of an actual physical example is not minimal but only stationary. Does anybody of know such a physical example?

In  it is discussed why by Hamilton's principle the action integral must be stationary. Most examples deal with the case that the action integral is minimal: this makes sense - we all follow the path with the least resistance.  However, a stationary point can be a maximal or minimal extremum or even a point of inflexion (rising or falling). Can anybody give examples from theory or practice where the action integral takes on a maximal extremum or a point of inflexion?


Trying to export a finished map to .pdf - view is correct in Print Composer and in program window but when I open the exported .pdf the view is not correct. Shapes and boundary lines are shifted from the correct position on Google aerial imagery. No luck exporting as an image, printing as Adobe PDF etc.Help!

I am having serious problems in exporting a map (Google satellite map) linked to QGIS.   Using the print editor I clearly see the part of the map I want to print and also in the right scale, but when I save it as jpeg, the result is: the correct map in a circle in the middle of the page, and all around it seems that Qgis is zooming at different scale on another part of the map [see attached file].  Any suggestion about it ? I don't want to save it as simple screenshot  because I need an HD file.   ]


I have a question given to me by a friend.  Prove that $\frac {(m,n){n\choose m}}{n}$ is an integer for all integers $n\ge m\ge1$. Any hint??

Prove that for every $n\geq m \geq1$ natural numbers, the following number is an integer:  $${\gcd(n,m)\over n}\cdot{n\choose m}$$  Where $\gcd$ is the greatest common divisor.  I tried to make it simpler by cancelling the $n$ from the left side, and making it $(n-1)!$ on the right: $\gcd(n, m) \cdot \frac{(n-1)!}{m!(n-m)!}$, but can't really go further.   This was problem B-2 on the .


Well, I have come to understand persons with the following traits will be usually be Sorted to Slytherin   Resourcefulness  Cunning Ambition Leadership Qualities Self-Preservation Determination  Cleverness Fraternity  Power   On which trait(s) was Snape Sorted into Slytherin?  One more point: Lily Evans was Sorted before Snape, and when she was placed in Gryffindor, obviously Snape wanted to be in Gryffindor too, because Lily is his only friend.   So why is he Sorted into Slytherin? Is there a stronger reason for the Sorting Hat to override his preference and Sort him into Slytherin?

The Sorting Hat says:      You might belong in Gryffindor   Where dwell the brave at heart   Their daring, nerve, and chivalry   Set Gryffindors apart . . .       Sorcerer's Stone - Page 118 - US Hardcover   Are there any canon examples of Peter Pettigrew displaying any of the aforementioned traits in a positive way? My sense is that Godric Gryffindor's definitions of "daring" and "nerve" did not include a person joining a group like the Death Eaters.


This is a shortish (maybe novella-sized) story about two kids in school who get sent to the principal's office for fighting. Instead of entering the office, they are transported to some sort of magical land. They get some magical equipment, like a bowl in which food appears when the bearer needs to eat. There is speculation by the kids that earth technology (specifically, television was mentioned) wouldn't work in that world, symmetric to how we don't have magical food bowls in our world. The kids have to work together to defeat some sort of enemy. I recall they have two halves of a disc (shaped maybe like a yin and a yang) that they have to fuse together and use as a discus sort of weapon. Upon doing working together to do so, I think they also fuse together into one person who grows huge and is able to fight the monster (which I can't remember any details of). When they get back to our world, they find no time has passed and they're still in front of the principal's office door, but they no longer hate each other.  I remember reading this in seventh grade (1993).

Read this as a kid in the early 80s.  Two boys in our world get in a fight at school, but when they enter the principal's office they are transported to a parallel world. As I recall, they had to work together to save that world by finding several magic items (one was a thread, I think?). And in that world math and poetry were magic?  Anyone remember this?


I want to make a map using ArcGIS and for that I need the limits of the cities of the area. Where I can get shapefiles for cities in the US?

Where can I find a shapefile that contains boundaries for the major cities in the United States?  I have tried the census website but could not find anything.


I have the following SQL query and I would like to output the ageOnLastSeptember date in a UK (dd/mm/yyyy) format. Can anyone tell me how I can achieve this?  $sql="select ( if(month(now()) < 9, year(now()) - 1, year(now())) - year(dob) - if(month(dob)<9, 0, 1)  ) as ageOnLastSeptember,first_name,last_name,dob,school,contact_no,family_id,contact_id from members_family where contact_id = '$contact_id' ";   I tried the following but it did nothing  $sql="select date_format(( if(month(now()) < 9, year(now()) - 1, year(now())) - year(dob) - if(month(dob)<9, 0, 1)  ), '%d/%m/%Y') as ageOnLastSeptember,first_name,last_name,dob,school,contact_no,family_id,contact_id from members_family where contact_id = '$contact_id' ";

I have a datetime column in MySQL.   How can I convert it to the display as mm/dd/yy H:M (AM/PM) using PHP?


I'm modelling a bottle shape. And when I add the subdivision modifier the top and rear of the bottle has its surface seem pinched non smooth (although I have added shade smooth). So I delete the top face, select the vertices and do a grid fill which can be seen in the image attached. But when I increase the viewport quality in my subdivision modifier the top of the bottle seems more square than circle.  What's the best modelling tip so the top of the surface doesnt make that pinched surface?  Thank you.

My problem is simple. I think that the strange deformations on the top are there because there are so many vertices in one face. How do I fix this while maintaining nice topology?  Although I triangulated the top polygon, the problem still persists.


I'm new to blender and about to get a 2020 iMac.  CPU 3.8GHz 8-core 10th-generation Intel Core i7 GPU Radeon Pro 5700 XT 16GB  Is it possible to render with the GPU and CPU simultaneously on this iMac? Many thanks! :) Lee

I am considering purchasing a Mac for my godson who will be using it to run Blender 2.8.  I know very little about this program.  All I can find are requirements for a Mac that will run earlier versions of Blender.  Would someone please recommend a list of requirements for a Mac (or a link to a list of requirements) that I could use to find a model that can run 2.8?  Thank you in advance for all your help! Sincerely, M. Lap


I'm quite new to photography in general I've mainly in the past tried to get killer camera phone shots, now the missis has just got me a used d3200 for my birthday, it's body only so has no lens I'm looking at picking up a cheap 18-55mm vr for it to be going on with and keeping my eye out for bargains, but also I'm looking at some sort lenses for the olden film days any advice appreciated.  I've read that Sir lenses are obviously missing features like auto focus which I don't find a problem, metering and iso etc I would like to learn more about and I think an sir lens is a good way to go about it and they seem pretty cheap, my main question is will all nikon lenses fit (presuming their all F-mounts?)  thanks..

I'm looking at buying a new SLR body. I have an old film Nikon entry-level SLR (about ten years old) with a kit lens. If I buy a Nikon body, how likely is it that my old lens will work on it? Would I be better off buying a new lens?


Find all integer values of $a$ such that the quadratic expression $(x+a)(x+1991)+1$ can be factored as a product $(x+b)(x+c)$ where $b$ and $c$ are integers.  I tried expanding the brackets and equating it with $(x+b)(x+c)$ : $x^2 + 1991x + ax+1991a + 1 = x^2 + cx + bx + bc$ $=>(1991+a)x + (1991a+1)  = (c+b)x + bc$ If I equate corresponding coefficients, I get two equations with three unknowns. What is the "proper" approach to solve such problems ? EDIT : This problem has been taken from a math contest "RMO" held in the year 1991. So I think this problem can be generalized for the expression $(x+a)(x+\lambda)+1$. How to solve it in that case ?

Find all integer values of $a$ such that the quadratic expression $(x+a)(x+1991)+1$ can be factored as a product $(x+b)(x+c)$ where b and c are integers.   I tried to do it by comparing the two expressions but I can't proceed.


Is there a way to redirect an entire domain to another domain through one CNAME record?  For example [anyhost].domain1.com pointing to [anyhost].domain2.com where no matter what host name I enter in domain1.com it will point to the actual ip address of the SAME host name in domain2.com.  If I ping www.domain1.com it will resolve to www.domain2.com's ip address. Or if I ping mail.domain1.com it will resolve to mail.domain2.com's ip address, and so on.  I know I can enter a CNAME record for each host in domain1.com but that is tedious. Some of the other questions asked in this area shows answers where a specific ip address is used for a default for the domain and that is not what I am looking for as an answer.  Incidentally, I tried using CNAME *.domain1.com *.domain2.com and it didn't work.

Is it possible to set a CNAME record at the top of a domain? (i.e. @ CNAME www, @ CNAME foobar.com., etc.)  My ISP says that it's only possible to use CNAME's for subdomains but I've read somewhere else that is should be possible even if not recommended.


As user can add any image for his profile which can be offensive or disgusting by accepted standards of morality and decency like obscene, vulgar, immoral, dirty etc.  So Stack Exchange have any guidelines or regulations that deals with using profile image? Or user is free to use any kind of image for profile.

There are already at least a couple of questions (, ) about how to handle potentially inappropriate profile pictures, but the answer given in both cases (and other duplicates of those) essentially comes down to "flag it and let the moderators deal with it." Well, as a moderator, how exactly am I supposed to deal with it? As far as I can tell, Stack Exchange does not have a clear policy about what sorts of images are inappropriate. The closest thing is this clause in :  Subscriber represents, warrants and agrees that it will not contribute any Subscriber Content that [...] (d) is libelous, defamatory, abusive, threatening, harassing, hateful, offensive or otherwise violates any law or right of any third party....  but people do not always agree on what constitutes hateful or offensive content, or even on what constitutes libel or defamation (considering the prevalence of lawsuits). I don't think it's reasonable that my own opinions on the topic should be the basis for judging whether a picture is acceptable or not, simply because I'm the one tasked with handling (or not handling) the flag. I'd like to establish a more specific policy to guide moderators tasked with handling potentially inappropriate profile pictures. Certainly I'm not suggesting we set up an exhaustive list of inappropriate profile pictures, but something more than what is in the ToS would be useful. For example: "X, Y, and Z are always inappropriate; for anything else, defer to the community team," with specific details about what X, Y, and Z are. I have my own ideas, but I'll omit them to avoid influencing the responses.


Father entered Bavarian army in WW1 in Germany on August 30, 1914.  He was in E/R 14, taken prisoner and sent to Normandy, France on a farm.   Where was the farm?

Where can I find information on German soldiers from World War I and World War II?   I am curious to find out about my ancestors' role in the wars, i.e. what rank they had, where they where fighting, with whom and anything else.


I want to know if I can search Stack Overflow users by their country. For example, I had, like, to see all users who live in the UK.  How do I do this?

I want to find Stack Overflow/Exchange users in my area.   Is there an easy way to do that?


Logarithms are a weak point for me and I'm curious how my professor went from the following logarithm to the next one. How are they equal? $$ 3^{\log_4 n} = n^{\log_4 3} $$  And does that mean I can change $2^{\log_2{n}}$ to $n^{\log_2{2}}$?

I got this from "4.4 The recursion-tree method for solving recurrences" in book "Introduction to Algorithms"  The recurrence that try to use recursion-tree to solve is: $T(n) = 3T(n/4) + cn^2$


I downloaded a sonic model from sketchfab and added all the textures, then checked the other things that came with it, many where images that seemed to have something to do with the textures, but I'm not really sure what they're exactly supposed to do  Here's the link for the model:

I created some texture maps in MindTex to use in Blender, but I can't figure out how to properly hook them up. The maps I have:  - Diffuse  - Normal  - Height   - Specular   - Gloss   - Self Illumination  - Reflection  - Ambient Occlusion   MindTex (left) vs. Blender (right)  As you can clearly see it's a pretty big difference.  is my material node setup in Blender. In the examples I don't actually use self illumination or reflection images, but including this in the answer would be helpful.


Im currently writing a program for a uni asssessment and they have a set line to compile it, so if it doesn't work with that it won't be accepted.  They command they use is  gcc -Wall -ansi -lm program.c -o program.out   My program will not compile that way, and it'll give me a undefined referance error (Referring to my log10 using math.h library) if i use:  gcc -Wall -ansi program.c -o program.out -lm   it works  What could be my issue?  Im using windows 10 64bit and have windows bash installed and gcc.

Why does the order in which libraries are linked sometimes cause errors in GCC?


I'm using a Surface Pro 3 running Windows 10 and I have 14GB Free on my C:\ drive. But whenever I shrink it it only says I have 941MB avalible to shrink.

I have just bought an HP laptop with Windows 7 (64 bit). It has a 500 GB HDD with three partitions: a small hidden system partition, a 12 GiB HP recovery partition, and a 450 GiB C: boot partition.  I would like to split this large C: partition into two partitions, leaving only 100 GiB for the system, and giving the rest to a new data partition.  Although the Windows built-in Disk Management utility has an option to shrink the bootable partition, it only allows me to shrink it roughly by half, even though only 20 GiB on the partition is used. As far as I understand, system unmovable files lie in the middle of the partition, preventing Disk Management utility to do what I want.    And since new HP laptops don't come with OS installation disks (they only allow you to create recovery disks yourself), I can't just repartition HDD and then reinstall OS.  So, is there a way to shrink the C: bootable partition and preserve Windows 7 working?  P.S.: I have tried to use the third-party  utility, and after shrinking the partition, Windows 7 stopped booting, with a . System recovery didn't work, and I had to do factory recover. Since this is a long process, I would like to avoid doing it again :) So, please, suggest only proven solutions.


If we create an empty dictionary, like: idict = {}, how many spaces are assigned for this dictionary ? I know for the list, if we initialize a list like ilist = [], it will always over-allocate the size, first is 4 space, then 8. What about a dictionary ?

Does anyone know how the built in dictionary type for python is implemented?  My understanding is that it is some sort of hash table, but I haven't been able to find any sort of definitive answer.


I am having lots of troubles unwrapping an object. I tried to start simple by selecting only part of the object and unwrapping that, but even something simple is not turning out intended.  Here is the simple part of the object being unwrapped:    I have tried Applying the Scale, using Ctrl-A > Scale and I have marked seams as shown below:    And here are the UVs after choosing "Unwrap" from the "UV Mapping" menu:    I have no idea why it looks this way. Can anyone add any insight?  Thanks!

I'm having problems using the UV mapping in blender 2.67. Specifically, I am trying to unwrap a really simple mesh, but the UV map is still giving me a net where some of the boxes are completely out of proportion to the others, which causes the texture to stretch horribly. Here is a picture to illustrate:    The mesh only has those three faces you can see in the picture, and the single seam on the front corner. It's a trivially simple mesh, so I really don't understand why the two side faces are being stretched in the UV map to be the same size as the top face. I've tried clicking the average islands scale button as suggested by some of the answers to other questions but that has no effect. It's frustrating because it seems so simple.  Hopefully someone can show me the presumably simple mistake I am making!  Edit: Just to make this clearer, I have already added a seam as the first answer suggests i do. Hopefully this picture will make that clearer, the yellow arrow is pointing to the edge i seamed. The mesh is only three faces so should only need this single seam. The image shows the mesh from infront and behind/underneath so it should make more sense.    Double Edit: One more picture for clarity on the seam issue. The mesh is unfolding correctly, it is just the scale of the unfolded map that is incorrect (in relation to one another)


I am running Ubuntu 18.04 but there is no disk writing tool like Brasero  disk burner present.

I have tried countless cd/dvd burning software on ubuntu 12.04 and none of them work for me,  any ideas guys?   I've tried tovidgui, bombono dvd,and mestelix, they are all so very confusing is there any program like dvdflick that is just straight to the point?


I am coming from java, and I cannot figure this out. I am trying to concatenate strings to run a command with parameters using the system function, this is what I am doing, but it is not working:   system("command "+param1+" other stuff "+param3);

I'm working in C, and I have to concatenate a few things.  Right now I have this:  message = strcat("TEXT ", var);  message2 = strcat(strcat("TEXT ", foo), strcat(" TEXT ", bar));   Now if you have experience in C I'm sure you realize that this gives you a segmentation fault when you try to run it. So how do I work around that?


What is the easiest (preferably inductional) way without approximation of the sum_ to prove the following inequality: $\frac{1}{1^2}+\frac{1}{2^2} + \ldots +\frac{1}{n^2} \le 2 - \frac{1}{n}$

Having the following inequality  $$\frac{1}{1^2}+\frac{1}{2^2}+\frac{1}{3^2}+\ldots+\frac{1}{n^2}<2$$ To prove it for all natural numbers is it enough to show that:  $\frac{1}{(n+1)^2}-\frac{1}{n^2} <2$  or  $\frac{1}{(n+1)^2}<2-\frac{1}{n^2} $


So i'm trying to have the user input a string, print it backwards and then compare the new strings to see if it is a palindrome or not... It doesn't seem to be working and i'm not sure why...  public static void main(String[] args) {     Scanner input = new Scanner (System.in);     System.out.print("Enter a word: ");     String word = input.next();     StringBuilder drow = new StringBuilder(word);     drow.reverse();     System.out.println(drow);     System.out.print(" ");     String X = drow.toString();     if (word == X) {         System.out.println("That word is a palindrome");  } else {     System.out.println("That word is not a palindrome"); }   Thanks for any help to why this isn't working...

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?


I have a host1 that has a WAN interface eth0 (1.2.3.4) and a LAN interface eth1 (10.41.82.1). Inside the LAN is a host2 with the IP address 10.41.82.2.  Incoming connections to 1.2.3.4:22 are forwarded to host2 using the following iptables rules on host1:  root@host1:~# iptables -t nat -A OUTPUT     -d 1.2.3.4 -p tcp --dport 22 -j DNAT --to 10.41.82.2:22 root@host1:~# iptables -t nat -A PREROUTING -d 1.2.3.4 -p tcp --dport 22 -j DNAT --to 10.41.82.2:22   This works fine, except when host2 is trying to access 1.2.3.4:22:  root@host2:~# telnet 1.2.3.4 22 Trying 1.2.3.4...  root@host2:~# ping 1.2.3.4 PING 1.2.3.4 56(84) bytes of data. 64 bytes from 1.2.3.4: icmp_seq=1 ttl=64 time=0.125 ms 64 bytes from 1.2.3.4: icmp_seq=2 ttl=64 time=0.279 ms  root@host2:~# tcptraceroute 1.2.3.4 22 traceroute to 1.2.3.4, 30 hops max, 60 byte packets  1  * * *  2  * * *  3  * * *  4  * * *  5  * * * (and so on)   It seems like the packets are being forwarded in a circle. As you can see, pinging works, so the routes and IP forwarding are set up properly.  What did I do wrong and how can I fix the problem?    UPDATE:  As mentioned in BillThor’s response and as is described in the , I need to add an SNAT rule. I have done this now (note that I have added the LAN address of host2 for -d, as this rule is applied in POSTROUTING where the destination of the packet has already been changed):  root@host1:~# iptables -t nat -A POSTROUTING -d 10.41.82.2 -p tcp --dport 22 -j SNAT --to 10.41.82.1   Unfortunately, this does not solve the problem, and everything is still the same as described above. Interestingly, the SNAT rule never seems to be matched, according to the counters shown when running iptables -t nat -nvL.    UPDATE 2:  I discovered that when I run tcpdump -i eth1, even when I run it with parameters irrelevant to this case, such as tcpdump -i eth1 port 34238, it suddenly works. But only while tcpdump is running.  What I didn’t mention so far because I thought it was irrelevant is that eth1 is actually a bridge, and host2 is a Xen domain. I am starting to suspect that my problem might be related to this.

This is a  about Hairpin NAT (Loopback NAT).   The generic form of this question is:  We have a network with clients, a server, and a NAT Router. There is port forwarding on the router to the server so some of it's services are available externally. We have DNS pointing to the external IP. Local network clients fail to connect, but external work.   Why does this fail? How can I create a unified naming scheme (DNS names which work both locally and externally)?   This question has answeres merged from multiple other questions. They originally referenced FreeBSD, D-Link, Microtik, and other equipment. They're all trying to solve the same problem however.


I noticed that there are a lot of questions similar to mine on here, but I couldn't find the one that solves my issue. I have posted the image below:    I want to increase /dev/sdb12, but it won't let me use the allocated space, what should I do in this case?

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


I can query data from the database use mysqli, output to Twig and create a table, and words with characters with accents(À, Í, etc) are not displayed.  The array can be displayed through a var_dump perfectly. So somewhere in Twig is it going awry.  I have:   A database with data in Spanish PHP Silex/Twig A table schema in utf8, with text being displayed correctly.   I have tried:   mb_convert_encoding before sending it to Twig convert_encoding('iso-8859', 'UTF-8') in Twig   I am at a loss as to what to do next, nor why it is not working. If anyone knows why the entire word disappears, that would be great.  Template Example:  {% if results %}

             {{ "First Name"|trans }}	             {{ "Second Name"|trans }}</T>	             {{ "First Surname"|trans }}	             {{ "Second Surname"|trans }}	             {{ "Number"|trans }}	             {{ "Type"|trans }}	             {{ "District"|trans }}	             {{ "State"|trans }}	             {{ "City"|trans }}

         {% for r in results %}
             {{ r.first_name }}	             {{ r.middle_inital }}	             {{ r.surname }}	             {{ r.second_surname}}	             {{ r.number }}	             {{ r.type }}	             {{ r.district }}	             {{ r.state }}	             {{ r.city|capitalize }}
         {% endfor %}

 {% endif %}   Array is passed from a mysqli query to a variable. Text book example.

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I just want to know if its possible. I have only two in my general area and I would like too add some if possible. This is probably a really stupid question but i'm just curious.

After playing the game for a little while, I've noticed that Pokestops are chosen seemingly at random locations on the map. A few of them are even in inaccessible places; an abandoned church building, inside of an airforce base, etc. How are these locations chosen as Pokestops?


He is working his field and digs up a large object that seems to be humming. There is an opening in the case, so he inserts a piece of lumber and it spins with such torque that it almost kills him. I cannot remember how the story ends. I read it in the mid 1960's.

SF novel which starts with a one-armed main character, who is very strong, out riding his horse and finds a donut shaped engine.  He proceeds to dismount by grabbing the saddle horn with his one hand and lifting himself out of the saddle to investigate.   After an interesting result from jamming a branch in the donut hole he takes it to a shed to investigate.    I can't remember the title or author.  Remember more story if needed although the opening scene is striking enough that I suspect more isn't needed.


I've got a big disk worth few TBs ( 5 TBs ) and i need fill up this disk space to about 95%, this is a linux centos box.  I've tried dd as in  dd if=/dev/zero of=o_File1.img bs=209715200 count=1000   even tried running in a loop like   #!/bin/bash  count_=0 parallel_=10  BS=2097152000 COUNT=100 while [ $count_ -lt $parallel_ ] do         file="Dummy_DD_BS_"$BS"_$(date +%Y%M%d%H%m%s)_$count_.img"         echo $file         `dd if=/dev/zero of=$file bs=$BS count=$COUNT > /dev/null 2>&1 &`         count_=$((count_+1)) done   but 5 TB seems like a hell lot.   is there a faster method, I'm Okay with any scripts python/perl/bash or anything, I'm looking for a fast optimized solution  Edit:  Okay so following the  did not really solve much anything     case 1 : dd    time dd if=/dev/zero of=filename10 bs=1G count=10     10+0 records in     10+0 records out     10737418240 bytes (11 GB) copied, 34.0468 s, 315 MB/s      real    0m34.108s     user    0m0.000s     sys     0m13.498s   so an estimated around 3 - 4  hours to fill this 5 TB      Case 2 : fallocate    fallocate failed: Operation not supported     its a custom file system not the popular ext*       Case 3 : truncate      this is the weirdest ones    it doesn't really fill the disk this seems to be just reserving the space for the file so definitely not suiting my requirements   so is there a better solution or I have to live with dd or create smaller partition to test this

How can I quickly create a large file on a Linux () system?   will do the job, but reading from /dev/zero and writing to the drive can take a long time when you need a file several hundreds of GBs in size for testing... If you need to do that repeatedly, the time really adds up.  I don't care about the contents of the file, I just want it to be created quickly. How can this be done?  Using a sparse file won't work for this. I need the file to be allocated disk space.


The Census OnTheMap download links seems regular in formatting .  This suggest someone may have already written an R package to download these files. Does such a package exist?  Other Comments:   I don't want Decennial Census, or ACS (or else I'd use totalcensus or tidycensus).  I already have the  (CSV).  Once I have a link, .    If not, how might I do so?  (I have a list of about 30 counties I wish to do it for). The links seem regular. Regular links, for SLC, Utah and Denver, Colorado:  https://onthemap.ces.census.gov/cgi-bin/report.py?report_id=otm_d2c5f4708fff45dd8a153aeea29b66ae&settings=%7B%22analysis_type%22%3A%22area_profile_report%22%2C%22view%22%3A%22summary%22%2C%22characteristic%22%3A%22c000%22%2C%22year%22%3A2015%2C%22job_type%22%3A%22jt00%22%2C%22ap_segment%22%3A%22s000%22%2C%22origin%22%3A%22work%22%2C%22color%22%3A%5B%22%230000AA%22%5D%7D&mode=export_geography&format=shp  https://onthemap.ces.census.gov/cgi-bin/report.py?report_id=otm_b874bc58baa84cbea0d57c2f654450ef&settings=%7B%22analysis_type%22%3A%22area_profile_report%22%2C%22view%22%3A%22summary%22%2C%22characteristic%22%3A%22c000%22%2C%22year%22%3A2015%2C%22job_type%22%3A%22jt00%22%2C%22ap_segment%22%3A%22s000%22%2C%22origin%22%3A%22work%22%2C%22color%22%3A%5B%22%230000AA%22%5D%7D&mode=export_geography&format=shp   The string for the download link consists of 3 parts, the first and third of which are identical, viz:   1)   2a) d2c5f4708fff45dd8a153aeea29b66ae  2b) b874bc58baa84cbea0d57c2f654450ef  3) &settings=%7B%22analysis_type%22%3A%22area_profile_report%22%2C%22view%22%3A%22summary%22%2C%22characteristic%22%3A%22c000%22%2C%22year%22%3A2015%2C%22job_type%22%3A%22jt00%22%2C%22ap_segment%22%3A%22s000%22%2C%22origin%22%3A%22work%22%2C%22color%22%3A%5B%22%230000AA%22%5D%7D&mode=export_geography&format=shp   In other words, is there a way to use R to automate a query on a webmap server?

I'd like to automate downloading point shapefile data from . There is a link which can be used to download the data, as provided below:    Is it possible to directly download this within R?  Other Comments:   I don't want Decennial Census, or ACS (or else I'd use totalcensus or tidycensus).  I already have the  (CSV).  Whilst this question is about using Census On the Map, is there an R package to do so?


I attacked someone that is prone. So I attack with advantage plus sneak attack. Then in his turn he leaves my space which grants me an opportunity attack.  Here's my question: does that opportunity attack grant me another sneak attack? Assuming he is in front of my ally too so he is distracted and he did not disengage.

PHB says 'once per turn,' so, it would seem that a Rogue with Sentinel, for example, could "consistently" deal Sneak attack twice per round (whether the enemy triggers an OA or the melee weapon attack provided by the Feat).  So, can rogues deal sneak attack damage with any weapon attack outside their turn? (obv. one that meets the standard requirements--finesse, adv or adj ally)


Other than the obvious first-degree family members, it is also indicated that the Prime Minister of the United Kingdom knows about the wizarding world.  Who else can be revealed to magic? Who's the one to decide (some specific entity in the ministry)?  Only one example, where the rules are blury, is asked already  if a wizard or a witch were dating a muggle, how soon would it be ok for them to share their secret? Do they have to wait until they are married first?

In the Harry Potter universe, if you're dating a Muggle, how long do you have to wait before the Ministry of Magic will let you disclose you're a witch or wizard without consequence?  Follow up, related questions   Would they have to get their memory wiped if you broke up? How would that work if there were kids involved?  Do the kids have to keep magic a secret from the oblivious parent or are they just sworn to secrecy?    ...It's hard to believe that no Muggle has ever tried to gain custody by telling the court his ex-wife is a witch.


I'm actually trying to pin down an anthology and this is the only story I can remember being definitely in it.  A boy (maybe called Christopher) is visited by aliens who agree to carry out his every wish.  He begins small but eventually is destroying cities with huge tsunamis that are being brought into being by the aliens, as per his request.  I seem to remember he knows he's doing it and there was an angle in the story explaining his nihilistic behaviour.  At the end the boy is on top of a hill looking out over the devastation he has caused (the Earth is now dead) and writes in the dust at his feet something along the lines of "I WAS (his name, possibly Christopher but not too sure).  The aliens depart and the final scene is them justifying their behaviour by stating that they are not monsters but just looking for a home.  If I can identify the story then I should be able to use isfdb.com to pin down the anthology.  The story is from the 1990s or earlier.

Looking to identify a short story I read in a sci-fi anthology as a child, about an angry, bullied somewhat misanthropic boy who is given immense near-omnipotent powers by an alien intelligence. I read this in English, sometime in the late 1990s/early 2000s. He goes on to use this power to destroy the human race, which causes him to age terribly in a very short amount of time. At the end of the story he is a lonely old man stripped of the powers he held briefly, and is alone on an isolated Earth. The aliens then proceed to invade Earth.


For some reason, I can't zoom in more. I'm on mac so i press cmd scroll but i can't zoom in. I can zoom out slowly but not in. Also, when i move my view (not sure if it is the right term), it goes way too fast, a slight scroll and it moves a lot. Also, when i use the hand to move, it goes EXTREMELy slowly Edit i think it's because i only zoom, so there's a point where it can zoom in anymore. Edit 2: I fixed it by toggling lock to object

I often find that I can zoom in to a point, but then cannot zoom any more, even when there is a lot of room to zoom to the meshes on the scene.   This is particularly annoying in the following scenario:  I often land up left clicking on the scene and the 3D cursor shifts there. I use Shift+C to shift the 3D cursor back to the origin. However, this also centers the view on the cursor and shifts the view to show all objects, and sometimes this zooms things way out – at this point, if I try to zoom in, I can zoom in to a point (using the pinch/zoom on trackpad), but then it stops zooming in.   How do I zoom in after that? Is there anything else I am doing wrong in this case?


I've created a topbar for my website that's displayed the whole time and added an image to it with  <img src="sites/default/files/MYFOLDER/IMAGE.png">   It looks great on the homepage, but when I for example visit a node, the image isn't found anymore. I guess this problem is caused by a wrong path, but I don't know how to fix it.  What's the correct relative path?

I created a block, in which an img with src="sites/mysite/files/imagename". It works every node, but failed loading in search page.  Is this an issue of Search module? Drupal 7, I hope, has a uniform url management, for example:   exapmle.com/files, exapmle.com/modules/Module_name, or exapmle.com/modules/core(Symbolic Link points to sites/all/modules) /Module_name   exapmle.com/themes/Theme_name, or  exapmle.com/themes/core(Symbolic Link points to sites/all/themes) /Theme_name ... ...


After enabling Locker service, javascript function from static resource is coming as undefined.    JS file:  function myFunc(){    return '1'; }   Lightning component:      <aura:component controller="AccController" implements="force:appHostable" access="global">         <ltng:require scripts="{!$Resource.AccLexJS}"           afterScriptsLoaded="{!c.controllerFunction}" />       </aura:component>   Lightning Controller:  ({     controllerFunction : function(component, event, helper) {          var action = component.get("c.getInitialVals");          action.setCallback(this, function(data) {            var JSreturnVal = myFunc();         });         $A.enqueueAction(action);     }  })   This results in following error:  This page has an error. You might just need to refresh it. Error in $A.getCallback() [myFunc is not defined]. I am defining or calling the method wrong?  If I copy paste the JS function in controllerFunction itself then it works with LockerService enabled.

I'd like to put some shared Javascript to Resource file to reuse it between several components. This Javascript is general purpose set of utility functions. However, functions from my resource file are not available from the Components. Static resource (named TestScript):  function helloWorld() {      return 42; }   Component:  <ltng:require scripts="{!$Resource.TestScript}" <ui:button label="Do job" press="{!c.doJob}"/>   Controller:  doJob: function(cmp, event, helper) {      var i = helloWorld();      // failed with Uncaught ReferenceError: helloWorld is not defined }   I don't like to use  <ltng:require scripts="{!$Resource.***resourceName***}" afterScriptsLoaded="{!c.afterScriptsLoaded}" />   because my static resource is a set of functions and I'd like just use them as functions later in my controllers. How can I achieve that (if possible)? If not, what's the suggested solution?