How to read and write HFS+ journaled external HDD in Ubuntu without access to OS X?

Question: I have a HFS+ journaled external hard-drive and need to be able to write to it on Ubuntu. I don't have access to my Mac, it's thousands of miles away and I won't have access to it for three months.
Can anything be done without losing the data on the HDD?
Comment: **ubuntu-MATE _`caja`_** users: Whichever solution below you pick, doing a `killall caja && caja .` will help caja to "get the news , that the folder is now actually writable.
Answer: See How to mount a HFS partition in Ubuntu as Read/Write? - Super User
To quote from the second/third answer down:

First, make sure that you have hfsprogs installed. Example
  installation command:
sudo apt-get install hfsprogs
Next, mount or remount the HFS+ drive; commands need to be as follows:
sudo mount -t hfsplus -o force,rw /dev/sdXY /media/mntpoint
or
sudo mount -t hfsplus -o remount,force,rw /mount/point

...

Finally, if the drive was improperly unmounted or has otherwise become
  partially corrupted run fsck.hfsplus ... as
  such:
sudo fsck.hfsplus -f /dev/sdXY

There is a goldmine of other information there regarding the mounting of HFS+ filesystems.
Comment: I tried and get sudo mount -t hfsplus -o force,rw /dev/sdb2 /media/sdb2
mount: /dev/sdb2 already mounted or /media/sdb2 busy
mount: according to mtab, /dev/sdb2 is mounted on /media/1ad12b58-c2f2-39d3-955f-54ea66a96b2b   The drive (a hfs+ journaled volume) mounts as read only. is it possible to write to it without having to undo the journaling on mac os?   I tried the last command and get  ** Checking HFS Plus volume.
fsck_hfs: Volume is journaled.  No checking performed.
fsck_hfs: Use the -f option to force checking.
Comment: thanks. What do I need to put instead of "mountpoint" ? I tried sdb2 and get sudo mount -t hfsplus -o remount,force,rw /dev/sdb2 /media/dev/sdb2
mount: mount point /media/dev/sdb2 does not exist and then tried sudo mount -t hfsplus -o remount,force,rw /dev/sdb2 and got :
Comment: thanks, I'll give it a try. The info I'd found pointed out that ubuntu couldn't handle journaled htfs+ drive, and said that it had to be "unjournaled" in OSX. I don't have access to OSX for the next three months and thus can't reverse the journaling.
Comment: From the link posted above  : "You need to turn off the journaling if you want to write to it from Ubuntu. Ubuntu only has support for writing to non-journaled HFS+ volumes.

