$m_l=0$ in Hydrogen atom of Scrodinger equation

Question: $m_l=0$ corresponds to s-orbital and the values associated are:
$$\lambda=2\pi r/m_l\to\infty$$
It means a wave of of infinite wavelength has a constant height at all values of $\phi$(azimuthal angle).
$$J_z=\pm hr/\lambda\to0\text{ also }J_z=\pm pr$$
which implies zero linear and angular momentum as $r\ne0$.
Now what does zero angular and linear momentum signify/mean?(I think the electron is at rest but it cannot be)
Comment: Wher did you get this formula for $\lambda$? do you mean the wavelenght of absorbed/emitted photons?
Comment: $\lambda=h/p$ and $J_z=\pm hr/\lambda$
Answer: The plane wave – the wave function for a particle moving in a clear direction and with a sharp momentum, $\vec p$, is
$$ \psi (\vec x) = C \exp (i\vec p\cdot \vec x / \hbar ) $$
where $\exp(ia)=\cos a + i \sin a$. However, the dependence of an $s$-wave wave function on the angular direction is trivial (constant),
$$\psi_s (r,\theta,\phi) = \psi(r). $$
There is no dependence. You may imagine this wave function to be a superposition of some waves moving in all directions of the space, and backwards.
Because the wave function doesn't depend on the angles, in particular, it doesn't depend on $\phi$, you may imagine that it is a wave with an infinitely long wavelength in the angular directions. Note that $\cos 0\phi = 1$. The shorter the wavelength, the higher momentum, and vice versa – and it sort of holds for the angular momentum and the wavelength measured in spherical or azimuthal coordinates and in radians, too.
The zero angular momentum means that there is no rotation. If such a (slowly moving) particle (atom) is absorbed by a gyroscope (near the axis), the rate of the gyroscope rotation won't change.
Comment: so why doesn't such a slowly moving particle get absorbed/atracted into the nucleus
Comment: First, it is only not moving in the angular directions; the average value of the momentum in the radial dimension is nonzero. Second, this $|p_r|$ has to be nonzero, much like the average $|r|$, so the particle can't quite stop and can't collapse to the nucleus, due to the uncertainty principle $\Delta p \cdot \Delta x \geq \hbar/2$ which prohibits $r=0$ much like $|\vec p|=0$ etc. The electron finds a compromise between minimizing the kinetic energy (small $p$ is good) and minimizing potential energy (small $r$ is nice), and the sum, total energy is minimized for Bohr-radius-like radius.
Comment: So it means the electron can move only towards and away from the nucleus in a radial direction where $p_z=0; p_x,p_y\ne0\implies J_z=0; J_x,J_y\ne0$. So is this mean the electron will vibrate in radial direction at mean position $r_0=0.529 A^o$.Also how can x and y components be measured when we are trying to acheive 100% accuracy in z component?
Comment: Yes, the electron in an atom is "vibrating" in the radial direction around the average value that is what you write and that is of the same order for other states of the same atom or other atoms, too. The $x,y,z$ components of the position commute with each other, and so do the 3 components of the momentum. The 3 components of the angular momentum do not commute with each other, but the commutator of two of them is the third one, so the states with $J_x=J_y=J_z=0$ are an "exception" for which the commutator is effectively zero so the $s$-states are eigenstates of all three components.


freetextbox is not loading properly

Question: I have 28 freetexboxes on my ASP.NET 4.5 web form and the 29th freetexbox does not load properly. The 29th freetextbox doesn't have color or border. Can someone tell me how to resolve it?
Answer: I faced the same issue but it resolved for me by changing the css file.
As far as I understand the FreeTextBox is developed using the table. I had commented the margin-top: and padding element from main css file used in website. After commenting out. It worked as expected.

freetextbox is not loading properly


Verify signature on smart contract

Question: I want to make sure that my function in contract can only be called from just my client. So how can I generate signature and verify it in smart contract?
Comment: You mentioned this is a common use case on EVM blockchains. Do you need a functionality like `onlyOwner` to restrict the function call to one address? Or do you want to explicitly verify a signature with a function like `ecrecover`?
Comment: No, I just need to verify the signature generated by the client in the program.
Answer: Programs (smart contracts) in chains cannot connect to a server via any protocol.
And you cannot be sure from which client a program is called, it can be reached by any client and even by any other program.
You can be sure who signs the transaction. So your user...
To read some data from outside the chain, let's say from your server, you must send that data to the program via the transaction, as arguments or account data.
Comment: I edited my question and I want only my client can call specific functions in the contract by verifying signature generated from my client. This usecase is used with EVM blockchain commonly.
Answer: Referring to this
Validating Inputs
On Solana it is crucial to validate program inputs. Clients pass accounts and program inputs to programs which means that malicious clients can pass malicious accounts and inputs. Programs need to be written in a way that handles those malicious inputs.

Consider the transfer function in the system program for example. It
checks that from has signed the transaction.
<code>fn transfer(accounts, lamports) {
    if !accounts.from.is_signer {
        error();
    }
    accounts.from.lamports -= lamports;
    accounts.to.lamports += lamports;
}
</code>
If it didn't do that, anyone could call the endpoint with your account
and make the system program transfer the lamports from your account
into theirs.
Answer:
sign with your client's keypair to the transaction
verify if signer's public key matches to your client's public key (it can be either a constant or can be stored in a kind of authority account)
Answer: Hey with anchor you can get the Ed25519 signature instruction, make sure is_verifiable,
make sure pubkeys match, signature match and message match.
With this you should be able to verify your Ed25519 signature.
Have a nice day.

Verify signature on smart contract


Can Android NFC devices be used to clock in a RFID/HID timeclock for work? (As a tag?)

Question: Can Android devices be used to clock in a RFID/HID timeclock for work using NFC? Using the software, I can register the cards with the timeclock. But would I be able to register phones?
Answer: Generally no, unfortunately Android phones can't be used as a card easily as phones running the stock OS can't emulate a card. This is due to restrictions put in place by the Android operating system rather than the underlying hardware. See also this and this where I've answered other similar questions.
Saying that it depends on what you're using as an RFID timeclock. If you were making your own then you could use Android's NFC peer-to-peer mode to talk to the clock. Another alternative is instead of using the stock Android OS is to use Cyanogenmod which does allow for emulating certain card types.
Answer: It might be possible with Android 4.4.2 kitkat since they enabled the card emulation feature. Refer to the documentation will help.


How to view object in edit mode without global transformation?

