I have a doubt about using backshift in this following situation:  Peter: "I have a good job now."  Peter said that he had a good job now.............or................Peter said that he has a good job now.  I appreciate that a similar phrase without the addition of 'now' would be changed to had:  "Peter said that he had a good job", but surely the inclusion of 'now' demands that has should remain in the present and not get backshifted.  It just seems to make more sense like this Thanks for any advice or comments

Are these two sentences grammatically correct?   Mona told me that London was the biggest city in England. He wanted to know where Manchester was.   I found these two sentences by chance in an exercise book published by Egypt's  Ministry of Education. Both sentences talk about a fact, and Is it unreasonable to change the verb tense in reported speech to past simple when what the sentences talks about is still true? (As my teacher and the books say.) Or is it right when we talk about facts to change the tense or is the tense change optional and  both are correct?


I have never understood this.  This is what i know: 64 bits OS if you want to handle more than 2GB RAM. Else, 32 bits OS.  So on Ubuntu's homepage you can download either 64 bits or 32 bits. But the 64 bits is called amd64 and the 32 bits is called i386.  So i have to have a AMD processor to run amd64? And intel to run i386?  And if someone codes a software (lets say Apache). Does he have to code one 32 bits and one 64 bits? Do some softwares only exist for 32 and not 64 and vice versa?  Thanks in advance!

I can't understand what these are even though I've read articles about them.  Does it have something to do with 32 bits and 64 bits CPU? So why is it saying "AMD"64 and "i386"?  AMD is a label just like Intel? So, if I've got an Intel Core 2 Duo (MacBook Pro), then I can't use AMD64 even though Intel Core is 64 bits.


When I run the code below, I get back only the first result. If I replace return (a,d) with print (a,d), I get the full set of results. (I understand that running print (a,d) doesn't save the output anywhere.)   What do I need to change to get the full output and not just the first result?  nums = [(str(i)) for i in range(100,106)]  def foo(aa):     for a in nums:         for b in a :             c= sum(int(b)**2 for b in a)             d=''.join(sorted(a,reverse=True))             if (c>5):                 return(a,d)    output = foo(nums) print(output)   UPDATE --  I'm expecting the following output:  103 310 103 310 103 310 104 410 104 410 104 410 105 510 105 510 105 510   The return(a,d) gives me just:  103 310

The canonical way to return multiple values in languages that support it is often . Option: Using a tuple Consider this trivial example: def f(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return (y0, y1, y2)  However, this quickly gets problematic as the number of values returned increases. What if you want to return four or five values? Sure, you could keep tupling them, but it gets easy to forget which value is where. It's also rather ugly to unpack them wherever you want to receive them. Option: Using a dictionary The next logical step seems to be to introduce some sort of 'record notation'. In Python, the obvious way to do this is by means of a dict. Consider the following: def g(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return {'y0': y0, 'y1': y1 ,'y2': y2}  (Just to be clear, y0, y1, and y2 are just meant as abstract identifiers. As pointed out, in practice you'd use meaningful identifiers.) Now, we have a mechanism whereby we can project out a particular member of the returned object. For example, result['y0']  Option: Using a class However, there is another option. We could instead return a specialized structure. I've framed this in the context of Python, but I'm sure it applies to other languages as well. Indeed, if you were working in C this might very well be your only option. Here goes: class ReturnValue:   def __init__(self, y0, y1, y2):      self.y0 = y0      self.y1 = y1      self.y2 = y2  def g(x):   y0 = x + 1   y1 = x * 3   y2 = y0 ** y3   return ReturnValue(y0, y1, y2)  In Python the previous two are perhaps very similar in terms of plumbing - after all { y0, y1, y2 } just end up being entries in the internal __dict__ of the ReturnValue. There is one additional feature provided by Python though for tiny objects, the __slots__ attribute. The class could be expressed as: class ReturnValue(object):   __slots__ = ["y0", "y1", "y2"]   def __init__(self, y0, y1, y2):      self.y0 = y0      self.y1 = y1      self.y2 = y2  From the :  The __slots__ declaration takes a sequence of instance variables and reserves just enough space in each instance to hold a value for each variable. Space is saved because __dict__ is not created for each instance.  Option: Using a  (Python 3.7+) Using Python 3.7's new dataclasses, return a class with automatically added special methods, typing and other useful tools: @dataclass class Returnvalue:     y0: int     y1: float     y3: int  def total_cost(x):     y0 = x + 1     y1 = x * 3     y2 = y0 ** y3     return ReturnValue(y0, y1, y2)  Option: Using a list Another suggestion which I'd overlooked comes from Bill the Lizard: def h(x):   result = [x + 1]   result.append(x * 3)   result.append(y0 ** y3)   return result  This is my least favorite method though. I suppose I'm tainted by exposure to Haskell, but the idea of mixed-type lists has always felt uncomfortable to me. In this particular example the list is -not- mixed type, but it conceivably could be. A list used in this way really doesn't gain anything with respect to the tuple as far as I can tell. The only real difference between lists and tuples in Python is that lists are , whereas tuples are not. I personally tend to carry over the conventions from functional programming: use lists for any number of elements of the same type, and tuples for a fixed number of elements of predetermined types. Question After the lengthy preamble, comes the inevitable question. Which method (do you think) is best?


I am totally new to Ubuntu,I have download the latest Ubuntu 12 64bit(ubuntu-12.04.4-desktop-amd64.iso) from the Ubuntu site,the file is approx 700mb.  I want to install it on my laptop(currently on windows 7 32bit) that's why i copied the file to my usb then paste it to the c: drive of my Windows platform,(the file is in rar format) that's why i extracted it and found that there is wubi.exe (which is the Ubuntu installer for windows).  Now what should I do, do I? Just click the wubi.exe and follow the process, will wubi.exe need any internet connection to download any other extra file or 700mb is enough.

I've never used Ubuntu before. Just heard from some friends. "IT'S GREAT!!!", they used to say. So i decided to try it. I downloaded WUBI, and ran it but 'twas takin' too much time. So I decided to download the .ISO Image file separately. It couldn't download more after 150 mB, and got interrupted (and cancelled) itself. I just went to , and further went to , and searched for my question. After having found a related one, which told     "try the torrent way"   So I downloaded it through the torrent. And after that when I opened the .rar file, there wasn't any .ISO image file; just some folders with names like .disc, boot, ISOLINUX, etc. I searched for the .ISO file but nothin' there: ANYONE HELP ME, PLEASE!!! or this will drive me into never thinkin' about Ubuntu again.


Please help me with installing the software update over mobile data

How can I software update over cellular data? I've got enough data on my SIM but when go to update my iPad to iOS 8, it requires Wi-Fi. I do not have a router.


I am new in the ArcGIS world, and I want to know if there is a site or place where people share their models and scripts for free. Like an Open source of tools for ArcGIS, for example.

I will be writing scripts for ArcGIS Desktop in Python with ArcPy.   Is there a community or open source project where code and models can be shared?


To denote non-empty subsets, I repeatedly find myself writing $A\subset S, A\neq \emptyset$. Is there any established shorthand for this, you know, like $A\subset S$ can be seen as a shorthand for $A\subseteq S, A\neq S$?

Define $\mathcal N$  $\mathcal N (A):=\mathcal P(A)\setminus\{\varnothing\}$  Does $\mathcal N$ has a special name and standard notation?


zadsfad@ubuntu   How can I change the username (zadsfad)? If I change the host name, the 'ubuntu' section is changed.  Should I reinstall Ubuntu?

Some time ago, when I installed Ubuntu, I chose a rather stupid username for my account that I do not want to use anymore. How do I change this (including the name of my home directory, and the name in the terminal) without losing settings for applications? How do I keep permissions and my keys for various authentification (e.g. email, SSH, GPG and more)? What settings could possibly get lost if I changed my username?


Galileo stated that objects dropped from the same height will hit the ground at the same time, that the rate of gravity is constant for all objects no matter the mass. But I think there is a flaw in this statement.  All objects with mass have gravity. If a object has a greater amount of mass, it has a greater gravitational pull. Therefore, a hammer has more gravitational pull than a feather.  Given that the hammer and feather have gravitational pull, we can prove that the hammer falls faster than the feather, because it has more mass.  Because the hammer has a gravitational field, it is tugging the Earth toward itself a tiny bit, and the same with the feather. But since the hammer has more mass than the feather, it will tug the Earth toward it faster, meaning it would "fall" to the Earth faster if you dropped it.   Doesn't this mean that objects with greater mass fall faster, disproving Galileo?

The common understanding is that, setting air resistance aside, all objects dropped to Earth fall at the same rate. This is often demonstrated through the thought experiment of cutting a large object in half. The halves clearly can't then fall more slowly just by being sliced in two.  However, I believe the answer is that when two objects fall together, attached or not, they do "fall" faster than an object of less mass alone does. This is because not only does the Earth accelerate the objects toward itself but the objects also accelerate the Earth toward themselves. Considering the formula: $$ F_{\text{g}} = \frac{G m_1 m_2}{d^2} $$  Given $F = ma$ thus $a = F/m$, we note that the mass of the small object doesn't seem to matter as when calculating acceleration the force is divided by the $m$ term, its mass. However, this overlooks that the force is actually applied to both objects, not just to the smaller one. The acceleration on the second, larger object is found by dividing $F$, in turn, by the larger object's mass. The two objects' acceleration vectors are exactly opposite, so closing acceleration is the sum of the two:  $$ a_{\text{closing}} = \frac{F}{m_1} + \frac{F}{m_2} $$  Since the Earth is extremely massive compared to everyday objects, the acceleration imparted on the object by the Earth will radically dominate the equation. As the Earth is $\sim 5.972 \times {10}^{24} \, \mathrm{kg} ,$ a falling object of $5.972 \, \mathrm{kg}$ (just over 13 pounds) would accelerate the Earth about $\frac{1}{{10}^{24}}$ as much, which is one part in a trillion trillion.  Of course in everyday situations, we can for all practical purposes treat objects as falling at the same rate because of this negligible difference—which our instruments probably couldn't even detect. But I'm hoping not for a discussion of practicality or what's measurable or observable, but what we think is actually happening.  Am I right or wrong?  What really clinched this for me was considering dropping a small Moon-massed object close to the Earth and a small Earth-massed object close to the Moon. This made me realize that falling isn't one object moving toward some fixed frame of reference, but that the Earth is just another object, and thus "falling" consists of multiple objects mutually attracting in space.


On Minecraft Realms, in the End, I had summoned the Ender Dragon, twice. This was all in version 1.9. Of course, I did not know that the AI of the dragon was bugged, and now I want to remove the Ender Dragon.   I tried using the commands /kill @e[type=EnderDragon,r=100] and /kill @e[type=EnderDragon], but alas, it did not work.  How do I remove the bugged Ender Dragon, in Minecraft Realms?

So I used the command /summon EnderDragon ~ ~ ~ {NoAI:1} so that I would have an Ender Dragon that would just sit there.    I then wanted to get rid of it, but doing /killall EnderDragon didn't work, neither did /killallnpc, and I can't seem to do any damage, even with a diamond sword and maximum strength using commands.    I'm not sure why I can't get rid of it; I think it's because the dragon has no AI, but I need to get rid of it somehow, any ideas?


Getting error message at logon "session only lasted less than 10 seconds....", which apparently can be caused by multiple issues. My error is happening during the graphical logon.  I can login to the console by pressing ctrl alt F1. contents of ~/.xsession-errors file indicated that initctl was unable to connect to upstart. The message says that this process is looking for a socket at /com/ubuntu/upstart which is an invalid path on my system.  I created a new user to see if there was an issue with any profile configuration, but the new user graphical logon session also lasted less than 10 seconds for the same reason.  I've updated, upgraded, dist-upgraded, and autoremoved, but no change. I"ve confirmed that cinnamon is fully installed.  I'm running linux mint 18 sarah cinnamon 64-bit. Prior to the 10 second error, all video programs VLC media player and totem player failed to start & reinstall of those packages didn't fix. I rebooted & discovered I had much bigger problem.   I thought that the path initctl was looking for was the wrong one: (/com/ubuntu/upstart) since that file system path doesn't exist.  I used grep & strings to locate another occurrence in lib/sysvinit/telinit. In addition to /com/ubuntu/upstart, I also noted "linux:abstract=/com/ubuntu/upstart. google to  said: Linux also supports an abstract namespace which is independent of the        filesystem. So I guess this will take more than locating the offending config file & making a change.  So now I'm really in over my head! Anyone have a suggestion on how to fix this?   one last hail mary: removed virtualbox-guest-x11 & rebooted and my system is back. I had previously removed virtualbox package because I noticed it had updates today, but I didn't realize that there was another package included in the offending update.  and it only took 7 hours to fix....... I'm going to post this "question" anyway in case it helps someone else.

I run sudo apt-get install git-all in Ubuntu 16.04 and see the following in the end  Setting up runit (2.1.2-3ubuntu1) ... start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused dpkg: error processing package runit (--configure):  subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of git-daemon-run:  git-daemon-run depends on runit; however:   Package runit is not configured yet.  dpkg: error processing package git-daemon-run (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                       Errors were encountered while processing:  runit  git-daemon-run E: Sub-process /usr/bin/dpkg returned an error code (1)   I get the error after rebooting my system also. It really blocks my whole system.  I run killall update-notifier. I run sudo apt-get install git-all but  I get the same error message. I run pgrep -a apt but get nothing as output. I run pgrep -a update but get nothing as output.  A bug report about the case .    In Grub, Choose Advanced options > Ubuntu (Upstart) Linux kernel 4.22. Doing the same only in terminal without systemd causes the same error.      Why is this error here with runit?


I've got a slightly annoying problem. My locale is English (UK), but occasionally my keyboard randomly switches to English (US) on Windows 8.1. I see that the task bar has a language selector, which when I click on it displays two languages:    Most of the time it stays on UK, but occasionally randomly switches to US. When I go into the Language section of the control panel, only English UK exists:    In Advanced Settings I've specifically set the input method to be English (UK), but English (US) persists in its obstinate existence.  Why is the 'US keyboard' there? How do I get rid of it?  edit There is only one language listed under 'input settings':

I have a Spanish keyboard on my notebook, but I use it mostly for English and Chinese writing.  This is how I configured the languages:    However, Windows added some layouts on its own (probably when connecting via Remote Desktop to computers with different languages/layouts):    Those layouts are all part of the AltShift cycle, which is extremely annoying.  How can I remove ENG/US and ESP, considering they don't show in the configuration list?  Is there a way to prevent them from being added again?


On page 217 of Velleman's "How to Prove It", Velleman states a lemma. It goes like this (note that $[x]_R = \{y \in A : y \, R \, x \})$:  Lemma 4.6.5. Suppose R is an equivalence relation on A. Then:   For every $x \in A$, $x \in [x]_R$ For every $x \in$ and $y \in A$, $y \in [x]_R$ iff $[y]_R=[x]_R.$   I don't understand why (1) should be true. After all, an equivalence class is a set $[a]_R = \{ x \in A : x \ R\ a \}$, where $R$ is an equivalence relation - i.e., a relation that is reflexive, symmetric and transitive.  As I didn't understand it, I turned to the commentary on the page, and found the author had written:     According to the definition of equivalence classes, $x \in [x]_R$ means $x R \ x$. This is what leads us to apply the fact that R is reflexive.    ...so? Yes, $x \in [x]_R$ means that $x R \ x$, but that isn't the only hard requirement for it to be in $[x]_R$ - we just established that an eq. class is one defined using an equivalence relation, that is to say, a relation that is not only reflexive but also symmetric and transitive! How can we say that $x \in [x]_R$ by just looking at one of 3 requirements?  So I turned to another book. Cunningham's "A Logical Introduction to Proof", pg. 216. I found an almost identical list on that page, and the first pointer was yet again        For every $x \in A$, $x \in [x]_R$      So I turned to the proof, and in the proof the author goes     To prove (1), let $x \in A$. Clearly, $x \in [x]_R$, as $R$ is reflexive.   What? How can you conclude that $x \in [x]_R$ by just considering one of three requirements of the eq. relation R?  The same thing in Lay's "Analysis with an Introduction to Proof":     Given an equivalence relation $R$ on a set $S$ [...] we define the equivalence class (with respect to $R$) of $x \in S$ to be the set:   $$E_x = \{y \in S : y \, R \,x \}$$   Since $R$ is reflexive, each element of $S$ is in some equivalence class.   Why! Why would $R$ being reflexive have anything to do with each element of $S$ being in some equivalence class! To be in an eq. class, they're supposed to be reflexive, symmetric and transitive - why does everybody keep repeating they only need to be reflexive!

Why is it always the case that, given an equivalence relation R on a set X and a $x \in X$, that x is equivalent to itself?  According to my book, this is due to the reflexivity of $R$ and consequently $x \in [x]_R$, but isn't an equivalence relation supposed to be reflexive, symmetric and transitive - not just reflexive?  I've cross-checked this with some other books, and they all say the same thing. I don't get it, how can $x \in [x]$ if x only satisfies reflexivity?


I have an assignment question that I have no idea how to solve. It goes like this:  The multiplicity of the zero $x^*$ is the least integer $m$ such that $f^{(k)}(x^*)=0$ for $0 \le k \lt m$, but $f^{(m)}(x^*) \neq 0$. Show analytically that in the case of a zero of multiplicity $m$, the modified Newton's Method $$x_{n+1}=x_n-m \frac{f(x_n)}{f'(x_n)}$$ is quadratically convergent.  I have no clue how to solve this. Any help would be much appreciated. Thank you!

In class we derived the convergence rate for Newton's method for a function such that the root was not simple. And we found it to be linear convergent However our professor then went on to a modified version of Newtons method for roots of multiplicity $m$: $x_{n+1} = x_n - m \frac{ f(x_n)}{f'(x_n)}$. However he just mentioned that assuming $x_n \rightarrow \alpha$ then the modified method is quadratically convergent. But I can't see why?


