Im new to (command line) linux, and as a learning exercise i decided to turn my old PC i had lying arround into a linux server running Ubuntu 20.04 LTS. However, while i was configuring it, i like a complete dummy chose to encrypt entire hard drive. That is not a good thing for me, since i want my "server" to automatically start some thing i have on it if it for some reason reboots without me having to do anything about it. So naturally, first thing i tried was seeing if there was a way to remove the encryption on my disk, but that requires a copying all my data to another hard drive, wich i dont have. Then i saw on a VERY OLD answer to a question here that it might be possible to have your password stored in plain text on a non encrypted part of the disk, and have it be automatically inputed for you, but with no mention of how. Sooo how would i go about doing that? (Btw i understand that it renders the encryption useless, but i dont really care, its not needed for my purposes). Also please explain what everything does on your answer if possible, the whole point of this was to learn anyways

Goal  I am looking for non interactive way to decrypt a root file partition and a swap partition encrypted with LUKS the next time the system reboots. As well as this, I need a way to undo it after the reboot so that it after one more reboot will require the password again (or even a new password).  The system uses LVM.  I don't want to have to type the password on the system, or use a different system to unlock it, it has to unlock itself that one time.  I have the password it is encrypted with, and would be willing to save it in cleartext on the harddrive. I am not concerned with security at this step.  Background  I have a flow for deploying Ubuntu that is based on an Ubuntu server installation with a custom preseed and kickstart file, kickstart installs a service that run after the first reboot (and only the first reboot) and then reboots again. I am trying to implement LUKS disc encryption in this flow, but I need it to remain non interactive, so it has to be able to restart the first time without a password.  The password set during installation is temporary and will be changed by the service that runs after the first reboot, so the first password can be stored in clear text.  Things I have looked into before posting this question  I have done my fair bit of Googling to try and figure this one out, and most of what I find point towards a solution that swaps out the initramfs file.  I have found multiple resources that explain how to use this to allow for remote unlocking the system, but I need to do it without interaction. Here is one such resource:   The closest thing to a solution I think I have found, is this resource which is supposedly a way of accomplishing what I want for a VPS solution, but it is just a bunch of commands with no explanation, and I don't know how to adapt it:   I also found this resource for ArchLinux , and I have tried adding the kernel parameters, but I have not had any luck with that either. I don't know if it is because LUKS does not support these kernel parameters.


I want to execute any sample command of cmd.exe through c# code. Eg. Time/ver this command i want to execute through c# code.  1. By opening cmd.exe and execute. 2. by hiding cmd.exe and get the cmd response in the code.  In this both cases i want to execute. Can you please suggest me correct code links. I have been trying various codes of Process() class but not working for me.  Thanks in advance !!

How do I invoke a console application from my .NET application and capture all the output generated in the console?   (Remember, I don't want to save the information first in a file and then relist as I would love to receive it as live.)


I've tried enabling from settings, doing sudo /etc/init.d/bluetooth start, sudo /etc/init.d/bluetooth restart, rfkill list says   2: hci0: Bluetooth Soft blocked: no Hard blocked: no   I have rfkill unblock bluetooth in rc.local but it just won't turn on. If I try enabling it via checkbox from settings the checkbox changes state but the text "bluetooth is disabled" is still there. Btw, yes, I've double checked that I didn't disable it with hardware button. How do I make bluetooth work on 16.04?   UPD: requested console output  yxfxmx@yxfxmx-pc:~$ lspci -knn | grep Net -A2; lsusb 13:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01) Subsystem: Hewlett-Packard Company BCM43142 802.11b/g/n [103c:804a] Kernel driver in use: wl Bus 001 Device 002: ID 8087:8000 Intel Corp.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 004: ID 05c8:022a Cheng Uei Precision Industry Co., Ltd (Foxlink)  Bus 002 Device 003: ID 0a5c:216d Broadcom Corp.  Bus 002 Device 005: ID 22b8:2e76 Motorola PCS  Bus 002 Device 002: ID 0458:012b KYE Systems Corp. (Mouse Systems)  Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   UPD2:  yxfxmx@yxfxmx-pc:~$ dmesg | grep Blue [    6.446411] Bluetooth: Core ver 2.21 [    6.446433] Bluetooth: HCI device and connection manager  initialized [    6.446438] Bluetooth: HCI socket layer initialized [    6.446442] Bluetooth: L2CAP socket layer initialized [    6.446450] Bluetooth: SCO socket layer initialized [    8.478642] Bluetooth: hci0 command 0x1001 tx timeout [    8.827513] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [    8.827519] Bluetooth: BNEP filters: protocol multicast [    8.827526] Bluetooth: BNEP socket layer initialized [   16.474175] Bluetooth: hci0: BCM: Reading local version info failed (-110) [   18.478015] Bluetooth: hci0 command 0x1001 tx timeout [   26.473545] Bluetooth: hci0: BCM: Reading local version info failed   (-110)   UPD3: after installing firmware  yxfxmx@yxfxmx-pc:~$ dmesg | grep Blue [    6.249804] Bluetooth: Core ver 2.21 [    6.249829] Bluetooth: HCI device and connection manager initialized [    6.249835] Bluetooth: HCI socket layer initialized [    6.249839] Bluetooth: L2CAP socket layer initialized [    6.249858] Bluetooth: SCO socket layer initialized [    8.393500] Bluetooth: hci0 command 0x1001 tx timeout [    8.877281] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [    8.877286] Bluetooth: BNEP filters: protocol multicast [    8.877292] Bluetooth: BNEP socket layer initialized [   16.389750] Bluetooth: hci0: BCM: Reading local version info failed (-110) [   18.393828] Bluetooth: hci0 command 0x1001 tx timeout [   26.390149] Bluetooth: hci0: BCM: Reading local version info failed (-110) [  430.267410] Bluetooth: hci0 command 0x1001 tx timeout [  438.263237] Bluetooth: hci0: BCM: Reading local version info failed (-110) [  438.268233] Bluetooth: hci0: BCM: chip id 70 [  438.284219] Bluetooth: hci0: BCM43142A [  438.284225] Bluetooth: hci0: BCM (001.001.011) build 0000 [  438.742225] Bluetooth: hci0: BCM (001.001.011) build 0227 [  438.758225] Bluetooth: hci0: Broadcom 43142 Bluetooth 4.0 Adapter [ 3600.950603] Bluetooth: hci0: BCM: chip id 70 [ 3600.966645] Bluetooth: hci0: Broadcom 43142 Bluetooth 4.0 Adapter [ 3600.966653] Bluetooth: hci0: BCM (001.001.011) build 0227 [ 3601.421687] Bluetooth: hci0: BCM (001.001.011) build 0227 [ 3601.437680] Bluetooth: hci0: Broadcom 43142 Bluetooth 4.0 Adapter

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


A 10 meter graphene pulley with 10,000 teeth, attached to a second graphene pulley of 10mm with 10 teeth both in a low temperature vacuum chamber.  The first graphene pulley is being rotated by a powerful motor powered by nuclear energy. Rotating at 300,000 RPM. Wouldn't the second pulley rotate faster than the speed of light?  (2Pi * 10M /60s) *300,000RPM = 314,159m/s. Since it's attached to 10mm with 10 teeth. It means every one revolution of the first pulley, the second pulley would rotate 1,000 times. So, 314,159m/s * 1,000 = 314,159,265m/s.  Where is the impracticability in the above solution?

Imagine a bar   spinning like a helicopter propeller,  At $\omega$ rad/s because the extremes of the bar goes at speed  $$V = \omega * r$$  then we can reach near $c$ (speed of light) applying some finite amount of energy just doing   $$\omega = V / r$$  The bar should be long, low density, strong to minimize the amount of energy needed  For example a $2000\,\mathrm{m}$ bar  $$\omega = 300 000 \frac{\mathrm{rad}}{\mathrm{s}} = 2864789\,\mathrm{rpm}$$  (a dental drill can commonly rotate at $400000\,\mathrm{rpm}$)  $V$ (with dental drill) = 14% of speed of light.  Then I say this experiment can be really made and bar extremes could approach $c$.  What do you say?   EDIT:  Our planet is orbiting at sun and it's orbiting milky way, and who knows what else, then any Earth point have a speed of 500 km/s or more agains CMB.  I wonder if we are orbiting something at that speed then there would be detectable relativist effect in different direction of measurements, simply extending a long bar or any directional mass in different galactic directions we should measure mass change due to relativity, simply because $V = \omega * r$  What do you think?


Why are we using the squared residuals instead of the absolute residuals in OLS estimation?  My idea was that we use the square of the error values, so that residuals below the fitted line (which are then negative), would still have to be able to be added up to the positive errors. Otherwise, we could have an error of 0 simply because a huge positive error could cancel with a huge negative error.  So why do we square it, instead of just taking the absolute value? Is that because of the extra penalty for higher errors (instead of 2 being 2 times the error of 1, it is 4 times the error of 1 when we square it).

In the definition of standard deviation, why do we have to square the difference from the mean to get the mean (E) and take the square root back at the end? Can't we just simply take the absolute value of the difference instead and get the expected value (mean) of those, and wouldn't that also show the variation of the data? The number is going to be different from square method (the absolute-value method will be smaller), but it should still show the spread of data. Anybody know why we take this square approach as a standard?  The definition of standard deviation:  $\sigma = \sqrt{E\left[\left(X - \mu\right)^2\right]}.$   Can't we just take the absolute value instead and still be a good measurement?  $\sigma = E\left[|X - \mu|\right]$


I tried by solving inequality of numerator and denominator Numerator: $(1+a)(1+c)(1+c) \leq \frac{(3 + a + b + c)}{3} = \frac{(3 + 1)}{3} = \frac{4}{3}$ Denominator: $(1-a)(1-c)(1-c) \leq \frac{3 - (a + b + c)}{3} = \frac{(3 - 1)}{3} = \frac{2}{3}$ By combining the 2 equations $\frac{Numerator}{Denominator} \leq \frac{4/3}{2/3} = 2$ But that's not the answer (I know I found max value). Can anyone help me? Is the method I am following can be used in other types of question? Solving Numerator and denominator inequality and than dividing both inequatlity.... ANSWER: 8

If $x,y,z>0$ are not equal and positive and if $x+y+z=1$ the expression   $$\frac{(1+x)(1+y)(1+z)}{(1-x)(1-y)(1-z)}$$  is greater than what quantity?


My daughter didn't have a phone that allowed the Pokemon go App so we downloaded it on to my S6. She now has a phone that allows the app. Could you please tell me how I transfer her game from my S6 to her Samsung Galaxy Grand Prime? She doesn't want to be forced to start over. I am technology challenged so I the information as simple as possible. Also is it possible to change the email to hers?