Question: I am new to blender here. I have a mesh object that is globally transformed (rotate, scale, translate). I want to manipulate the object in a mode such that I can see it in its default form (0 rotation, 0 translation, and 1 scale). I wonder if I can view an object in its default form in edit mode while keeping the global transformation?
Answer: The only way that comes to mind is to not transform the object directly, but through another object (eg: an empty), using a "copy transform" constraint.
Disabling/enabling the constraint shows the object in its initial state (disabled), or in the transformed state (enabled)
Comment: Right on. I use this method all the time. It's great for things like modeling a gun while also previewing how it fits into a character's hand.
Comment: thinking more, one downside of this method is that transforming a different object you can't use tools  like snapping... I'll try another answer, a different way.
Answer: Can you include a screenshot of what you mean? I am thinking you want to tab into edit mode and have the object back to the origin and editable, but then back to object mode and it be the size/rotation/location you left it in. If this is the case, then I would suggest you try using a single bone armature as a parent (Automatic Weights) while the object is still at 0/0/0 and in original scale. Then you can make actions on the bone in Pose mode and the object will follow and scale to the bone, but once you select the object and tab to edit mode it will be back at the default pose and position/scale.
Answer: I added another answer before, and another user too (a good one) but now I think there's another way, perhaps better, depending on your workflow, anyway is always better to know more different ways. So far, using other answers, you are driving the transform through an object which is very different from yours and thus you can't use some useful tool like snapping, while transforming, at its best, I feel.
Well, you could use the "duplicate linked" command, instead, to create a copy of the original object (maybe keep it in another, unused, layer). The linked copy shares the same mesh, but it is an independent object, so it can be transformed an used in any way.
(To better separate originals and linked copies you could also use a "linked scene", perhaps, but I'll follow the layers example here, to keep it simpler).

If you need to view the original object, without transforms or modifiers, you simply switch to the "originals" layer, and you base object is there, unaltered.
More, if you wish to alter its mesh (not the object, for that you'll use the linked one), like extruding it, subdividing, etc, you can do that in the "base" object - IN EDIT MODE - and the result will be applied to your linked copy too...
eg: extruding base object0s mesh on Z

..exiting edit mode, the linked object's mesh gets modified too...

As said, in this way you can transform the linked object using also useful tools like snapping, and sometimes this can be really useful.
I think you can pick whatever method works best in any situation...


$X_i \equiv a_i \pmod{P}$ for some $a_i \in \mathcal{O}$ given a prime ideal $P$ of $\mathcal{O}[X_1, \ldots, X_n]/(f_1, ..., f_n)$

Question:
Let $\mathcal{O}$ be a complete local ring with maximal ideal $\mathfrak{m}$.
Let $R = \mathcal{O}[X_1, \ldots, X_n]/(f_1, ..., f_n)$ such that $\det( \partial f_i/ \partial X_j ) \notin P$,
where $ \mathfrak{m} \subset P$ is a prime ideal of $R$ such that $R_P/P R_P \cong \mathcal{O}/\mathfrak{m}$. How can I show that there exists $a_i \in \mathcal{O}$ such that each $X_i \equiv a_i \pmod{P}$?
Comment: With your hypothesis, what is an example of $P$ with $R/P\neq \mathcal{O}/\mathfrak{m}$ without localizing?
Answer: This is the multivariate form of Hensel's Lemma. The isomorphism $R_\mathfrak{P}/\mathfrak{P}R_\mathfrak{P} \to \mathcal{O}/\mathfrak{m}$ is the same as a choice of $n$ elements $\overline{a_i} \in \mathcal{O}/\mathfrak{m}$ (they're just the images of $X_i$) and what you want is a solution of the polynomial system of equations $\forall i: f_i(X_1,\ldots,X_n) - f_i(a_1,\ldots,a_n) = 0$ to which you already know an approximate solution, namely $(\overline{a_1},\ldots,\overline{a_n})$. The condition for the determinant is exactly the non-degeneracy condition for the approximate solution that you need to apply Hensel lifting.


Can I install 10.8 over 10.7 and maintain windows xp boot camp functionality?

Question: I have an iMac with 10.7.5 running fine with Windows XP installed with Boot Camp that works both as native boot and with Parallels. I want to install 10.8 over 10.7 and I have read that XP cannot be installed from 10.8, but will XP/Boot Camp survive the upgrade?
Answer: According to Apple's documentation:

If your Mac has a Boot Camp partition with Windows XP or Windows
  Vista, you can continue to use your Boot Camp partition, but you can't
  upgrade to Boot Camp 4.0.

So it sounds like if you upgrade to Mountain Lion, it won't touch your Boot Camp 3.x installation; you won't get Boot Camp 4.0, but you'll be able to continue using XP.
However, I think if you do a clean install of Mountain Lion, that will install Boot Camp 4.0 by default, which requires Windows 7. So you can only keep XP if you do an upgrade, not a clean install.
Answer: It's not exactly the same setup, but I had a 2011 MacBook Air running 10.7 + Windows 7 Boot Camp, and the in-place upgrade to 10.8 didn't break anything.
Answer: Once installed, the bootcamp partition and the OSX partition are completely separated from one another. You can do anything you want to either one (even deleting them fully) that wont affect a single thing on the other.


Have key store file and password - how can I access my ETH without Mist/Geth

Question: Maybe a Noob question. I have the text file from the keystore folder. I have the password. How can I access my funds without using Mist/Geth? These are not working on my computer. Is there an online option to import the wallet. If I input the strings from the file in myetherwallet.com it will only show empty other accounts. Also I did not need to enter my password. Where can I find the encrypted key string in the file.
Comment: "These are not working on my computer." I'd like to know more about this. Why are they not working?
Answer: Just upload the entire keystore file under "Upload JSON" on the Send Transaction tab. It is not a text file, it is a JSON file, just with no labeled extension. Then it will ask for your password.


How to unindex a single blog in Multisite?

Question: Is there anyway to un-index a single blog in Multisite from search engines ?
Answer: Each site in Multisite has its own search engine setting -- in your site's Admin pages, go to Settings > Reading, and check the Discourage search engines from indexing this site box.
The URL should be along the lines of example.com/site-name/wp-admin/options-reading.php


Narration voice

Question: I'm working on an animated cartoon that has several voice over parts where one the characters are narrating. How do you make a voice sound like it's a narration, or voice over? In my references, the narrating voice sounds a lot closer to the screen, almost like it's coming from inside your head.
Is it just that it's dry, and so it contrasts to the other voices on screen that have room?
Or is there a trick?
Answer: It is partly due to the voice being mixed differently, but also comes from how the voice is recorded - controlled conditions in the studio, using a large diaphragm condenser with the actor close-in. Recording like this gives more bass and nice crisp highs in the tone of the voice. If you compare that to the way dialog on set is recorded - with a boom, from a distance, that's what accounts for most of the difference in the sound. Try recording your own voice at different distances from the mic (moving in to about an inch away) and you should hear the difference you describe.
Answer: Use a cardioid condenser mic and go too close to the mic so that the proximity effect is produced, then add a little boost between 2-4 kHz and you will have a classic voice over effect.
Answer: Most of it comes down to performance and projection, annunciation etc.  Distance from the mic also makes a big difference but I would caution against getting toooo close, you should still be a good 3-5 inches away.  One of the biggest give aways for inexperienced VO talent is moving way up close and being an inch away, you'll find a voice recorded that way extremely hard to work with and fit into your mix.  The mic makes a little difference but much VO and production sound is recorded with the same mic such as a Sen 416.

Narration voice


Are there blockchains based on substrates that use smart contracts and are on mainnet?

Question: I'd like to know if there's a chain that smart contract is being in mainnet use of it.
Answer: Thank you for your question. This is Sota, founder of Astar Network. Astar is a multichain smart contract hub on Polakdot supporting WASM and EVM. Polkadot doesn't support smart contracts by design and this is the reason why the ecosystem needs smart contract Parachains like Astar and Moonbeam.
When it comes to smart contracts on Polkadot, there are 2 types of contracts, smart contracts on EVM and smart contracts on WASM. EVM on mainnets are already ready today and Moonbeam and Astar are supporting EVM. WASM is also going to be supported by Astar in the early Q3. Currently, we are testing WASM on our testnet and measuring the network stability and performance. Hope we can support WASM as soon as possible on Astar so that the Polkadot ecosystem can explore the new smart contract landscape.
Answer: Check out Moonbeam and Astar!

https://moonbeam.network
https://astar.network
Answer: If you are interested in WASM Smart Contracts which are executed by pallet-contracts, these are primarily Smart Contracts which are written in the Rust based edsl ink! and which are compiled to WASM.
You might want to take a look at the awesome-ink Repo, which collects info on all avaible projects building with ink!.
So there is a testnet support available on currently 5 different Parachain testnets and hopefully the first deployment on a mainnet soon.


Rendering Grease Pencil lines behind Glass

Question: I am working on this layout and find that it looks nice with a bit of Grease pencil on top... however you can see I am using a glass material and the grease pencil lines are not passing through. Does anyone know a fix to allow all the machinery behind the glass to be traced as well?
Thank you!
Answer: So I was able to come up with a fix after looking for a solution to this problem myself. Here's what I did and suggest you try :)
if you hide the layer that isn't covered by the transparency you can bake the outline for that layer first, then unhide the layer that is above the transparency layer that you've baked already and add another grease pencil and bake for that layer too
Answer:
You can also link your glass object into a Collection and set the Line Art Usage to "Excluded". Then the glass will not be used for Grease Pencil Outlines, and you can see through.

Another option is to work with Occlusion layers, that were introduced in Blender 3.3.


Adobe Encore/Premier quick and dirty/shortcut to make DVD

Question: Isn't there a quick way to create a DVD movie with menus and everything in Adobe Encore or Premier? I mean like for instance the old iDVD on Macs where you could choose a preexisting theme and iDVD would do the rest for you (once you've chosen the chapters etc).
Comment: Have you found the answer to solve your problem? If you have, please mark it as "Correct". This makes your question a valuable reference for other members of this site.
Answer: Starting with Adobe CC, Adobe removed a program from their Premiere suite called Encore. Encore had all the same benefits of Dynamic Link - you didn't need to render your project, just add your project file, and boom - transcoded to DVD in one step, without an intermediate.
Now, for CC users, you still have a licence for CS6, and can downloaded Encore still, through the Creative Cloud launcher.
What you do have to do, is first make an intermediate render. You've got two basic choices:

Render a Master copy, full res, full quality, with no or very little compression (ProRes, DNxHD etc.)
Render a DVD-ready MPEG2, that will not need transcoding in Encore. There are presets for this in Media Encoder.

Adobe has the information you'll need to download Encore in their Help Documentation. Summarised, you install Premiere CS6, which also installs Encore CS6. Then, uninstalling only Premiere will leave you with Encore CS6, as well as all your regular Adobe CC apps.


Turning a running Linux system into a KVM instance on another machine