I'm working on a python 2.7 sudoku checker and am having trouble with the .get(), as it seems it is only working on the last frame (bottom row of entries), the rest just stores empty strings. there's 8 lines marked as test that should output what is currently on the entries. Here is the code:  from Tkinter import *  def armar(x):         global sudoku         global matriz         for i in range(9):                 for j in range(9):                         if matriz[i][j].get()!="":                            sudoku[i][j]=matriz[i][j].get()                            sudoku[i][j]=int(sudoku[i][j])                         else:                            sudoku[i][j]=0         #test---------------------------------         for fila in sudoku:                 for numero in fila:                         print numero,                 print         for fila in matriz:                 for numero in fila:                         print numero.get(),                 print         #--------------------------------------- matriz = [[0]*9]*9 sudoku = [[0]*9]*9 marco = [0]*9  #-------------Window--------------- ventana = Tk()  #Marcos for i in range(9):         marco[i]=Frame(ventana)         marco[i].pack()  #Cuadricula for i in range(9):         for j in range(9):                 matriz[i][j]=Entry(marco[i], width=3)                 matriz[i][j].pack(side=LEFT)                 matriz[i][j].bind("<Return>", armar)  ventana.mainloop()

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


In the Mac OS X Mavericks terminal, inside frisk man page, there is:  SEE ALSO        cfdisk(8), sfdisk(8), mkfs(8), parted(8), partprobe(8), kpartx(8)   Does it mean see also the eighth cfdisk or something else? If so, how can I find all of cfdisk from cfdisk(1) to cfdisk(8)?

I keep seeing parentheses and a number after a command in Unix or Linux or C function.   For example: man(8), ftok(2), mount(8), etc.  What do these mean? I see them in man too.


I use Google Scholar to search papers a lot. When I type in the key words, Google Scholar finds papers which contain those key words. I’m wondering, can Google Scholar sort these papers by their number of citation? If this is possible, then, the most top one could be the one which contains those key words and also has most number of citations. Is there such functionality for users to configure their searches?

There appears to be no way to sort Google Scholar search results by any field. If somebody has figured out a way to do so, please share.


I just came across this user's profile, , and noticed something odd. He has negative score on a question and gets +5 in his stats. Is this normal behavior of Stack Overflow or did something out of norm occur here?

On Stack Exchange, users may gain a certain level of reputation.  What does reputation do? How can a user gain or lose reputation?   See also   in the Help Center  - Maximum amount of votes a user can use in a day and reputation requirements to vote.  - How to get an exact overview of the actions that got you your reputation.  - A full list of all privileges granted at each reputation level on all sites.


I am currently having some problems involving trigonometric functions with Python's Math library. What I am trying to do is to get the tangent of 45°, which is equal to 1. Since math.tan only accepts , I convert 45 to radians, as shown below: math.tan(math.radians(45))  The value returned, however, is not equal to 1, but almost: 0.9999999999999999. This can be proofed comparing: math.tan(math.radians(45)) == 1 # >>> False  I am aware that this concerns float imprecision and its tricky nature (plus function concatenation, which increases imprecision), but I would like to know how to mitigate it, and, if it is possible, to get 1 as the result.

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