I was having trouble playing the game on my android so I downloaded it to my wife's phone (Galaxy S6). I read some posts on how to get it running on my android and it worked but, my level 7 account is on my wife's phone.  How do I get it back to my android? When I sign out and back in it doesn't ask for any sign in info. I've tried deleting the app's data and even uninstalling and re-installing, but it still doesn't ask for sign-in info.


After solving the Schrodinger Equation and getting the stationary states (separable solutions), we say the the general solution of the Schrodinger Equation is just the linear combination of these separable solutions. My question is: How do we know that it is exhaustive, i.e., covers all possible solutions for the wave function? (If possible please also give a proof, although just an explanation is also fine.)

I always heard the eigenfunctions of a  form a complete basis. Where can I find a proof in infinite dimension space? Presumably readable for physicists.


I have a table in my document, the code of which is as follows:  \onecolumn \begin{table}[b] \centering     \begin{tabular}{cccr}     \hline     \textbf{Hydrofob del}   & \textbf{Hydrofil del}             & \textbf{Samlet tensidstruktur}       & \textbf{Tensidtype}    \\ \hline     Alkylbenzen             & \ce{--SO_3^-}               & alkylbenzensulfonater       & anionisk      \\     \ce{CH_3[CH_2]_nCH_2}-- & --\ce{OSO_3^-}      & alkylsulfater               & anionisk      \\     \ce{CH_3[CH_2]_nCH_2}-- & --\ce{COO^-}              & sæber                       & anionisk      \\     \ce{CH_3[CH_2]_nCH_2}-- & --\ce{[OCH_2CH_2]_mOSO^-} & alkoholethersulfater        & anionisk      \\     \ce{CH_3[CH_2]_nCH_2}-- & --\ce{CH(SO_3^-)C(O)OCH_3} & methylestersulfonater       & anionisk      \\     \ce{CH_3[CH_2]_nCH_2}-- & --\ce{[OCH_2CH_2]_mOH}     & alkoholethoxylater          & nonionisk     \\     \ce{CH_3[CH_2]_nCH_2}-- & --\ce{N^+(CH_3)_2(CH_2} $\phi$) & alkylbenzyldimethylammonium & kationisk     \\     \ce{CH_3[CH_2]_nCH_2}-- & --\ce{[NCH_3)_2]\rightarrow O}        & alkyldimethylaminoxider     & nonionisk     \\     \ce{CH_3[CH_2]_nCH_2}-- & --\ce{N^+(CH_3)_2CH_2COO^-} & betainer                    & zwitterionisk \\ \hline     \end{tabular}  \caption{I denne tabel kan man se byggestenene for de vigtigste tensider i vaskemidler.} \label{tab:vigtigste tensider} \end{table}   Now the problem is that LaTeX just centers the table in the middle of a new page. I just want it at the bottom of a two-column page.

I'm posting today because I would like to reduce white space in a document I'm writing. The content is two-columns but I have floating tables that span across both columns (table*).   At some point, the text ends in the beginning of the first column of a new page. I would like to include my table on this page since it has a lot of free space below the text, but when I insert the table* right after the text, it goes to the top of the next page instead:    Do you know a way of obtaining the desired behavior?  Minimal working example :  \documentclass{article} \usepackage{lipsum}  \begin{document} \twocolumn  \paragraph{} \lipsum[1]  \begin{table*} \centering \begin{tabular}{|c|c|c|c|} \hline Column 1 & Column 2 & Column 3 & Column 4 \\ \hline Column 1 & Column 2 & Column 3 & Column 4 \\ \hline \end{tabular} \end{table*}%   \end{document}


I am quite new to python so this may be a stupid question. a = 0 def example():          a = a + 1     print(a)  example()  Why is a unresolved when it seems to be above?

The following code works as expected in both Python 2.5 and 3.0:  a, b, c = (1, 2, 3)  print(a, b, c)  def test():     print(a)     print(b)     print(c)    # (A)     #c+=1       # (B) test()   However, when I uncomment line (B), I get an UnboundLocalError: 'c' not assigned at line (A). The values of a and b are printed correctly. This has me completely baffled for two reasons:   Why is there a runtime error thrown at line (A) because of a later statement on line (B)? Why are variables a and b printed as expected, while c raises an error?   The only explanation I can come up with is that a local variable c is created by the assignment c+=1, which takes precedent over the "global" variable c even before the local variable is created. Of course, it doesn't make sense for a variable to "steal" scope before it exists.  Could someone please explain this behavior?


This won't work, because all the stdio will go to stderr:  webpack -w --ignore=*.js | grep ignore   so I try this:  webpack -w --ignore=*.js > grep ignore 2>&1   but that will write a file called "grep" to the filesystem lol  how I can I send stderr to stdout so that I can grep it in this scenario?

I'm trying to capture all of the output of a build operation, and send it to myprogram. I seem to only be able to capture part of it. This is what I'm trying:  make clean && make DISABLE_ID3TAG=1 CFLAGS="-O2 -DNDEBUG -W64" | myprogram &2 > 1   I also tried:  make clean && make DISABLE_ID3TAG=1 CFLAGS="-O2 -DNDEBUG -W64" &2 > 1 | myprogram   Basically I want to send everything to stdout and then do something with that. Currently I'm only capturing part of the output, and the other part is going to the screen. How can I pipe everything to another program?


I stumbled upon  an intriguing behaviour of a list of string lists in Python 3.7.3. I define the lists of lists as below, and  update an element:      s = [['']*2]*2     s[1][1] =  'why?'     print(s)   It prints:  [['', ''], ['', '']] [['', 'why?'], ['', 'why?']]   I cannot figure out why is not updated the right element. A first thought was to define s = [['    ']*2]*2, with 4 spaces = len('why?'), as elements, but the wrong update persists. Redefining the list s explicitly, and performing the same update as above, I get the right result:      s = [['', ''], ['', '']]     s[1][1]= 'why?'     print(s)   [['', ''], ['', 'why?']]   I'm  working with such lists as lists of  tooltips associated to  large  heatmaps. I can avoid this issue converting the list of n-spaces lists to a np.array, but I'd like to know why the above odd update occurs. Thanks!

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 am looking to calculate time difference between the two below  Value1=2016-10-13 14:19:23 Value2=2016-10-13 18:19:23    I want to get difference in the form of hours/minutes. Any quick solution available?.

I often want to make some quick date calculations, such as:   What is the difference between these two dates? What is the date n weeks after this other date?   I usually open a calendar and count the days, but I think there should be a program/script that I can use to do these kinds of calculations. Any suggestions?


I installed ubuntu alongside windows and I was wondering if I can access the contents from ubuntu while booted into Windows. the reason is that ubuntu is stuck in a boot loop.

I have two questions on ext4:   Is there currently a way to mount an ext4 partition in Windows (XP/Vista/7) to get basic read support? If not, are there any plans to support this someday?


I have a list with 15 numbers in, and I need to write some code that produces all 32,768 combinations of those numbers.   I've found  (by Googling) that apparently does what I'm looking for, but I found the code fairly opaque and am wary of using it. Plus I have a feeling there must be a more elegant solution.  The only thing that occurs to me would be to just loop through the decimal integers 1–32768 and convert those to binary, and use the binary representation as a filter to pick out the appropriate numbers.   Does anyone know of a better way? Using map(), maybe?


I have a website with one section not displaying images after migration, the src attribute returns empty urls, the site is intpro.co.zw and the section im referring to is on Latest Properties What could be the problem, its only happening on this particular server.  thanks in advance

I need to move a WordPress site hosted on Dream Host to the companies servers. To do so I used the built in import and export feature that comes with WordPress (using a WordPress export file). However, it did not copy over images from the site, and didn't preserve the featured images.  Using import/export, is it possible to copy over the images and featured images as well? If not, is there another method I could use?


I'm trying to fill a complex face created with via an SVG, my workflow is as follows :  Import SVG convert to mesh simplify mesh fill ----------this is where I'm stuck  By filling the face it's creating additional edges by splitting the faces, not the end of the world but i want to inset the (one) face so that I can bevel the edge slightly. Having these extra faces in there causes them to overlap, and creates a mess.  I've tried dissolving the problem edges, but this doesn't do anything I've tried deleting the vertices attached to the edges, but this removes the face too, and filling the hole created just puts me back to square one.  Stumped! Please help and thanks in advance]

So, I'm working on a control station that has buttons. It is a one-mesh creation, that means, I don't want to create buttons and things like that separated from the main mesh, but as you can see, I have problems. I would like to make the highlighted parts to be one with the main part around them. I've tried everything, and I have this problem on multiple creations. Any idea?  Update: I've added another example of the problem. I want them to be one face, instead of two. (2nd picture)


I am trying to make a game, but I have run into a roadblock I cannot figure out. this is the part of my code that I am failing to understand  from random import randint apple = (0, 0) def placeApple():     apple = (randint(0, 19), randint(0, 19))     fillCell(apple[0] * 20, apple[1] * 20, appleColor) print(apple)   I feel like this should change apple to a point with a random integer 0 through 19 but when I call print(apple) in the console I always get (0, 0)


I use the code:  def foo(x):     print(type(x))     if x is not int:         raise(TypeError)     #do smth  foo(100)  The log is , but TypeError is raised. Why?

What is the best way to check whether a given object is of a given type? How about checking whether the object inherits from a given type?  Let's say I have an object o. How do I check whether it's a str?


I have 2 known positive integers, $a$ and $b$ . Is there a ' standard ' formula to find the lowest (if possible) positive integers $x$ and $y$ , so that the following is true?     $$xa = yb + 1$$

When I am faced with a simple linear congruence such as  $$9x \equiv 7 \pmod{13}$$ and I am working without any calculating aid handy, I tend to do something like the following:  "Notice" that adding $13$ on the right and subtracting $13x$ on the left gives: $$-4x \equiv 20 \pmod{13}$$  so that $$x \equiv -5 \equiv 8 \pmod{13}.$$  Clearly this process works and is easy to justify (apart from not having an algorithm for "noticing"), but my question is this: I have a vague recollection of reading somewhere this sort of process was the preferred method of C. F. Gauss, but I cannot find any evidence for this now, so does anyone know anything about this, or could provide a reference? (Or have I just imagined it all?)  I would also be interested to hear if anyone else does anything similar.


I can get a list of drives plugged into a computer with File.listRoots(), but I only get the drive letter.  How can I get the actual name of the drive (e.x. "Local Disk", "DVD RW Drive", etc.) as it's shown in Windows Explorer?

On my Windows machine, my main hard drive has the letter C: and the name "Local disk".   To list the drive letters in Java on Windows, the File object has the static listRoots() method. But I can't find a way to acquire the drive names (as opposed to the drive letters) on Windows.  Has anyone tried this before?