On your Mac:

    Open Disk Utility under Applications -> Utilities
    Select the volume to disable journaling on.
    Choose Disable Journaling from the File menu. (On later Mac OS versions you'll have to hold down the option button when you click the File menu. Or if you like Apple+J)"  I don't have access to a mac,, is it possible to gain read and write access on the drive without losing the data? thanks b
Comment: You should try: `sudo mount -t hfsplus -o remount,force,rw /dev/sdXY /media/mntpoint` (or leave out `/dev/sdXY` and point it to where it is currently mounted) instead. I will edit this into my answer.
Comment: it is mounted at /dev/sdb2 according to mountmanager
Comment: OK, you probably just need to create the directory with `sudo mkdir /media/dev && sudo mkdir /media/dev/sdb2`. Optionally set permissions if you're going to not write to it as root with `sudo chown -R $USER /media/dev`
Comment: I created the directories with the commands above.  sudo mount -t hfsplus -o remount,force,rw /dev/sdb2 /media/mntpoint gives me : mount: mount point /media/mntpoint does not exist
I also tried  sudo mount -t hfsplus -o remount,force,rw /dev/sdb2 and get a long output including The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
Comment: I also tried sudo mount -t hfsplus /dev/sdb2 /media/1ad12b58-c2f2-39d3-955f-54ea66a96b2b
mount: /dev/sdb2 already mounted or /media/1ad12b58-c2f2-39d3-955f-54ea66a96b2b busy
mount: according to mtab, /dev/sdb2 is already mounted on /media/1ad12b58-c2f2-39d3-955f-54ea66a96b2b
Comment: and sudo mount -o remount,rw,force /media/1ad12b58-c2f2-39d3-955f-54ea66a96b2b /dev/sdb2
mount: you must specify the filesystem type
Comment: OK, try: `sudo mount -t hfsplus -o remount,force,rw /dev/sdb2 /media/dev/sdb2` (that exact command).
Comment: Thanks. I got $ mount: /media/dev/sdb2 not mounted or bad option
Comment: Hmm... maybe `sudo mount -t hfsplus -o remount,rw -force /dev/sdb2 /media/dev/sdb2`? Make sure you have `hfsprogs` installed, too! And you may be unable to write to the disk until you do an `fsck` as instructed.
Comment: sudo mount -t hfsplus -o remount,rw -force /dev/sdb2 /media/dev/sdb2 does nothing. Yes, hfs progs is installed, and an fsk gives me sudo fsck.hfsplus /dev/sdb2
** /dev/sdb2
** Checking HFS Plus volume.
fsck_hfs: Volume is journaled.  No checking performed.
fsck_hfs: Use the -f option to force checking.
Comment: It "does nothing"? There should be no output from that command if it works correctly; see if there are any files in `/media/dev/sdb2`. I changed the fsck command in my answer to include the `-f` option.
Comment: Yes, no output. With the new fsck command I get : ** /dev/sdb2
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Checking Catalog hierarchy.
** Checking Extended Attributes file.
** Checking volume bitmap.
** Checking volume information.
** The volume Storeva-USB appears to be OK.  --- I tried ejecting, going through the commands again, rebooting but it's still read only
Comment: Alright, so it is mounted (the output of `ls -l /media/dev/sdb2` is your files and folders on that device) but only as read-only?
Comment: yes, it's been mounted from the begining, sorry if this wasn't clear in my initial question. I can access my files and could before we started, but still can't write to the drive, which is what I need to be able to do. The dpole emploive is journaled and I can't reverse the journaling in OSX because I don't have access to a mac and won't for a few months
Comment: Sorry for the late reply - I had forgotten about this topic. See http://ubuntuforums.org/showthread.php?t=1420673 for a program that does turn off journaling from within Ubuntu.
Comment: Try `diskutil disablejournal /dev/disk2s2`, a command line alternative to disk utility's  Disable Journaling:

Don't forget to substitute disk2s2 for your actual device
Comment: On Ubuntu 16.04 I get `unknown filesystem type 'hfsplus'`.
Comment: On recent Ubuntu you need to install `hfsplus` instead of hfsprogs. Please add to your answer. Thanks.
Comment: One extra info: I had to start my File Manager (Nautilus) as root to be able to write in the hfs mount point.
Answer: These steps works for me (Ubuntu Studio 14.04):
sudo apt-get install hfsprogs

Check status of drive:
sudo fsck.hfsplus -f /dev/sdXY

Unmount device:
sudo umount /media/sebastian/devicename

(create folder to mount the drive)
Mount the drive with HFS+ read/write permissions:
sudo mount -t hfsplus -o force,rw /dev/sdXY /home/sebastian/foldername

Comment: I get the following error: `mount: wrong fs type, bad option, bad superblock on /dev/sda2,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
`
Comment: this mounts it alright as a folder, but it is still read-only.... :( ... can't seem to find a simple way to get by the hfs+ journal system restrictions
Comment: This works. But why do we need `force`?
Comment: this is correct sequense of comands. start with fsck command! thanks!
Comment: `sudo fsck.hfsplus -f /dev/sdXY` also did some minor repair to the drive which allowed me to mount it! I can finally access 100 GB of pictures that I thought lost
Comment: I was wondering if I'd need to create the `foldername` folder. Yes. You will need to make the mount point. so `mkdir /home/sebastian/foldername` would be the second-to-last command.
Answer: I had this problem too. I tried fsck.hfsplus, umount, remount with sudo mount -t hfsplus -o remount,force,rw nothing worked for me.
What did work for me was :

unmount with sudo umount /media/myMountPoint
delete the mount point with sudo rmdir
recreate the mount point with sudo mkdir and
remount with sudo mount -t hfsplus -o force,rw /dev/xxxx /media/myMountPoint

Hope this will also work for you guys.
Comment: you saved my life!
Comment: The reason behind '2.' is probably, that the mount point directory is 'user:user'. (`ls -l to verify). In other words: `sudo chown -c root:root myMountPoint/` will probably also fix it. (unmount before still necessary)
Comment: This worked for some reason. I've no idea why. The directory was empty and mounting it before deleting the directly mounted it with `ro` even with `force,rw`. Removing and recreating the directory did it.
Comment: And by my exerpience: if you don't do your mount points under `/media//` but elsewhere (I like `/mnt`), a "smart" Ubuntu MATE for example won't delete and (wrongly) recreate your mount folders time and again. – Easier for a mount script that lasts...
Answer: Since I cannot comment (not enough reputation here:). I will post this answer to point out that the answer above appears to be for a hfs+ HD that is not journalled. The 'fsck.hfsplus' command needs to be issued with the '-f' option to work on a journalled volume.  To avoid confusion I've copied the command below:
$ sudo fsck.hfsplus /dev/sdXY

** /dev/sdXY
[snip....]
** The volume ########### appears to be OK.

This would only run on a volume that has not been journalled. Even with the '-f' option on a journalled volume this check in itself will not allow the remounted volume to be mounted read/write.  I believe journalling must be turned off.
There does not seem to be stable code available to turn off journalling from linux.  See the link provided by Richard: http://ubuntuforums.org/showthread.php?t=1420673
If journalling is turned off and the disk initially mounts as read-only unmounting and remounting should allow read/write if the disk is undamaged.  If it is damaged then fsck.hfsplus needs to be run.
Answer: Borrowing from the previous answer, the following steps worked for me. Hopefully this is useful to others:

Plug in the external HDD.
Notice that Ubuntu mounts it automatically but it is read-only.
Unmount the drive (I do this simply by clicking on the eject button in the file explorer).
sudo apt-get install hfsprogs
$ sudo fsck.hfsplus /dev/sdXY

** /dev/sdXY
** Checking HFS Plus volume.
** Detected a case-sensitive catalog.
** Checking Extents Overflow file.
** Checking Catalog file.
** Checking multi-linked files.
** Checking Catalog hierarchy.
** Checking Extended Attributes file.
** Checking volume bitmap.
** Checking volume information.
** The volume ########### appears to be OK.

(sudo fsck.hfsplus -f /dev/sdXY if filesystem is journaled.)
Remount the drive (I do this simply by clicking on the drive in the file explorer).
The drive is now read-write.
Comment: I followed your steps and everything works as expected up to 6. But on 7 the drive continues to be read only.
Comment: The above is true given disc doesn't have journaling enabled.
Comment: Point 1. Incorrect answer


I need a list of Async-Signal-Safe Functions from glibc

Question: Non syscall's wrappers but something like snprintf(), dprintf()
Comment: `man 7 signal` and search `Async-signal-safe`, there would be a list.
Comment: Why the content in the answer you accepted is in `man 7 signal` then?
Comment: You have not understood my question.
Comment: @CodyChan I'm sorry, it was auto-accepting because I had used a bounty.
Answer: I am pretty sure you have to see the documentation
Edit:
How about this list then?
From man signal:
NOTES

   The effects of this call in a multi-threaded process are unspecified.

   The routine handler must be very careful,  since  processing  elsewhere
   was interrupted at some arbitrary point. POSIX has the concept of "safe
   function".  If a signal interrupts  an  unsafe  function,  and  handler
   calls  an  unsafe  function, then the behavior is undefined. Safe func-
   tions are listed explicitly in the various standards.  The POSIX.1-2003
   list is

   _Exit()  _exit()  abort()  accept()  access()  aio_error() aio_return()
   aio_suspend() alarm() bind() cfgetispeed() cfgetospeed()  cfsetispeed()
   cfsetospeed() chdir() chmod() chown() clock_gettime() close() connect()
   creat() dup() dup2() execle() execve() fchmod() fchown() fcntl() fdata-
   sync()   fork()   fpathconf()  fstat()  fsync()  ftruncate()  getegid()
   geteuid() getgid() getgroups() getpeername() getpgrp()  getpid()  getp-
   pid()   getsockname()  getsockopt()  getuid()  kill()  link()  listen()
   lseek() lstat()  mkdir()  mkfifo()  open()  pathconf()  pause()  pipe()
   poll()  posix_trace_event()  pselect() raise() read() readlink() recv()
   recvfrom()  recvmsg()  rename()  rmdir()  select()  sem_post()   send()
   sendmsg()  sendto()  setgid()  setpgid() setsid() setsockopt() setuid()
   shutdown()  sigaction()  sigaddset()  sigdelset()  sigemptyset()   sig-
   fillset()  sigismember() signal() sigpause() sigpending() sigprocmask()
   sigqueue() sigset() sigsuspend() sleep() socket()  socketpair()  stat()
   symlink()  sysconf()  tcdrain()  tcflow() tcflush() tcgetattr() tcgetp-
   grp() tcsendbreak() tcsetattr() tcsetpgrp()  time()  timer_getoverrun()
   timer_gettime()   timer_settime()   times()  umask()  uname()  unlink()
   utime() wait() waitpid() write().

   According to POSIX, the behaviour of a process is  undefined  after  it
   ignores  a  SIGFPE, SIGILL, or SIGSEGV signal that was not generated by
   the kill(2) or the raise(3) functions.  Integer division  by  zero  has
   undefined result.  On some architectures it will generate a SIGFPE sig-
   nal.  (Also dividing the most  negative  integer  by  -1  may  generate
   SIGFPE.)  Ignoring this signal might lead to an endless loop.

   See  sigaction(2)  for  details  on what happens when SIGCHLD is set to
   SIG_IGN.

   The use of sighandler_t is a GNU extension.  Various versions  of  libc
   predefine  this  type;  libc4  and  libc5  define  SignalHandler, glibc
   defines sig_t and, when _GNU_SOURCE is defined, also sighandler_t.

Comment: Source for the strcat / strcpy being signal-safe?
Comment: Yes, that list consist mostly of system calls, but _that's what the GLIBC is; a __system__ interface_. I take it that the other standard C functions are __not__ signal safe as they are not listed here, or at least I am unable to find _any_ authoritative pointers to other (POSIX) standards listing them.
Comment: that list is list of syscalls. I remember it pretty. but i need list of functions from glibc
Comment: strcat, strcopy from GLIBC IS signal-safe. It's non-standard, but it is. I'm interested in more similar functions.
Comment: Yes sources of strcat, strcpy, strncpy, strcmp, strlen is signal-safe.
Answer: Finally latest versions of man 7 signal-safety contain interested list: signal-safety.7.html
Comment: It is important to note that a program that should also work in the future should only depend on functions documented as async signal safe, because functions that look safe from inspection of their source might be unsafe in a future version. Intent and commitment to async signal safety of the library author(s) is what matters here not current implementation.
Answer: This seems hard to determine, as you don't know what random unsafe function a library routine might decide to call.  The list also might different between different versions of glibc, or if you take it to another Unix-like system.  Seems like you'd have to analyze a lot of call stacks to find the answer, and even that may be a bit shaky from version to version, distro to distro.
Maybe you are not looking for alternative design approaches, but it seems like a better strategy would be: if your program has an event loop, make the signal handler very stupid and just setting some state that the event loop will pick up.  That way you do the meaningful work outside of the signal handler.
Example: Let's say you've got a poll() loop somewhere.  Maybe you could include a pipe that the signal handler can write to.  Then the poll() loop does some non-trivial work based on being signaled by that.
Comment: I need this in SIGSEGV handler AFTER crash of application.
Answer:
I need this in SIGSEGV handler AFTER crash of application.
I want unwind stack on crash

If you're trying to capture a stack trace:

Typically abort would cause a core dump, which can be run through a debugger to produce the stack trace.

Alternatively, a crude (but signal-safe) way of doing so would be to fork and exec a separate utility (e.g. "pstack") to output a stack trace of your crashed task. When exec-ing (after fork-ing, in the child), you'll need to pass your process ID using getppid; and in the parent you'll need to wait for it to finish, before calling abort.

On the other hand, if you're trying to do a "clean" exit after SIGSEGV (e.g. ensuring C++ destructors get called, etc.) -- then you should be warned that POSIX says:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04_03_02:

The behavior of a process is undefined after it ignores a SIGFPE,
SIGILL, SIGSEGV, or SIGBUS signal that was not generated by kill(),
sigqueue(), or raise().

and http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04_03_03:

The behavior of a process is undefined after it returns normally from
a signal-catching function for a SIGBUS, SIGFPE, SIGILL, or SIGSEGV
signal that was not generated by kill(), sigqueue(), or raise().


What happened to Valyria?

Question: I've read the books and all but what happened to Valyria?
Are there any outside sources?
If you think about it, the whole empire was destroyed in this apocalyptic event. The event had to be so bad that a few hundred years afterwards no one would go there.
If it was a volcano it would be pretty unlikely that they'd still shun that place in my opinion. Same with an earthquake.
Answer: No, this was not just a single earthquake or volcano. Consider this summary:

The cataclysm hit the Valyrian capital city Valyria, fragmenting the land surrounding the city into numerous smaller islands, creating the Smoking Sea between them. the Freehold was annihilated in a single night of fire and storm, with great earthquakes and volcanic eruptions laying waste to the empire. The area is now described as "demon-haunted." Most people are afraid to go there, saying, "The Doom still rules in Valyria."

Here is a map of the fragmented peninsula, to illustrate the magnitude of what happened. The entire land mass was separated, and Smoking Sea still smolders and is unsafe for travel:
Comment: @Armin: IRRC, there were at least 14 volcanoes that erupted more or less at the same time.
"Fourteen or fourteen thousand. What man dares count them? It is not wise for mortals to look too deeply at those fires, my friend. Those are the fires of god's own wrath, and no human flame can match them. We are small creatures, men."
And it is said the fires were so hot, they even killed the dragons that were in Valyria at that time.
Comment: wow, so this volcano was for more than a hundred years active without rest... wow... but thanks
Comment: @StefanUrziceanu do you have a source where i can look that up?
Comment: @Armin http://awoiaf.westeros.org/index.php/Fourteen_Flames
Comment: I can't give an answer, since the question is marked as a duplicate, but read the second post on this forum page:
http://asoiaf.westeros.org/index.php/topic/49269-the-doom-of-valyria/page-4

What happened to Valyria?


Nelson-Aalen estimator for recurrent events

Question: Can one modify the Nelson-Aalen estimator to use for processes with recurrent events, i.e. when more than one identical events are possible for each subject, with known times of the events?
Answer: It turns out that Nelson-Aalen estimator is the estimator for recurrent events. More precisely: the estimator, initially developed by Nelson for survival analysis, was adapted to recurrent events by Aalen.
My answer relies on this document.


How to count lattice points on a line.

Question: How can we count the number of lattice point on a line, given that the endpoints of the lines are themselves lattice points? I really can't think of how counting lattice points would work, so please provide me some intuition on how lattice points can be counted. Also, what is the relation of the x-distance and y-distance being coprime to existence of lattice points?
Comment: Start by moving everything so that one lattice point is at the origin. The other is at $(a, b)$. You're hoping to find $n$ and $k$ such that $(n, k)$ is on the line from $(0,0)$ to $(a, b)$ and $0 \le n \le a$. Being on the line means that $bn = ak$. Write both $k$ and $n$ as multiples of $d = gcd(k, n)$ and you should be on your way...
Answer: For the line from $(a,b)$ to $(c,d)$ the number of such points is $${\gcd(c-a,d-b)}+1.$$
Especially, if the $x$ and $y$ distances are coprime, only the endpoints are lattice points.
Comment: The equation of the line is $$y=\frac{d-b}{c-a}(x-a)+b$$ Now define $c-a=\alpha\cdot k$ and $d-b=\beta\cdot k$ where $k$ is the greatest common divisor (gcd) of $c-a$ and $d-b$. Then $$y=\frac{\beta}{\alpha}(x-a)+b$$ holds for integers $x$ and $y$ if and only if $(x-a)$ is a multiple of $\alpha$. Since $a\leq x\leq c$ we must have $0\leq (x-a)\leq c-a=\alpha\cdot k$ so there are $k+1$ multiples of $\alpha$ in this interval. Thus there will be $k+1$ lattice points.
Comment: Thanks for the formula...But can you please explain it??

How to count lattice points on a line.


On what threshold we should resample the data?

Question: When working with churn datasets, we usually find imbalanced datasets. My question is how to decide on what basis we should resample the data.
For example: while splitting the data before training we split in train and test on the threshold (70-30 or 70-25), likewise if I have 62% of 0 class, 38% of 1 class in this case do we need to resample the data?
Answer: First of all, resampling or artificial sampling is not necessary nor panacea in many cases of imbalanced learning. Other methods may yield good results (eg threshold tuning, class weights adjustment and so on..).
That being said, resampling is indeed helpful in many cases of imbalanced learning.
But when do we have imbalance really? Is a 60-40 split imbalanced or not?
This is the heart of your question and cannot be answered fully (except for extreme cases) unless other methods are tried first and then resampling.
In many cases whether imbalance indeed is a problem depends on the case at hand and there are no hard limits (except of course extreme cases as mentioned above).
So first try other methods to adjust balance and then try resampling, is my advice.
See also: How much imbalance in a training set is a problem?


How do I delete cookies when users log out?

Question: How do I delete cookies when users log out? How can I do this with out modifying any core module?
Comment: Stupid question, but why not use session then you store your data? Or if you need it as a way to transport infos to the browser (for JS), then you might want to use drupalSettings instead. Cookies have to be sent with every request made to your server
Comment: The problem is that not saving to a session and destroy it on logut , the problem is **i cant identify the user is loged out or not in a custom php file inside a module . The session is not getting there .** So i am using cookies to identiy the user logged in or not in the custom file inside the module folder .
Answer: Imlement hook_user_logout($account) and call user_cookie_delete($cookie_name).
For example:
<code>function mymodule_user_logout($account) {
  user_cookie_delete('name');
  user_cookie_delete('mail');
  user_cookie_delete('homepage');
}
</code>
Comment: That is the user object on which the operation was just performed. For example the uid is `$account->id()`.
Comment: What is $account in this ?
Comment: can u place a sample code using that function so that users can understand easily , my doubt is from where **$account** is come from ?
Comment: I added sample code to my answer.
Comment: Is there a similar method that would work on Drupal 7?
Comment: Both hooks exist in Drupal 7 as well so you should be able to use the exact same code.


What is a good web-based Grid that accepts Excel clipboard data?

Question: Any good recommendations for a platform agnostic (i.e. Javascript) grid control/plugin that will accept pasted Excel data and can emit Excel-compliant clipboard data during a Copy?
I believe Excel data is formatted as CSV during "normal" clipboard operations.

dhtmlxGrid looks promising, but the online demo's don't actually copy contents to my clipboard!
Answer: Not an answer, but a warning: my company bought the 2007 Infragistics ASP.NET controls just for the Grid, and we regret that choice.
The quality of API is horrible (in our opinion at least), making it very hard to program against the grid (for example, inconsistent naming conventions, but this is just an inconvenience, we have complaints about the object model as well).
So I can't say that I know of a better option, I just know I will give a try to something else before paying for Infragistics products again (and the email support we got was horrible as well).
Answer: I'm currently using dhtmlxGrid and we have the Excel copy/paste functionality working.  dhtmlXGrid is the most full featured javascript grid package that I've found.
On their website, dhtmlXGrid claims to support Clipboard functionality in the Professional version.  (However, I noticed the Sample on their site isn't working on my Firefox.  EDIT: It's probably the permissions issue that Nathan mentioned.)
In any case, we had to do some extra work to get the exact Excel copy and paste functionality we wanted.  We essentially had to override some of their functionality to get the desired behavior.  Their support was pretty good in helping us come up with a solution.
So to answer your question, you should be able to get them to support copy and paste if you purchase the Professional version.  I'm just warning you that it may take some additional work to fine tune that behavior.
Overall, I'm happy with dhtmlXGrid.  We use a lot of their features.  Their support is pretty good.  They usually take one day to respond since they are in Europe (I think).  And Javascript is by its very nature open source so I can always dive in when I need to.
Answer: I was wrestling with this problem several years ago (2004 I think).  We ran into the problem that Firefox doesn't allow scripts to read the clipboard by default (but you can grant access to the clipboard).
There's other ways of reading the clipboard data as well...Flash, for instance, can read the clipboard.  There's a good article on ajaxian to explain how do to this behind the scenes.
In the end, we couldn't find a web-based Grid that fit the bill, so we had to create our own in a mixture of Actionscript and Javascript.
Answer: I'd hate to be Captain Obvious here...but what about a plain old .NET Gridview control?  You can copy Excel data into it and out of it...and you can run it on any system with the .NET platform installed.
Answer: http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxgrid:clipboard_operations


Difference among Azure batch, scheduler and web job and when to use what

Question: I could see primarily there are 3 options in Windows Azure to schedule jobs. Batch, scheduler and web jobs. Is there any link or video explaining what are the differences and what to use when and benefits?
Thanks in advance
Answer: So far I didn't see anything official from azure.com or msdn, so let me take a stab.
Azure Batch - is a way to run parallel (typically compute intensive) HPC style job on the cloud. Batch pitches the value of parallel job running as a service so you don't worry about provisioning/managing large cluster. A typical scenario is, go encoding those 10K H.264 videos from 1080p to 720p - instead of spinning up 200 VMs you just configure the command line and specify the location of those 10k videos (blobs).
Azure Scheduler is a way to run recurring job at specified time. It's Windows Task Scheduler in cloud. For example, start a cloud service 8AM every weekday and shut it down at 6PM.
Azure Web Job is focusing on doing background job for Azure Website. It's working daemon web server farm in cloud. An example is - compress all images uploaded from the webpage.
Comment: I have 450 x 50GB tar files to unpack after MS has received the disk. Should I use webjobs or batch? These tars typically take days to untar on a single machine but not sure which approach is preferred - only heard about Azure Batch today! thanks
Comment: Note that Azure Scheduler has been retired.  You should use Logic Apps instead: https://learn.microsoft.com/en-us/azure/scheduler/migrate-from-scheduler-to-logic-apps
Comment: 1) can azure scheduler process files having 1 million records and insert that into Azure SQL database ? 2) Can we configure and run C# console apps in Azure scheduler 3) if above is true , will azure scheduler be cheaper option than azure batch ?
Comment: Azure Scheduler was fully retired and not available. It has replaced by Azure Logic App
Answer: To add to Yiding answer, Azure Scheduler and Azure WebJobs actually work together and complete each other in that sense.
Azure WebJobs will host your code/executable that is doing the work.
Azure Scheduler will schedule when to run your work --> WebJob.
To start create a scheduled Azure WebJob which will create both resources.
Comment: Can `Azure WebJobs` do any processing/calculations etc as well or that functionality can only be done via `Azure Batch`?


Is there any way to convert a pdf file back to lyx file?

Question: Is there any way to convert a pdf file back to lyx file
Comment: Hi, welcome. If you mean that you have a PDF previously generated by LyX, and you want the original `.lyx` file back, then no, there is no way of doing that. See https://tex.stackexchange.com/questions/85683/is-it-possible-to-get-the-source-code-of-a-latex-rendered-pdf-file-if-one-has-th and linked questions for example.
Answer: Short answer: Sorry, there's no easy way.
You may export the PDF into HTML and import the latter in LyX. Results depend on complexity of the layout.
With packages like 'embedfile' or 'attachfile' you may add your *.lyx source to the PDF. Next time no need to ask such questions …


Dividing line for developers on cross browser testing before handing off to QA

Question: We're trying to define the process for cross-browser testing testing done by developers before handing off to QA. There's a point where you don't necessarily want a developer doing all the testing themselves, but they should be doing some basic verification on the work they've done. My question is what is a good way to define that point where the dev has done enough testing to hand off?
Comment: +1 for the fantastic question. I have faced this problem in recent times.
Answer: TL DR: Establish a baseline, tinker, and react.
In general developers should not worry too much about cross browser testing. Yes, it's a problem, and yes, they need to be aware of it, but I would keep it to a minimum. Let them focus on great functionality first, and not that developers shouldn't care about quality (because they totally should!) but in general they should defer that to the experts in it.
However, there are obvious cases where they should. If they're fixing a bug specific to a browser or browser version, clearly they need to test on that browser and version. Ideally they check the other browsers in this case too, since cross browser bugs are most likely to produce other cross browser bugs when you fix them.
Okay, so there's one side that says leave it all to the QA, and one that says obviously there's a little that devs have to do. Where is the happy medium? And the only answer to that depends greatly on your individual organization. You can learn this only through uncontrolled experimentation.
Start off with very little cross browser testing (and, in general, other types of unexpected developer testing). After gathering metrics for a few sprints or releases, identify the types of testing that would have caught these bugs faster. It might be cross browser testing. It might only be one or two browsers that often cause problems. It might be ones that interface with a certain other system. Modify the developer's test scripts they follow to include those specific kinds of tests. Then wait to see if your rates in those areas go down significantly. And the significantly part is important. If you've increased your developer testing time by 10% for a 10% drop in bugs in that area, I'd say that's a loss (because that developer time could have been spent on a dedicated QA person who would have probably caught more). If you drop by 50% in that area, suddenly it starts to pay off more. But what I think doesn't matter. It's about what's best for your organization that does.
Where the thresholds are will be determined by the costs incurred by your organization in terms of how much faster bugs get fixed, how many fewer bugs are reported, and more importantly how the schedule is impacted. (That's the goal, right? Reduce bugs so developers don't spend their time re-coding what they already did?)
Like so many things in SQA, you have to establish a baseline, tinker, and react.
Comment: Excellent Answer, thank you. What I'm taking away from this is I need to set up what tests they should cover and measure the amount of bugs we're finding per sprint. Fine tune depending the ratio. I know that's pretty much what your TLDR says, but I wanted to retype it as I thought it to make sure it made sense. I found this answerhttp://sqa.stackexchange.com/a/427/11153 which seemed like a good outline, but coupled in with what you seems like good advice.
Answer: This is a good question with no "right" answer as a great many factors come into play and the right answer depends on your individual situation.
Factors to consider are:

developer:qa ratio
developer group size
company size and resources
amount of javascript in the application
current browser usage of your software
developer uniformity of local browsers used
automation and continuous integration of UI tests
ability to run automated UI tests with alternative drivers
tools used for cross-browser testing and their availability
tools available to developers for easy cross browser testing
availability of developers to spend time not coding the back end
ability to run automated UI tests with alternative browser drivers

I call it 'the dev-qa slide' ;)
Comment: So what needs to be considered for the different factors?
Comment: Which end of the scale your are on.  What is important to you.  What your tolerance for risk is. what your business priorities are in relation to each point.