Question: I have two physical machines that I wish to virtualize.
I can not (physically) plug the hard drives from either machine into the new machine that will act as their VM host, so I think that copying the entire structure of the system over using dd is out of the question.
How can I best go about migrating these machines from their hardware to the KVM environment?  I've set up empty, unformatted LVM logical volumes to host their filesystems, with the understanding that giving the VMs a real partition to work with achieves higher performance than sticking an image on the filesystem.
Would I be better off creating new OS installs and rsyncing the differences over?
FWIW, the two machines to be VM'd are running CentOS 5, and the host machine is running Ubuntu Server 10.04 for no particularly important reason.  I doubt this matters too much, as it's still going to be KVM and libvert that matter.
Answer: P2V Linux physical to virtual KVM - no automated tools
Live migration of P running Debian Wheezy 7.11 to V KVM on Proxmox VE v5.4
mdadm software RAID1 P disks to KVM virtio disks
migrate from large P disks to smaller V disks
Foreword
The goal of these steps was to take a physical Linux P node running live-production and virtualise it. Without having to create and allocate multi terabyte disks, nor have to use md raid in the V guest, because the target hypervisor (Proxmox 5) used ZoL/ZFS. Also wanted to mitigate downtime/reboots on the running P node.
These steps might not be perfect, but it should get you close to a solution and cites useful links I found along the way.
I chose to post an answer on this question after careful google searching on https://unix.stackexchange.com and https://serverfault.com. This seemed like the most relevant question for my answer, even though its 9+ years old at the time of writing this.
Here are some related questions I found, which this answer also aims to solve too:
P2V with rsync
How to create a virtual machine from a live server?
How to migrate a physical system to a KVM virtual server with only network access?
Converting physical machine into virtual without shutdown it
Migrating physical machine to KVM
vmware conversion linux physical machine
How to migrate a bare metal Linux installation to a virtual machine
STEP 1
virtio support
# On the P node
# check the kernel has the virtio support
grep -i virtio /boot/config-$(uname -r)
# when no, that is an issue out of scope of these instructions. contact me.

# if lsinitrd is available, check if the initramfs already has the modules
lsinitrd /boot/initrd.img-$(uname -r) | grep virtio
# when yes, your virtio is already in the initramfs, continue to next step

# when no, add the modules to the initramfs
# backup existing initrd.img
cp -iv /boot/initrd.img-$(uname -r) /boot/BACKUP_initrd.img-$(uname -r)

# non Debian way
mkinitrd --with virtio_console --with virtio_pci --with virtio_blk -f /boot/initrd.img-$(uname -r) $(uname -r)

# The Debian way
# https://wiki.debian.org/DebianKVMGuests
echo -e 'virtio_console\nvirtio_blk\nvirtio_pci' >> /etc/initramfs-tools/modules
# check correctly append new lines etc, correct manually if needed
cat /etc/initramfs-tools/modules
# compile new initramfs
update-initramfs -u

# OPTIONAL if safe
# !!! WARNING DOWNTIME -- reboot P node to test everything is ok with the new initramfs
shutdown -r now

STEP 2
KVM prep - BIOS partition(s)
# boot a new KVM guest on SystemRescueCD or similar

# create the BIOS/UEFI partition(s)
# https://help.ubuntu.com/community/DiskSpace#BIOS-Boot_or_EFI_partition_.28required_on_GPT_disks.29
# https://help.ubuntu.com/community/Installation/UEFI-and-BIOS/stable-alternative#Create_a_partition_table

# follow the linked guides above to create the relevant BIOS partitions/disks.

STEP 3
KVM prep - BOOT and DATA partition(s)
# BOOT partition
# inspect the P boot partition - note the parameters
# CRITICAL the new V boot partition should be identical to the partition on the P.
# make the V boot partition using your preferred partitioning tool

# on P node, make a copy of the boot partition
# umount the boot fs for backup
umount /boot
# backup boot partition
gzip --stdout /dev/md1 > ~user/boot.disk.md1.img.gz
# re-mount boot fs
mount /boot

# on the KVM live CD
cd /tmp # or somewhere with > some space for the boot image
scp firstname.lastname@example.com:boot.disk.md1.img.gz .

gunzip boot.disk.md1.img.gz
# copy the P boot partition to the V boot partition
dd if=boot.disk.md1.img of=/dev/vda1
# verify consistency
fsck.ext3 /dev/vda1

# list the detected file systems, visual check for the expected results
fsarchiver probe simple

# on the KVM live CD make your data partitions, the size you wish
# mirroring the P is not required, obviously needs to be enough space for the data.

# CRITICAL the binaries/tools used to make the data file systems must be for the same kernel generation i.e. from the node being converted, otherwise the system will fail to mount the rootfs during boot.
# https://unix.stackexchange.com/questions/267658/

# CRITICAL target file systems must have enough inodes
mkefs -t ext4 -N 1500000 /dev/vda2
mkefs -t ext4 -N 1500000 /dev/vda3

cd /mnt/
mkdir linux
mount /dev/vda2 linux/
cd linux/
mkdir -p var boot
mount /dev/vda3 var/

step 4
rsync data
# consider mounting the fs ro, or at the very least stopping services for the final rsync
nohup rsync --bwlimit=7m --human-readable --itemize-changes --verbose --archive --compress --rsync-path='sudo rsync' --rsh='ssh -p22345' --exclude=/mnt --exclude=/proc --exclude=/sys --exclude=/dev --exclude=/run --exclude=/boot --exclude=/var/spool user@hostname:/ . 1>../rsync.stdout 2>../rsync.stderr

# check the logs are ok, and as expected

# final sync, stop services, and/or ro the fs(s)
rsync --bwlimit=7m --human-readable --itemize-changes --verbose --archive --compress --rsync-path='sudo rsync' --rsh='ssh -p22345' --exclude=/mnt --exclude=/proc --exclude=/sys --exclude=/dev --exclude=/run --exclude=/boot --exclude=/var/spool user@hostname:/ .

step 5
update grub
mount /dev/vda1 boot/
mkdir -p proc dev sys
mount -o bind /proc /mnt/linux/proc
mount -o bind /dev /mnt/linux/dev
mount -o bind /sys /mnt/linux/sys

chroot /mnt/linux /bin/bash

export PATH=$PATH:/bin:/sbin:/usr/sbin/ # check what is required for your P
grub-install /dev/vda
grub-install --recheck /dev/vda
update-grub

# update /etc/fstab with the new id/names/options
vim /etc/fstab

# Only required if you're P node had md RAID
# https://dertompson.com/2007/11/30/disabling-raid-autodetection-in-ubuntu/
aptitude purge mdadm

# required mount points
mkdir -p /mnt /proc /sys /dev /run

# required because I didn't rsync /var/spool
mkdir -p /var/spool/cron/atspool /var/spool/cron/crontabs /var/spool/cron/atjobs /var/spool/postfix /var/spool/rsyslog

step 6
test kvm and make changes required post P2V
# reboot to KVM guest normal boot disk

# fix a screen bug that appeared after P2V
aptitude reinstall screen

# ensure boot logging is enabled
# https://wiki.debian.org/bootlogd
aptitude install bootlogd

# networking
# check that the MAC address assigned to the KVM matches what the KVM kernel reports
ip link

# modify net interfaces, taking note of the interface name with the correct MAC address
vim /etc/network/interfaces

# update DNS if required
vim /etc/resolv.conf

# update apache2 envvars if required
vim /etc/apache2/envvars

# update hosts
vim /etc/hosts

# reboot
shutdown -r now

step 7
final tests and verification's
#### post reboot
# check dmesg and/or kvm console for boot it issues
dmesg -x
dmesg -x --level=err --level=warn

# check boot log for issues, useful if physical console cannot be easily viewed
# formatting: https://stackoverflow.com/q/10757823
sed 's/\^\[/\o33/g;s/\[1G\[/\[27G\[/' /var/log/boot |less -r

Answer: Redhat made a utility called p2v to do exactly this.
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/V2V_Guide/chap-V2V_Guide-P2V_Migration_Converting_Physical_Machines_to_Virtual_Machines.html
Answer: You could possibly pipe the output from dd through an SSH tunnel to your target machine.  I've known it to be done relatively successfully into a VMWare virtual machine.
Good details in the main answer here, and provides instructions for what to do if SSH isn't running (a number of liveCDs have SSH server on them anyway, so shouldn't be a problem):
How to set up disk cloning with dd, netcat and ssh tunnel?
Comment: The notes at the bottom of that answer are golden.  In particular, one of source filesystems is dramatically larger in capacity than the space allotted, though it's mostly free space and all the actual data will fit.  Looks like a dump/restore for that machine, and a netcat+ssh+dd copy for the other.
Answer: You can copy the disk images to the LVM logical volumes and provide this as the disk image for the VM.  Make sure you disable NTP and NTPDATE on the virtual servers.
I converted some old images using Mondo to create bootable recovery images.  This allowed me to resize the partitions during reinstall.


SharePoint Online - Is it Possible to Embed a Twitter Feed on a Modern Page / Modern Web Parts?

Question: Office 365 / SharePoint Online - Is it Possible to Embed a Twitter Feed on a Modern Page? I'm currently using a modern web part 'Embed', but having no luck so far.
Comment: This should be possible using SPFx webparts. Did you give it a try?
Comment: No I didn't, I'm not familiar with them.  Can you provide more information/links on these? Thank you
Answer: The Embed web part only support embedding content from secure websites. And SharePoint Online only support embedding content using the website address or iframe based embeds.
To add a Twitter Feed to a SharePoint page, we may need to add scripts () to the page.
Refer to this article about customizing the modern experiences in SharePoint Online, we need to use SharePoint Framework Extensions to add scripts to SharePoint modern pages.
Comment: add a Twitter Feed to a SharePoint page - the link is broken now. Do you have any other examples or info on how they did it?
Answer: We could successfully embed YouTube videos but struggled with embedding a twitter feed. After little success we created a work around.  This may be of interest to others on how we did this:
We created a basic (HTML) webpage with only the following code from twitter (created through a twitter widget):
National Park Tweets - Curated tweets by TwitterDev