I need to resize a point on zoom.  When you deep zoom the point get larger and on zoom out the point is smaller.     seems to have exactly the answer.  @CaptDragon posted an image of exactly what I need and then a demo, HOWEVER the demo is now dead.  I've looked into the API that @Mapperz mentions but for whatever reason cannot get my point to resize larger when zooming in.  Can anyone provide a working example similar to that of @CaptDragon?

I've added a point on map like this but it is static in size.   How to resize that point on zooming?  Map on zoom out


I wanted to change the chapter numeration in such a way that the introduction of my thesis has number I and the first chapter has number 1 and so on. So I changed the style of the numeration using Roman for the Introduction and Arabic for the other chapters in this way:  \documentclass[11pt,a4paper]{book}   \usepackage{hyperref}  \begin{document}  \stepcounter{chapter} \renewcommand*\thechapter{\Roman{chapter}}   %set the style to roman  \chapter{Introduction} My amazing intro \newpage  \setcounter{chapter}{0}                     %reset the chapter counter: here lies the problem, I guess \renewcommand*\thechapter{\arabic{chapter}} %change style to arabic  \chapter{Chapter 1} My first chapter \newpage \chapter{Chapter 2} My second chapter. \end{doument}   I got what I wanted: the numeration of section and equations in the intro. is of the type I.1 and frot he chapter 1 I have 1.1, but now the hyperref package makes some mess: since in this way the introduction and the first chater are, according to the internal numeration, both the chapter 1, references to section 1.1 is actually section I.1 and so on.  To be clearer: when in the pdf I click on the reference to the section 1.1, the link sends me to the section I.1 in the introduction.  How can I solve this?

The following MWE produces a PDF whose TOC has two entries: “Foo” and “Bar” with correct page numbers. So far, so good. However, upon clicking on the link to “Bar”, I am taken to the page for “Foo” instead.  \documentclass{report} \usepackage{hyperref} \newcommand*\backmatter{\setcounter{chapter}{0}}  \begin{document} \tableofcontents \chapter{Foo} \backmatter \chapter{Bar} \end{document}   (Produced with pdflatex, run twice.)  This MWE is whittled down from a (much!) more complex document but the above does seem to reproduce the error reliably.  Re-setting the chapter count seems to confuse hyperref, even though the page references are still accurate. Notice that in my real document, \backmatter does other things, including setting the numbering style to alphabetical so there’s no chance of confusion even though both chapters are ostensibly labelled as “Chapter 1”.  How do I fix this? Is this a bug? Are there workarounds?


If you look through a pane of common window glass the way it was meant to be looked through, it's clear.  But if you look at it from the side it's not very clear at all, but a dark green color.  One might think at first that this is due to thickness, that the glass is actually green (but highly translucent) throughout, but when looking straight through a pane it's thin enough that you don't notice the green color.  But if you pick up a small piece of a broken window, a shard no larger than the thickness of a window pane, you can still see that it's transparent from one direction but dark green when looked at from the side, so clearly (no pun intended) it has to do with some property of the glass itself and the angle at which it's looked through, rather than the thickness of the glass.  Can anyone explain why the same uniform material has a radically different color depending on which way the light travels through it on the way to your eyes?

When I look at a glass block at an angle the edges appear green, but when I look at the edge sideways, so that is directly in front of my eyes it appears transparent. Why?


I created a scene and set up the camera and everything looks OK in the  viewport. After I render the result looks different than expected.  See the images below:   Camera view render in viewport. That's what I want The result after I hit render.

Why would there be a difference in aspect ratio between a rendered image, and the camera perspective in the viewport? My render is getting squashed to fit a different aspect ratio.  Here is a scene with a circle and emission shader.  Camera perspective in the viewport:   Render:


I used this code to do citations for the following reference   \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel}  \usepackage[backend=biber,style=authoryear]{biblatex} \addbibresource{SMC_paper.bib}  \begin{document} Let's cite! The Einstein's journal paper \cite{al2004sliding} \printbibliography \end{document}    this reference:  @article{al2004sliding,    title = {Sliding mode control of a magnetic levitation system},    author = {Al-Muthairi, NF and Zribi, M},    journal = {Mathematical Problems in Engineering},    volume = {2004},   number = {2},   pages = {93--107},   year = {2004},   publisher = {Hindawi Publishing Corporation}  }   but it gives me this result     Let's cite! The Einstein's journal paper al2004sliding

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography}


It has bothered me for a while now that the history of Westeros seems so long, and yet the people have stayed the same. Take languages: Modern English didn't exist even 1,000 years ago; its ancestor Old English is barely comprehensible to us modern speakers; and yet the Common Tongue appears to be as widely understood in all of Westeros, even the Mountains of the Moon, probably since the Andals came.  And then lineage. Can any family on Earth count their heritage at nearly 8,000 years old as the Starks can? Surely after enough time the family would have split or lost its name or died out. Take orders like the Night's Watch, also founded 8,000 years ago: Christianity as we understand it now has existed a quarter of that time. It's a wonder the Watch didn't dry out sooner.  Take technology; the historical allegory to Game of Thrones, the War of the Roses, ended in 1487. In 527 years, humans have gone to the Moon, invented the Large Hadron Collider and the Internet, established equal primogeniture in England, and thought about colonising Mars. As it stands, no one from Westeros has even discovered electricity.  This may read like a rant, but I promise there is a question here. The question is: is there any in-universe explanation for why Westeros is so rigid? Why technology hasn't progressed beyond quills and torches; why language hasn't split and stratified and evolved; why noble Houses are so long-lived; why women still have few rights and bastards far fewer?

In Game of Thrones, their society dates back 8,000 years.  Why have there been no advances in technology?


The font in mathematical papers of Elsevier is elegant, as the figure below shows. I'd like to know the name of this font, that contains paconte and the command to call it.    For those who have access to a link to the PDF article is .  I suspect that this font is protected by copyright and therefore there is a free package it. If this is the case then I would like a font in a free package available.  Is that possible?

Is it possible to identify the font used in a specific document/picture?  Answers to this question should identify:   Possible methods to do this (perhaps one answer per method) and adequately describe how to use it (as opposed to merely stating it); Ways of finding the identified fonts, if possible (free or not); and Any prerequisites associated with the method used, if required (for example, "In order to use method X, your document has to be in format Y").   This question is meant as an FAQ, based on an . Its aim is to facilitate the community with the general procedures involved in font identification. Similar cases are solved on a per-usage basis on 's  tag.


Here is a screenshot on Meta StackOverflow showing 46 new bookmarks although I have only 2 bookmarks:  Not sure what this number is. Perhaps the total number of "new bookmarks" across all the StackExchange network? Here is a screenshot of my StackOverflow profile showing 41 new bookmarks, which is probably the correct number, which is probably included in the number on Meta StackOverflow (and the 5 others from other StackExchange sites?):  Same issue on Meta StackExchange, but with a different number and I don't have an explanation for this one (shows 9 new bookmarks although I have only 5 bookmarks):

I went to my user page this weekend and was surpised to see this:    I only have 11 questions favorited, so I thought that 34 seemed a bit high.  Then I realized that I actually have no idea what that number means.  I found an awesome answer by  to this question:    But, his observations ("The number next to the tab indicates how many posts have new answers since you last visited the tab") do not match up with what I'm seeing:     I don't have 34 questions favorited, so I don't think it's a count of questions with new answers It doesn't seem to be a tally of all the new answers on my favorited questions either (because there are only 32 answers total to those 11 questions).   Could we get a clear definition of what this number means?  This is obviously not a high-priority request, I'm just curious =)  I have left  the same for now, in case that is helpful to anyone doing detective work on this feature =)


I am new to LaTeX and trying to learn it by writing a CV. I tried to add a photo of me in the document. The code is below:  \documentclass[a4paper, 12pt]{article}  \usepackage{graphicx}  \begin{document}   \begin{figure}[h!]     \centering       \includegraphics[width=0.5\textwidth]{taufique}   \end{figure} \end{document}   'taufique' is the name of the jpg image file. It's located in the same directory where tex file is placed. I compiled with pdflatex but it is not being compiled. Error report says that compiler can't find the image file. What's the problem?

There several types of graphics files. In no particular order .jpeg .eps .pdf .png .tif .jif (and no doubt others). Some work with latex, dvips and some work with pdflatex. How am I supposed to know which?  Just to confuse matters, metapost produces .eps but I can use these with pdflatex as long as I put in a four line incantation.  Can anyone explain this?


I accidentally wrote over main hard drive with an img file using dd.  This thread is the  but my case is that I accidentally wrote my main hard drive.   I have a late 2013 MBP 13" Retina 256GB SSD 8GB RAM running Yosemite so I don't have a DVD drive. Due to the incident my OS won't boot at all.  I'm kinda worried about my old photos and movies of my fiance stored on my Hard Drive which is not yet backed up on an external drive.   I converted a 900+MB xubuntu.iso to an img and used dd command to write it out to a flash disk, but accidentally type disk1 instead of disk2. I just noticed it after the dd was executed already      # command used in mac terminal     sudo dd if=/path/to/xubuntu.img of=/dev/rdisk1 bs=1m   EDIT: I also tried single user mode but it throws in error because the OS was already overwritten :(  EDIT2: Corrected Laptop Model and added specs

I've made a bit of a balls up...  When attempting to create a bootable Ubuntu usb drive I accidentally ran dd on my main system drive :(  sudo dd if=/path/to/image.img of=/dev/rdisk1 bs=1m   I realised what I'd done pretty quickly but everything seemed fine so I re-ran the command on the correct drive /dev/disk2 and thought "phew not sure how I got away with that"... Then things started going wrong... I could continue using the applications I had open but opening anything new / accessing the hdd caused that thing to lock.  Sadly I haven't been using time machine, lesson learnt!   I spoke to AppleCare who said I need to reformat the machine but I'm really hoping there's some way to restore whatever 1m I destroyed (I'm assuming something to do with the partition information). Wishful thinking?  Also, AppleCare told me to restart, which means I can only user repair mode utils.  Help!


disclaimer : I am new to Congruences I have the Following Congruence, and I am a bit stuck when trying to solve it $2^{2^{(6L+2)}} + 11 \equiv 8 (mod19)$ what i have done is the following: $16^{2^{(6L)}} \equiv 16 (mod19)$ $16^{64^{(L)}} \equiv 16 (mod19)$ at this stage I am stuck, what can I do now ?

I accidentally found that $9^n\equiv 9\pmod{24} \quad \forall n \in \Bbb N^*$ But don't know how to prove it in an exact way. Please help


I wanted to report a small display bug on .  The user name text is cropped on the main view, and in the printscreen you can see that the last letter of each user is cut. (Like Bhargav Rao is seen as Bhargav Rac.)  I can reproduce the bug on Edge, Internet Explorer, and Chrome. I run on Windows 10.