Good day ladies and gentlemen, I wonder how hard would it be to implement the possibility of accepting multiple answers, IT-wise. It arguably does happen that there is more than one good answer and there is no reasonable way to say that one is better than another. Accepting just one (usually based on throwing an n-sided die) because system doesn't allow you otherwise, is a solution I'd call a hack, were I programming it :)  Of course, this question is not terribly important, so feel free to close. But I think it would make things go more smoothly on many occasions. It might also lower the number of requests for community wiki (which usually arise because someone yells "There is no correct answer here!!!").     Is it worthwhile to try to implement the feature of being able to select multiple correct answers?   Relatedly, is there a discussion anywhere whether it would not make sense to alter voting/accepting system (in whatever way)? We are all familiar with 3pt answer being accepted and 100pt crawling somewhere under it (which is especially sad state of affairs when the 3pt answer is long). Or is everybody just so used to all these quirks you don't care anymore? :)

As a matter of justice, should SO not come with algorithm which also gives additional points to each of them having correct answers?


In my project I'm downloading an Applet and then adding it to the classpath and displaying it, however it doesn't seem to be able to find the resource files  File f = new File("jars/myAppletJar.jar"); URLClassLoader urlCl = new URLClassLoader(new URL[]{f.toURL()},System.class.getClassLoader()); Class clazz = urlCl.loadClass("MyAppletMainClazz"); String[] args = {}; new MainFrame((Applet) clazz.newInstance(), args, 400, 400);   It throws a null pointer when attempting to find the resources in that jar. The applet works fine with run on its own.  How do I load the resources from the dynamically added jar into the classpath?

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 am returning from US to Bangalore. I was travelling on B1 Visa. While going to US, I was carrying one Laptop from Office. I have ID for this Laptop as well.  In US I have purchased a Laptop ($399) and one Surface Tablet($199). Will I be charged in the customs? If yes, How much?

I am planning to travel to India (COK airport, Kerala) from United States. I want to take my laptop as well as my tablet (iPad). Am I allowed to take both in my backpack with my documents related my work. I think I am allowed to take only one computer as per the rule. Will the customs consider my iPad as a computer?  What all I can take?   One of my friends took 2 laptops (1 work and 1 personal) and had trouble at the airport.  Also I am planning to take some wristwatches (7 of them, each avg price is 45 $). I read in a website that I can take stuff up to max 35000 INR. Is that true? In that case, how will I manage my stuff?


Do Indian passport holders have to have six-month validity left on their passport to enter Nepal?  I am an Indian passport holder wanting to travel to Nepal soon and do not have enough time to be able to renew my passport which is expiring before 6 months.  So, will I be able to go to Nepal?

I am an Indian Citizen and I wish to drive to Nepal. I am aware of the fact that if you enter Nepal by air, even as an Indian Citizen, you will be required to present an ID.   According to Wikipedia, Nepal has open borders with India underneath the . Thus, Indian citizens do not require a visa in order to enter Nepal, but while traveling by road, is an ID required?