This new webpage is then using the same domain as our website.  On our SharePoint Online we embedded the 'Embed' modern webpart into our modern page and added the following code:

Voila!
Answer: Just use this web part https://github.com/thenikhilk/sharepoint-instagram-feed.
No need for tokens, registration or any third party sign-in, just username you want to embed.


Generate electricity, water wheel

Question: I have a stream of water, it flows at 1 gallon per minute into a water wheel. The water wheel produces about 75lbs of torque. How much electricity can I make with this? Where can I get more info on how to compete this project?
Comment: To calculate power, you need to measure torque and speed of rotation of the wheel when the wheel is under some resistance. 75 lbs is not a measure of torque. It is a measure of force. To convert it to torque, you would need to specify how far it is from the center of the water wheel.
Comment: How much head (how far does the water fall in passing through the wheel) have you got? Does it enter with an pressure (ie, is it a "Pelton wheel" where the water hits the wheel at high speed (using head pressure from a reservoir high above the wheel) or is is a simple flow of water from a stream or pond under no pressure as it hits the wheel?
Answer: One simple sanity check is that you will get less power out (due to imperfect efficiency) than the power that would be required to have a pump circulate water from the outflow to the input. If the head pressure is low, you'll find that a very low power pump will pump 1 GPM up a few feet - so your power out will be lower than that. If your 1 GPM is coming in under pressure from a source a few hundred feet above the wheel, you might have some serious power.
Answer: 75lbs is not a measure of torque . 75lbs-in, or ft-lbs, or Newton-Metres. is a measure of torque. To use it, you would also need to know the speed of the wheel when it is generating this torque, in rpm or radians/second.
(If that's the static torque, as you let the speed increase, the torque will decrease, and you have to find the actual torque at the most practical speed, usually the speed where it produces most power)
Now if you measure torque in Nm and speed in radians/second, both SI units, just multiply them and you have the mechanical power in Watts.
If you measure torque in ft-lbs and speed in RPM, multiplying them by 2 * pi gives you the available power in who knows what units, but if you can find the relevant conversion factor you can translate it into horsepower or watts. I usually find it easier just to use SI units throughout.
The electrical power you can get is some fraction of this, maybe 50% in the toy DC motor range, to 90% for a modern generator in the kilowatt range.

Generate electricity, water wheel


Present Perfect with "that"

Question: I came across the sentence "It's been thirty years since my parents first met." I am sure that if I heard "It's been thirty years that my parents first met", I would accept it as grammatical, but I can't find any reference to support this. Am I wrong?
Comment: "It's been thirty years **since** my parents first met" would be more likely, I suppose. Other than that, the sentence is right the way it is without **that**.
Answer: You'd have to use present perfect on both sides for that sentence to work:

It's been thirty years that my parents have been married.

Otherwise, remove the present perfect from the first part:

It was thirty years ago that my parents first met.

In both examples, as well as the ones you referenced, that acts as a conjunction, or should. If you are trying to use it as a determiner, then it simply doesn't work there.
Answer: In your example, you would have to use the word since.

It's been thirty years since my parents first met.

Using since here is actually related to the span of time since the moment your parents met, rather than the first half of the sentence. Using that would be grammatically incorrect. However, you could say:

When I look back on my life, it's been thirty years that I wish I could forget.

In this instance, that is used to create a relative clause, connecting the thirty years to the last half of the sentence. You can do this with other things too:

I have eaten something that wasn't good for me.

This isn't restricted to the present perfect, either:

It's going to be thirty years that I wish I could forget.

But, as soon as you're talking about the span of time, you have to use since again.

I have eaten at least three kilograms of cheese since my parents first met.
I haven't eaten anything since yesterday.

Present Perfect with "that"


Van der Waals forces

Question: What exactly are Van der Waals forces? How do they arise and how can an instantaneous dipole cause another dipole? Shouldn't this make a chain reaction that causes all matter to eventually become polar?
Comment: Related: https://chemistry.stackexchange.com/questions/10210/whats-the-relationship-between-van-der-waals-forces-and-hydrophobic-interaction?rq=1
Answer: The post that was linked to you in comments contains  a nice, short description of the 'traditional' categories of van der Waals interactions. I suggest you take a look at that, it might just be enough to clear things up. The reason I am writing this post is that the categories introduced there are defined somewhat arbitrary, so I'll try to introduce some terminology that (as of today) is considered correct in the field.
So given a molecular system, it is quite easy to factorize the forces into intermolecular and intramolecular forces. Intramolecular forces are what hold the molecules together. These are (almost completely) covalent bonds, and these interactions would be same for one single molecule and the bulk phase of the matter. But we know, from the real life, that matter does not only exist as an ideal gas: we got liquids, solids, and even the gases are non-ideal. So evidently, there has to be forces between molecules. These forces are collectively called van der Waals forces for historical reasons.
Now there are three different types of interaction between molecules. There are electrostatic, induction and dispersion interactions.
Electrostatic effects are simple classical interaction between charged particles. Thesy simply come from the Coulomb law, can be either attractive or repulsive, and they are strictly additive (because Coulomb law is additive)
It is tricky to properly understand induction and dispersion. These two effect come from quantum mechanical perturbation theory. Without getting into details, perturbation theory means that the wavefunction of two molecules together is not simply the sum (or average) of the wavefunctions of the separate system, but there is an interaction between them, but this interaction can be expressed in terms of the interactionless wavefunction. The expression for the second-order energy correction is given by the Rayleigh-Schrodinger picture as follows (this is called the polarization approximation):
$$W^{(2)} = - \sum_{mn}' \frac{ <00|H'|mn><mn|H'00> }{W_{mn}-W_{00}}$$
In this expression, $|m>$ represents the mth excited state of the original wavefunction of molecule A and $|n>$ represents the nth excited state of the original wavefunction of molecule B. This expression could be read: the energy difference between the two separate systems and the interacting system depends on the excitations in the separate systems through an interaction operator $H'$.
The sum can be factorized into three components:
$$W^{(2)} = - \sum_{m\neq0}' \frac{ <00|H'|m0><m0|H'00> }{W_{m0}-W_{00}} - \sum_{m\neq0}' \frac{ <00|H'|0n><0n|H'00> }{W_{0n}-W_{00}} - \sum_{m\neq0,n\neq0}' \frac{ <00|H'|mn><mn|H'00> }{W_{mn}-W_{00}}$$
Here, the first term contains the energy contributions of the interactions of the ground state of A with the excited states of B. This is called the induction energy of B. The second term is the induction energy of $A$, which again, expresses the total response of the molecule A to the ground state of B. The third term is the so-called dispersion interaction, which is then a mixing of the excited states of both molecules.
So these expressions are the defining expressions for induction and dispersion. One should know that both of these interactions are always attractive , they are non-additive, and they are always present, between charged and neutral particles too. Also don't get confused that the energies are expressed in terms of excited states: there is no excitation going on in the system, it's just the mathematical tool that we used as definitions.
The total intermolecular force, or van der Waals force is then usually the sum of electrostatic, induction and dispersion terms. For the sake of completeness we might include resonant energy couplings and magnetostatic interactions too, but these are either rare or so small that we can neglect them.

Van der Waals forces


MIPS Assembly Language Homework

Question: My teacher gave us a worksheet to complete that has to do with MIPS assembly language. I'm trying to figure it out. This is her first year teaching and I don't think she's quite got the hang of it yet. She has caused more confusion in the class than understanding, but perhaps it's just the subject matter.
I've been doing a lot of research but nothing I have found has a format that I can compare to her question. I believe if I can get help with just the first question I can compare that to the rest of the homework and come up with a better understanding of the way it works.
1. Map your initials to letters of the alphabet e.g. A=1, B=2, C=3 etc. Then write a MIPS program that loads a value from memory location 0 into the register mapping to your first initial (Value A) ...
My first initial is C=3. Can someone show me what this should look like?

The load word Example from the book states the format should look like lw $s1,20($s2)

So in that example is 20 the memory location, or the value that they are putting into $s2? or neither?
Thank you in advance for anyone who helps, and I apologize if I haven't made any sense in asking this question.
Answer: <code>lw $s1,20($s2)
</code>
Load word at RAM address inside s2 + 20 into s1.
Comment: Well it's A[4], technically, since it's zero-based.

MIPS Assembly Language Homework


Why is the Block Header txn_count field always zero?

Question: According to the Protocol Specification, the txn_count field of a Block Header is always set to 0, why is that? What are the intended future uses of this field?
Answer: The headers message is sent in response to a getheaders message.
The txn_count is always 0 simply to make the parsing of this packet compatible with the parsing of the block message.
getheaders is designed to be used by a simplified client, however since there is no way to get partial merkle branches using the standard protocol this cannot actually be done.
Comment: The author was correct when he wrote this, although it is now possible to get partial headers (using Bloom filters)
Answer: Because no transactions are included in the message. I don't think there is any intended future use.
Comment: You mean transactions (Txs)? One could technically state how many of them there are in the original block, but then it would be a varint and the header would be of variable byte length.
Comment: Yeah, that's what I meant. I edited it. The protocol specification seems to be in error when it says that blocks normally have varint tx counts (or that headers don't). Headers are standard CBlock objects with the tx vector left empty, so the types are the same.


What is the durability of a plastic valve cover?

Question: After a change of the valve cover gasket didn't fix a rather persistent leak (than managed to cover my entire engine in oil) I took my car to a mechanic. They called up saying that they have pinpointed the problem to one corner of the cover that they say seems to have warped slightly. Now this is a thick plastic cover, I am just wondering, is this warping common or is it indicating a larger problem? Is there anything I can do to prevent this in the future?
Answer: This would depend on the type of car you have.  The majority of valve covers i've come across are aluminum.

You can try some RTV sealant or Hondabond sealant (pretty popular solution for this) in place of a valve cover gasket.  The sealant should mold itself around all the gaps and irregularities in your valve cover, making for a better seal.
If that fails, see if an aftermarket aluminum valve cover is available for your car.  They make them in colored/polished/chrome finishes for all kinds of cars - chances are they may have one for yours.
Answer: A few year ago, I remember Stacey David (when he was hosting the "Trucks" show) commenting that he thought the plastic valve covers on the old Jeep Wrangler must have been designed from the factory to leak because he had never seen one that didn't. That doesn't sound promising. Maybe you can find some aluminum or steel replacement valve covers from ebay, car-part.com, or from rock auto.  What kind of car is it? That will help.
EDIT:  Here is a picture of the new valve cover gasket that I think will be needed on your car. I don't see any aftermarket valve covers (of any kind) for this car, so I guess plastic it is.

Here is a LINK that describes the process of replacing it. It all sounds pretty accurate, except for the part where they tell you to speak with a Saturn mechanic... doh!
Comment: It is my beloved '98 Saturn SW2 w/ 1.8L DOHC.It is an absolutely awesome car except the oil puddle it leaves everywhere. The gas mileage is great so I want to use it for trips, but nothing says "Hey, thanks for inviting us," like an oil spot. #Vent
Answer: Be carful of how you go about fixing that. It is all too easy to overtighten the bolts if they do not have shoulders. There may be a crack. Plastic can be much stronger than a comparable steel/aluminum part, or it can be much weaker. All depends on how good of a job they did designing the part and selecting a good polymer.
For example, if you put the Moly bearing oil into a motor where the valve cover is a plastic sensitive to Moly (many plastics are) then the plastic will become brittle and crack. Though I would hope car manufacturers would know better than to make such a critical oversight.
In your case, I would put a swatch of RTV sealant on the plastic valve cover and see if it sticks. If it sticks you are good, if not then I would buy a whole new valve cover.
Answer: The probability of warping depends on many features:

What kind of plastic is used
How well the cooling system of the car has been designed
Has the car ever overheated

I used to have a 2011 Toyota Yaris mk2 for five and half years. It had a plastic valve cover. But, being a Toyota, I assume the plastic type has been carefully chosen and the cooling system has been designed to work extremely well. Thus, it never overheated and the plastic didn't warp. No valve cover gasket leaks.
I also used to have a 1989 Opel Vectra. It went to the junkyard at bit over 21 years of age. At that age, the valve cover gasked has started to leak but was never replaced due to it being a minor annoyance and not a major issue. I assume the fault mode was rubber deteriorating. The valve cover was steel.
So it's not a given that a plastic valve cover will warp. However, it is a given that rubber deteriorates.


Custom SVG does not work in my Qfield project

Question: When I open my project in Qfield, all SVG symbols are relocated by a question mark. Here is the path of my installation in my Tablet ..... \ Tablet \ Android \ data \ ch.opengis.qfield \ files \ share. Android 5.1.1 - Tablet A6.
Answer: Similarly, but slightly more specifically, to an answer to this question already provided, I am able to have my QFIELD projects on a tablet/phone device access .svg files in the following way:

Create and save your QGIS project on your PC in the .qgs format.
Open the "Project Properties" dialog from the "Project" drop down menu in the top-left of the QGIS desktop program screen.
Under the "General" tab, ensure the "Save paths" dropdown menu is set to "relative".
Place the .svg files in the same location as the .qgs project file and link to them in your project (i.e. choose these .svg files/location as the one your project points to/accesses them from).
Use the qConsolidate3 plugin to package the .qgs project to a chosen folder (NOTE: qConsolidate does not seem to work with .qgz files). This will create a folder with both the .qgs project folder, and a folder called "layers" with all the layers used by the project. Note: This process will not copy/move/package the .svg files but will maintain the project looking for them in the same location as the project file.
Copy the newly created qConsolidate3 packaged folder to your device.
Copy the same .svg files as described above in to the folder with your .qgs project file and the "layers" folder.
Open the project file and see your .svg files as desired.

If you are using the QFIELD sync plugin (which I haven't yet managed to use reliably), I would suggest trying something like the following:

Check that the required .svg files are somewhere in the same folder
as your .qgs project and at the same relative path as to how they are
accessed on your PC (i.e. if your project folder is on the desktop in
a folder called "project_01" at C:\YourName\YourName\Desktop\project_01\project_01.qgs and on your device at Computer\Galaxy S5\Phone\Android\data\ch.opengis.qfield\files\project_01\project_01.qgs ensure that you manually place the .svg files in this location.

For further information see: https://www.qfield.org/docs/project-management/portable-project.html
Hopefully this helps.
Comment: Think you for your help. it's ok now. Rayan Bell has gived me the same solution, but without details. I have commited a mistacke befor your help, i have not reaffected my symbolgie for this new place in a folder .qgs. Know it's worked without qConsolidate3 (this pluging not exist in QGis 3.2). I have just copied the folder in android device and all it's well (without QfieldSync).
Answer: Another option is to embed the SVG in QGIS. From "Symbol Selector" (Layer Properties > Symbology, double click on symbol, select SVG marker) scroll down and select the down arrow, select "Embed File..."
see: https://qfield.org/docs/project-management/android-data-structure.html
This worked for me exporting with QField Sync.
Comment: It's ok. Now it's easy for me to use QField Sync.
Comment: This approach did the job for me. As a plus, it's a simple approach and exactly what I hoped to achieve.
Answer: I came across a similar issue but was able to resolve by manually adding the SVG file to the same project folder as my QField project.
Comment: Thank you for your response. you insert svg files or a folder containing svg files? And you make this in the project in computer or in android device?
Comment: No worries. There is a folder on the computer that contains the QField project (created in QGIS) and a separate folder called 'SVG' that contains the svg files. I then move this folder to my android device.
Comment: I have used your suggestion but the problem still not changed. i'm going to test it in another android device. best regards
Comment: Best of luck, sorry I couldn't be of more help


No command 'bla' found, did you mean:?

Question: So, when a command is not found, by what means is the "did you mean:" list populated?
What program finds these alternate commands?
What is the meaning of: "(main), (universe)..."?
Can I change which program finds these?
Comment: Are you asking what programs offer this functionality or which does it in your case? If the latter, you provided too little information. What shell do you use, for start?
Comment: I'm using bash but I really just mean in the most general case. What programs provide this and is there a fairly consistent way to determine the program in most shells?
Comment: It also depends greatly on what flavor/distro of Unix/Linux you're using as to how the feature is implemented.
Answer: For bash, its behavior is governed by the shell function command_not_found_handle (See man bash).
To see what behavior is defined by that function, you can issue:
declare -p -f command_not_found_handle

You can change which program is used by redefining the command_not_found_handle function.
In Debian-based distros (including Ubuntu), the package command-not-found is commonly installed, and available as /usr/lib/command-not-found  From the link:

Suggest installation of packages in interactive bash sessions
This package will install handler for command_not_found that looks up programs not currently installed but available from the repositories.

See also:

man page for bash, especially COMMAND EXECUTION
/usr/share/doc/command-not-found/README (from the Debian package)
https://wiki.ubuntu.com/CommandNotFoundMagic
Answer: If you look at contents of /etc/apt/sources.list it will have the format
#Archive type  Repository URL                   Distribution Component
 deb           http://archive.ubuntu.com/ubuntu precise      main

Archive type
The first word on each line, deb or deb-src, indicates the type of archive. Deb indicates that the archive contains binary packages (deb), and so on.
Repository URL
The next entry on the line is a URL to the repository that you want to download the packages from.
Distribution
The 'distribution' can be either the release code name / alias (wheezy, jessie, stretch, sid) or the release class (oldstable, stable, testing, unstable) respectively.

What is the meaning of: "(main), (universe)..."?

Component
main consists of DFSG-compliant packages, contrib packages contain DFSG-compliant software, but have dependencies not in main,non-free contains software that does not comply with the DFSG and so on. A tip - Check one of the repository urls,it should have a folder with the name of component.
The package managers say  apt will have a database which contains a list of all packages in the repositories and it is smart enough to  give you suggestions.
Your package manager may be on eof  dpkg(eg Debian, Ubuntu etc), apt(eg Debian, Ubuntu etc), now obsolete rpm(eg older Redhat versions and newer ones don't kick it off for compatibility reasons),yum(eg. Fedora,CentOS),dnf - dentrified yum (eg.New Fedora releases) and so on. For a more comlpete list check this. You might even see are multiple package managers in one distribution. For example in Ubuntu, you may see dpkg which feeds /etc/apt/sources/list.
So when you type
cleaq

It may say
cleaq: no command found. Did you mean clean.

by what means is the "did you mean:" list populated?

This involves a pattern match with the packages in the your package manager database.
This database is updated when you do do an apt-get update
Not sure about

Can I change which program finds these?

though. I believe this is a feature which cannot be changed. Not so sure though
Reference : Debian SourceList
Comment: @vondirac : Yes sources.list is inside the `/etc/apt`. See the edit.. Well, in general you can say your package manager maintains this list for you and you package manager can be apt(in case of Debian, Ubuntu etc), rpm(Redhat and its clones),yum(eg. Fedora,CentOS) and dnf(New Fedora releases)
Comment: You can improve this answer with reference to [some Ubuntu doco](https://wiki.ubuntu.com/CommandNotFoundMagic).
Answer: This is not a standard feature of Linux shells. There are at least two possibilities:

zsh is maintaining its own suggestion list
project thefuck offers another one
Answer: police  tisn
No command police found, did you mean:
Command polipo in package polipo
Command ionice in package util-linux
$
Comment: Answers are for, well, answers. This does not answer the original question, it's a clarification request, [so it will be deleted](https://unix.stackexchange.com/help/deleted-answers). You need to earn some reputation before you're allowed to comment, but you should note that poor-quality answers will have a negative effect on what reputation you do have. I'd suggest you delete this yourself.
Comment: This does not provide an answer to the question. Once you have sufficient [reputation](https://unix.stackexchange.com/help/whats-reputation) you will be able to [comment on any post](https://unix.stackexchange.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/389417)

No command 'bla' found, did you mean:?


PgRouting : Shortest path starting from the closest vertex not the closest node

Question: I am currently working on a routing solution with PgRouting (Dijkstra's algorithm), but the shortest path it creates always start from the nearest nodes generated from the edge table, and sometimes the distance between the node and the point is too long(4km or more) and it makes my calculations wrong.
Is there a way to calculate the shortest path from the closest line vertex to my starting point?
I included a picture to clarify more my problem
Answer: While still not in the official release, the withPoints family of functions is in a stable state since pgRouting 2.2 (?) and provides a dynamic interface for temporary nodes in a graph, i.e. routing between arbitrary points.
The key here is the points_sql where you specify the closest edge to any of your temporary nodes, and the fraction of line length their closest point is located at.
Assuming points_table(id INT, geom GEOMETRY(POINT, 4326)) holds all custom source and target points, you can

either query dynamically, i.e. running
SELECT *
FROM   pgr_withPoints(
         '<edges_sql>',
         'SELECT pnt.id AS pid,
                 edg.edge_id,
                 edg.fraction
          FROM   points_table AS pnt
          CROSS JOIN LATERAL (
            SELECT <id> AS edge_id,
                   ST_LineLocatePoint(<geom>, pnt.geom) AS fraction
            FROM   <edges_table>
            ORDER BY
                   <geom> <-> pnt.geom
            LIMIT  1
          ) AS edg',
        -1, -2,
        details := TRUE
      )
;

would route between points_table.id 1 & 2 [*]

or add and update the required fields to your points_table in advance for more performance; the above points_sql query can be applied for the update

With the details parameter set to TRUE, the function treats all dynamic nodes from the points_sql (i.e. all other than those used as source & target) as 'normal' nodes of the graph in the result set; setting to FALSE would return only edges and vertices of the edge_sql (but always including start and/or end node if they are of the points_sql).

[*] for all temporary nodes passed in via points_sql, the function will use negative pid values as input as well as in the result set!
Comment: Nice explanation! We could add your example to the gRouting documentation.
Comment: @dkastl thx, and by all means, please go ahead if this would add value to the docs!
Comment: I really want to thank you for your answer, you opened my eyes on something I had no idea about
Comment: @Ismail share our knowledge, learn from each other; it can be so simple and effective! You are very welcome, if you think this answers your question, consider accepting the answer by activating the little tick symbol next to it.


What is the most efficient way to make money in Gran Turismo 5?

Question: What is the most efficient way of earning money in Gran Turismo 5, in terms of credits earned per time spent driving?
Answer: Some of the Seasonal Events added in the recent update (1.05) have very good prizes. So far I've only attempted the 493hp GT-R race but coming 3rd gave me 340,000.
This update has also increased the rewards for winning races, but this is only in effect until the end of January 2011.
See http://blog.eu.playstation.com/2010/12/20/gran-turismo-5-functionality-update/ for more details.
Update:
After the release of the spec 2.0 patch, there is now a "Consecutive Login Bonus" - a bonus to both prize money and experience points. This bonus increases for every consecutive day you log into the game, up to a maximum of 5 days of increases.
The bonus is as follows:

1 day: 110%
2 days: 130%
3 days: 150%
4 days: 170%
5 days: 200% (ie. double rewards!)

So, make money even more efficiently by logging in each day for 5 consecutive days, then tackle some races.
Comment: These are, while very rewarding, not repeatable for more Cr.
Comment: Not repeatable, but it looks like new races will appear regularly, all with similar-sized rewards.
Comment: It's hard to beat races where you can earn 2,000,000 for 5 laps. And so far there's been 5 races per week (albeit with different rewards) so it's a steady source of income. I earned enough for the Formula GT in a little over an hour! Cairnz' answer is the best for a pure grind.
Answer: A-Spec, Extreme series, American Championship, Indianapolis Motor Speedway.
Use a Race Modded Corvette (total cost ~600,000) for ~100k every 4-5 minutes. This seems to be the grind to go to for repeatable cash.
Comment: +1 for this, having now got access to this race, you can effectivly farm 97k every 5 minutes! So doing this race for 30 minutes would net you 587k, so manage to do it for an hour and you get 1m credits! Do the race 58 times and you can buy a GT by Citroen Race Car! ;)
Answer: If you are just after money and don't mind "playing unconventionally" (i.e. cheating) there is something you can do. I have only read about this and have not tried it.
The basic idea is:

Get yourself one of the Forumla One cars (e.g. the X2010)
Choose a race on one of the indy tracks (Like the Wind, or Dream Car Championship)
Using a rubber-band on the controller hold the right analog stick to full throttle
Using a rubber-band hold the left analog stick to almost straight ahead but just slightly to the right
Start the race

You should shoot off to the lead and then the car should follow the circut all the way around. You can win the race without having to do anything.
You could basically do that in B-spec anyways. The thing that makes this trick really worthwhile is this:

Once the race has started plug in a USB keyboard
Put something on the enter key so it is held down

Now when the race is over it will 'enter' through the credit/xp screens and restart the race. So you can leave this set up indefinitley and it will rake in money to the tune of ~$1million per hour, plus XP.
Comment: Hmm ... I suspect this does not work if there are cats in your house. I can picture going to sleep with the car at Indy and waking up to find that I'm driving a kart in circles.
Comment: I used to do this on GT2 with the Pike's Peak Escudo! I think this in combination with cairnz's answer is best. Just leave it on overnight and hey presto!
Answer: I would say the best way to earn money quickly is the Special Events.  Some of them like the Jeff Gordon NASCAR Racing school can be pretty quick to go through, and they will get you a lot of Credits and Experience for each one you complete.  I just did the Intermediate one last night and got roughly $50k per event.
The downside is that once you have already achieved a gold medal on a special event you don't earn anything from that event anymore.  So you can only use this trick once, but it's a good one anyway.
Comment: Yes I also found the special events to be lucrative, but once I've finished them I want to know the fastest way to earn millions of credits so I can get the most expensive cars.
Answer: My friend who plays GT5 swears by going to B-Spec mode if he gets bored and just make his AI teammate do races for him. Easiest way of earning creds ever.
You could do all of the Top Gear specials, they're super easy to do. ;)
Comment: B-Spec has much higher lap counts for lower payouts. Even endurance races are very poor in payouts. But for getting Cr. while doing nothing, it's perfect :)
Comment: True, this is great if you have cars left over for the races that you used. Set it to maintain pace and go make a cup of tea, read the net or have a shower etc ;p
Answer: Buy a formula gt or red bull x1 and complete the Like the Wind race. You'll probably get at least $1,400,000 per hour!!
Answer: Well right now the Seasonal Events has a Muscle Car Championship race, gives you 305,000 for first.  My best time is 4:09.  So that's about 3.7 mil every hour.  But gets kinda of tiring after a while.  I try to keep it interesting by buying every car that is eligible for that race and seeing which one's the fastest.  So far I've only tried two: '70 Challenger and '69 Vet.  The Vet is a few seconds faster with my tuning (but I'm not very good at tuning)
Answer: There is a new event that came out about a week ago called "La Festa Cavallino". Basically buy a stock Ferrari 458 Italia, upgrade it as much as you can (including Racing Soft tires), adjust the transmission so the top speed is like 215 and do the "Circuit de la Sarthe 2009" race. The race is 1 lap long, takes about 3'50", and gains you 168,000 credits for a first place finish. You can repeat this race over and over if you wish.
Answer: In A-Spec mode, at Rome in the European circuit, 5 laps with a 1:03 average lap time in a Veyron gives you 99k.
Comment: BTW - this is in extreme mode: european races: rome circuit
Answer: I put together my own USB-device to babysit B-Spec Bob:

Now I simply start a B-Spec race and plug this device into the USB-Port, the B-Spec races are then on repeat mode until the device is unplugged.
Comment: That's interesting, but I'm not sure how helpful this is unless you also publish a tutorial of how you made it...
Answer: 1st best way of making money=american championship fully tuned and modded zr1 98,000 per race.
2nd:European championship 5-6 min race for an 82,000 profit for 1st place
3rd=the dream car championship takes longer than like the wind but more money 74,000
4th=like the wind 70,000 a race for 2 mins work a bit faster tha the dreamcar.
Answer: I've not played with the extreme sereies but I have found the easiest money is for the Professional series, Lightweight British and the London course.  My lap times for the Race modded Lotus Elise are as low as 51.5  and with only 3 laps and a payout of $24,100  You can net just under 100k every 12 minutes.
Answer: I do the Rome circuit in the professional series I think European championship( I haven't played in a while) I have an Audi r10 tdi '06 and I can get a good lap of about 56 sec and the race is 5 laps. You get like 85000 per race so it's like 170000 every 10 minutes. It's decent if you're willing to put the time into racing the same thing over and over.
Comment: I don't know what series it's in
Comment: Ya know what, it might be worth more than that, all I know is that it's definitely over 85000 per race
Answer: Currently, the new Tous France Championnat Seasonal Event has a race on the Sarthe Cicuit which will net you just over 100k for just over four minutes of driving, depending on your car.  I won a '99 Citroën Xsara Rally Car recently and it destroys in "stock" form.  All I added was a set of sports soft tires and went to work.  You could get a fully customizeable transmission and up the top speed a little bit and trim a few fractions of a seconds, if you're in a time crunch.
Answer: There is currently an online only american muscle car challenge with the first track as daytona.  Nets you about 110k for 5 laps and your car only has to be able to top 175mph to win.  I added a few mods to a 69 corvette I found used and can blow around all 5 laps in 6:30 for 110k and still lap at least half the other cars.  I run those for an hour every other day or so when I want to go shopping :)
Answer: For me personally, I pre-ordered from Amazon and got a code for a Mazda 787B race car. Then I just redo the Professional Series > Supercar Festival > Daytona.
This makes you 21k every 2mins. So it works out about 100k every 10 minutes, which is the best I've found so far. I'm rank 17 ish.
Comment: It's worth noting that with the new Remote Racing feature, you can make money without even needing to play.
Answer: Im level 35 and use the Seasonal Events Sport Pickup Truck event (new) on the Mt. Aso track, gets you 90,100 for 5 laps at 1:05:00 a lap in a supped up Toyota Tacoma. Thats also about a million an hr. Im doing it to get every car, got 540 cars right now, half way there :)
Answer: soup up an Audi A6 (the one in the dealerships before the quattro '09) and do the European champ. In extreme series
Mines over 900 hp and it's a money making machine
Answer: I just raced the Honda Cup in the Special Events and won all 5 races for 300k each race!


What is the difference between batch and mini-batch gradient decent?

Question: I am learning deep learning from Andrew Ng's tutorial Mini-batch Gradient Descent.
Can anyone explain the similarities and dissimilarities between batch GD and mini-batch GD?
Answer: It is really simple.
In gradient descent not using mini-batches, you feed your entire training set of data into the network and accumulate a cost function based on this full set of data. Then you use gradient descent to adjust the network weights to minimize the cost. Then you repeat this process until you get a satisfactory level of accuracy. For example, if you have a training set consisting of 50,000 samples, you would feed all 50,000 samples along with the 50,000 labels into the network, then perform gradient descent and update the weights. This is a slow process because you have to process 50,000 inputs to do just one step of gradient descent.
To make things go faster instead of running all 50,000 inputs through the network, you split up the training set into "batches". For example, you could break the training set up into 50 batches each containing 1000 samples. You would feed the network the first batch of 1000 samples, accumulate the loss value then perform gradient descent and adjust the weights. Then you feed in the next batch of 1000 samples and repeat the process. So, now, instead of only getting one step of gradient descent for 50,000 samples, you get 50 steps of gradient descent. This method of using batches leads to a much faster convergence of the network.
Answer: The other answer provides a correct description of what is often called "gradient descent" and "mini-batch gradient descent", respectively, but doesn't clarify the terminology used, so let me add a few notes about that.
From my experience, "batch GD" and "mini-batch GD" can refer to the same algorithm or not, i.e. some people may use "batch GD" and "mini-batch GD" interchangeably, but other people may use "batch GD" to refer to what the author of the other answer calls "gradient descent not using mini-batches", i.e. you use all training data before performing a GD step, which is sometimes just called "gradient descent" (as I wrote above).


How to show the old data in a form input in the Laravel

Question: I write the form.blade.php like this:

    Start at

        <input class="form-control" name="start_at" size="16" type="text" value="{{  $activity->start_at }}">

Both Create and Edit method use the view to display the form. In the Edit method, the $activity is used and everything is normal. But in the Create method, the $activity is null, so I have a error in {{  $activity->start_at }}.
I know I can use if(!empty($activity)) to prevent this error. but I do not want to use this anywhere.
What is the better way?
Answer: You could use this,
{{ $activity->start_at or '' }}

Comment: It works, Thanks! Generally, create and edit share view and use different view, which one is used more?
Answer: I also like to reuse code and use the same view to create or edit an object. What I do is to pass a brand new instance of the object to the create view. This way I have the object on its initial state including defaults (if any) and I am able to prefill those defaults (if any) on the displayed form. It gives me an additional benefit: if anything goes wrong with the validation at the server level the user doesn't lose any data, I just need to do something like this in the view:

    Fecha de firma
         <input type="text" value="{{ ( !empty($isabi) ? $isabi->fecha_firma : old('fecha_firma')) }}"
                name="fecha_firma" id="isabi-fechafirma" class="form-control" placeholder="Este campo es obligatorio">

This is the create method with extra functionality removed for clarity (check if the user is authenticated, linking the created object with the company the user works for and other stuff):
public function create()
{
    return view('isabis.create', [
    "isabi" => new Isabi()
    ])->with($this->data);

}

I use $this->data for view configuration. Hope this helps.


OptiX CUDA out of memory error when rendering

Question: I'm getting the OPTIX Cuda error - out of memory, when trying to use OptiX for rendering. When I switch to normal CUDA, there's no issue.
Is it beause the OptiX is still work in progress and this is some random bug? My scene is not THAT crazy for it to run out of memory.
I'm using RTX 2080 Super Max-Q. I'm not sure which other information would be useful here.
Answer: The likely reason why the scene renders in CUDA but not OptiX is because OptiX exclusively uses the embedded video card memory to render (so there's less memory for the scene to use), where CUDA allows for host memory + CPU to be utilized, so you have more room to work with. I do know that OptiX isn't fully stable at the moment, Blender is still working on support for NVIDIA cards, so it could be that.
Things you could do to help make sure it renders:

Reduce your texture resolution. Bigger textures == a lot of memory eaten up
If you're using sub-surf modifiers like (especially adaptive subdivisions which are super costly) try to set them to lower # of subdivisions, or not use them at all.
Reduce the number of vertices in your scene

Personally, I've also tried:

Reducing the complexity of textures: Really intense procedural generated textures eat tons of memory too


Faster way to lose weight for med test

Question: I had to lose 6kg for my medical test, i already lost 2kgs but I'm stuck now and not loosing weight anymore.someone please tell me a faster and effective way to do this, i just have to lose as much weight as possible temporarily for the test, so how can i do that?
Also i would like to add that i have 25bmi and my goal is 23bmi and my hieght is 5feet 2 inches
Comment: Faster and more effective than what? You haven't said anything about what you've done. You can't give vague questions and expect solid, pinpoint answers.
Comment: If the goal is not long-term weight loss then go keto to lose glycogen and water stored in the muscle. Go to a sauna to sweat excess water. Drink a lot.
Comment: @IdriK agree but I'm going to speculate that OP is on a short term crash "diet" and that 2kg lost so far is already surely water weight
Comment: BTW to help reduce water weight, avoid sodium and keep carbs low for a couple days before the "weigh in"
Answer: You can adopt a juicing diet or fast with exercise.
1lb of body fat has 3500 calories (~8000cal/kg), so losing calories and not replacing them would be the quickest option.
I recommend erring on the side of caution, as I often hear people say to see a doctor before doing this (perhaps diabetes is a concern here), although I'm skeptical of the need to do that, as we adapted to have days without food.
If your body goes into ketosis after some time, you will have increased vision and other senses, because your body is preparing you to find more food.
If you take this route with exersise, you may want to have a protein supplement after workouts to avoid muscle loss.
Note - too much sugar or carbohydrates will kick you out of ketosis as well as very large amounts of protein. Try to keep sugar and carbs under 20g/day
Answer: You have to avoid eating all junk and processed foods. Consume food which have less calorie and exercise daily, this would help you decrease your weight.

Faster way to lose weight for med test


Why are the leaves of my Peace Lily wilted and black?

Question: I recently bought a flowering house plant. I may have watered it too much, me thinks. Since my apartment gets little natural light, I put it outside on the patio the other day in direct sunlight, only for a couple hours. When I returned, my plant which was once dark green, had black, wilted leaves. Did the sun kill it? Or did the water? Usually, I give it indirect sunlight, so that seems to be the culprit.
Comment: This is sunburn.  One never puts a plant that hasn't been in the sun without acclimation.  A few hours is all it takes to kill plant material not used to direct sun.  And viseversa.  Don't take plants that are used to the sun and expect them to live in the shade or indoors without acclimation.  If this were cold damage the entire plant would be blackened.  The leaves in the sun that were shading the leaves that are still alive are the ones that got fried.  Will not kill your plant unless you do this again.  And like Bamboo says, this guy doesn't like any direct sun, to include through windows.
Comment: I live in Los Angeles. The temperature rarely falls below 60 degrees F. I too think it's sun damage, as that was the anomaly. Good to know about the lighting conditions! It also says it's a Spathiphyllum.
Comment: Spathiphyllum is the latin or botanical name for this plant - common name is Peace Lily, though it has other common names too.
Answer: Cold is a possibility, but I don't think that's what's caused this damage; given where you are, unless you've had freak weather conditions in your particular location, it seems the temperatures recently have not fallen below 20 deg C during the day.
What has caused it is direct sunlight. These plants do not like direct sunlight even indoors - outside it would be even more damaging, particularly as the plant has probably never experienced any direct sunlight in the whole of its life. Peace lily is a reliably good low light houseplant, so perfect for your apartment.
Trim off the damaged leaves at their bases, the plant will put out more quite happily. These plants do not like to dry out completely and do seem to require a fair amount of watering. That, though, does not mean you should leave it standing in water in an outer tray or container - empty that 30 minutes after watering. Water when the surface of the compost feels just slightly dry to the touch, and stand the plant away from heat sources such as radiators - the light from any window which does not admit sun, or get any direct sunshine on it other than possibly very early morning or very late in the day, would be the most useful.
Comment: @J.Musser - I've just seen the asker confirms temperatures have not been below 60deg F, as I thought, the plant was outside during the day time in sunlight, ergo, sun damage.
Comment: I would agree *except* that sunburn causes a different type of cell damage, leaving the leave lighter, almost khaki colored, rather than the black I saw in the op's pic. Also, the damage distribution over the plant looks more like cold damage.
Comment: @J.Musser - well, the asker will know which it is, since presumably he is aware of how cold or not it was - and sun damage presents in a similar fashion, or at least it did when I saw it on mine
Comment: Good point, @Bamboo, I stand corrected.
Answer: That is cold damage. It was too cold outside for your plant, and the cold damaged the cells (by expansion > rupture).
That looks like a peace lily. Here's a good article on cold damage in peace lilies. From that article:

a study by members of the University of Florida's Environmental Horticulture department showed that peace lily can be damaged by temperatures from just above 32 degrees Fahrenheit to 59 degrees Fahrenheit.
The damage began at the leaf tips and spread inwardly, with soft, brown areas turning black and then drying up.

So it looks like (for a small plant like yours anyway), you want it only to be placed in temps above 60 degrees F. This person's peace lily has also had cold damage:

You can avoid this later, by keeping in mind that most houseplants came from warm climates, and don't like it much below room temperature, especially if they haven't adapted, and are used to warm temps.
Answer: If you have been watering it with -hard- tap water, then the damage may have been caused by the accumulation of minerals in the soil. Either replace the soil or use bottled water in abundance to rinse the soil.


Meaning of the term speed of light in context of an object of non-zero mass

Question: We know from GR that an object of non-zero mass cannot propagate at light. I have a problem with the term speed of light. Does it mean the relative speed of that object with another object or frame of reference? Or the speed gained by constant acceleration from rest?
Comment: If something moves at the speed of light, it will move at the speed of light relative to any inertial frame. But if it moves at the speed of light relative to any inertial frame, that means that there is no frame relative to which it is at rest, meaning that it does not have a rest frame, which is equivalent to say that it say zero mass.  Conversely, if an object has rest mass, it cannot ever reach the speed of light because it will otherwise move at the speed of light relative to every inertial frame, contradicting the fact the it has non-zero rest mass.
Comment: Yes, you always have to specify a reference frame. A body with nonzero mass always has a speed less than *c* in any inertial reference frame.
Answer: You are asking what your speed would be relative to or if it has to be relative to anything. Yes, motion of a massive body must always be relative to something.
Imagine you are in empty space (empty universe), moving at speed c/2. Now what is that speed relative to? Nothing. Would you know even you are moving? No.
This is not completely true, because we usually use the CMB as the relative reference frame of the universe.
You are confused, because sometimes people say, that there is no universal reference frame, yet, the speed of light is the absolute speed limit. OK, but the speed of light compared to what?
Now since we usually use the CMB as a reference frame for the universe, that is some kind of universal reference frame. Though, the absoluteness of the speed of light has nothing to do with that.
The speed of light in vacuum, when measured locally is always c. Relative to anything else (any other particle, object) in the universe. Two separate observers (massive) would  see the same photon travel at the same speed c. It does not matter what speed the observers are traveling at, or what direction. Now you ask, but how can those two observers traveling at different speeds see the same photon travel at the same speed c? It is because you are looking at it the wrong way. You think you start at speed 0 in space and then you speed up.
Wrong. At the big bang, every particle was massless. All of them were traveling at the same speed c. It was the sea of photons. They were all traveling in the speed dimensions at speed c, and in the time dimension at speed 0. Time stops for the photons. They do not experience time as we (massive) do. Now, later as they (some particles) gained mass, they started to slow down in the spatial dimensions, and they started moving in the time dimension. They started experiencing time as we do. This is because the universe is built up so and the four velocity vector is built up so, that its magnitude is always constant, and for massive particles it is always c. Now if a particle slows down in the spatial dimensions, it has to speed up in the time dimension to keep the magnitude of the four velocity vector c.
Now every single particle in the universe is moving relative to the speed of light. For massless particles, this relative ratio is just 100%c. For massive particles it is less then 100%c. All particles are moving at speeds relative to this speed.
Now you are asking why the speed of light is relative, if it is the absolute speed. It is relative to any other observer (reference frame, massive observer) in the universe. What SR and GR are saying is that the speed of light (in vacuum, measured locally) is always c relative to any observer, any reference frame. Obviously, we tested this with experiments. Now all observers are massive, and they always do have a reference frame.
We do not know what the speed of light would seem relative to another object moving at speed c, because this question is meaningless anyway. The photon (or any massless particle, like gluons) does not have a reference frame. It does not make sense to ask what a photon would see.
But, the speed of light is c (in vacuum, when measure locally) to any observer. Since observers are massive, and do have a reference frame, our experiments showed exactly this. This means, that the speed of the observer is relative to the photon, and not the other way around.
This means, that the massive observer moves at speed 0.1c, the other observer moves at 0.01c, and both of them see the photon travel at speed c (in vacuum, when measured locally). You see this is no surprise now, that we established that both massive observers move relative to the speed of light. Of course they see the photon travel at the same speed.
This is of course only true for vacuum, and local measurements, because as per GR, the speed of light varies in a gravitational field (see the Shapiro effect).
Answer: I must say that your question is not very clear, so I will do what is not usually done: quote the OP.

We know from GR that an object of non-zero mass cannot propagate at
  light.

I guess you mean "at the speed of light". We know that from Special Relativity, on which GR is built.

I have a problem with the term speed of light. Does it mean the
  relative speed of that object with another object or frame of
  reference?

A speed always means "relative to a reference frame". You can calculate speeds of object relative to one another, but you actually go to one object's rest frame to do it in a meaningfull way. If you throw an object at 0.9c in one direction and another at 0.9c in the opposite direction, no physicist will ever say that the second object has a velocity of 1.8c relatively to the first.
And, because I guess this is your problem, lights travel at the same speed (in vacuum...) in any inertial frame.

Or the speed gained by constant acceleration from rest?

And this is the part I don't understand. :)