There is an alignment issue with the displaying of usernames in the Stack Apps site's  and  tabs. The last characters of the usernames are not being displayed correctly.  Screenshot for reference:     After inspecting the element, the alignment issue appears to be at the in-line styling margin-right : 5px;. If margin-right : 5px; is changed to margin-right : 8px; the issue will be solved.  The issue is occurring in Chrome and IE 11 and the same fix solves the problem in both browsers.  Screenshot for reference:    Chrome Version 47.0.2526.106 dev-m IE Version 11.20.10586.0


I am trying to make a method in a helper class such that it fetches the record ids and stores them.  Others should be able to call this method whenever they require the record type ID instead of coding it.

I know of two approaches to get the recordtype id of a particular record type   Use SOQL   RecordType RecType = [Select Id From RecordType  Where SobjectType = 'Account' and DeveloperName = 'Business'];    Benifit here is if the admin changes the name of the record type, the code still works as we can use developer name   Using Describe  Map<String,Schema.RecordTypeInfo> rtMapByName = d.getRecordTypeInfosByName(); Schema.RecordTypeInfo rtByName =  rtMapByName.get('Business');    Saves on SOQL limits but uses a describe call.  What would be your choice and why   EDIT : Usage is for setting up recordtype while inserting records in apex or trigger


I have a Felt Z80 road bike like the one pictured below. Would it be possible to add disc brakes instead of the caliper brakes it came with? I don't plan on getting a new bike for awhile so I thought this would be a beneficial upgrade because I ride in the rain from time to time.    I suppose my other question would be, if it is possible, would it be worth it?

I've got an older, about 1991, model Cannondale SM1000 mountain bike purchased new.  Would it be worth it to convert to disk brakes and if so what would be the process?


I recently had a discrete math midterm that I am trying to review, and one of the topics that really has me confused is the idea of proving uniqueness.     Let $x \in \mathbb R$. Prove that the $\lceil{x}\rceil$ is unique; that is, prove that there is at most one $n \in \mathbb Z$ with $n − 1 < x ≤ n.$   My professor, when doing these problems in the past, tended to use $x'$ as a second variable when proving uniqueness, but I am struggling with comprehending the logic behind these proofs. I understand the structure, i.e. that you are trying to prove that $x, x'$ both make the predicate true and that implies that $x=x'$, but I can't execute any of these proofs.  Also, please note that I am not trying to prove the existence here, but instead uniqueness.  Any help would be greatly appreciated.

So this question in my book looks like it's essentially asking me to prove the ceiling function exists.   This question is slightly different to other things I found in related question because we're asked to prove the existence of the value in the middle of the inequality.  My initial thoughts are to define an $n \in N$ such that $n > x$ and $-n < x$  Following from this one can say $-n < x \leq n < x + 1$.  Now here I just lose any sort of direction and instead think of trying another method defining a set and using the properties of $inf$ and $sup$ to move from there. The tricky thing I encounter as a roadblock  is once again the proving of the existence of the $n$ which is different to many related questions.   Any help or solutions are appreciated, ready and rearing to reply :)


I recently installed ubuntu (dual boot with windows).  I want to boot windows automatically unless I manually choose ubuntu.  I use grub and startupmanager (yes I know obsolete). I am running ubuntu 14.04 and windows 7.   Can someone tell the procedure to do this?

How do I set the bootloader so that in my dualboot with Windows 7/Ubuntu 11.04, Windows start up as standard instead of Ubuntu?


Which is the first Empire novel of I Asimov, "The stars like dust" or "the currents of space"?

I believe that Asimov himself recommended reading them in chronological order, however I read them in the order that they were published and think that this is the best way to do it.  What is the correct order?


Let $X$ be a topological space and let $Y$ be a Hausdorff space. Let $D$ be dense in $X$. Prove that continuous functions $f, g : X \to Y$ which are equal in $D$ are equal in all $X$.  I'm a little stuck with this elementary proof. All help appreciated :)

Problem:      Suppose $f$ and $g$ are two continuous functions such that $f: X \to Y  $ and $g : X \to Y $. $Y$ is a a Hausdorff space. Suppose $f(x) = g(x)  $ for all $x \in A \subseteq X $ where $A$ is dense in $X$, then $f(x)  = g(x) $ for all $x \in  X $.   Attempt at a solution:  Put $h(x) = f - g $. Therefore, $h: X \to Y $ is continuous and $Y$ is Hausdorff by hypothesis. Also we know $h(x) = 0 $ for all $x \in A $ such that $A$ is dense in $X$. I want to show that $h(x)$ vanishes everywhere in $X$. We can show $h(x) = 0 $ for all $x \in X \setminus A $. Suppose $h(x) > 0 $ on $X \setminus A$. Pick points $y_1,y_2 \in Y $. Since $Y$ is Hausdorff, can find open set $O_1, O_2 \subseteq Y $ which are disjoint such that $y_1 \in O_1$ and $y_2 \in O_2$. By continuity, $f^{-1}(O_1), f^{-1}(O_2)$ are open in $X$.   I know that if I can show that one of the $f^{-1}(O_i)$ lies in $X \setminus A $, then we would have a contradiction since we have non-empty open set in $X \setminus A$ and this implies $A$ cannot be dense in $X$. But this is the part I am stuck. Any help would greatly be appreciated.  Also, Would be be possible to prove this without using the Hausdorff condition on $Y$?


I made a my program in c++ and generated its executable but every time I need to use my program I need to change my directory to the folder and then execute it.   How do I make my program run like an installed package so that I don't have to shift my directory every time I need to run it?

What should I do if I want to be able to run a given program regardless of my current directory? Should I create a symbolic link to the program in the /bin folder?


I have two separate bib files. One for journals and other for conference publications. Now I want to publish both of them in the CV. Any idea how to do it? \renewcommand{\refname}{Journal Publications} \nocite{*} \bibliographystyle{IEEEtran} \bibliography{MMjournals}  \renewcommand{\refname}{Conference Publications} \nocite{*} \bibliographystyle{IEEEtran} \bibliography{MMconference}   The problem with above code is, it is publishing the MMjournals twice. It did not publish the conference proceedgins. How to fix it?

My promoteur has a very unusual requirement: the bibliography needs to be sorted first by specific type of referred item, next by author and by year of publication.   I managed to get this custom sorting done by using makebst and manually editing the .bst, but now there is even greater problem for me: the bibliography itself must be sectioned, so it should look something like this:    Sources  Aahn, A. 2008, whatever dude  Aahn, A. 2009, whatever dude, really  Dictionaries  Encyclopeadia of everythinga, 1999  Wikipaedia, 2000-today  Articles  Aahn, B. and Boss, C., 1889 This issue is not to our concern, good man  Other Materia  Bactera, E.C., 1987, How we totally not-wiped the whole earth.    Can this be done automagically with bibtex? Or do I have to edit the generated file manually?


Do enhancement bonuses to ability scores stack?    Such as from a Belt of Giant Strength and from the spell Bull's Strength?

My group and I have a question about stacking enhancement effects of spell and items. For example: A fighter got ogre power gauntlets +2; in a fight, the wizard cast Bull's Strength on him, which gives +4 strength bonus of same type as the ogre gauntlets. Do these effects stack?  Sorry for my English but I'm used to play with translated game...


Why speed was defined as distance over time ? Are there possible ways to define speed like distance plus time or distance minus time or distance times time

I have a rather basic, maybe even dumb, question. I was wondering why speed is defined as it is:  $s = d/t$  Of course, what the equation means is not too difficult to understand. However, there are many ways that d and t could be related, for instance:  $s = d + t$  I am not sure who the first person to define speed was, but I was wondering how they made the decision to define speed as distance divided by time.


I am upgrading my fathers computer that has Ubuntu on it, however he wants to keep Ubuntu as an operating system, I heard of dual boot and thought it would be worth a try, however I can't back up the data because most of it is password protected and he forgets his password. Is there any way I could try and add windows 7 onto the Ubuntu desktop without having to take Ubuntu off first, or deleting all the information on the computer if I put windows 7 and it then takes priority. I'm not sure how much of that made sense, but if anyone knows another method of dual booting windows 7 and Ubuntu that would be greatly appreciated.

I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this? I can't lose my Ubuntu files, and I'm afraid that I might break . Go  for UEFI only!


RAW, advantages and disadvantages cancel each others out, always. Here I am interested in the case, where these two (found at PHB - Combat - Unseen Attackers and Targets) cancel each others out:  When you Attack a target that you can’t see, you have disadvantage on the Attack roll.   When a creature can’t see you, you have advantage on Attack rolls against it.  I just don't like how combining these work out. I mean, take an ax and go chopping some incapacitated or prone wood while blindfolded, and see how it goes. And then there are the "abuses" of this, like turning IMHO big disadvantages (fluff-wise, like 600' long bow shot) into a straight roll by creating an area of Darkness, which you can then move behind/into between looking at the enemy and actually taking the attack action. But this isn't the question, but just for the context, explaining why I am asking the following question: On an upcoming campaign, I am planning to have the house-rule: If you don't see the target you are attacking, you will have disadvantage. What are the balance and game play implications of this house rule? Will it break something, or have some nasty unintended consequences?

The  (PHB p. 194-195) specify that attacking a creature that cannot see you = advantage, and attacking a creature you cannot see = disadvantage:  When you attack a target that you can't see, you have disadvantage on the attack roll. This is true whether you're guessing the target's location or you're targeting a creature you can hear but not see. If the target isn't in the location you targeted, you automatically miss, but the GM typically just says that the attack missed, not whether you guessed the target's location correctly. When a creature can't see you, you have advantage on attack rolls against it. If you are hidden–both unseen and unheard–when you make an attack, you give away your location when the attack hits or misses.  This creates some arguably counterintuitive situations when neither party in a conflict can see each other, like , or . As a result, I am considering making the following modification (in bold) to the second rule in my game:  When a creature can't see you, and you can see it, you have advantage on attack rolls against it.  This would mean that being unable to see your target gives you disadvantage regardless of whether they can see you or not, instead of the disadvantage and the advantage cancelling themselves out. What impact might this have on game balance, in terms of feature interactions or anything else? Does this change cause any major balance shifts?


I know how to create an extent indicator in Layout View, but I have no idea how to create one for Data View. I have 25 bookmarks created for Data View and what I need to do is to display all of them in Data View. I work in ArcMap 10.3.

We have this large project in ArcGIS with 30 maps with different extents using Bookmarks to pan between these maps/pages.   Now we would like to use Data driven pages instead. The question is, is it possible to convert bookmarks to data driven pages or do we have to create a lot of polygons covering each map extent?


I have a file test.txt. It has 120 lines in it. I want to add on line 70 a new line "test" so I get: line 68 line 69 test line 70 line 71  How can I do it in one line command without using text editors such as vim?