I was given the following task  Define bijection between $Z^{X \cup Y}$ and $Z^X \times Z^Y$, $X\cap Y = \emptyset$  I have the following proof  We need to build a map $h$. Let's define it. $h(f)(a) = \begin{cases} z & a \in X \\ g & a \in Y \end{cases}$ Now we have to proof injectivity and surjectivity. Let's begin with injectivity. Assume that $f \neq f'$. Then $\exists a$ such that $f(a) \neq f'(a)$. Therefore $h(f)(a) \neq h(f')(a)$. Now surjectivity. $\left.f\right\rvert_X = g$ and $\left.f\right\rvert_Y = z$  Could you please validate my proof ?

Define a bijection between $Z^{X \cup Y}$ and $Z^X \times Z^Y$, where $X, Y \in \mathcal{P}(\Omega) $ and $X \cap Y = \emptyset$  I was given the following task to prove. I know that we need a map $h : Z^{X \cup Y} \ \to Z^X \times Z^Y$ Firstly, we have to define a function $h(f)$ and the show that is both injective and surjective. However, I can't define it. I know that LHS should be $h(f)(x)(y)$. Is it correct ? What should be RHS?


Double d1 = null;      Double d2 = null;      System.out.println(d1+d2);//throw NullPointerException      String s1 = null;      String s2 = null;      System.out.println(s1+s2);//doesn't throw any exception prints nullnull   Since both Double and String are of type Object then why Double types throw exception??


For each of the following linear transformations, find the inverse if it exists, or explain why there is no inverse.  (a) $T : \mathbb{R}^3 \to \mathbb{R}^3$ where $T(v)$ is the reflection of $v$ around the plane $x + 2y + 3z = 0$.  (b) $T : \mathbb{R}^3 \to\mathbb{R}^3$ where $T(v)$ is the projection of v along the vector $(1, 2, 3)$  (c) $T : \mathbb{R}^3 \to \mathbb{R}^3$ where $T(v) = Av$, $$A = \begin{pmatrix}         1 & 1 & b \\         0 & 1 & 1 \\         0 & 0 & 1 \\         \end{pmatrix},$$  and $b$ is a real number.  These are very confusing to me because I never learned linear transformations in depth. Any help would be appreciated.

For each of the following linear transformations, find the inverse if it exists, or explain why there is no inverse.  (a) T : R 3 → R 3 where T(v) is the reflection of v around the plane x + 2y + 3z = 0.  (b) T : R 3 → R 3 where T(v) is the projection of v along the vector (1, 2, 3)  (c) T : R 3 → R 3 where T(v) = Av and  A =  \begin{matrix}         1 & 1 & b \\         0 & 1 & 1 \\         0 & 0 & 1 \\         \end{matrix} where b is a real number.  So for these would I just have to put the plane or vector into matrix form and try to find the inverse? Thanks!


Good Morning. At the moment I am new in the topic of creating graphics in latex. I know how to handle the editor on average, but I'm just getting started on this topic. I would like you to guide me on how to create graphs of this type and if they have information material that could help me, it would be very useful. Thank you very much.

Which is the best way to put function plots into a LaTeX document?


I changed my camera lens while it was switched on. It was my first time doing this because I usually switch off my camera and change the lens but this has been the first time I've changed the lens while my camera was switched on. Is it dangerous? Will anything happen to my camera?

I have just accidentally changed my lens over with the power on. In the manual it lists this as something you shouldn't do as a 'caution' . Can this cause damage? If so, what and how will I tell?  (I have an Olympus OM-D.)


Suppose we want a regression of a function $f(x)$. Suppose $r = f(x) + \epsilon$. Why can we suppose that $\epsilon  \sim \mathcal{N}(0,\sigma^2)$? What is the advantage of such supposition?

My question is very simple: why we choose normal as the distribution that error term follows in the assumption of linear regression? Why we don't choose others like uniform, t or whatever?


I want to emphasize that I said start process in background in Linux. I didn't say start process in foreground, then move it to background, just to re-emphasize.  When I run wget "http://blawblaw.blaw/blaw.html" &, it starts the download, but it also still displays the results on my terminal still.  If I start the command, then terminate it mid-process using control+Z, then run bg, it finishes it, but still shows results in the terminal.  I've also tried `wget "http://someth.ing/html"` & and nohup "http://someth.ing/html" &, and all sorts of different ways from these tutorials on how to "start a process in background" (which is false in these tutorials, since it starts in the foreground then gets sent to the background), and they either lock my terminal into showing the results or they get sent to the background and terminate as soon as a type in any other commands in the terminal.  Also, the control+Z solution doesn't work too well for me, as I need this to eventually program this to do it automatically for me within BASH, and I can't make BASH do control+Z.  I have also tried doing >/dev/null to write it to the null device, and it still has this issue.

For example, when I type ping 8.8.8.8 &, why can we see ping process working? And when I type find / -name '*test*' & , it's also seen on monitor.  Why is that? Is it not really in background?


Let  $ \mathbb{Z}^{'}_{\mathbb{C}}$ be the integral closure of $ \mathbb{Z} $ in $ \mathbb{C} $, i.e. $ \mathbb{Z}^{'}_{\mathbb{C}}$ contains all complex roots of polynomials with integer coefficients and $1$ as the leading coefficient.  Prove that $ \mathbb{Z}^{'}_{\mathbb{C}} $ is not finitely generated as a $ \mathbb{Z} $-module.  My attempt: Suppose $ \mathbb{Z}^{'}_{\mathbb{C}}=\mathbb{Z}\alpha_{1}+...+\mathbb{Z}\alpha_{n} $ for some $ \{ \alpha_{i}\}_{i=\overline{1,n}} \subset \mathbb{Z}^{'}_{\mathbb{C}} $.  Let's take $ \alpha , \beta \in \mathbb{Z}^{'}_{\mathbb{C}} $ with minimal polynomials of degrees $ m $ and $ n $ respectively. We can construct a monic polynomial with integral coefficients $ P(z)=\prod(z-(\alpha_{i}+\beta_{j})) $ where $ \alpha_{i},\beta_{j} $ are the conjugates of $\alpha $ , $\beta $ and therefore the minimal polynomial of $ \alpha + \beta $ has degree $ \leq mn $.   I was thinking that the degrees of the minimal polynomials of the elements of $ \mathbb{Z}\alpha_{1}+...+\mathbb{Z}\alpha_{n} $ could be somehow bounded by a certain constant, whereas $ \mathbb{Z}^{'}_{\mathbb{C}}$ contains elements whose degrees of the minimal polynomials are arbitrarily large. I think this works when we are asked to prove that the set of all algebraic numbers $ \overline{\mathbb{Q}} $ is not a finitely dimensional $\mathbb{Q}$-vector space, but I don't know how to proceed in my case.  I would really appreciate any ideas, hints or solutions. Thank you very much!

Let     $$ \mathbb{Z}^{'}_{\mathbb{C}}=\{ z \in \mathbb{C} | \exists f \in \mathbb{Z}[X] \text{ monic such that } f(z)=0\} $$   be the integral closure of $ \mathbb{Z} $ in $ \mathbb{C} $. Prove that $ \mathbb{Z}^{'}_{\mathbb{C}} $ is not finitely generated as a $ \mathbb{Z} $-module.  My attempt: Suppose $ \mathbb{Z}^{'}_{\mathbb{C}}=\mathbb{Z}\alpha_{1}+...+\mathbb{Z}\alpha_{n} $ for some $ \{ \alpha_{i}\}_{i=\overline{1,n}} \subset \mathbb{Z}^{'}_{\mathbb{C}} $. I know that given $ \alpha , \beta \in \mathbb{Z}^{'}_{\mathbb{C}} $ with minimal polynomials of degrees $ m $ and $ n $ respectively, then we can construct a monic polynomial with integral coefficients $ P(z)=\prod(z-(\alpha_{i}+\beta_{j})) $ where $ \alpha_{i},\beta_{j} $ are the conjugates of $\alpha $ , $\beta $ and therefore the minimal polynomial of $ \alpha + \beta $ has degree $ \leq mn $.   I was thinking that then the degrees of the minimal polynomials of the elements of $ \mathbb{Z}\alpha_{1}+...\mathbb{Z}\alpha_{n} $ could be somehow bounded by a certain constant, whereas $ \mathbb{Z}^{'}_{\mathbb{C}}$ contains elements whose degrees of the minimal polynomials are arbitrarily large, take $ 2^{\frac{1}{n}} $ for example,$ n\geq 2$. I think this works when we are asked to prove that the set of all algebraic numbers $ \overline{\mathbb{Q}} $ is not a finitely dimensional $\mathbb{Q}$-vector space, but I don't know how to proceed in my case.  I would really appreciate any ideas, hints or solutions. Thank you very much!


I have a 1.86 GB Flash Drive and it is a FAT File System. I have downloaded the Ubuntu ISO. I need to be able to boot the flash drive with the Ubuntu ISO and be able to install it to another computer by booting from the flash drive. How do I do this?

What's the best way of placing a bootable ISO on a USB drive, such that the drive is bootable? ISOs such as a live Linux preview disk, Windows installation ISO, etc.


I want to compare the value of two different custom settings field in html like below? Is there any way to do that where I dnt have to write a compare module separately? template if:true={navSubItem.Source__c}={navItem.Item_Name__c}

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


When looking at the reputation leagues for MSE we can see that Teresa Dietrich is ranked 25th when it comes to yearly reputation gain.  We also see that her reputation gain is bigger than her current reputation. The first suspect in this case is of course caching. So to check that I went to see her current reputation on her profile. That matches what was listed in the league under total reputation. Another culprit could of course be caching of the total gain, so I went to check if she received any downvotes today. Her public reputation history shows no entries since December 2nd.  The last thing could of course be that she downvoted something. That scenario is also highly unlikely as she was last seen 18 hours ago according to her profile. That was yesterday in UTC time, so the script had since run at UTC midnight. Are there any other possibilities or is this a genuine bug? P.s. there are also other users with similar things (even larger differences), but I decided to use an SE employee as an example.

In the  here on Meta Stack Exchange, it shows that I've earned 9,876 rep this year, and 10,359 rep overall. (It's updated every day at 0:00 UTC, and I so far have earned 1 rep today, since an answer I downvoted a while ago was deleted.)  The difference between my total rep and the rep I earned this year is 483, which means 483 of the rep I've earned is rep I earned in 2017 or earlier. This amount normally never changes, though I can see some reasons why it might change, such as if rep is recalculated and something affects a rep event occurring in a previous year (e.g. a vote from last year was invalidated due to user deletion, a post I made at that time was deleted or undeleted, etc.)  This amount, 483, was a recent change; it used to be 461. Ordinarily, I'd chalk this up to a rep event from last year being recalculated, but I've gone through my full rep history and I can see nothing of the sort happening. On the other hand, on the same day that this number changed from 461 to 483,  was undeleted, recalculating my rep and giving me back 22 (which happens to equal 483-461). It therefore makes sense if that post was from a previous year. However, the post is from this year, so it doesn't make very much sense.  Is there a bug in the way yearly rep in the rep league is calculated, in that rep regained from an undeleted post made the same year is not re-added to the rep earned this year (while it is subtracted properly upon deletion)? Or is there some other event that occurred in the three weeks before 2018 that I had my account that caused this difference to change, that I'm not seeing, and the change being equal to that is just a coincidence?


I'm having a problem with an SQL database in combination with JavaScript, and it's really awkward.  HTML on page "configuration.php"  <input id="action_description" type="text"/> <input id="send" type="button" onClick="addAction()"/>   JavaScript on script.js  function addAction(){       var action = document.getElementById('action_description').value;       if (action == ""){       window.alert("error");       }       else {       xmlhttp.open("GET","doConfig.php?action=2&param1="+action,false);       xmlhttp.send();      } }   I do actually the xmlhttp for Microsoft or other, but this is not of interest to the problem.  PHP on doConfig.php  include('db.php'); mysqli_set_charset($link,'utf8'); $action= $_GET['action']; switch ($action){      case '2':               $text = $_GET['param1'];               $sql = "INSERT into actions (text) VALUES ('$text')";               echo $sql;               mysqli_query($link,$sql);      break; }   Database  Database in XAMPP with phpMyAdmin. Charset UTF8_bin.  The column is named "text" and is format "text (255)".  Problem:  Now the problem is, when I use characters from my country (ä ü ö ), the database messes up those. For example the character Ä gets displayed as an A and a quarter symbol.   But, when I copy the echo $sql, for example "INSERT into actions (text) VALUES ('ähä?)" to my phpMyAdmin console into the SQL-Field, then it works perfectly, and the character gets displayed right.

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 created an email server hosted at IP 65.75.241.26 with domain www.softmail.me using which I can send and receive emails from all users and I don't have problem with any other except hotmail. That my emails are moving to Junk bin of hotmail. How to overcome this issue?

This is a  about avoiding outgoing mail being classified as spam.   Also related:                    I'm wondering how to prevent my emails from my site being marked as spam? I'm using sendmail.  I'm trying to send emails through my ruby-on-rails application. The mails are all written in swedish (if that does make a difference?). I don't know why they keep getting marked as spam.  Are there any things that I can do to minimize the risk?


I installed Ubuntu 16.04 on Dell Inspiron 1564. Suddenly, the wireless card is not turning on (network is disabled). However, the computer recognizes the wireless card (lshw -C network).  I tried starting it manually through terminal but it won't.  ok i ran  lspci -knn | grep Net -A3; rfkill list and here what i got :  lspci -knn | grep Net -A3; rfkill list 03:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01)     Subsystem: Dell Wireless 1397 WLAN Mini-Card [1028:000c]     Kernel driver in use: b43-pci-bridge 04:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller [10ec:8136] (rev 02)

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


In elastic collisions in 2-D if two balls $A$, $B$ ($m_A = m_B$, $R = 1$) have equal mass we can determine in advance the outcome of the collision.   If cue-ball $A$ impacts object-ball $B$ (at rest) at an angle of +60° (with the x-axis), we can say in advance that ball $B$ will move at an angle of -30° with same axis, we do not need other equations or data.  How do you determine the angle of ball $B$ if the ratio $R: m_A/ m_B \neq 1$? How do you determine the angle of ball $B$ in the above-cited case if, for example, $R = 1/3 \rightarrow \lambda = -46.1$ ?  If you think that impossible, considering the current state of the art, please state that clearly, even in a simple comment. This will help future readers looking for an answer.  I am adding a picture to visualize the problem:

Suppose a particle with mass $m_1$ and speed $v_{1i}$ undergoes an elastic collision with stationary particle of mass $m_2$. After the collision, particle of mass $m_1$ moves with speed $v_{1f}$ in a direction of angle $\theta$ above the line it was moving previously. Particle with mass $m_2$ moves with speed $v_{2f}$ in a direction of angle $\phi$ below the line which particle with mass $m_1$ was moving previously. Using equations for conservation of momentum and kinetic energy, how can we prove these two equations  $\frac{v_{1f}}{v_{1i}}=\frac{m_1}{m_1+m_2}[\cos \theta \pm  \sqrt{\cos^2 \theta - \frac{m_1^2-m_2^2}{m_1^2}}]$  and  $\frac{\tan(\theta +\phi)}{\tan(\phi)}=\frac{m_1+m_2}{m_1-m_2}$ ?  EDIT. Here is what I've done:  For the first one, set the $xy$ coordinate system so that the positive direction of the $x$ axis points toward the original path of the particle with mass $m_1$. So we have three equations:  $m_1v_{1i}=m_1v_{1f}\cos \theta + m_2v_{2f} \cos \phi$  $0=m_1v_{1f}\sin \theta - m_2v_{2f}\sin \phi$  $m_1v_{1i}^2=m_1v_{1f}^2+m_2v_{2f}^2$.  From the second one, we get:  $v_{2f}=\frac{m_1v_{1f}\sin \theta}{m_2 \sin \phi}$  Plotting this into third equation, we get  $v_{1i}^2=v_{1f}^2(1+\frac{m_1 \sin^2 \theta}{m_2 \sin^2 \phi})$ (1)  From the first equation, we have  $\cos \phi =\frac{m_1(v_{1i}-v_{1f}\cos \theta)}{m_2v_{2f}}$  which after applying the equation we have for $v_2f$ becomes  $\sin^2 \phi = \frac{1}{1+\frac{(v_{1i}-v_{1f}\cos \theta)^2}{\sin^2 \theta \times v_1f^2}}$  Plotting this into equation (1), gives us an equation in terms of $m_1$, $m_2$, $v_{1f}$, $v_{1i}$ and $\theta$, but it is too far from what I expected.  For the second one, assigning the $xy$ coordinate in a way that the positive direction of the $x$ axis points toward the final path of the particle $m_2$, will give us three equations (two for conservation of linear momentum and one for conservation of kinetic energy), but I don't know what to do next.


Given the following inequality:  $$\sqrt[N]{\prod_i^N x_i} < \frac{1}{N} \sum_i^N x_i$$  for $x_i \in \mathbb{R^+_0}$ (positive reals) and $N \in \mathbb{N}^+$ (positive integer).  How can I prove that it is valid for the above conditions?    BTW: what is the english word for the $\prod$ operation? It has a name in spanish () but I have not been able to find a name for it in english other than "product".

The arithmetic - geometric mean inequality states that $$\frac{x_1+ \ldots + x_n}{n} \geq \sqrt[n]{x_1 \cdots x_n}$$ I'm looking for some original proofs of this inequality. I can find the usual proofs on the internet but I was wondering if someone knew a proof that is unexpected in some way. e.g. can you link the theorem to some famous theorem, can you find a non-trivial geometric proof (I can find some of those), proofs that use theory that doesn't link to this inequality at first sight (e.g. differential equations …)?  Induction, backward induction, use of Jensen inequality, swapping terms, use of Lagrange multiplier, proof using thermodynamics (yeah, I know, it's rather some physical argument that this theorem might be true, not really a proof), convexity, … are some of the proofs I know.


I'm not sure I understand why Vader continued to serve Palpatine after Padme died.  What did Palpatine have to offer him?  Anakin is an angry individual, but not necessarily an evil one.  "There's good in him still, I can feel it," as Luke said to Obi-Wan in Ep 6.    Was it the Dark Side itself that compelled him to serve Palpatine?  Did he feel that his disfigurements would mean he would not be able to function in any other role?   Why exactly did Vader stick around?

In the prequels, the primary reason Anakin was willing to become  is because he wanted to save Padmé;     ANAKIN: I will do whatever you ask.       PALPATINE: Good.       ANAKIN: Just help me save Padme's life. I can't live without her. If she dies, I don't know what I will do.      PALPATINE: To cheat death is a power only one has achieved, but if we work together, I know we can discover the secret.       ANAKIN kneels before PALPATINE.       ANAKIN: I pledge myself to your teachings. To the ways of the Sith.   Given that he didn't manage to save her, why did he still become a Sith?


I mount my server drive through Nautilus as  describes, then how do I cd the directory in Terminal? I don't want to double click a folder again and again.

In older Ubuntu releases, you were able to access the SMB shares mounted with Nautilus by going into the ~/.gvfs/ directory. I found it very convenient, since I like to use Nautilus to mount the shares, but do all disk operations (copy, mv, find etc.) using command line.  I now have Ubuntu 13.04, and even though I can mount the share and use it with Nautilus (which I never use), I am unable to find the actual mount point. Is it still somewhere? Or has it been abandoned? Can I get it back?  I know that I can mount the shares using CIFS and /etc/fstab, but I'd rather use the user space. That way, when I install a new system or transfer my home to another machine, my preferences (including credentials) stay in my home directory and I don't need to worry about updating fstab.  Also, I do not want to mount it manually with sudo (with sudo mount -t cifs ...). Yes, I could create an alias or a script, but then I would have to either type my password every time or store my password in a credentials file. And type the sudo password. And then each time I encounter a new share, I'd need to remember how to create a credentials file. So yes, I might end up with this solution, but I would rather not change my current habits, if it is possible.  Furthermore, there is the matter of other users for which I often provide a simple command-line solution. In 13.04, this is no longer possible (for example, because the users to whom I provide the solution are not allowed to sudo mount on their machines).  In any case, I'm curious as to what happened to gvfs and why I can't see the mounted directories.


I don't know how to determine the sequences is converge or diverge and find the limit of each convergent sequence. Can someone help me to solve this problem?

Thomson et al. provide a proof that $\lim_{n\rightarrow \infty} \sqrt[n]{n}=1$ in . It has to do with using an inequality that relies on the binomial theorem:  I have an alternative proof that I know (from elsewhere) as follows.  Proof. \begin{align} \lim_{n\rightarrow \infty} \frac{ \log n}{n} = 0 \end{align} Then using this, I can instead prove: \begin{align} \lim_{n\rightarrow \infty} \sqrt[n]{n} &= \lim_{n\rightarrow \infty} \exp{\frac{ \log n}{n}} \newline & = \exp{0} \newline & = 1 \end{align}  On the one hand, it seems like a valid proof to me. On the other hand, I know I should be careful with infinite sequences. The step I'm most unsure of is: \begin{align} \lim_{n\rightarrow \infty} \sqrt[n]{n} = \lim_{n\rightarrow \infty} \exp{\frac{ \log n}{n}} \end{align} I know such an identity would hold for bounded $n$ but I'm not sure I can use this identity when $n\rightarrow \infty$. Question: If I am correct, then would there be any cases where I would be wrong? Specifically, given any sequence $x_n$, can I always assume: \begin{align} \lim_{n\rightarrow \infty} x_n = \lim_{n\rightarrow \infty} \exp(\log x_n) \end{align} Or are there sequences that invalidate that identity?  (Edited to expand the last question) given any sequence $x_n$, can I always assume: \begin{align} \lim_{n\rightarrow \infty} x_n &=  \exp(\log \lim_{n\rightarrow \infty} x_n) \newline &=  \exp(\lim_{n\rightarrow \infty} \log x_n) \newline &=  \lim_{n\rightarrow \infty} \exp( \log x_n) \end{align} Or are there sequences that invalidate any of the above identities? (Edited to repurpose this question). Please also feel free to add different proofs of $\lim_{n\rightarrow \infty} \sqrt[n]{n}=1$.


I want to retrieve my Gmail account. I used it 2 year before, 2 year before some security problem happened suddenly Gmail account blocked, I can't use Gmail account up-to now.  I tried to create same username, account creation not accepting, its showing username already exits. Actually I want that username,even data is deleted also no problem.

I have forgotten the password or username for my Google account, or I'm unable to access my account for other reasons.  How can I recover my account?  (This Q&A is meant as a general description for all Google and Gmail username/password questions. See: )


Ok, I've been using a command block to spawn a villager that has custom trades. There's no problem with that at all- I'm just wondering if it's possible to have a villager trade me an item that has a custom name (eg. Key). Or is this unchangeable, so I'd need to name it with an anvil after purchase?  /summon Villager ~ ~1 ~ {Offers:{Recipes:[{buy:{id:"minecraft:emerald",Count:4},sell:{id:"minecraft:leather_helmet",Count:1}},{buy:{id:"minecraft:emerald",Count:6},sell:{id:"minecraft:leather_chestplate",Count:1}},{buy:{id:"minecraft:emerald",Count:5},sell:{id:"minecraft:leather_leggings",Count:1}}]}}   The code is fully functional, it's just integrating custom names for the item he sells.

I am making a Minecraft Mini Game adventure map, and one of the levels has a /setblock command, I am using the command in a way to spawn an item in a chest (Wooden Button) I need the wooden button to have CanPlaceOn tag so it can be placed on a log. I have tried this command: setblock 294 5 -1251 minecraft:chest 0 replace {Items:[{Count:1,Slot:0,id:minecraft:wooden_button,CanPlaceOn:[log]}]}`


I have recently added a second swap partition for my third system (Two of which are Linux).  My aim was to have a single dedicated swap space for each of the systems so that it would not cause any problems when swap-sharing.  Making the appropriate changes to /etc/fstab, I rebooted... Only to have the first system load both of the available swap partitions.  My question is, are there any other ways a system can mount a partition other than those listed in /etc/fstab?  cat /etc/fstab output  UUID=9034-ACC1  /boot/efi       vfat    umask=0077      0       1 UUID=ece74c78-21b5-4c37-ad97-2dcbd98c1d50 /home           ext4    defaults        0       2 UUID=78ab45f8-1a54-49b3-b7a9-48afc6a95054 none            swap    sw              0       0 /dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0 UUID=de651abc-dcc4-472a-8bb6-64d0e89cdc30 /tmp ext4 defaults,noauto 0 2 UUID=f5019f7b-d758-4aee-8261-424ca5813b75 /var ext4 defaults,noauto 0 2 UUID=477bf58b-c602-4116-afea-7e8914adbf56 / ext4 errors=remount-ro,noauto 0 1   Yet cat /proc/swaps yields  Filename                Type        Size    Used    Priority /dev/sda15              partition   6291452 0       -2 /dev/sda8               partition   6179836 0       -1   fdisk -l  Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: gpt Disk identifier: E7779D9B-ADD0-40D7-A257-C1DEF6AC0E35  Device     Type                         UUID /dev/sda1  Windows recovery environment 84D97802-5484-4905-85D5-39A6C394635F /dev/sda2  EFI System                   FF3F087C-3E1F-428B-A3A6-3083444059F9 /dev/sda3  Microsoft reserved           0BE8D02B-398F-4D93-9A71-8C1AE98FBF20 /dev/sda4  Microsoft basic data         8F0537C3-D0CF-413C-9417-FA2436FF1583 /dev/sda5  Windows recovery environment 7CC71CC6-F1D9-4693-AB32-5DB177867815 /dev/sda6  Linux filesystem             A20F3F7B-4EA3-4749-9601-B9D879B19498 /dev/sda7  Linux filesystem             5829D354-8018-43FD-9738-B31A82C0073B /dev/sda8  Linux swap                   F8FCB0F2-38EC-4A3C-92CB-7196DC7AEAF0 /dev/sda9  Linux filesystem             31174EC2-06E4-4963-8302-273994431B65 /dev/sda10 Linux filesystem             BC658257-DBE5-40D0-9CD1-CEC46E1913BC /dev/sda11 Linux filesystem             E1E3A130-EA53-48B4-A130-4CF349964A41 /dev/sda12 Linux filesystem             359F6EC1-D937-43E6-A3E3-DDC8E457C0CC /dev/sda13 Linux filesystem             82092B42-981D-4F67-977F-6A3F034B365E /dev/sda14 Linux filesystem             278ACACC-B8CC-4169-8A79-E9812F59B035 /dev/sda15 Linux swap                   33BF80B8-A409-4AD5-B778-836974BAA8C3  Partition table entries are not in disk order.   I tried repacking the initramfs, checked that the resume variable is not set wrong, and only one of the two systems does this.

I've read that you need to put the swap partition on HDD rather than SSD.   My questions are the following:    When and how is the "checking" done by the distribution (or something else) to find its Swap partition?  Does it happen during boot?  It just checks all available disks and searches for a partition with 'swap' flag?  What happens if there are several partitions like that?  Also, how many swap partitions do I need to have if I run, for example, two different distributions on the same disk, let's say Fedora and Ubuntu?


Attempt to invoke virtual method 'void android.media.MediaPlayer.start()' on a null object reference  Below is the code -   package com.example.zhengli.mediaplayerdemo;  import android.media.MediaPlayer;  import android.support.v7.app.AppCompatActivity;  import android.os.Bundle;  import android.view.View;  import android.widget.Button;  import android.widget.TextView;  public class MainActivity extends AppCompatActivity {      private Button mb1;      private MediaPlayer mpplayer;       @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);          mb1=(Button)findViewById(R.id.play);         mb1.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 mpplayer=new MediaPlayer();                 mpplayer=MediaPlayer.create(MainActivity.this,R.raw.mp);                 mpplayer.start();             }         });      }      @Override     protected void onDestroy() {         super.onDestroy();         if(mpplayer.isPlaying()){             mpplayer.stop();         }         mpplayer.release();//释放资源     } }

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?


If every cyclic subgroup of a group G be normal in G, prove that every subgroup of G is normal in G.  Attepmt  Let G be a group. Let H be a Normal subgroup of G. Let $K=\langle a \rangle$ be a cyclic subgroup of G generated by $a\in G$. We shall have to show that H is normal in G. That is to prove that for $h\in H$, $ghg^{-1}\in G$ for all $g\in G$.   If the steps I have written, please help me to solve the problem.

Exercise 11, page 45 from Hungerford's book Algebra.     If $H$ is a cyclic subgroup of $G$ and $H$ is normal in $G$, then every   subgroup of $H$ is normal in $G$.   I am trying to show that $a^{-1}Ka\subset K$, but I got stuck. What I am supposed to do now?  Thanks for your kindly help.


I create a list using the below codes. a = [[False] * 3] * 3  which creates a 3x3 matrix with all elements of False value. And when I changed a[0][0] to be True using a[0][0] = True, the result is: [[True, False, False], [True, False, False], [True, False, False]]  where the entire first column changes into True. However, if I create a using the for loop, like: a = [[False] * 3 for i in range(3)]  or a = [[False for i in range(3)] for i in range(3)]  And after executing the same a[0][0] = True, I get my desired result in both ways as: [[True, False, False], [False, False, False], [False, False, False]]  where just one element is changed into True. Why there is such difference in creating the list in Python? Thank you for answering!

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I want to set forwarding IP address on a router. What port is used in OS X for remote desktop?

Specs: Macbook Pro Mid 2012 OS X 10.10.4  I'm not able to Share my screen with my friends. I want to connect with my friend's Macbook (which is not in my network, different city) for troubleshooting purposes, & so I tried Screen Sharing from Messages App:    After I click 'Ask to share screen', it does send a request to the other Mac for permission, after he click on 'Allow', nothing happens!?  [ The Screen Sharing option is turned ON & Remote Management is turned OFF, on my Mac as well as on my friend's Mac.]    How do I connect with his computer, & control it over internet, It'll be very convenient for troubleshooting purposes.  Thanks!


I recently rediscovered my old Pokemon Red game complete with my original Pikachu that I trained while I was a kid. What I'd like to do is try to trade it to my Sun game that I've just recently purchased using the intermediary gens and hardware as required.  I'm curious if it's even possible to get my Gen 1 Pikachu up to Sun. Any games, hardware, or software is fair game for this little project.

I know that you can trade Pokemon between games of the same generation (Gold/Silver, Ruby/Sapphire) and even trade between 1st gen and 2nd gen. However, I haven't been able to find a way to trade Pokemon so that I can play with my 1st generation Pokemon in HeartGold, for instance. If it is possible, how many steps would it take and what equipment would I need?


I have set of files created from Monday to Friday..  a -- > 08/20 a1---> 08/21 a2---> 08/21 a3---> 08/21 a4---> 08/22 a5 --> 08/23   I need to move only 08/21 file to diffrenet folder.  How is this possible ?

How can I list recursively all files that were changed between 22.12.2011 and 24.12.2011?


I'm trying to add a 72 pt. space before the section heading. I do not only want the 72 pt. between paragraphs but basically every section should start at a new page with a 72 pt. spacing before it.   Preambel:   \documentclass[a4paper,12pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{blindtext} \usepackage{indentfirst} \usepackage[top=3cm, bottom=3cm, left=3cm, right=2cm]{geometry} \usepackage{titlesec} \titlespacing*{\section}{0pt}{72pt}{18pt}  \titleformat{\section}[block]{\normalfont\fontsize{16}{19}\bfseries}{\thesection.}{1em}{}    \titlespacing{\subsection} {0pt}{36pt}{18pt} % first paragraph should have 18 pt spacing before it \titleformat{\subsection}[block]{\normalfont\fontsize{14}{19}\bfseries}{\thesubsection.}{1em}{} \titlespacing{\subsubsection} {0pt}{18pt}{18pt} \titleformat{\subsubsection}[block]{\normalfont\fontsize{12}{19}\bfseries}     {\thesubsubsection.}{1em}{}   For example  \begin{document} \section{Section 1} \blindtext \subsection{Subsection 1} \blindtext \subsubsection{Subsubsection 1} \blindtext \section{Section 2} \blindtext \blindtext \end{document}   Result:   How the 72 pt. before spacing approx. should look like on every page where a new section starts:

In the document class article how do I change the command \section to behave exactly like the command \chapter in the document class book? i.e. write Chapter # and then the title and also leave some empty space at the top of the page.  Sorry if my question is not clearly stated and if this question might already exist but I couldn't find anything.


When I'm trying to download samthing it says "insuffient space on my device"my brean it does work when I hear that......it so confusing me..and I have engh space on my memory card

I have a Samsung Captivate, running the stock Froyo ROM, rooted.  When I try to install a large app from the Market, I get the error "insufficent space on the device", for apps of ~40 MB, with 700+MB free.  I first noticed it with "Jelly Defense" on Google's Christmas-week sale, but you can see it for yourself if you try the free "Reiner Knizia's Labyrinth" which is also quite large.  This is a common problem -- just Google it and you'll see dozens of posts around the Internet going back almost a year. From those posts, I've tried two free apps that are supposed to help, "Market Fix" and "Cache Fixer", but neither has done the trick yet.  As I understand it, both are supposed to re-mount /cache as a loopback file on the SD card.  I don't know why they don't work.  If anybody has fixed this specifically on the i9000 series (SGS1, Captivate, Fascinate, etc), please let me know how!


Well, the book tells me to dray the set:  $$x^2+y^2\le a^2, y^2+z^2\le a^2, (a> 0)$$  So I interpreted this as the volume of something under the region $x^2+y^2\le a^2$. This something should be the value of $z$, which I did: $z = \sqrt{a^2-y^2}$  I tried to integrate then like this:  $$\int_{-a}^a \int_{-\sqrt{a^2-x^2}}^{\sqrt{a^2-x^2}}\sqrt{a^2-y^2}dy \ dx $$  so I would be integrating $z = \sqrt{a^2-y^2}$ from the bottom of the circumference of radius $a$, to its top, depending on the chosen $y$. Then I would integrate this for all $y$, therefore, from the 'beggining' of the circumference to its 'end', that is, from $-a$ to $a$. This should calculate the volume desired. Is it wrong? Because .

Find the volume common to two circular cylinders, each with radius r, if the axes of the cylinders intersect at right angles. (using disk/washer)  I saw no example of this problem anywhere.. I saw an example how to solve it without calculus but I'm afraid that'll be deductions on my test.. I have the volume of a cylinder and the method of area between two curves but this is out of my reach.... I don't know what I can try...


On the genealogy site one often needs to include scanned image of old documents for clarity and interpretation. This is fine when working with JPEG files, but I have been working with a source that insists on downloading images as PDF files. I have no way to convert those to JPEG files locally. Is there a way to get Imgur to store these files, so that I can include a link in my questions?

I want to attach some files to a post on one of Stack Exchange sites. What is the best way to do this?


Let $L=\left\{R\right\}$ be a language with only one relation symbol. Consider these formulas: $\Psi _1\:=\:\forall x\left(R\left(x,x\right)\right)$ $\Psi _2\:=\:\forall x\forall y\left(R\left(x,y\right)\rightarrow R\left(y,x\right)\right)\:$ $\Psi _3\:=\:\forall x\forall y\forall z\left(R\left(x,y\right)\wedge R\left(y,z\right)\rightarrow R\left(x,z\right)\right)\:$ I need to show $Mod\left\{\Psi _1,\Psi _2,\Psi _3\right\}\ne Mod\left\{\Psi \:_2,\Psi \:_3\right\}$.    So far, i understand the meaning of each formula, but i wonder which relation on any domain, can show that  $R$ is symmetric and transitive but not reflexive. Any ideas?    EDITED: Well, i looked at  and it really helpfull! but i want to find other examples just from curiosity ..

An equivalence relation is defined by three properties: reflexivity, symmetry and transitivity.  Doesn't symmetry and transitivity implies reflexivity? Consider the following argument.  For any $a$ and $b$, $a R b$ implies $b R a$ by symmetry. Using transitivity, we have $a R a$.  Source: Exercise 8.46, P195 of Mathematical Proofs, 2nd (not 3rd) ed. by Chartrand et al


Currently I'm moving from old PC to new one. I have windows 7 installed. I'm planning throw away old PC, but before that I would like to have possibility to run old PC operating system just in case I forgot how to configure application or just forgot file. It is not enough to have file system, I need to have possibility to run whole OS. It would be nice for example to have Vmware image of my old PC. Is it possible somehow make virtual PC from hardware PC?

I have VirtualBox 4.3.6 and True Image 2014 Premium with Universal Restore. I've read a lot about different methods but I'm not sure where to start, or what will suit my needs.  Directly from  wiki:     Windows installations, unlike Linux, cannot easily be moved from one   hardware to another. This is not just due to Microsoft's activation   mechanism but the fact that the installed kernel and drivers depend on   the actual hardware.   This is where Universal Restore could come in handy. It is a feature of True Image that allows backups to be restored to dissimilar hardware.  I want a complete disk image backup of the system disk created with True Image before I do anything. I will then reformat the system disk. And then, instead of reinstalling Windows or restoring it from backup on the host, I would like to have it restored VirtualBox.  Is it possible to go from TIB (True Image Backup) to VDI (Virtual Disk Image)? If not at all possible, can I image the system disk (with current Windows install) with another tool and have it create a VDI image?  Then there is the Sysinternals Disk2vhd v2.01 by Mark Russinovich and Bryce Cogswell. But it creates a VHD image, rather than VDI image. There is also a limitation on how big the image can be.  Directly from  website:     Disk2vhd is a utility that creates VHD (Virtual Hard Disk -   Microsoft's Virtual Machine disk format) versions of physical disks   for use in Microsoft Virtual PC or Microsoft Hyper-V virtual machines   (VMs). The difference between Disk2vhd and other physical-to-virtual   tools is that you can run Disk2vhd on a system that’s online.      ...      Virtual PC supports a maximum virtual disk size of 127GB. If you   create a VHD from a larger disk it will not be accessible from a   Virtual PC VM.   My system disk is 190 GB. Is there an option inside this tool that would allow me to compress it to less than 127 GB? If not then I don't see how to do it, and I would rather not use VHD format anyway.  Can someone give me some pointers? How do I do this?


Is it legal/possible to purchase alcohol as duty free upon departure from the US, having attained the drinking age in the destination country but not in the US?  It seems like even though you are buying it in the US, since it's for exclusive use in another country it should be allowed.....but I can see it being illegal to buy anyway.

Is the drinking age in the tax free/duty free area the same as in the country you are in or is there no real drinking age?  Can I buy spirits in the tax free even though the country's law doesn't permit me? Are there ID checks in the duty free area? Are the same rules enforced in the lounges?


If the admin account has a keylogger and I make a guest account , will the guest account be safe or will that too be logged and infected

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


I have six tables  a. Employee  EmployeeId         EmployeeName 123                John 125                Peter 129                Jack   b. EmployeeParameterValue  EmployeeParameterValueId         EmployeeId    ParameterValueId 1                                123           1 2                                125           2 3                                129           3   c. ParameterValue  ParameterValueId    ParameterId    Value 1                   2              1, 2, 3 2                   3              1, 2 3                   2              3   d. Parameter  ParameterId      Name 2                WorkedStates 3                WorkedType   e. WorkedStates  WorkedStatesId    WorkedStatesName 1                 CA 2                 WA 3                 NY   f. WorkedType  WorkedTypeId          WorkedTypeName 1                     Hourly 2                     Salaried   I need to write a report in following format:  EmployeeId         EmployeeName       Parameter          ParameterValue 123                John               WorkedStates       CA, WA, NY 125                Peter              WorkedType         Hourly, Salaried 129                Jack               WorkedStates       NY   I am able to write a query which fetches first 3 columns. But I am not able to write a query which fetches the data in the fourth column.  Please advise.

Consider a database table holding names, with three rows:  Peter Paul Mary   Is there an easy way to turn this into a single string of Peter, Paul, Mary?


Question:  How first programming language made?  Description:  I want to know how first programming language made?

There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers.  What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment.  I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network?  I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions.  So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe.  My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow?  Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.


I installed winedit 3 and miktex and whenever I run the program there is  undefined control sequence    <argument> \g__prg_map_int"    error. What should I do? the line causing the error is:   \MakeSPathList{calligraphy pen copperplate}{\l__cal_tmpa_tl}

Under MacTeX 2018 the following TeX file:  \documentclass{article}  \usepackage{tikz}  \usetikzlibrary{decorations.pathreplacing,calligraphy}  \begin{document}  \tikz\draw[decorate,decoration={calligraphic brace,amplitude=4mm},ultra thick] (0,0) -- (0,8);  \end{document}   gives the following warning  ************************************************* * LaTeX warning: "kernel/deprecated-variant" *  * Variant form 'VnV' deprecated for base form '\spath_get:nnN'. One should not * change an argument from type 'N' to type 'V': base form only accepts a * single token argument. *************************************************   and these errors:  /usr/local/texlive/2018/texmf-dist/tex/latex/spath3/tikzlibrarycalligraphy.code.tex:707: Undefined control sequence. <argument> \g__prg_map_int   l.707 ...igraphy pen copperplate}{\l__cal_tmpa_tl}  /usr/local/texlive/2018/texmf-dist/tex/latex/spath3/tikzlibrarycalligraphy.code.tex:707: You can't use `\char"1' after \advance. \int_gincr:N ..._global:D \tex_advance:D #1\c_one    I reported the warning in , but the errors are new with TL2018 -- TL2017 does not give the errors.


I'd like to activate ctrl+alt+backspace on multiple pcs (Ubuntu 14.04) using  dpkg-reconfigure keyboard-configuration   I don't want to do the dialog every time so i tried:  debconf-get-selections | grep "^keyboard-configuration" > config.dat   on a host where i answered the dialog with the desired answers  On the host where i want to do it non interactively i tried:  debconf-set-selections config.dat  dpkg-reconfigure -f noninteractive keyboard-configuration   it ran without asking, but afterwards the selections where reset to the default values  How can i get dpkg to use my predefined values? Or is there another possibility to enable the ctrl+alt+backspace for all users without going through dialogs?  EDIT  to summarize: my problem is that  dpkg-reconfigure -f noninteractive keyboard-configuration   doesn't seem to respect my preseeded selections. Can anyone find something wrong in the procedure how i try to do it or could this be a bug?

Ctrl+Alt+← can usually be set to restart X, however I can't find the option to allow this (it is disabled by default).  I have looked in System->Preferences->Keyboard and System->Preferences->Keyboard Shortcuts but I can't find an option to enable it.  Where can I change this setting?


When i'm trying to delete user with this code sudo deluser username than this message occurs  Warning: group `username' has no more members. userdel: user username is currently used by process 14804 /usr/sbin/deluser: `/usr/sbin/userdel username' returned error code 8 Exiting.   so, what can i do for that ??

When I tried to delete a user using the User Accounts window under Settings, I get the following error message:  running '/usr/sbin/userdel' failed: Child process exited with code 16  How can I delete this user?


I got a complex multithread program that calls to exit when it's done. I want to optimize its configurations and need to run it multiple times. How can I do it in a JIT friendly way? Note that this question is different from  I don't want to build a unitest for it but test the performance of the entire execution.

I've got a few methods that should call System.exit() on certain inputs. Unfortunately, testing these cases causes JUnit to terminate! Putting the method calls in a new Thread doesn't seem to help, since System.exit() terminates the JVM, not just the current thread. Are there any common patterns for dealing with this? For example, can I subsitute a stub for System.exit()?   [EDIT] The class in question is actually a command-line tool which I'm attempting to test inside JUnit. Maybe JUnit is simply not the right tool for the job? Suggestions for complementary regression testing tools are welcome (preferably something that integrates well with JUnit and EclEmma).


In Windows 7, booting up took you directly to the Login Screen where you could immediately start typing your password. By contrast, Windows 10 (or perhaps 8) introduced an intermediate Lock Screen that requires a keypress before you can actually go to the Login Screen to start typing your password. While aesthetically pleasing, I can see the Lock Screen getting tiring after a while when I just want to go straight from booting to typing my password in, like I'm used to doing on Windows 7.  If I ever wanted to bypass the Lock Screen and go straight to the Login Screen, how would I do that?

The Windows 10 "anniversary update" is coming out tomorrow and according to some  the group policy to disable the lock screen is no longer effective on anything below the Enterprise edition. I'd like to know what options/workarounds are left to disable this nonsense on Pro editions.  Regards.


I created a custom module and printed this outcome in .csv.  Name,Event,Email,Timestamp Ea Iustum Jus,Fifa,example@asdf.wer,1573924224   How do I convert the timestamp in a date format?  I tried with $select->addField('c','created',"DATE_FORMAT(FROM_UNIXTIME(created), '%d.%m.%Y %H:%i'"); and $select->addField('c', 'created', date('m-d-Y',$select));.  This is the complete code in mymodulecontroller.php.  /**  * @file  * Contains \Drupal\mymodulelist\Controller\ReportController.  * - it works but timestamp needs be converted to human readable date ??  * - $select->addField('c', 'created');  */ namespace Drupal\mymodulelist\Controller;  use Drupal\Core\Controller\ControllerBase; use Drupal\Core\Database\Database; use Symfony\Component\HttpFoundation\Response;  /**  * Controller for mymodule List Report in .CSV  */ class DownloadCSVController extends ControllerBase {   /**    * Gets all mymodules List for all nodes.    *    * @return array    */   protected function load() {     $select = Database::getConnection()->select('mymodulelist', 'r');       // Join the users table, so we can get the entry creator's username.     $select->join('users_field_data', 'u', 'r.uid = u.uid');       // Join the node table, so we can get the event's name.     $select->join('node_field_data', 'n', 'r.nid = n.nid');     // Select these specific fields for the output.     $select->join('mymodulelist', 'r', 'r.mail = r.mail');     // Select these specific fields for the output.     $select->join('mymodulelist', 'c', 'r.created = c.created');     // Select these specific fields for the output.     $select->addField('n', 'title');     $select->addField('u', 'name', 'username');     $select->addField('r', 'mail');     // how to create a date format from unix timestamp to d-m-Y for the field created ??      $select->addField('c', 'created');     // I tried this 2 options     // 1. $select->addField('c', 'created',"DATE_FORMAT(FROM_UNIXTIME(created), '%d.%m.%Y %H:%i'");     // 2. $select->addField('c', 'created', date('m-d-Y',$select));     $entries = $select->execute()->fetchAll(\PDO::FETCH_ASSOC);     return $entries;   } }

Is it possible to convert a timestamp to a date format in a query?  This is the code I am using.  $query = db_select('my_submissions', 's'); $query->fields('s', array('sid','name','company','email','phone','is_customer','submitted','count')); $entries = $query->execute();  $rows = array(); foreach ($entries as $entry) {   $row = array_map('check_plain', (array) $entry);   $row['submitted'] = $row['submitted'] ? date('d.m.Y H:i', $row['submitted']) : "";   $rows[] = $row; }


I'm not a developer. However, I find that IDE tool like Force.com Eclipse is useful to help me with analysis. I mostly use Force.com Eclipse to search for certain key word, like Field_Name__c, and it will display where the field is being referenced or used even in classes/custom setting.  However, now Force.com Eclipse has been sunsetted. I am new to Salesforce DX and still trying to learn about the concept of using CLI. Can anyone here guide or share how could i use Salesforce DX Visual Studio to perform such searching?

I have used Eclipse in the past but unfortunately, Eclipse and Force.com IDE no longer work for me. I have switched over to VSCode along with the Salesforce DX and forcecode extensions (among many others) and this is the first time I have used this software. I was able to download all of the metadata from my salesforce instance. Now I need to perform a search to find all reports that use a specific field. Can anyone help walk me through the process to achieve this search? And once the search is completed, how do I replace a specific field used in a report with another field?


Can you say "Actor dead aged 44" instead of elaborately saying "Actor dies at age 44"?

Newspaper/news article headlines usually have different syntax rules, for example   No copula. North Korea trip 'successful' Past events written in present. Qantas cancels flight out of frozen Heathrow Predictions written with infinitive. Britain's 'crossbow cannibal' to die in jail Very often not in complete sentence. No indefinite/definite articles. Ivory Coast Faction Squeezes UN Force Using a comma instead of "and". Romania, Bulgaria face delay in joining Schengen.   Why these rules and are there any other rules?


I am passing to sed for replacement text that seems to have some characters that it does not like. The text comes from git log graph and is something like:    ID- desc author                                                                                ID- desc author     I get unescaped newline inside substitute pattern How can I escape everything before piping to sed?      Example:     COMMIT=$(git log my_branch...origin/master --pretty=format:'%h %an')     FINAL=$(cat msg.txt | sed -E "s/--PLACEHOLDER--/$COMMIT/)

I have a script that reads a text stream and generates a file of sed commands that is later run with sed -f. The generated sed commands are like:  s/cid:image002\.gif@01CC3D46\.926E77E0/https:\/\/mysite.com\/files\/1922/g s/cid:image003\.gif@01CC3D46\.926E77E0/https:\/\/mysite.com\/files\/1923/g s/cid:image004\.jpg@01CC3D46\.926E77E0/https:\/\/mysite.com\/files\/1924/g   Assume the script which generates the sed commands is something like:  while read cid fileid do     cidpat="$(echo $cid | sed -e s/\\./\\\\./g)"     echo 's/'"$cidpat"'/https:\/\/mysite.com\/files\/'"$fileid"'/g' >> sedscr done   How can I improve the script to ensure all regex metacharacters in the cid string are escaped and interpolated properly?


I am trying to clip the outside black boundary in between the TIFF files out.  The problem is the TIFF files being on a layer above the other TIFFs.  This is what causes the border and I want the picture to look consistent all the way through.

I have looked at solutions to what seem to be somewhat similar problems but they don't seem to solve my problem.  A georeferenced raster layer loads into the correct location in relation to other layers, so CRS is obviously OK, but has this black background which I don't know how to remove.


I'm trying to build a 555 timer with a 50% duty cycle.  I followed the instructions given  (pg 12).  I used a 470 microfarad capacitor, 150 ohm resistor and a kohm resistor. The output voltage is always low.  I've attached an image of my current circuit and would appreciate it if someone could pinpoint what I'm doing wrong.


I want to generate a six-digit random number everytime. I am using public class Test {     static Random rand = new Random();           public static void main(String[] args) {          int rand_int1 = rand.nextInt(1000000);         System.out.println(rand_int1);  Will it print the six-digit number or it can print any number between 0 to 1000000. I executed and got a 6 digit number but just want to be sure Can it give 1 or 2 or 3 digit number also?

How do I generate a random int value in a specific range? I have tried the following, but those do not work: Attempt 1: randomNum = minimum + (int)(Math.random() * maximum);  Bug: randomNum can be bigger than maximum. Attempt 2: Random rn = new Random(); int n = maximum - minimum + 1; int i = rn.nextInt() % n; randomNum =  minimum + i;  Bug: randomNum can be smaller than minimum.


My one technical paper was recently accepted for one international conference.  But, unfortunately, I am not able to attend as the Conference dates are conflicting with my official assignments. I intimated the Conference about my inability to attend. On my request, the conference acknowledged that they will not publish my paper to their Journals/proceedings. (I have the full set of email communications with the conference secretariat.)  I wish to submit the same paper for an IEEE conference. Is there any issue? Please advise.

I have two accepted papers in one conference . The problem is that until I have not gotten an original invitation letter, a must to get a visa. I've sent over ten emails to the email addresses listed on the conference website to the organizers and chairperson asking for this letter; no response. I do not have anyone else who can present in my place. If I failed to attend the conference because of this, would my papers be published in the conference proceedings?


Hi I needed some serious information for the safety of mine and my family’s, I just moved into a new house and I’m removing the smoke detectors because they are really yellow and look old. I was wondering I wanted to put photoelectric smoke alarms because they are better for fires but they haven’t been around for long and I wanna know is the infrared led dangerous in there and can it affect my eyes or my kids because I want my kids to grow up safe and I just don’t want to not be educated on what I buy. Someone please help

So I was researching stuff about smoke sensors and I may be paranoid but I was wondering if they were Safe for kids and in general , I read they had infrared LEDS which I heard were very harmful for eyes if looked at directly which I assume the IR LESS are inside and nor visible outside the smoke detector but I was wondering if there was any way the LED can leak out and harm a child since they are curious and like to stare at lights/ etc.. Just got me thinking thanks for the feedback


I want to estimate the size taken up by an object. To get the object's size I can just use   To do so I might use Instrumentation.getObjectSize(myObject), but this will give me a "shallow" size. I want to get the size of the Object, including the sizes of the objects it references.  My thought is that I need to get the size of the object, then go through all the object's fields that are not static or primitives and get the size for the objects that they point to and do this recursively.  Of course, I don't want to count an object size a few times, or get stuck in a loop, So I'll have to remember the objects which size we already counted.  Is there a faster, or a more standard, way to do this?  My code looks like this:  public static long getObjectSize(Object obj) {     return getObjectSize(obj, new HashSet<Object>()); }  private static long getObjectSize(Object obj, Set<Object> encountered) {     if (encountered.contains(obj))     {         // if this object was already counted - don't count it again         return 0;     }     else     {         // remember to not count this object's size again         encountered.add(obj);     }     java.lang.reflect.Field fields[] = obj.getClass().getFields();     long size = Instrumentation.getObjectSize(obj);     // itereate through all fields                    for (Field field : fields)     {         Class fieldType = field.getType();         // only if the field isn't a primitive          if (fieldType != Boolean.class &&              fieldType != Integer.class &&              fieldType != Long.class &&              fieldType != Float.class &&              fieldType != Character.class &&              fieldType != Short.class &&              fieldType != Double.class)          {              // get the field's value              try              {                  Object fieldValue = field.get(obj);                  size += getObjectSize(obj, encountered);              }               catch (IllegalAccessException e) {}          }     }     return size; }

I have an application that reads a CSV file with piles of data rows.  I give the user a summary of the number of rows based on types of data, but I want to make sure that I don't read in too many rows of data and cause OutOfMemoryErrors.  Each row translates into an object.  Is there an easy way to find out the size of that object programmatically?  Is there a reference that defines how large primitive types and object references are for a VM?  Right now, I have code that says read up to 32,000 rows, but I'd also like to have code that says read as many rows as possible until I've used 32MB of memory.  Maybe that is a different question, but I'd still like to know.


I'm slightly confused how Java works, I know the following to be true:  public static void main(String[] args) {     int c=0;     changeC(c);     System.out.println(c); // 0 }  public static void changeC(int c) {     c++; }   We know c outputs 0 because the changeC method does not change the original c  Now I'm looking at a , and it seems to following a similar concept.  Here is the code:  public int numIslands(char[][] grid) {     int count=0;     for(int i=0;i<grid.length;i++)         for(int j=0;j<grid[0].length;j++){             if(grid[i][j]=='1'){                 dfsFill(grid,i,j);                 count++;             }         }     return count; } private void dfsFill(char[][] grid,int i, int j){     if(i>=0 && j>=0 && i<grid.length && j<grid[0].length&&grid[i][j]=='1'){         grid[i][j]='0';         dfsFill(grid, i + 1, j);         dfsFill(grid, i - 1, j);         dfsFill(grid, i, j + 1);         dfsFill(grid, i, j - 1);     } }   In this case, the grid is passed to the void function dfsFills(). Yet, whatever dfsFill() does to grid, the grid in the numIslands() function is also updated.  Why does this act differently than my first example? Is one pass by reference and the other pass by value?

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


I'm using Jabref to manage my bibliography while writing my tech. paper in WinEdt . Jabref creates a .bib file where items look like this:  @Conference{Hegyi2006_KF,   Title                    = {A comparison of filter configurations for freeway traffic state estimation},   Author                   = {A. Hegyi D. Girimonte R. Babuska B. De Schutter ·},   Publisher                = {Intelligent Transportation Systems Conference, 2006. ITSC '06. IEEE; 10/2006},    Owner                    = {scc},   Timestamp                = {2015.12.28} }   I'm attempting to publish in Elsevier and they use an elsarticle.cls class where the bibliography is in \bibitem format compiled by natbib. I searched the net and forums to convert the bibtex to bibitem. I reached a result where a minimum working example as follows  \listfiles \documentclass{article} \usepackage[backend=biber]{biblatex} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib}  @article{Hegyi2006_KF,   Author                   = {Traffic England government website},   Note                     = {Page Visited 15-May-2015},   Url                      = {http://www.trafficengland.com},    Owner                    = {scc},   Timestamp                = {2015.05.18} }   \end{filecontents*} \addbibresource{\jobname.bib}  \begin{document}  Some text \autocite{Hegyi2006_KF}.    \printbibliography \end{document}[/latex]   should produce a .bbl file where I should copy its contents and replace the   \printbibliography command in my original .tex file. ...that should work!!!  However, the example states that the .bbl file will have the \bibitem stuff. Mine doesn't .... mine comes out in this format .... and has no \bibitem at all  % $ biblatex auxiliary file $ % $ biblatex bbl format version 2.5 $ % Do not modify the above lines! % % This is an auxiliary file used by the 'biblatex' package. % This file may safely be deleted. It will be recreated by % biber as required. % \begingroup \makeatletter \@ifundefined{ver@biblatex.sty}   {\@latex@error      {Missing 'biblatex' package}      {The bibliography requires the 'biblatex' package.}       \aftergroup\endinput}   {} \endgroup   \refsection{0}   \sortlist{nty}{nty}     \entry{Hegyi2006_KF}{inproceedings}{}       \name{author}{1}{}{%         {{hash=3ccb259afa5edafde7862b7ab6ee125a}{��}{�\bibinitperiod {A.\bibnamedelimi Hegyi\bibnamedelimb D.\bibnamedelimi Girimonte\bibnamedelimb R.\bibnamedelimi Babuska\bibnamedelimb B.\bibnamedelimi De\bibnamedelima Schutter}{A\bibinitperiod\bibinitdelim H\bibinitperiod\bibinitdelim D\bibinitperiod\bibinitdelim G\bibinitperiod\bibinitdelim R\bibinitperiod\bibinitdelim B\bibinitperiod\bibinitdelim B\bibinitperiod\bibinitdelim D\bibinitperiod\bibinitdelim S\bibinitperiod}{}{}{}{}}%       }       \list{publisher}{1}{%         {Intelligent Transportation Systems Conference, 2006. ITSC '06. IEEE; 10/2006}%       }       \strng{namehash}{3ccb259afa5edafde7862b7ab6ee125a}       \strng{fullhash}{3ccb259afa5edafde7862b7ab6ee125a}       \field{sortinit}{A}       \field{sortinithash}{b685c7856330eaee22789815b49de9bb}       \field{labelnamesource}{author}       \field{labeltitlesource}{title}       \field{title}{A comparison of filter configurations for freeway traffic state estimation}     \endentry   any suggestions??? to reach the \bibitem thing....

Suppose that I moved from BibTeX to biblatex. With BibTeX I just copied the content of .bbl file into final version of my paper before submitting it to a journal. What should I do at same stage having .bbl file produced by biblatex? It is of quite different format.