Would a DMZ be safe to use with a software firewall for home networking?

Question: If I set up a Windows 10 PC with a software firewall (TinyWall, which is a front end for Windows Firewall) and blocked all traffic except for a few applications and ports I would be using (Minecraft server and Plex server), would it be safe to put my machine into my router's DMZ? Would the PC, its data, or my home network be vulnerable to outside attacks?
Answer: If you router offers a real DMZ then the rest of the network would be safe even if your Windows PC is compromised. A real DMZ is a separate network which has no or only very restricted access to the internal network.
But, what most SoHo routers call DMZ is actually an exposed host, i.e. traffic from outside is forwarded to a single host inside the internal network and not into a separate network. Since this exposed host is inside the internal network and has full access to the network this setup can not be considered safe because the compromise of the exposed system could also affect the security of the other (non-exposed) systems inside the same internal network.
A real DMZ requires that the router itself provides an additional network for such exposed devices which has no access to the internal network. This network should also be physically or logically separated from the internal network, i.e. different usually with a different physical ethernet port but maybe only with VLAN. If the router only offers to forward everything to a single device inside your internal network (i.e. exposed host) you might try to make the best of it with a strictly configured additional router as exposed host which then tries to offer the real DMZ network. But since the router is placed inside the internal network you have to be really careful with the configuration so that DMZ devices cannot access the internal network.
As for the security of the exposed system itself: Even if only the Minecraft and Plex server would be reachable from outside I would not believe in security since in the past there were exploits for Minecraft server and exploits for Plex.
Apart from that most attacks against normal systems like yours are not caused by direct hacks against the system from outside but by the user inadvertently putting malware on the system by browsing (drive-by-downloads) or reading mail and opening links or attachments (i.e. from phishing mails). And the simple Windows firewall will in no way protect against this. Antivirus and similar will help better against this malware but also cannot achieve full coverage.
Comment: @raphael: Take a close look at the documentation of the routers. If they just forward traffic from outside to a specific system *inside the same network as the other systems* it is not a real DMZ but just an exposed host. A DMZ should be a network separated from the rest. If some router has this more advanced feature it is very likely it will also be described properly.
Comment: Fantastic. Thank you for detailed response. I will take all of this into consideration!
Comment: I will be using the stock Google Fiber router. At this [help page](https://support.google.com/fiber/answer/6004732?hl=en), there seems to be an indication that the DMZ provided by the router does indeed isolate the PC ("Place web or game server in the DMZ to isolate it from the rest of your Fiber network."). Is there any way I can to confirm this? Additionally, the page mentions using a second router in some configurations; would such a configuration be beneficial to a scenario such as mine?
Comment: @Atlantic: from https://support.google.com/fiber/answer/4650342 it looks more like exposed host and not a real DMZ: you can only configure a single device to serve as DMZ. A real DMZ would be a separate interface at the router which is not the case here. You can make kind of a DMZ out of it if you setup a router/firewall as the DMZ device and then make sure with routing rules that it can only access the outside and be accessed from the outside and has no access to the internal network. But this does not provide the same security as a real DMZ because this router is inside the internal network.
Comment: Is there an easy way to identify these "real DMZ" routers?


Is it OK to put book titles in tags?

Question: learn-c-the-hard-way was created today on Stack Overflow and is being applied to older posts. Is this tag a helpful tag and should it be applied to older posts?
Comment: [I noticed this earlier.](http://chat.stackoverflow.com/transcript/message/6759544#6759544) It's the name of a book, not a meta-tag. That said, I still question the validity of the tag.
Comment: Well, it means the question contains contents from the book or asking something about those contents so yes, I would say it's OK to use.
Comment: Got it. [It seems fine to create tags on book names](http://meta.stackexchange.com/a/129096/166025).
Answer: I'm not in favor of this use of tags.
Yes, we do have a few book tags like sicp.  But these are notable books.  Unless you can demonstrate that "Learn C the Hard Way" is in the same league as, say, Kernighan and Ritchie, allowing such tags opens the door for a tag for every possible book title, and the shoddy questions that follow ("What does this sentence in this book mean?").
Tags are not designed for this.  Tags are meant to categorize questions, not to identify specific artifacts like book titles, motherboard part numbers, or even specific software versions except under certain narrow circumstances.
If you really have a question about something in a particular book like "Learn You a Haskell," just put the book title in the question.
Comment: Also, [we kind of endorsed books having their own tags](http://meta.stackexchange.com/q/129092/140951).  Apparently, we might have to revisit it.
Comment: To be fair, `sicp` only has 137 questions.  I don't even know that book deserves it.  *Maybe* the GoF, but in the end, it's just all too subjective.  I think we should probably not have specific book tags altogether.  We have the same problem when trying to create lists of books and vote on them.  What do those votes mean?  The point being, we don't have a solid definition of what "notable" is, so we shouldn't have book tags, period.
Comment: Worth noting: it appears that Reto Meier never bothered to create the tag for his book.
Comment: Given that question is more than six months old, it's quite possible that there was only ever one question with it and the reaper took care of it.  That or it was otherwise mysteriously disappeared.  By force.

Is it OK to put book titles in tags?


Fuzzing with Owasp-Zap

Question: I am doing web application testing and mostly performing injections into fields etc. Instead of having to do these manually in each form field how do I go about making this automated against all form fields on a page? I heard this can be done in OWASP-zap but cannot figure out how to do it. Can someone shed some light on this for me?
Comment: You can right-click on captured web requests and click "fuzz" (if I remember correctly)
Comment: But will that fuzz all form fields on that specific page? I go through all pages on the web app and inject javascript to see what I can exploit but dont want to keep dong this manually.
Comment: The form fields will probably make some http request, so you can edit the request to have just the parameters you need when fuzzing
Answer: With ZAP Fuzzing you can specify any number of locations to fuzz in a request.
However if you want to apply specific attacks and know what results you're looking for you might be better off with writing an active scan rule. We have various examples here: https://github.com/zaproxy/community-scripts/tree/master/active
Comment: Also, any good suggestions on owasp-zap tutorials and guides that I can check out?
Comment: Tutorials and videos take so long to produce :/ We do have some linked off https://github.com/zaproxy/zaproxy but we need more!

Fuzzing with Owasp-Zap


Is there a F1 race where the fastest lap is quicker than pole position?

Question: We know that drivers give maximum performance during qualifying race without worrying about overheat engine and have lighter fuel. Also, based on 2016 regulation, drivers can open the DRS wing anytime they want during qualifying. So, based on this factor, I can sure say that qualifying time will be much faster than fastest lap time. But can I know is there a F1 race where the fastest lap is quicker than pole position?
Answer: Races where qualifying is held in wet conditions and the race is dry are the obvious answer, due to the significant time differential between wet and dry conditions. Most recently the 2022 British Grand Prix had this occur - Pole was 1:40.983 for Carlos Sainz in the wet and the fastest lap in the race was a 1:30.510 for Lewis Hamilton in the dry.
Similarly the 2021 Russian Grand Prix saw a Pole of 1:41.993 for Lando Norris who then set a fastest lap of 1:37.423 in the race. His pole lap was set on slick (dry weather) tyres but the track had been wet earlier in the session and was drying rather than fully dry.
I could go on, but pretty much any time qualifying is wet and the race is dry you'll see that happen.
But has it ever happened with a dry qualifying? I had a look through the last 2.5 seasons as I wondered whether the relatively recent change to awarding a championship point for fastest lap (and the resultant occurrences where people have pitted very late in the race to get it) might have resulted in this happening but it seems that although races where this occurs results in a fastest lap much closer to the pole time there's still a second or two in it. It has happened however -  at the 1957 German Grand Prix Juan Manuel Fangio set pole position with 9:25.6 and went on to set a fastest lap of 9:17.4 in the race.
Answer: Motosubatsus Answer has some interesting races that had weather changes between the qualifying and the race but there were races in which the fastest on track lap was set in the same weather as the pole positon:
Austria 2003 for example tho it was noteworthy for uncertain weather conditions so they did use different tyres meaning pole wasn't the fastest qualifying time.
Similiarly the 2005 Turkish Grand Prix had excellent weather on both race day as well as Qualifying
Lastly the 2005 Chinese Grand Prix had excellent weather on both race day as well as Qualifying German source for the qualifying weather with both the pole and the fastest qualifying time being slower than the fastest lap time.
Apparently Australia 2004 was the same, tho I could not verify the weather.
China in 2005 was the only one of these which I really consider as having the exact same conditions between race and qualifying tho.


uGet looks like a linux application.How it runs on Windows?

Question: https://ugetdm.com/
This is the app's website.The app's interface looks 100% like a linux application.It is a linux application converted to a Windows one?The app was mainly developed for linux Or it is just a windows application with Linux interface?If it is a linux app, how they converted it to a windows one?
Interface Picture
Answer: uGet is written using a multi-platform toolkit called GTK.
GTK determines how the application looks. It is widely used among Linux applications and I guess that's where your confusion comes from. There are a lot of applications on Windows using GTK but the native solution is used more often.
Comment: GTK is only for designing Graphical user interfaces?
Comment: It is also the implementation. It's goal is to make making GUIs simply and make coherent GUIs on all platforms.


Open Source References

Question: This patent is comprised of mainly open source technologies all put together. Can open source items be patent in this manner without a reference? The open source project I'm referencing is Kegbot (http://www.kegbot.org, https://github.com/Kegbot). This open source project does the exact same thing this patent specifies and has been in existence since 2010.
Comment: The applicants (using an IDS form, filed in their case - seen USPTO Public PAIR site) have informed the USPTO of 12 US patents, 6 US patent applications and 1 PCT application but do not seem to have listed anything from that open source project.
Comment: When you say "open source technologies all put together" do you mean that they actually seem to use the code or they do the same thing as the code? The code you link in gplv2 and there are patent terms in the license and preamble.
Answer: To the question (paraphrasing) - Can open source technology all put together be patented ?
First, anything published before the date of filing or priority date can be used to show that a potential claim is not new, or if new, is obvious. Whether the earlier publication was a journal article, a patent, a rejected patent application or an open source project is generally immaterial. The earlier technology being open sourced doesn't make it any weaker or stronger prior art than if it were proprietary technology disclosed to the same level of detail.
Second, most new things are old things put together so that, itself, does not answer the question about non-obviousness. It is taken on a case-by-case basis.

Open Source References


Who is God of sight?

Question: Vak Devi is the goddess of speech and talking.
Which God or goddess is of seeing or sight? How may I pray to him? If a blind person prays to him, will he be able to see?
Comment: I think it's Sun.
Comment: You may also refer to Ashwin devatas; see Mahabharata aadi parva/Paushya parva chapter 4, where Dhaumya asks upamanyu to worship then for eye sight.
Answer: The question raises complicated issues and I can give only a speculative answer.
I will give the Advaita Vedanta perspective. It is not the eye that sees but the mind. A blind person will need to pray to a god of the brain to see.

True, Acarya Sankara, Suresvara and others acknowledge the fact that
the mind assumes the form of the external object from which it comes
in contact, and modifies that form to suit its purposes.

Pancadasi IV.27

...But it must be asserted that external material objects are not
known unless the mind comes in contact with them.

Commentary by Swami Tapasyananda
What does neuro-science say?
Neuro-science findings

One of the most fascinating recent developments in neuro-science
concerns the functioning of our visual system. How do we see? How do
we know that we have in front of us is a book or a cat.
It would seem natural to think that receptors detect the light that
reaches the retinas of our eyes and transform it into signals that
race to the interior of the brain, where groups of neurons elaborate
the information in ever more complex ways, until they elaborate the
information in ever more complex ways, until they interpret it and
identify it and identify the objects in question. Neurons recognize
lines that separate colors, other neurons recognize shapes drawn by
these lines, others again check these shapes against data stored in
our memory…. Others still strive at the recognition: it's a cat.
**It turns out, however, that brain does not work like this at all. It
functions, in fact, in an opposite way. The majority of the signals do
not travel from the eyes to the brain; they go the other way, from the
brain to the eyes.
What happens is that the brain expects to see
something, on the basis of what it knows and has previously occurred.**
The brain elaborates an image of what it predicts the eyes should see.
This information is conveyed from the brain to the eyes, through
intermediate stages. If a discrepancy  is revealed between what the
brain expects and the light arriving into the eyes, only then do the
neural circuits send signals towards the brain. So images from around
us do not travel from the eyes to the brain – only news of
discrepancies regarding what the brain expects to do.

Helgoland, But is it really possible? By Carlo Rovelli
General Discussion
Rovelli being a materialist says that the brain expects to see something based on what it knows and what has previously occurred and it informs the eye. A little thought will tell you that Rovelli can't be right. How does a person see an object which has not been seen before by anyone? Surely brain can't predict in such a situation. Rovelli considers the mind to be the same as brain and thus is forced to his position.
Advaita Vedanta is clear that the mind comes out of the body and takes an imprint of the object through contact. Then it informs the brain. This is how the brain comes to know. Then the brain informs the eyes that there is an object out there. I don't know if there is a God of sight. What I can say is that a blind person will need a deity of the brain (if there is any such deity) to see.
Answer: Lord Surya (Sun) is the Lord of the Vision.
Aitareya Upanishad.:

I:i:4.:-> He (Self/Atman) did penance with the resolution (of creation). From that austerity, an egg like mouth (face) was born. From the mouth (after parting/cracking) emerged speech (vāk); from speech came Fire. The nostrils parted; from the nostrils came out the sense of smell; from the sense of smell came Vayu (Air). The two eyes parted; from the eyes emerged the sense of sight; from the sense of sight came the Sun. The two ears parted; from the ears came the sense of hearing; from the sense of hearing came the Directions. The skin emerged; from the skin came out hair (i.e. the sense of touch associated with hair); from the sense of touch came the Herbs and Trees. The heart took shape; from the heart issued the internal organ (mind/manas); from the internal organ (manas) came the Moon. The navel parted; from the navel came out the organ of ejection; from the organ of ejection issued Death. The seat of the procreative organ parted; from that came the procreative organ; from the procreative organ came out Water.

I-ii-3: For them He brought a man. They said "This one is well formed; man indeed is a creation of God Himself". To them He said, "Enter into your respective abodes".

I-ii-4: Fire entered into the mouth taking the form of the organ of speech; Air entered into the nostrils assuming the form of the sense of smell; the Sun entered into the eyes as the sense of sight; the Directions entered into the ears by becoming the sense of hearing; the Herbs and Trees entered into the skin in the form of hair (i.e. the sense of touch); the Moon entered into the heart in the shape of the mind; Death entered into the navel in the form of Apana (i.e. the vital energy that presses down); Water entered into the limb of generation in the form of semen (i.e. the organ of procreation).

As Vision/Sight is also compared with knowledge. In our body Sun represents Buddhi or Intellect.
I hope this clarifies all your queries. Prd..
Answer: For any sensory organ such as an eye to function, it requires an anugraha of the Devata ( the presiding deity of the indriya) , which otherwise would be defunct due to that Devatas nigraha

Presiding deities avail themselves of the various sensory organs to hinder or to help one's progress. All that depends upon the nature of one's past actions.
svsss 420 , Translation Swami Tatvananda

The presiding deity of the eye—lit. the being associated with the eye—who is a part of the sun, being directed by the experiencer's past work, goes on helping the functions of the eye as long as he lives, but he ceases to help the eye and is merged in his own self, the sun, when the man is about to die. This has been stated in the passage, 'When the vocal organ of the £ead man has been merged in fire, the vital force in Vayu, the eye in the sun,' etc.
Brihadaranyak upanishad(III. ii. 13). ,4.4.2

By listening to the recital of Chaakshushopanishad, one may seek cure for eye ailments.

This upanishad belongs to the Krishna Yajur veda recension,. Chakshus
indicates eyes. Hence, naturally, this upanishad contains the hymns competent enough to remove the diseases affecting our eyes. There are two other upanishads, viz,
Suryopanishad and Akshyopanishad, which are in praise of Sun the presiding deity of light & hence of the eyes.
But, Chaakshushopanishad is mainly said to have the power to cure all the eye-ailments. The significance of this
upanishad has been explained in the opening verses of
mantra.
Dr T. Narayanan Kutti, S. Chakrapani

Meaning of chaakshushopanishad mantra

O! Lord Surya! please protect me and remove my eye-ailments immediately Let me able to see the divine
luminous light enmanating from you (which is spiritual and
gold). May the auspiciousness
also glittering intto the eyes as gold).
be showered upon me, that I don t suffer from blindness.
May all the wrong deeds that I might have been committed
in my previous births resulting in the impediment of vision
pray to you. Kindly shower Thy
be uprooted, for which I pray
grace for the welfare of all.
Dr T. Narayanan Kutti, S. Chakrapani

Who is God of sight?


Honda Jazz 51 Electronics Won't Come On

Question: my wife's car's electronics are not working (no central locking, no lights on the dash - nothing). I have tried charging the battery and jump starting the car but no luck. Could a bad fuse stop all of the electronics from working or is it something else ?
Comment: No, not usually ... though a fusible link might be a culprit, but that is an outside chance. Also, that would not indicate why you cannot put jumpers on it to get it going, unless the jumper cables you are trying to use do not have the load capacity to do the work.
Comment: Thanks Paulster the jump leads I have are 400amp and say they are recommended for vehicles up to 2500cc .... Any ideas what else it could be ??
Answer: I am thinking an issue with the battery cables.  Likely the ground cable.  Follow it and see if it breaks anywhere.
Get a multimeter.  Measure the voltage between the battery terminals, then between an unpainted part of the body or the engine and the positive terminal.  If the voltage is about the same, your ground is good.  If the voltage is 0, you have a bad ground.  If your ground is good, you will need to follow the positive until you find a break.

Honda Jazz 51 Electronics Won't Come On


Retrieve mobilepush contacts

Question: Is there a way to retrieve SFMC mobilepush contact data/activity history data via ssjs/script that is generated in automation studio? For example, mobile contacts who are opted in who have been in a mobilepush campaign who have been a mobile subscriber for the past 12 months (in a child business unit)? I haven't been able to find much about retrieving data via wsproxy aside from what I've been able to find on https://sfmarketing.cloud/
Answer: To get push activity data, you can set up the Automation to run the Push Message Detail Report that places a file on the FTP that you can then import to a data extension. There's also the MobilePush Detail Data Extract that you can ask Support to provision that extracts much the same data as you see in the report.
To get MobilePush contacts, the REST API is the place to look, rather than SOAP/WSProxy that are focused primarily on the email channel. The REST route of interest is /contacts/v1/addresses/search. Here's some stripped down SSJS missing the getting of an Access Token and paging logic to get further pages beyond the first page of 2K records.
<code><script runat="server">
  Platform.Load("Core","1");
  var tssd = "my account specific api subdomain";
  var token = "my rest access token got elsewhere";
  var endpoint = "https://" + tssd + ".rest.marketingcloudapis.com/contacts/v1/addresses/search/Channel?$pageSize=2000&$orderBy=contactKey%20ASC&$page=1";
  var payload = '{"filterConditionOperator":"Is","filterConditionValue":"PUSH"}';
  var content = [0];
  var statusCode = Platform.Function.HTTPPost(endpoint, 'application/json', payload, ['Authorization'], ['Bearer ' + token], content);
  var batch = Platform.Function.ParseJSON(content[0]);
  Write(Stringify(batch));
</script>
</code>
Here's an abbreviated version of the response:
<code>{
    "pageNumber": 1,
    "pageSize": 2000,
    "totalCount": 0,
    "addresses": [
        {
            "contactID": {
                "type": "string",
                "value": "15508978"
            },
            "contactKey": {
                "type": "string",
                "value": "01083e40-4cb3-4383-ac18-e58c96dc42a4"
            },
            "contactTypeID": 0,
            "addressTypeID": 9,
            ...
            "status": 0,
            "ordinal": 0,
            "source": 13,
            "modifiedDate": "2020-05-08T03:33:32.517",
            "valueSets": [
                {
                    ...
                    "name": "Primary",
                    "values": [
                        {
                            "objectState": "Created",
                            "objectValidationState": "Unknown",
                            "definitionID": "e2057a81-fefc-48a7-9bff-7a5ef379e7d6",
                            "valueDefinitionID": "e2057a81-fefc-48a7-9bff-7a5ef379e7d6",
                            "definitionKey": "OptInStatusID",
                            "valueDefinitionKey": "OptInStatusID",
                            "definitionName": "OptInStatusID",
                            "name": "OptInStatusID",
                            "valueID": "4b8a1329-cff8-476a-b829-054dcfea1c13",
                            "innerValue": "0"
                        },
                        {
                            "objectState": "Created",
                            "objectValidationState": "Unknown",
                            "definitionID": "a489e3bf-1dc7-47c0-a653-7f4a91aec2eb",
                            "valueDefinitionID": "a489e3bf-1dc7-47c0-a653-7f4a91aec2eb",
                            "definitionKey": "CreatedDate",
                            "valueDefinitionKey": "CreatedDate",
                            "definitionName": "CreatedDate",
                            "name": "CreatedDate",
                            "valueID": "8903628a-0940-4437-a653-d4f9d3387863",
                            "innerValue": "5/9/2020 7:42:46 AM"
                        },
                        ....
                    ]
                }
            ]
        }
    ],
    ....
}
</code>
You'll need to pull all this data (detail reporting and contact addresses) into data extensions in order to be able to answer the question, "who have been in a mobilepush campaign who have been a mobile subscriber for the past 12 months".
Comment: This is helpful, greatly appreciated. I'm ultimately trying to merge the mobile contact data with the activity data (i.e. tie the mobile contact to the mobile campaigns they opted into and the date they opted in). Is this possible to do with the REST API?
Comment: Not directly, I'm afraid. You'll have to basically pull out the contact and activity data separately and stage it somewhere (eg: Data Extensions or external database) and then do your reporting on the staged data.

Retrieve mobilepush contacts


Is this Ok for UK Business Visa

Question: I am Owner Sole Proprietor of my Company. I am going to apply business visa for UK. I want to ask from experts that am i filling correct the form?
Answer: A few things occur to me

"Sole Proprietor" is too vague. I believe it is expected that you indicate the actual nature of your work or business - carpenter, architect, mobile phone salesman, consulting surgeon etc.
Where they ask why your employer or company is helping to pay for your visit, I suspect they want the business purpose of the visit - they probably want to know who will you be visiting and what specific business activities will you be carrying out. For example "My company has a contract with BAE Midwich to provide 3 days training of remote-drone pilots in the use of the Foomatic 3000 battlefield visualisation system." or "I have a series of meetings arranged with Tyrell Corp, CHOAM, Acme Industries and Massive Dynamics in order to select a primary UK distributor for the range of Turbo-Encabulators manufactured by my company".
Comment: Thank you for your Answer. I understand I should brief about my visit with detail what's the reason i am going.
I need to ask as a proprietor, is it well my company pay me? or should I select " Paying for your trip " = NO ? because as proprietor we can pay myself.

Is this Ok for UK Business Visa


Dark Souls PTDE: How do I completely clear cache

Question: For Dark Souls PTDE, I want to completely clean my cache with my saves still intact (are they saved via the Cloud?). Is there a way I can do that, since I crash when launching the game and it's probably from a mod?
Comment: Do you have or did you have DSFix installed and/or are you running the steamworks beta version?
Comment: @slow_excellence I had DSFix and probably a few others. The settings would crash me for some reason. Is there a way to stop crashing with things like Anti-Aliasing enabled?
Comment: You absolutely need to have AA disabled. If you can't launch the game, delete all of the residual DSFix files. Otherwise you should be able to disable AA if you can make it to the menu. If you're going to install DSFix, you need to download v2.4 since that has the proper entries for the steamworks version of dark souls.
Answer: I had to replace the DSFix to highlight the files, then remove them. I had to reset my game options but then it worked fine.


Tail-Recursive Power Function in Scheme

Question: I am having trouble writing a tail-recursive power function in scheme. I want to write the function using a helper function. I know that I need to have a parameter to hold an accumulated value, but I am stuck  after that. My code is as follows.
(define (pow-tr a b)
(define (pow-tr-h result)
  (if (= b 0)
     result
     pow-tr a (- b 1))(* result a)) pow-tr-h 1)

I edited my code, and now it works. It is as follows:
(define (pow-tr2 a b)
 (define (pow-tr2-h a b result)
  (if (= 0 b)
    result
    (pow-tr2-h a (- b 1) (* result a))))
 (pow-tr2-h a b 1))

Can someone explain to me why the helper function should have the same parameters as the main function. I am having a hard time trying to think of why this is necessary.
Answer: It's not correct to state that "the helper function should have the same parameters as the main function". You only need to pass the parameters that are going to change in each iteration - in the example, the exponent and the accumulated result. For instance, this will work fine without passing the base as a parameter:
(define (pow-tr2 a b)
  (define (pow-tr2-h b result)
    (if (= b 0)
        result
        (pow-tr2-h (- b 1) (* result a))))
  (pow-tr2-h b 1))

It works because the inner, helper procedure can "see" the a parameter defined in the outer, main procedure. And because the base is never going to change, we don't have to pass it around. To read more about this, take a look at the section titled "Internal definitions and block structure" in the wonderful SICP book.
Now that you're using helper procedures, it'd be a good idea to start using named let, a very handy syntax for writing helpers without explicitly coding an inner procedure. The above code is equivalent to this:
(define (pow-tr2 a b)
  (let pow-tr2-h [(b b) (result 1)]
    (if (= b 0)
        result
        (pow-tr2-h (- b 1) (* result a)))))

Comment: @JoshuaTaylor yep, this seems like a good moment. I updated my answer with your suggestion
Answer: Even though it has the same name, it's not the same parameter. If you dug into what the interpreter is doing you'll see "a" defined twice. Once for the local scope, but it still remembers the "a" on the outer scope. When the interpreter invokes a function it tries to bind the values of the arguments to the formal parameters.
The reason that you pass the values through rather mutating state like you would likely do in an algol family language is that by not mutating state you can use a substitution model to reason about the behaviour of procedures. That same procedure called at anytime with arguments will yeild the same result as it is called from anywhere else with the same arguments.
In a purely functional style values never change, rather you keep calling the function with new values. The compiler should be able to write code in a tight loop that updates the values in place on the stack (tail call elimination). This way you can worry more about the correctness of the algorithm rather than acting as a human compiler, which truth be told is a very inefficient machine-task pairing.
Answer: (define (power a b)
  (if (zero? b)
   1
  (* a (power a (- b 1)))))

(display (power 3.5 3))

Comment: While this code may answer the question, providing additional context regarding why and/or how this code answers the question improves its long-term value.
Comment: This solution is not tail-recursive.

Tail-Recursive Power Function in Scheme


Simple linear regression with constant error in $X$ and $y$

Question: I am trying to perform a regression of GPR measurement response (X) vs concrete core density (Y). There is a known, constant error associated both these measurements. How would I incorporate this error into a simple linear regression?
Answer: If it is a known error in both $X$ and $Y$, you can subtract errors from both $X$ and $Y$ to get $X'$ and $Y'$, and then fit the regression on $X'$ and $Y'$.
So, lets say there is a known constant error of $c_x$ in your $X$ and a known constant error of $c_y$ in your $Y$. (These are signed errors). Then you define
$X' = X - c_x$ and $Y' = Y - c_y$, and fit the regression on $X'$ and $Y'$. The model would then be
$$Y' = a + bX' + \epsilon, $$
where $a$ is the intercept, $b$ is the slope and $\epsilon$ is the random error with zero mean. Just to see how this regression related back to the old one,
$$Y - c_y = a + b(X - c_x) + \epsilon \Rightarrow Y = c_y + a - bc_x + bX + \epsilon. $$
Thus we get that if you fit the regression on the original $X$ and $Y$, then the slope is unaffected by the constant errors and the $y$-intercept changes according to the constants.


How are miners rewarded exactly?

Question: First of all what does is mean when we say miners search for a specific hash, and when first miner finds it, others are going to compete for next hash ?
If I'm a miner I'm going to find numbers smaller than hash target and create a pool of these numbers, then I'm going to use these numbers to add different blocks.
That's the way I will implement it :)
And also I want to know when exactly a miner receives his reward ?
Comment: You can't precompute the solutions since the problem changes with every block.
Answer: So it works like this really what you have is a CPU or a GPU and that is what you use to solve equations arithmetically and when you solve those equations you get rewarded for solving that problem. Like if you were a student and your teacher said what's 1 + 1 and you were the first person to answer 2 and so she then rewards you .00153 Bitcoin or w/e as a reward for answering correctly and first, but because of how things work nowadays and the massive amounts of power and hash rate most people (pretty much almost everyone I think) pool their computing power together so it's not as much of a competition to see who can solve the equation first or whatever as much as It's more just about solving the equations as quick as possible and as many as possible by working together to combine effort and get rewarded fairly and proportionately. So when you pool everyone's power together, everyone gets rewarded proportionately to the hash rate or solving power that they put into the solving the equation. the solved equation being the produced block in this analogy. So once the equation is solved, the block is completed, gets written into the ledger (the blockchain) which is an immutable record, and a predetermined amount of cryptocurrency is rewarded to the miners crypto address that ultimately got the credit for solving the equation. Then the pool will distribute it's payouts to all the miners who helped in solving the complex equations based on the amount of work they contributed to the solution. which would be computational power (hash rate) from your CPU/GPU mining rig, ASIC or whatever is computing out the equations solution. does that help it make a bit more sense?
Comment: Thank you very much for your answer.
so the reward is sent to address of the node which answered correctly.
then that node is going to share that amount with all nodes in it's pool. (I guess this thing is not part of blockchain and protocol).
what about questions, If in two weeks (2016 blocks) all hash should be lower than a number and we know the question why don't we try and find all those hashes at once ?
and create a array of hashes and when there was a request for a block to be added to blockchain we use one of those hashes.

How are miners rewarded exactly?


Is there tax on card packs?

Question: I live in Arizona, USA. I was thinking about buying one or two $20 Battle.net gift cards to buy the Karazhan adventure and some card packs. But, having searched all over the internet, it seems that because of the state I live in, I have to pay tax on in-game items such as card packs and adventures. Is this true? If I buy two $20 gift cards will I be able to buy $40 worth of adventures and packs or will I only be able to buy around $35-37 worth of items because of tax?
Comment: I'm voting to close this question as off-topic because it's not really about a game, more so about economics.
Comment: I'll assume you have to pay tax on your $20 gift cards when you purchase them. So they'll actually cost you like $22 each. The Blizzard tax policy should only apply to purchases made by paying through the client, such as with a credit card. To be sure, though, you should contact your Department of Revenue and/or Blizzard customer support prior to purchasing anything.
Comment: @scenia You do not pay taxes on gift cards in the US.
Comment: @Kaizerwolf is it possible to vote to move it to another SE site? Perhaps money.stackexchange.com ?
Comment: @Joe Doesn't that kind of circumvent taxes, then? Couldn't you simply buy gift cards and buy whatever you want with those?
Comment: @scenia The thing you buy is subject to tax.  Gift card is effectively the same as credit/cash.
Comment: I see. In that case, OP would be able to buy stuff worth $35-37 (+tax) by paying $40 for gift cards. I sometimes wonder why US retailers (and online retailers when selling to US customers) don't simply show the net price (including taxes) like they do in the rest of the world... That would be so much easier...
Answer: Blizzard specifies that taxes are applicable to your state (Arizona) as well as 14 other sates of America.

For questions or concerns about these taxes or your specific tax rate,
  contact your state's Department of Revenue.

Also, if you buy 2 x $20 gift cards, you will be able to buy $40 worth in-game content no matter what happens.
Comment: This answer doesn't clearly answer the second part of the question. While it does technically answer it, it'd be better if you clarified that the tax would be assessed at the time of purchase of the cards (so OP would pay $42.26 based on 5.6% AZ state sales tax) -- which explains how tax is paid while still being able to buy $40 worth of in-game content.
Comment: @VanBuzzKill oh you mean LOOT boxes (I thought you meant retail box copies of the game). [Michigan does not affirmatively tax digital goods. Electronically delivered software is taxable, but digital products are not included in the state's definition of tangible property as software is.](https://www.avalara.com/learn/whitepapers/identification-taxability-of-digital-products/)
Comment: This answer is incorrect (unless something has changed recently).  I got a $20 Battle.net gift card but I wasn't able to buy the $20 set of packs from the in-game store because of taxes.  After buying the $10 set, I was left with $9.19 on my account.  I live in Texas (online purchases are taxed).
Comment: According to that help article Hearthstone is not listed as a relevant game. Also, I live in michigan (another taxable state) and while I don't play hearthstone, I have bought Overwatch boxes (also not listed as a relevant game) for $20 and no tax.
Comment: @VanBuzzKill *where* did you buy the Overwatch boxes? If you bought them from an online retailer that doesn't have a presence in MI, that retailer would not assess sales tax; however you technically would still be responsible for it (there is likely a "sales and use tax" line on your state tax form, if you file yearly taxes)
Comment: @DoktorJ They were bought directly in-game.
Answer: Legally, you are not buying ingame items. You are buying the cards.
The purchase happens when you pay with real, US money to buy some "blizzard money". Blizzard is not a bank and those "blizzard money" are not real money. As far as law is concerned, they are goods. Let's call them "points" here to avoid confusion. They're not dollars, real dollars work everywhere, points don't. Once you've bought the points (by purchasing cards or online with a credit card), the US dollars changed hands, and it THIS transaction that's taxed. Neither Uncle Sam nor Blizzard care if you ever exchange those points into actual ingame items. They are happy because they've already got your real dollars and they're not giving them back without a fight.
So, when you buy $20 worth of points on Blizzard website, you'll pay $21.12 and when you buy a $20 card at convenience store, you'll pay $21.12 at the register.
When buying cards you need to keep in mind that Blizz sells them in bulk for lower price than $20, so the store can sell them for $20 and still make some profit. There are vendors who accept smaller profit and sell them below their face value. So it is possible that a particular vendor actually sells them for $18.93 which after tax will give exactly $20.
Comment: I don't know if this is really true, or at least, if it's really a complete explanation.  "Gift cards" or gift certificates to, whatever, Applebee's say, are purchased tax-free, and then sales tax is applicable when they're used, even though they're functionally not really that different.  You're giving them money and they create a sort of account for you with that money comparable to a bank, or a credit card, and then they let you spend that money through use of the linked card.  It's possible "blizzard bucks" work differently, but I doubt it.
Comment: See [Nerdwallet](https://www.nerdwallet.com/blog/shopping/holiday-tips-news/holiday-shopping-cheap-gift-cards/) for example.
Comment: Yeah this isn't how it usually works. Gift cards are sold at face value ($20 for a $20 card) and the cost of the item plus tax is taken off the card when you make a purchase (if the purchase is taxable). Some retail stores [do it wrong](http://www.csmonitor.com/Business/Saving-Money/2014/0826/Gift-cards-and-sales-tax-How-not-to-get-duped), but you generally shouldn't be charged tax on the card purchase, only for what you buy with the card (again, if tax applies at that time).

Is there tax on card packs?


What is a polynomial?

Question: I'm confused at the exact nature of a polynomial in a set or ring, is a polynomial its own kind of object? We use indeterminates so we are interested in the structure, not the number, it could be an expression, however, say we have $X^2+3X+4$ and $4+3X+X^2$ or $X^2+(2+1)X+4$ these are all different expressions but the same polynomial, which suggests that polynomials are at a higher level than expressions, how do we understand this?
Comment: A polynomial with coefficients in a ring $R$ is a sequence $(a_0, a_1, a_2, \ldots)$ of elements of $R$  which has only finitely many nonzero entries. (Usually this polynomial would be written as $a_0 + a_1 x + a_2 x^2 + \cdots + a_n x^n$.)
Comment: I'm really not a fan of the sequential definition of polynomials, because it doesn't capture what a polynomial is supposed to be. This old answer of mine to a similar question might be of interest to you: https://math.stackexchange.com/questions/3948623/importance-and-intuition-of-polynomial-rings/3948766#3948766
Comment: Also the chosen base $1,x,x^2,\cdots,x^n$ is not mandatory, you can express polynomials in other interesting bases, the binomial one for instance $1,x,\frac 12x(x-1),\cdots,\binom{x}{n}$. What's important it's that it is described by $n$ coefficients.
Comment: Your examples of three different expressions for the same objects can be done with every mathematical object, like $0=1-1=\sin(0)=\ln(1)=...$. More interesting is that in a finite field of coefficients, different *polynomials* could induce the same *polynomial function*. Example: with $R=\mathbb Z/2Z$, $X^2+1$ and $X+1$ are different polynomials that induce the same polynomial function.
Answer: As pointed out in the comments polynomials are bascailly just sequences with it's elements in the Ring (at least that's how they were defined in my lectures). A common definition could be as follows:
A polynomial is a sequence $(a_i)_{i \in \mathbb{N}_0} \subseteq R$ (where R is a Ring or Field) with only finite many $a_i \neq 0$.
With this one can define the addition and multiplication as we know them. Addition would just be the addition of the sequence Elements and multiplication would be defined with a 'convolution' (not sure about the terminology, in German it's "Faltungsprodukt")
Now in order simplify working with polynomials one defines the notation of Polynomials as a sum of powers of x with the coefficients being the elements in the sequence.
This could be as follows:
Let $p=(a_j)_{j \in \mathbb{N}_0}$ be a polynomial, then we define:
$$
p := \sum_{j \in \mathbb{N}_0} a_j x^j
$$
(Note that here it is important that only finite many $a_i \neq 0$ for the sum to exist)
So really the notation we know is just a notation and as such there are possibilities of redundancy as you have pointed out.
However it seems to have turned out that the above is quite a useful notation which is why it is used rather than the notation as sequences.
So if one was very pedantic with the definition above one would have to simplify your example terms and would only then be able to talk about those terms as polynomials and would see that they are indeed the same polynomial.
At last all this also just depends on the definition of polynomials that is used and this would just be my take on it with the definition I have been taught.
I hope this helped.

What is a polynomial?


Migrating existing Music to Spotify?

Question: I have a huge folder of music (I don't have iTunes), and I recently got Spotify Premium. I want to match all my local music on Spotify library, removing the local files and only saving those that don't exist on Spotify. Is there a simple way to do this?
Answer: A bit of quick googing shows a few apps:

http://www.ivyishere.org/
http://www.getunify.com/

Migrating existing Music to Spotify?


can i shrink log file in full recovery model

Question: i have configured Always on Availability group where iam unable to shrink log file size through simple recovery model. can i shrink the log file size in full recovery model if yes or possible then is there any impact for it..
Comment: You can shrink log file in any recovery model subject to condition that VLF are marked as free at the end of Log file. Please read [MSDN Document on Shrinking a log file](https://technet.microsoft.com/en-US/library/ms178037%28v=SQL.105%29.aspx?f=255&MSPPError=-2147217396) Shrinking of log file regularly is not advisable as it causes performance issues
Answer: Shrinking a log file isn't generally a good idea unless you've had a large amount of unexpected log file growth - otherwise it'll only grow again, and a log file that grows can cause performance problems.
You can shrink a log file that's in any of the recovery models, but you won't always see the effect of it, as less of the file will be able to be shrunk - log records have to hang around until they have been backed up, transferred to other machines, and so on.
If you can put up with your log file being large, then that could be okay. Or try to shrink it to an okay size until it shrinks - maybe try every half hour until then? Once it can shrink, it will, and you can stop trying.


How to create texture for sculpting from mesh

Question: I've made this mesh that i want to use as a texture for sculpting, how should I do this?
would creating a normal map of it work?
Answer: You may render the AO of your sculpt and use it as an alpha texture for sculpting. Though I don't think it's a perfect method it gives a decent result.

I've quickly sculped some rocks to show you an example.

First remove all the lamps from your scene. Then add a material to your sculpt and set its specularity to 0.000

Select your camera and set its type to Ortographic. Set the Ortographic Scale to fit the sculpt borders as you want.

Go to World header, set the Horizon Color to black. Check the Ambient Occlusion checkbox (Add, Factor 1.000). In Gather panel choose the Raytrace and set the Samples to desired amount (the more samples, the more detailed alpha texture for sculpting'll be). Render, then save rendered image.

Now load your rendered image as an alpha texture in the Texture panel of the Sculpt Mode.

I used the Stencil mapping type with a harsh curve type to sculpt, but you may experiment with it.

NOTE: You may try to bake the AO (from the sculpt to a flat plane [selected to active]), save the result and then use it as the alpha mask for sculpting. I haven't tried this method though.
Comment: I just subdivided the plane in *Edit Mode* many times to create a dense geometry and added a *Subsurf Modifier* with 3 subdivisions.
Comment: Thanks, this may be somewhat unrelated, but how did you make the high poly plane to sculpt on (subdividing a square turns it into a circle for me)?


Take into consideration

Question: The following subject is about wells turbine. Entropy generation parameter help to us for designing and provide designers with useful information about the causes of the flow irreversibilities(entropy generation).
the flow goes through the turbine and contacts with the blade of turbine. these are made that entropy is generated around the blade.
Now, I had a question. Is the bold sentence correct grammatically?
Also, entropy generation factors around the blade are investigated. All of these factors are detected by viscous entropy generation distributions, which record a substantial increase of the viscous component of local entropy generation rate equation. Any entropy generation analysis improvement on Wells turbine must take these factors into consideration.
Thanks,
Best.
Ali
Comment: "...on **a** Wells turbine**...".
Comment: or "... on ***the*** Wells turbine"  Interestingly, that sentence is closer to being right than any other in the whole post.
Answer: Yes, this sentence is correct. "Take into consideration" means to "consider" or "take into account".

Take into consideration, to take into account; consider:
  (ex) We failed to take into consideration the large number of tourists attending the exhibition.

Take into consideration


LINQ to Entities Where clause with custom method

Question: I'm using Entity Framework Core (2.0) and I have the following doubt.
I'm not sure about what happens when I do this:
context.Customers.Where(c => MyCustomMethod(c));

bool MyCustomMethod(Customer c)
{
    return c.Name.StartsWith("Something");
}

Does it translate to SQL without problems?
Is it different than writing:
context.Customers.Where(c => c.StartsWith("Something"));

In short, will I be able to wrap my validations for the Where clase inside a method? Does it break the translation to SQL?
Comment: This won't work because EF doesn't know what to do with your `MyCustomMethod`
Comment: Have you tried it? What was the result?
Comment: I dnt think you can call like this inside of where and do process, Ef in blind in this case
Answer: No, you cannot call your custom method in EF LINQ query because EF will not be able to generate expression tree of the method and so it cannot translate it to SQL.
For more info about expression trees, refer to the link.
Answer: if you need to get string from method you can write same query like this
from customer in contetx.Customer
                let str = GetString()
                where Name.Any(c=> c.StartsWith(str) )
                select customer;

string GetString()
{
    return "Something";
}

i dnt know this is helpfull, but this can achieve


Creating a view of content that is filtered by the email of the current user

Question: How can you create a view of content in a specific node type where there is an email address that will correspond with the email address of currently logged in user's email address? The content is not owned by user. This view will be used to assign relations to the user and other content with rules.
Comment: Contextual filters on User ID from URL. If it must be the email you may have to do some grabbing but the uid will get you there.
Comment: There is also "User ID from logged in User," But how do you grab the email from the User ID within contextual filters? This is dealing with attaching pre-registered info gathered from another site.
Comment: This worked for me: http://drupal.stackexchange.com/questions/200641/7-views-filter-where-one-field-equals-logged-in-users-email-field
Answer: Here is the approach to provide a relationship between content and logged in user:

Create a user view.
Add a contextual filter on User: E-mail.
Add a relationship on User: Content authored.

Now you can do rest of you functionality.
Answer: Since the content is not authored by the user, I needed to create a relation from the user to the content. The content has a matching email. I was able to achieve a list of content filtered by a user's email through Rules, VBO, and passing the email address as contextual argument. Then rules can apply the relation to the content.


Strength of the centrifugal force

Question: Let's say you're on a roundabout. When you're radially further away from the roundabout would you feel more centrifugal force or less? I feel like intuitively you'd feel less, but from the actual formula it seems to be the opposite case?
Answer: Let's say the roundabout is spinning at a constant angular velocity $\omega$. An object remaining at a particular point on the roundabout a distance $r$ away from the centre of the roundabout will experience a centripetal acceleration of $\omega^2 r$, which means the required centripetal force to enable this acceleration is $m\omega^2 r$.
Since $\omega$ is assumed to be constant here, the centripetal force indeed gets larger with $r$. Hence why you need more force to hold on near the edges of the roundabout than at the centre, giving the roundabout spins at the same angular velocity.
Also, for more intuitive insight, note that the tangential velocity increases as you move further from the centre, even though the angular velocity does not change, $v_{tan.} = \omega r$:
Comment: So on a sufficiently large disk, those on the outer rim could be moving the speed of light?
Comment: According to Newtonian mechanics, yes. However, Newtonian mechanics break down at these relativistic speeds, and we would need to consider relativity instead. Otherwise, you would surpass the speed of light according to this model; not realistic! However, since the question is based off an everyday object like a roundabout, it would be incredibly impractical to consider relativity. Newtonian mechanics and rigid body dynamics is more than enough.
Comment: Furthermore, for large enough wheels, you would need to use solid mechanics: the stresses built up by such a large wheel travelling at a large enough speed will cause the wheel to deform, and possibly break. Rigid body dynamics assumes these stresses are insignificant, which is approximately true for smaller wheels travelling at smaller speeds, ignoring these deformations. If you're interested, I could answer this query in response to a question :)

Strength of the centrifugal force


Word for when a life event (like a vacation) is coming to an end and you feel an immense feeling of sadness due to not wanting to leave

Question: I get this feeling every time after I leave somewhere where I've gotten comfortable being in.
Comment: Do you want a term before or after you leave? The question sounds like before, the body sounds like after. The top voted answer is based on after, though this seems easier to find a word for.
Comment: *pang*, as in *pang of sorrow*, *pang of sadness*, etc.
Comment: Bet the Germans have a word that means exactly this...
Answer: I suspect the closest one can get with a single word is wistfulness.

wistfulness [noun] [noncount]:
a feeling of sadness because you are thinking about something that is
impossible or in the past

[Cambridge Dictionary]

If there's a vague sense of yearning behind an action, you can say
it's done wistfully. People sigh wistfully, gaze wistfully, and wave
goodbye wistfully – thinking about the past or what you are leaving
behind with a little bit of sadness.

[Vocabulary.com]
'Nostalgia' is rooted further in the past.
Answer: Specific to holidays, as per your title, you have:

Post vacation syndrome (PVS) is commonly called the blues. PVS typically appears in individuals who have recently returned to work following a holiday of a week or more. Typical symptoms include a lack of focus and difficulty concentrating.
Answer: The feeling can be described as bittersweet, defined as per the Cambridge Dictionary:

containing a mixture of sadness and happiness

For example:

The end of a vacation is always bittersweet. After days of fun and
festivity, it's hard not to be happy, even if you know all the joyful
adventuring is about to come to an end.

It can equally be applied to other largely positive major life events such as graduation or a promotion that takes you to a new city.
Comment: I'm not sure about that. OP seems to be looking for a word that captures the sadness about something good ending (a purely negative emotion), not "a mixture of sadness and happiness".
Answer: Not a single word or an established term but anticipatory sadness is used for this feeling. (Note that it differs from anticipatory grief which is more intense).
As you mentioned, you feel sad before the good thing ends because you know it is ending, hence the modifier anticipatory. I doubt there is a specific single word, which there isn't even any in the dictionary of obscure sorrows. Japanese mono no aware comes close but it has its own intricacies tied in with Japanese culture.
Comment: Ok I noticed that you feel sad before the good thing ends per the question title; but then, you say "after" in the question body. I can delete or modify my answer based on your clarification. Perhaps you can provide more details in the question body.
Answer: I hate to say this, but the best I can come up with is "That feeling you get when a great vacation is about to end."
Comment: If every feeling could be reduced to a single word, would we have Proust?
Answer:
longing
yearning

These words express a wanting for something. But there is a nuance here implying that the thing being wanted is something the speaker has previously experienced or come in contact with, and therefore feels a connection with.
You could express a longing, or yearning for a place you have been to before, or a time in your life that has passed.
Contrarily, (to my knowledge) it would be strange to say you you've been longing to try scuba diving. This is because "try" implies you haven't done it yet, and so a connection to the experience would not yet be established.
Note: What I mean by "to my knowledge" is that I'm basing this description on how I've seen/heard these words used. But dictionary definitions I've checked do not mention a preexisting connection to the thing longed for. Nonetheless, I'm going to give this answer based on my gut feeling. (I welcome discussion on this in comments.)


user access to multiple record types

Question: Currently we have two record types A & B.Users are having access to either record A or B depending on their profiles.
Can a user have access to both record types.How it can be done.?
Answer: Yes, in the user's profile add the record types A and B, following the link:
Assign Record Types to Profiles in the Original Profile User Interface

user access to multiple record types


Could someone place an independent film on the stock market?

Question: Just curious. I'm not sure exactly how the stock market works so i was wondering if people could invest in a filming project by buying shares which would payoff if the film succeeds.
Comment: Disney is trading quite well...
Answer: When we say "stock market," we are usually thinking of the publicly traded stocks, such as the New York Stock Exchange or the NASDAQ. Shares of individual products do not go on these exchanges, only large corporations.  You won't see a stock ticker symbol for The Force Awakens or for the iPhone 6s Plus.
The reason for this is that when investors buy a stock, they are looking for something that will grow in value theoretically forever. Individual products usually have a limited lifespan. Your movie will (hopefully) generate revenue when it comes out, but after a while sales will slow down after people have seen it. If someone bought a share of stock in a movie on the stock market, they have to realize that eventually the movie will stop making money, and their share of stock won't be worth anything anymore. Instead, people invest in companies that have the potential to make new products, such as Disney or Apple.
So if you were envisioning seeing the ticker symbol of your movie going across the screen on CNBC, sorry, that's not going to happen.
However, you could theoretically sell shares to individual investors for a percentage of the profit. You figure out how much money you need to create the movie, and estimate how much profit you think the movie will earn. Then you find an investor (or group of investors) that is willing to give you the money you need in exchange for a percentage of the profit. Unlike a stock market investor, these investors won't be looking for the long-term growth potential of the resale value of the stock, but simply a share of the profit.
Answer: Stock is a part ownership of a business. First there has to be a business that people want to own part of because they expect to make a profit from that ownership.  Nobody is going to be interested if the business isn't worth anything.
In other words: sure, you could try to start a movie production house to make this film and others... But unless you are already a major player AND already have a lot of money invested in the studio, forget it.
This isn't GoFundMe or Kickstarter. Nobody is going to buy stock because they want a copy of the DVD that you promise will be available in two years' time.


home_url(); showing current page instead of site address

Question: Does anyone have an idea why my home_url() function gets the URL of the current page instead of the site address? (The site runs locally using MAMP.)
Answer: Since you didn't post actual code in your question, I can only speculate. However, a common problem is that, when calling home_url(), it is not echoed. The value of the function is returned, rather than echoed, so it must be explicitly echoed by the code.
I'm guessing you have something like this:
<a href="<?php home_url(); ?>">Home

Which renders like so:
Home

...and would explain why the linked URL is the current page, rather than the expected URL for the site front page.
If so, change it to this:
<a href="<?php echo home_url(); ?>">Home

Comment: Hey thanks Chip, I just figured it out and yes you are right. I forgot the damn echo.