How can I insert some text in specific lines of a file? What is the simplest method that I can use? (bash, sed, awk?) What I want to do might be simple, but I don't know where I should start. It takes too much time for me to try to do this manually (I have a lot of files that I have to change for Excel/Calc later use). Here is my input file example: 4.06 4.05 5.04 4.06 34.50 56.06 45.33 36.44  And I want something like this (insert text before line 1 and 5): Exp1     4.06 4.05 5.04 4.06 Exp2 34.50 56.06 45.33 36.44  How can I do this?


I need place a visualforce page as tab in lightning experience. I created a visualforce tab and added it to salesforce1 navigation but it is not showing up.. I need to place a tab on the below place to open a VF page..

How to configure/customize new Sidebar(brought instead of old horizontal tab bar) in the new Lightning Experience? Like adding or removing objects?


A have a problem which is I am sending Datetime to view. In HTTPGET i havent any problem i mean it shows date as formatted. But when i try to post it to controller it does not post. The date  changing. For example if my date 25-03-2015 (25th March 2015) on posting its changing, and trying to take "25" as mounth. When i enter 11/10/2017 everything is ok. When i enter first digit (which is 11 in this example) higher than 12 it does not post. You can see my model and view parts.  Thank you.  Model:    [DisplayFormat(DataFormatString = "{0:dd-MM-yyyy HH:mm}", ApplyFormatInEditMode = true)] public DateTime AppointmentDate { get; set; }   View:   <div class="input-capsule appointment-date">      @Html.LabelFor(m => m.AppointmentDate, "Randevu Tarihi:")      @Html.TextBoxFor(m => m.AppointmentDate, "{0:dd-MM-yyyy HH:mm}", new {@class = "form-control required" }) </div>

How can I specify a custom date formate to be validated with the  for jQuery?


is there any plan to update the  from version 0.17.0 to version 0.20.0? (I'm new here. Sorry if this is the wrong place to ask) Background:  Our software is based on OpenSC. Due to an unknown problem, OpenSC 0.17.0 does not work for us. However, OpenSC 0.20.0 works just fine. Our customer wants to stick to using Ubuntu 18.04 LTS, so updating to Ubuntu 20.04 LTS is not an option  Thanks in advance, Felix

Why are packages in the official Ubuntu repositories older than the latest (upstream) versions from Debian Sid, PPAs, the authors, etc.?


Lets say I have a database that contains X SHA256 hashes . How do I calculate the likelihood of a me creating a hash out of random values that collides with any hash in the stored database?

I am going through some of my notes from class (About Information Security) and I'm stuck understanding how my teacher got this result. The question is:     How many collisions would you expect to find in the following cases?      a) Your hash function generates a 12-bit output and you hash 1024 randomly selected messages.      b) Your hash function generates an n-bit output and you hash m randomly selected messages.    The teacher's only answered a) like so:         We expect to find one collision every $2^{n/2}$ hashes. There are $2^{(n/2) * 2} = 2^n$ comparisons. Since the output is 12-bit the answer is $2^{10 * 2}/2 ^{12} = 2^{8} = 256$ collisions.   However I don't quite understand how he got this?  I get that the expected number of collision after n hashes would be $2^{n/2}$. But the rest doesn't make sense to me. I mean if the output is 12 bits (4096 arrangements), why would we expect to get 256 collision after only hashing 1024 messages (1/4 of the possible outputs)?


I am not really sure how to do this question, I think it has something to do with setting up a matrix for Gaussian reduction so that you can find what $q,r,s,t$ need to be so that the following is true: $$ (a_1,a_2,a_3,a_4) = q\vec{u_1} + r\vec{u_2} + s\vec{u_3} + t\vec{u_4} $$ Is there something to do with span as well?

Question: Consider the vectors u1 = (1, 1, 1, 1), u2 = (0, 1, 1, 1), u3 = (0, 0, 1, 1) and u4 = (0, 0, 0, 1). Write down an arbitrary vector (a1, a2, a3, a4) ∈ $ R^4$as a linear combination of u1, u2, u3 and u4. Can I just do $\begin{pmatrix}a1\\ a2\\ a3\\ a4\end{pmatrix}=k\cdot u1\:+\:b\cdot u2\:+\:c\cdot u3+d\cdot u4$? Is that it? What is the question trying yo highlight with all those ones?


I have a file called alarm.log, and I want a script to automatically run when this file is changed.

I would like to have a trigger and when a particular file is accessed by some process, I would like to be notified (i.e. a script should be run). If I understand correctly, this could be achieved with inotify.  If I have a file /foo/bar.txt how would I set up inotify to monitor that file?  I am using Debian Wheezy with kernel 3.12 (my kernel has inotify support)


I am building a Drupal 7 site using: page manager, Panels, Views and the  module.  In the  and on the  there is an option to put the Answer form in the same page with the question.   How can I do that on my site? I can find how to define that.. In addition, how can I do put the answer form on a Panel Page?    Please Note: This Question is different because it dealing with the specific version (7.x-4.0-alpha1) of the answer module. in this version the Answer form can be displayed in the question page.  The other question I have asked has no relation to the answer module specifically, although I am trying over few days to achieve the same goal. I already wrote that the answer I got is problematic, and did not solve the problem.  I will be very happy to get any help or suggestions, since I am dealing with this issue for few days without a solution!

My goal is to display a form in a page made with panels. The form will be between content panes.    The single page (made with page manager & panels) will be like below:   Content Pane Form Content Pane   How can I achieve that, and display the form in a page made with panels ?  Update 2-4-2014:  I found this  and created the following block that doesn't work (I am getting an error when trying to add that to panels). can sombody help make this thing work?  <?php  function my_answer_form_block_info() {     $blocks = array();      $blocks['my_answer_form'] = array(             'info' => t('My-Answer-Form'),             'cache' => DRUPAL_CACHE_GLOBAL,     );      return $blocks; }  function my_answer_form_block_view($delta = '') {     $block = array();     switch($delta) {             case 'my_answer_form':                     $block['subject'] = t('My Answer Form');                     $block['content'] = drupal_get_form('answer_node_form');             break;     }      return $block; }   ?>   Note: Form ID is: "answer_node_form"  I am using the . The form I want to put on the panel page is the Answer Form, that was created by the Answers Module. Is that a node form or a custom form?


I have an entity class as fallow: export class Contact {   id: number;   firstName: string;   lastName: string;    constructor(id?, firstName?, lastName?) {     this.id = id;     this.firstName = firstName;     this.lastName = lastName;   }   }  and want to have a different copy from Contact: export class MyComponent {      contactSrc = new Contact();   contactDest = new Contact();      constructor() {       this.contactSrc.firstName = "Adam"   }      handleCopyOfObject() {     console.log("firstName for contactSrc: " + this.contactSrc.firstName);      this.contactDest = this.contactSrc;     this.contactDest.firstName = "Mohsen";      console.log("-----------result after copy -----------");     console.log("firstName for contactSrc: " + this.contactSrc.firstName);     console.log("firstName for contactDest: " + this.contactDest.firstName);   }  }  the output is: firstName for contactSrc: Adam -----------result after copy ----------- firstName for contactSrc: Mohsen firstName for contactDest: Mohsen  you can see that by changing contactDest.firstName, contactSrc.firstName also changes. how can I change contactDest.firstName without effecting the contactSrc.firstName?

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


I need help with a question. I don't know how to start, but I do know that it focuses on the pigeonhole principle. I have no problem understanding the principle, but I want to know how to find the pigeons and the pigeonholes.     A set $M = \{1, 2, ..., 100\}$ is divided into seven subsets with no number in two or more subsets. Show that at least one subset either   contains four numbers $a, b, c$ and $d$ such that $a + b = c + d$ or three   numbers $p, q$ and $r$ such that $p + q = 2r$.

A set $M = \{1,2,\ldots,100\}$ is divided into seven subsets with no number in $2$ or more subsets. How do you prove that one subset either contains four numbers $a$, $b$, $c$, and $d$ such that $$a + b = c + d$$ or three numbers $p$, $q$, and $r$ such that $$p + q = 2r\,?$$ I am having some issues with this question whether I don't fully understand the question or my arithmetic is wrong. Grateful for any help.


I have a simple task: in addition to measuring the time it takes to execute a chunk of code in Python, I need to measure the amount of memory a given chunk of code needs.  IPython has a nice utility called timeit which works like this:  In [10]: timeit 3 + 3 10000000 loops, best of 3: 24 ns per loop   What I'm looking for is something like this:  In [10]: memit 3 + 3 10000000 loops, best of 3: 303 bytes per loop   I'm aware that this probably does not come built in with IPython—but I like the timeit-memit analogy.

I want to know the memory usage of my Python application and specifically want to know what code blocks/portions or objects are consuming most memory. Google search shows a commercial one is  (Windows only).  And open source ones are  and .  I haven't tried anyone, so I wanted to know which one is the best considering:   Gives most details. I have to do least or no changes to my code.


Consider a transformation between the coordinates given by $x^{a}$ to another system given by coordinates $x^{'a}$. So a transformation of the type: $x^{a} \rightarrow x^{'a}$.   With that I can construct the Jacobian matrix:  $\bigg[ \frac{\partial x^{'a}}{\partial x^{b}} \bigg]$  The determinant of this matrix is called the Jacobian determinant, hereafter J. I want to prove that:  $dx^{'1}dx^{'2}...dx^{'N} = Jdx^{1}dx^{2}...dx^{N}$  where primed system is cartesian and the unprimed one is a general set of coordinates. How can I do that?  I remembered that in transformation of coordinate is valid to write (using the summation convention) that:  $dx^{'a} = \frac{\partial x^{'a}}{\partial x^{b}}dx^{b}$   And tried to apply that to proof that I need, but, I was not abble to go anywhere because of lot of terms shows up.  Actually, in the case we considerer just 2 dimensions I ended up with something like that:  $dx^{'1}dx^{'2} =  \bigg( \frac{\partial x^{'1}}{\partial x^{1}} \frac{\partial x^{'2}}{\partial x^{1}} \bigg)(dx^{1})^{2}+ \bigg( \frac{\partial x^{'1}}{\partial x^{2}} \frac{\partial x^{'2}}{\partial x^{2}} \bigg)(dx^{2})^{2} + \bigg[\bigg( \frac{\partial x^{'1}}{\partial x^{1}} \frac{\partial x^{'2}}{\partial x^{2}} \bigg) + \bigg( \frac{\partial x^{'1}}{\partial x^{2}} \frac{\partial x^{'2}}{\partial x^{1}} \bigg)\bigg]dx^{1}dx^{2} $  As is possible to see, the last two therms inside the brackets are almost the Jacobian determinant. So my question is: what is wrong in this approach?   with a different ideia of the proof. But why should I use that instead of the mine? And also: how could I generalize the ideia of this article for N-dimensions?

The question is:  Let $\phi ： \mathbb{R}^n \to \mathbb{R}^n$ be a $C^1$ map and let $y = \phi(x)$ be the change of variables. Show that $$dy_1\wedge\dots\wedge dy_n = (\operatorname{det}D\phi(x))\cdot dx_1\wedge\dots\wedge dx_n.$$  I tried $n = 2, 3$ but still didn't get any rule. Do we need to do this under integral?


I have used the word object but I'd be referring to particles as in the context, the objects would be comparatively very small.  Consider the de Broglie's equation:  $$ \lambda = \frac{h}{mv}  \implies v = \frac{h}{m\lambda}$$  A particle having zero initial velocity would require an impulse of $mv$ to get the required velocity. According to Newton's law of gravitation:  $$ F = \frac{G Mm}{r^2} $$ To get the required impulse, we can have the Gravitational force work for a short interval of time $t$ i.e. $$J = \frac{GMm t }{r^2} $$ To get the required $\lambda$ for the particle : $$mv = J$$ $$\implies \frac{h}{\lambda} = \frac{GMmt}{r^2}$$ $$\implies r= \sqrt\frac{GMmt\lambda}{h} $$  For $M=1$Kg, $m = 1$Kg, $t = 1$s, $\lambda = 650$nm  $r$ comes out to be $2.56 \times 10^{8} $ m  So, at the the given conditions would the wave nature dominate to a mass of 1 Kg ? What would be the consequences ? Would everyday objects behave like a wave ? Would our perception of massive objects change ?  EDIT: The question was marked duplicate of  which it certainly is not. This question is about the consequences of a massive object (Such as a human being) behaving like a wave of a significant wavelength unlike the mentioned question which asks the validity of de Broglie equation on non-fundamental (many-body) object.

Many introductory quantum mechanics textbooks include simple exercises on computing the de Broglie wavelength of macroscopic objects, often contrasting the results with that of a proton, etc.  For instance, this example, taken from a textbook:     Calculate the de Broglie wavelength for      (a) a proton of kinetic energy 70 MeV      (b) a 100 g bullet moving at 900 m/s   The pedagogical motivation behind these questions is obvious: when the de Broglie wavelength is small compared to the size of an object, the wave behaviour of the object is undetectable.  But what is the validity of the actual approach of applying the formula naively? Of course, a 100g bullet is not a fundamental object of 100g but a lattice of some $10^{23}$ atoms bound by the electromagnetic force. But is the naive answer close to the actual one (i.e. within an order of magnitude or two)? How does one even calculate the de Broglie wavelength for a many body system accurately?


How do I calculate effect size for data based on Wilcoxon signed ranks test. Any step-by-step guidelines? What software should I use?

Some authors (e.g. Pallant, 2007, p. 225; see image below) suggest to calculate the effect size for a Wilcoxon signed rank test by dividing the test statistic by the square root of the number of observations:     $r = \frac{Z}{\sqrt{n_x + n_y}}$   Z is the test statistic output by SPSS (see image below) as well as by wilcoxsign_test in R. (See also my related question: )  Others suggest the Bravais-Pearson ($r = \frac{cov(XY)}{sd(X) \times sd(Y)}$) or Spearman ($r_S$) correlation coefficients (depending on data type).  When you calculate them, the two rs are not even remotely the same. E.g., for my current data:     r = 0.23    ( for $r = \frac{Z}{\sqrt{n_x + n_y}}$ )      r = 0.43    ( Pearson )   These would imply quite different effect sizes.  So which is the correct effect size to use, and how do the two rs relate to each other?    Pages 224 (bottom part) and 225 from Pallant, J. (2007). SPSS Survival Manual:


I would like to know, how jQuery assign a value to this. I tried as follow, but I am getting an error saying that Uncaught ReferenceError: Invalid left-hand side in assignment.  let each = function(o, callback) {     let keys = Object.keys(o);     for (let i = 0; i < keys.length; i++) {         (function() {             this = o[keys[i]];             callback();         })();     } }   In jQuery  $("p").each(function() {     console.log(this); });

I have a pretty good understanding of Javascript, except that I can't figure out a nice way to set the "this" variable.  Consider:  var myFunction = function(){     alert(this.foo_variable); }  var someObj = document.body; //using body as example object someObj.foo_variable = "hi"; //set foo_variable so it alerts  var old_fn = someObj.fn;   //store old value someObj.fn = myFunction;   //bind to someObj so "this" keyword works someObj.fn();               someObj.fn = old_fn;       //restore old value   Is there a way to do this without the last 4 lines?  It's rather annoying...  I've tried   binding an anonymous function, which I thought was beautiful and clever, but to no avail:  var myFunction = function(){     alert(this.foo_variable); }  var someObj = document.body;        //using body as example object someObj.foo_variable = "hi";        //set foo_variable so it alerts someObj.(function(){ fn(); })();    //fail.   Obviously, passing the variable into myFunction is an option... but that's not the point of this question.  Thanks.


I'm currently on ubuntu 13.04. It's using 3.8 kernel. Is it possible to install 3.11.5 kernel downloaded from the website www.kernel.org  what is the improvement in such new kernel? Is there a easy guide if i need to update?  I'm a newbie. So, please bare if i asked a silly question.

Newer "mainline" versions of the kernel are available from the , e.g. 3.4 and 3.5, while Ubuntu 12.04 is on 3.2.   What are the mainline kernels? Are they better than my existing kernel? What are the pros and cons of upgrading to a mainline kernel? Will I easily be able to go back?


I have just created my first very simple apex trigger and it works. However it fails to deploy because it covers 0% code and I have discovered that i need a test class.  The trigger should insert the account of the respective contact. I need it to update a lot of older records. I tried also with process builder, but that fails in data loader so apex was my only choice. I have created a formula field with the account ID to make it work.  Any idea how my test class should look like? My code is:  trigger insAccAftale  on Aftaler__c (before insert, before update){  for (Aftaler__c a: Trigger.new) {     if(a.Account__c == null){         a.Account__c = a.AccountID__c;             } } }   Any help would be very much appreciated.  Thanks

I am trying to learn how to do APEX testing but all the tests in the documentation are too complex and I can't find an example of a simple APEX Controller that is a Hello World Test.  I have this APEX Code  public class MessageMaker{ public static string helloMessage() {     return('You say "Goodbye," I say "Hello"');     } }   Should I be testing that the String is the same? Here is my test that doesn't work      @isTest public class MessageMakerTest {     public static testMethod void testMyClass(){         MessageMaker controller = new MessageMaker();         String helloMessage = helloMessage();          System.assertEquals(helloMessage, 'You say "Goodbye," I say "Hello"');      } }   I am getting this error.       Method does not exist or incorrect signature: helloMessage()   I have some more advanced APEX code but I want to understand what I need to test for and how before I can do that.  Thank you in advance.


Can we give a PWM of amplitude more than the rated voltage to a motor but making sure that the averaged voltage is lower than that of the rated voltage of the motor.Is it safe for the motor?

I am new to PWM control. Is it advisable to operate a motor at higher than rated voltage with the "PWM average voltage" more than the nominal voltage specified in the datasheets? After some researching, the majority of the information that I kept seeing is that it should be OK (with a recommendation to operate at high PWM frequency). Secondly, if the "average PWM voltage" is kept less than the nominal voltage (with the supply voltage much higher) is it correct to refer to it as over-voltage operation? Or is it only when the average voltage is higher than nominal voltage?


Suppose I have a model that estimates a discrete probability distribution over a set of classes/factors c1, c2, c3.  What are the options and appropriate use cases of measuring performance given a test set of feature vectors and their labels?  Few options that come to mind   Maximum likelihood: measure probability of observing the class labels in the test set under the given model; Assume that, for example, a test vector with a class label of c1 represents a collapsed probability distribution $(1, 0, 0)$. Then use a similarity measure (or a loss function) to compare these probability distributions with the predicted probability; Use a derived measure of expected utility $\mathbb{E}(U)$ based on application. Suppose further that we are modeling a game where the classes are possible outcomes of playing and there is an utility $U(c_i)$ associated with each class. Assume we would play whenever $\mathbb{E}(U) > 0$ in the model and our pay-off would be the utility of the actual class label or $0$ if we chose not to play. Then use pay-off over test set as a performance measure.

I do not study statistics but engineering, but this is a statistics question, and I hope you can lead me to what I need to learn to solve this problem.    I have this situation where I calculate probabilities of 1000's of things happening in like 30 days.  If in 30 days I see what actually happened, how can I test to see how accurately I predicted?  These calculations result in probabilities and in actual values (ft).  What is the method for doing this? Thanks, CP


Are there any good intuitions to understand why countable dense subset implies separability? Is the separability related to the opposite of connectedness? In Munkres, I am a bit confused after he mentioned that this is an unfortunate choice of terminology.

A topological space is called separable if contains a countable dense subset. This is a standard terminology, but I find it hard to associate the term to its definition. What is the motivation for using this term? More vaguely, is it meant to capture any suggestive image or analogy that I am missing?


When I click on the little blue i to view my quota there is no way there's 7GB worth of used space. There's not a ton of revisions. All my photos take up zero space because I bought a Pixel XL. All my docs are Google Docs not Word Docs so they don't take up any space. The biggest files I have are a few PDFs which are manuals for my dishwasher or clothes dryer. They start at 8MB and get smaller.    That's the top of my quota list. How can I find the problem files? If it's a mistake, how can I request Google to reindex my GDrive and fix the limit?

I have a paid 100GB Google Drive plan. It is reporting that I am at 99% capacity.  According to the the storage both within the desktop and web application, I have used 90.53GB within Drive.    My Drive is mapped to my OS X filesystem, and when fully synched it reports only 61.28GB used.    So what is going on here? I need to do a cleanup but cannot account for the 30GB difference.


I'm doing some stuff with digitizing and one thing that would nice to have is to get coordinates by mouse click.  My problem is that I don't know how can I create utility similar to this from map tool, where I can easly create method:  def canvasReleaseEvent(self, e):     if e.button() == Qt.LeftButton:         x = e.pos().x()         y = e.pos().y()          point = self.iface.mapCanvas().getCoordinateTransform().toMapCoordinates(x, y)         print(point)   For example, when user wants to digitizing, he has to show a point on canvas, where to start. To do this, he clicks on a button to call a function for getting coordinates from canvas.  The main problem I struggle with is that I don't know how I can craete method for catching coordinates, that only works when I call it (not like in maptool, when it works all the time).  Is there any way to do that?

Are there any procedures when working with QgsMapCanvas (pyqgis, qgis) in order to obtain a pair of coordinates by clicking on the map canvas?   Are there any sample Python codes that demonstrate this?


Use Integration by Parts to find  $\int \cos x\cdot e^x\;dx$.  How is this done? Please, feel sorry for me and help me out. Today has been a very bad day and I can't concentrate very much on this problem because my cat died. Can you help me?

I need to evaluate the following function and then check my answer by taking the derivative: $$\int e^{ax}\cos(bx)\,dx$$ where $a$ is any real number and $b$ is any positive real number.    I know that you set $u=\cos(bx)$  and $dv=e^{ax} dx$, and the second time you need to integrate again you set $u=\sin(bx)$ and $dv=e^{ax}dx$ again.  It eventually simplifies down to $$\int e^{ax}\cos(bx)dx = \frac{1}{a}e^{ax}\cos(bx) + \frac{b}{a}\left(\frac{1}{a}e^{ax}\sin(bx) - \frac{b}{a}\int e^{ax}\cos(bx)\,dx\right).$$  Now I know to move the integral on the left side to the right side so that I can just divide by the constant to solve.  Here is my problem:  I know I need to solve the right side to be:  $$\frac{e^{ax}\left(a\cos(bx) + b\sin(bx)\right)}{a^2+b^2} + C.$$  To divide by the constant, I multiplied everything on the right side by  $$\frac{a^2}{b^2+1}.$$ but this leads me to get $b^2 + 1$ on the bottom instead of $a^2 + b^2$.  I will show what I am doing in detail:  After setting the initial integral equal to: $$\frac{1}{a}e^{ax}\cos(bx) + \frac{b}{a}\left(\frac{1}{a}e^{ax}\sin(bx) - \frac{b}{a}\int e^{ax}\cos(bx)\,dx\right) + C$$ I simplify: $$\int e^{ax}\cos(bx)\,dx = \frac{a^2}{b^2+1}\left(\frac{1}{a}e^{ax}\cos(bx) + \frac{b}{a}\left(\frac{1}{a}e^{ax}\sin(bx)\right)\right) + C$$  If this is already wrong, can someone point be in the right direction?    If I have not gone wrong yet, I can edit to show the rest of my work.


Working through this given problem on maximum likelihood estimation (MLE). The density is given as  $$f(x;\theta) = \theta x^{\theta -1} $$ transforming the above equation to MLE, we have  $$L(x;\theta) = \prod_{i=1}^{n} \theta x_i^{\theta - 1} = {\theta}^n \prod_{i=1}^{n} x_i^{\theta - 1}. $$ Taking $\ln$ $$ \begin{align} \ln L(x;\theta) &= \ln{\theta}^n +\ (\theta - 1) \sum_{i=1}^{n} \ln(x_i)\\ \end{align}$$ then we have $$L'(x;\theta) = {n \over \theta} - \sum_{i=1}^{n} \ln(x_i). $$ $$\theta = {n \over \sum_{i=1}^{n} \ln(x_i)}. $$  Is it correct? How can I apply the law of the strong numbers in this case :? Thanks for any help

Working through this given problem on maximum likelihood estimation (MLE). The density is given as  $$f(x;\theta) = \theta x^{\theta -1} $$ transforming the above equation to MLE, we have  $$L(x;\theta) = \prod_{i=1}^{n} \theta x^{\theta - 1} $$  then we have $$L(x;\theta) = {\theta}^n \sum_{i=1}^{n} x^{\theta - 1}. $$ Taking $\ln$ $$ \begin{align} \ln L(x;\theta) &= \ln{\theta}^n \ln\sum_{i=1}^{n} x^{\theta - 1}\\ &=n\ln{\theta} ({\theta - 1})\ln\sum_{i=1}^{n} x_{i}\\ &=n\ln{\theta} ({\theta - 1})\ln\sum_{i=1}^{n} x_{i}. \end{align} $$ Differentiating with respect to $\theta$ is what is turning me off here, or is there any thing i have done wrongly.   Thanks for any help


I am working on a Java project and I am making a simple Comparison, I Imagine the issue is staring me in the face but its been a few days and could use a new set of eyes.  public class Reservation {     String tripID;     String tripDate;     String customerNum;      Reservation() {      }      public void setID(String s) {         this.tripID = s;     }      public String getID() {         return this.tripID;     }      public void setDate(String s) {         this.tripDate = s;     }      public String getDate() {         return this.tripDate;     }      public void setNum(String s) {         this.customerNum = s;     }      public String getNum() {         return this.customerNum;     }  }   I have a list of Reservations stored as   List<Reservation> listReservation = new ArrayList<>();   While running the comparison for a customerNum that the user enters stored as userInput   for(Reservation rs : listReservation) {     if(rs.getNum().toString() == userInput) {         System.out.println(rs.getDate());     } }   The list will never make a match, for the sake of ease the list of use numbers is as fallows 101 101, 101, 103, 104, 105, 106, 107, 108, 109, 102, 102, 115, 116, 119, 120, 121, 122, 126, 124, 124, 112, 119, 121, 125, 126, 120, 104.  Thank you in advance.

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


Let sequence $x_n=(n+1)^{1/3}$ and sequence $y_n=n^{1/3}$. Basically, I'm trying to show that $$\lim_{n \to \infty} | x_n-y_n | =0,$$ which is intuitively true. After some attempts, I find it hard to bound $(n+1)^{1/3}-n^{1/3}$ anything useful. Can anyone give me some hint?

I have to find $$\lim_{n\to\infty}{(\sqrt[3]{n+1}-\sqrt[3]{n})}$$ here what I did $$\lim_{n\to\infty}{(\sqrt[3]{n+1}-\sqrt[3]{n})}$$=$$\lim_{n\to\infty}{\left(\sqrt[3]{n\left(1+\frac{1}{n}\right)}-\sqrt[3]{n}\right)}$$ How can I proceed?


There are number of issue with this post .    Why would you want to hide hidden bytes to a text file? He's asked virtually the same question 3 times The other question he's  is wondering how to upload an entire folder via FTP.   I think this has malicious intent.  So based on this answer  I have a number of options. I've confronted the user but no answer. I've flagged the duplicates.   Does this warrant a moderator flag?

How should we treat questions that are, or have seeds of, evil or malicious purposes and actions, such as writing spambots and malware?    Should they be answered like regular "everybody keeps their pants on" questions? Or should there be some other type of response to this bad behaviour lot?


I would like to solve this question. I think the answer is 35, but I do not know how to do it without extremely long analysis of possibilities.  Is there a short way to solve this problem? Maybe the fact that $A_{12}$ is simple helps?

I'm trying to solve this exercise here:     What's the maximum order of any element in $A_{10}$?   Here are my thoughts:  One way of doing this seems to be by writing down all possible elements in $S_{10}$ (I mean just per order, not actually every element) and then looking at those that are in $A_{10}$.   This seems a lot of work but for completeness I will post this here. So, (some) possible orders for elements in $S_{10}$ are:  $$  \begin{matrix} \text{ disjoint cycles } & \text{ order} \\ (1)(1)(1)(1)(1)(1)(1)(1)(1)(1)  & 1\\ (1)(1)(1)(1)(1)(1)(1)(1)(2) & 2\\ (1)(1)(1)(1)(1)(1)(1)(3) & 3\\ (1)(1)(1)(1)(1)(1)(4) & 4\\ (1)(1)(1)(1)(1)(5) & 5\\ \dots & \\ (10) & 10 \\ (7)(2)(1) & 14\\ (5)(3)(2) & 30\\ (5)(3)(1)(1) & 15 \\ \end{matrix} $$  where $(k)$ denotes a cycle of length $k$.  So these are not all orders but I think I got the interesting ones. For example, I think $30$ is the highest possible order in $S_{10}$.   Also, I think $15$ is the highest order in $A_{10}$.  But my problem is I don't know how to prove it.     How can I prove that $15$ is the highest order in $A_{10}$?   And my other question is:     Is there a failsafe way to find elements of highest order? By that I mean one that makes sure I'm not missing any elements?   It seems kind of tricky: these are such large groups but they don't seem to contain any elements of large orders. Or do they? Maybe I'm missing something?


I cited a datasheet in a caption of one of the figures of my report. I have added a list of figures in my document, and Latex has numbered the citations in order of appearance. Now in my first chapter (Introduction) the first citation in this appears marked as [2], which I want to be [1]. So I removed the citation from the caption, but the change is not reflected in the numbering, and its still numbered one. How can I change this? The rest of the document is fine, because no other caption has any citation

As you can see in  article on Wikipedia, there is a distinction made between notes, citations and references. I would like to have a section called citations at the end of my document which I can refer to like this[2]  [2] Lasker (1934), p. 73  which is to be found in my references under "Lasker, Emanuel (1934). Lasker's Chess Primer. London: Billings (1988 reprint). ISBN 0-7134-6241-8". Ideally, I would like this citation to contain a hyperlink to this reference (although this is not done in the document). Any good way to do this or something similar?


How can we calculate the series $$ I_N(n)=\sum_{m=1}^{N}m^n\binom{N}{m}? $$ with $n,N$ are integers.  The first three ones are $$ I_N(1)=N2^{N-1}; I_N(2)=N(N+1)2^{N-2}; I_N(3)=N^2(N+3)2^{N-3} $$

So, I wonder what is the evaluation of $$\sum_{k = 0}^{n} {n\choose k} k^m\text{,}\qquad (*)$$ where $m,n\in \mathbb{N}$.  One of my tries: knowing that $$k^m = \sum_{j = 0}^{m}\text{S}(m,j)\cdot k(k-1)\cdots(k-j+1)\text{,}$$ where $\text{S}(m,k)$ are Stirling numbers of the second kind, and $$\sum_{k = 0}^n {n\choose k} k(k-1)\cdots(k-j+1) =2^{n-j}\cdot n(n-1)\cdots(n-j+1)\text{,}$$ I have rewritten the  upper sum into $$\sum_{k = 0}^{n}\sum_{j = 0}^m {n\choose k} \text{S}(m,j)\cdot k(k-1)\cdots(k-j+1)\text{.}$$ Changing the order of summation, we get $$\sum_{j = 0}^{m}\text{S}(m,j) \cdot 2^{n-j}\cdot n(n-1)\cdots (n-j+1)\text{,}$$ and here it stops.


If I have a device that displays a random number from 1 to 10 billion and I use that device X times, what is the probability that not all of the numbers displayed are unique?

Before reading the Wikipedia article, my idea to calculate the probability was as follows:  $1-\left(\frac{364}{365}\right)^{_nC_{2}}$  Basically, I thought to compare all combinations of pairs ($_nC_{2}$) and require them to have different birthday ($\frac{364}{365}$). It gave a very similar result to the wiki method, but is slightly different and I can't tell how  my way of thinking is wrong.  Can anyone tell me what I'm missing?


E.g. hammer and anvil, and part and parcel.  Unlike a normal cliche all of these would make sense if you switched the word order, but no one ever does.  I remember seeing a name for this, but can't remember what it was.

Is there a word or phrase for two nouns or adjectives joined by a conjunction (usually "and") in a fixed sequence?        alive and well           fast and furious   hat and gloves   pen and pencil   law and order   wit and wisdom   salt and pepper   bacon and eggs   horse and carriage   Adam and Eve   ladies and gentlemen   loud and clear   heads or tails   yes or no   dead or alive


I am in an editing session and am trying to vectorize a raster using ArcScan. The raster is a TIFF file (an 8-bit, single band raster with an unsigned integer pixel type). When I select "start clean-up" on the vectorization on the Raster Cleanup toolbar and then select the Raster Painting tool, the tools do not appear.   How do I fix this?

When double clicked on tools of arctoolbox, no dialog box is opening, for the "buffer" or "intersect", or for any of the tools in the ArcToolBox.  I faced the same problem in both ArcGIS version 10.5 and 10.6.   How can I solve this?


For below code,  interface SuperInterface{     void f();     interface StaticNestedInterface{         } }  class Sub implements SuperInterface{     public void f(){      } }  public class Dummy {      public static void main(String[] args) {         Sub x  = new Sub();     }  }   Compiler does not ask class Sub to implement interface StaticNestedInterface.  Is class Sub a valid java code?

I have just found a static nested interface in our code-base.  class Foo {     public static interface Bar {         /* snip */     }     /* snip */ }   I have never seen this before. The original developer is out of reach. Therefore I have to ask SO:  What are the semantics behind a static interface? What would change, if I remove the static? Why would anyone do this?


Using, Euler's identity, we get:  $z = r.e^{i\theta}$Then, do we need to use the fact: $\theta = \theta + 2n \pi, n \in \mathbb N$ ? I am unable to get to the proof..

I always know that the natural logarithm $\log_e$ is the inverse of the exponential function $e$, but to my surprise when reading elementary functions in complex analysis, I discover that that is not always true. $$\log(e^z)=z+2k\pi i$$  My question here is that, why is the above expression true?


Has anyone solved this? You can retrieve and submit, but as far as I can tell you can not edit.  I understand this is NOT possible Natively within sites.com. My question is whether anyone has solved this programatically.

In site.com I have a page which iterates records of an object with data repeater.  I want to edit these records from this page ,but I didn't find anything to achieve this.  If there is any option to do this please help me to implement this.  Thanks


I am trying to solve the following question  True or False? If $(f_n):[0, 1] \to [0, 1]$ is a sequence of continuous functions which converges to $f$ pointwise, then $f$ is Riemann integrable and $\int_0^1{f_n} \to \int_0^1f.$  With help from the comments I found  counterexample, but I am hoping there is a simpler one. If we replace the Riemann integrals by Lebesgue integrals, then the result is true by the Dominated Convergence Theorem. This implies that if $f$ is Riemann Integrable, then indeed  $\int_0^1{f_n} \to \int_0^1f.$ So in looking for a counterexample, we should try to find one where $f$ is not Riemann integrable. Thank you very much for any help.

The following is an exercise from Stein's Real Analysis (ex. 10 Chapter 1). I know it should be easy but I am somewhat confused at this point; it mostly consists of providing the Cantor-like construction for continuous functions on the interval $[0,1]$ whose pointwise limit is not Riemann integrable.   So, let $C'$ be a closed set so that at the $k$th stage of the construction one removes $2^{k-1}$ centrally situated open intervals each of length $l^{k}$ with $l_{1}+\ldots+2^{k-1}l_{k}<1$; in particular, we know that the measure of $C'$ is strictly positive. Now, let $F_{1}$ denote a piece-wise linear and continuous function on $[0,1]$ with $F_{1}=1$ in the complement of the first interval removed in the consutrction of $C'$, $F_{1}=0$ at the center of this interval, and $0 \leq F_{1}(x) \leq 1$ for all $x$. Similarly, construct $F_{2}=1$ in the complement of the intervals in stage two of the construction of $C'$, with $F_{2}=0$ at the center of these intervals, and $0 \leq F_{2} \leq 1$, and so on, and let $f_{n}=F_{1}\cdot \ldots F_{n}$.  Now, obviously $f_{n}(x)$ converges to a limit say $f(x)$ since it is decreasing and bounded and $f(x)=1$ if $x \in C'$; so in order to show that $f$ is discontinuous at every point of $C'$, one should show that there is a sequence of points $x_{n}$ so that $x_{n} \rightarrow x$ and $f(x_{n})=0$; I can't see this, so any help is welcomed, thanks a lot!


Starting March 2016, Software Updater displays "Failed to download repository information," and "Check your internet connection when attempting to update." What's causing it and how can I fix it so I can update my computer?  I have Google Chrome installed and I'm running Ubuntu 14.04 64bit.

I am using Google Chrome 48.0 32-bit. Today when I launched Google Chrome, I got this message:    This computer will soon stop receiving Google Chrome updates because this Linux system will no longer be supported   I thought Ubuntu 14.04 is supported for five years, what's exactly happening here?  And on 64-bit Ubuntu, I get an error from Update Manager and apt-get update:  Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release  Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)   Some index files failed to download.   They have been ignored, or old ones used instead.


I am trying to write a workflow that fires when a record type is changed to another type in the Contact Object.  I saw a similar question asked, and I tried that solution, but still got the same error. I have tried RecordType.Name and RecordType.Id with the same resulting error message.  This is what I have so far:  IF(  ISCHANGED(  RecordType.Id  ),  IF(  CONTAINS( RecordType.Id , "Contact"),False) )   Thanks! Carmen

I am trying to prevent Recordtype from being changed for Account. when I use ISCHANGED(   RecordType.Name   ) in validation rule, the following error appears:  Error: The ISCHANGED function cannot reference the RecordType.Name field. I have tried using different fields with the same error. I noted that the record type is another object. if this is the reason why I cannot, is there a suggestion as to how I can do this?


My work lunch routine currently consists of cooking chicken over the weekend and refrigerating it, then cutting up a piece and adding it with rice and vegetables in a refrigerated, sealed tupperware container the night before work. In the morning I take the container out of the fridge and put it in my backpack, where it stays for about 2 and 1/2 hours (or a little more) through my morning commute. As soon as I get to work I put it back in a refrigerator, microwave it and eat it about 4 hours later. Is this too long out of the refrigerator to safely eat?

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


Giant robots with an oval-looking head with a few of long legs (like spider) but bigger  Lighting strikes down into the middle of the road and that’s how they came They climbed out and starting shooting lasers that would desintegrate the humans they kill but their clothes are not gone A family (the main characters) go and try to run and they live but they go to a big ferry or ship. They make it on but those alien robots come and flip the ship, taking all passengers into the water, taking them with their long arms inside of them. The alien robots are either killing them or storing them but they throw out their clothes.  The family finds a little underground house or something, but the son or boy goes to help someone else up the hill. So he goes and leaves the family but I think he dies. the father and daughter hide in the underground bunk house, but the alien robots have moving arm eyes or something, looking for people to capture and kill or take.   I don’t think this is from War of the Worlds.

So I saw this movie about 10 years ago, when I was about 5 years old. Since I was really young, my memory of it isn't really that great.   I think it may have been an alien invasion movie, but the only scene I remember is that there were these giant robot-alien things:   I think they had several long legs. They had a big glass dome on top of them They would grab civilians and drop them in their glass dome.   That's all I remember. If you could please help me out, that would be great.   Again, I was about 5 years old when I watched it, so my memory of it isn't that great, but I hope you know what I'm talking about. Thanks so much :)


I have the following function that emails authors of a custom post type when the post is published which is great, but I would like it so that it does not email them on any future edits after that to avoid sending them loads of emails by accident.  This is the function I have at the moment:  //email authors function authorNotification($post_id) {    $post = get_post($post_id);    $author = get_userdata($post->post_author);     $message = "Hi ".$author->display_name.". A document for you, ".$post->post_title." has just been published or edited and requires your attention.  You will be taken to the document after you log in from this link: ".get_permalink( $post_id ).".    ";    wp_mail($author->user_email, "An online document has been made or edited for you.", $message); } add_action('publish_portaldocuments', 'authorNotification');   I'm wondering if it has something to do with the The {$old_status}to{$new_status} and {$new_status}_{$post->post_type} hooks as on this page:   Could someone help please as I'm not sure how I would implement it WITH A CUSTOM POST TYPE. Thanks :-)  Update: This worked for me:  // SEND EMAIL TO AUTHOR OF A CUSTOM POST TYPE ONCE POST IS PUBLISHED  function authorNotification($post_id) {     if( ( $_POST['post_status'] == 'publish' ) && ( $_POST['original_post_status'] != 'publish' ) ) {  $post = get_post($post_id);    $author = get_userdata($post->post_author);     $message = "Hi ".$author->display_name.". A document for you, ".$post->post_title." has just been published or edited and requires your attention.  You will be taken to the document after you log in from this link: ".get_permalink( $post_id ).".    ";    wp_mail($author->user_email, "An online document has been made or edited for you.", $message);     } }  add_action( 'publish_portaldocuments', 'authorNotification' );

I try to use this function i have created when a post is published for the first time.  function a_new_post($post){   $post_id = $post->ID;    if ( !get_post_meta( $post_id, 'firstpublish', $single = true ) ) {       // ...run code once       update_post_meta( $post_id, 'firstpublish', true );   } } add_action( 'draft_to_published', 'a_new_post' );   I can't see anything wrong with it, but when i try to create some sample posts i check the database and the field "firstpublished" has not been created.  Does anyone see anything wrong?


Lately, equations such as X=8/2(2+2) have begun being presented on social networks as "very hard problems that will divide the audience just like the striped dress optical illusion". Of course, most of people coming at different results are blindly following the BODMAS or PEMDAS mnemonic incorrectly, saying that multiplication always goes before division or the opposite, where in reality most sources I've found say "multiplication and division" and "addition and subtraction" are single steps. I thought those were easy to disprove, but then someone stated that the "left to right" rule is only spelled out for sums and subtractions, and not for multiplication and division, and people writing expressions always needs to use parentheses or horizontal fracional bars to disambiguate an otherwise unknowable order, making 8/2*2=? Someone else said that implicit multiplications like 2(2+2) must be done first, and that 8/2*(2+2)=4*4=16 but 8/2(2+2)=8/2(4)=8/8=1. Is there a true consensus on what the correct order is?

There is a huge debate on the internet on the value of $48\div2(9+3)$. I believe the answer $2$ as I believe it is part of the bracket operation in BEDMAS.  yields the same answer. I also believe that if $48\div2\times(9+3)$ was asked it would be $288$ which Mathway agrees with as well. However,  says it is $288$ either way. A friend of mine (who is better at math) told me that there is no such thing as 'implicit multiplication', only shorthand so that is in fact done after the division (going left to right, not necessarily because division occurs before multiplication. But he didn't explicitly give a reason) What is the answer and why?