Debug Docker caching issues

Question: I am trying to improve CI/CD performance and part of that is improving the caching behaviour of Docker builds. I find myself trying to debug what exactly invalidates the cache. Are there any ways to query the Docker build process to get more information than "cached" and "not cached" ? For example, at some point, I add a large directory, which has not changed as far as I can tell, but busts the cache. I would like to find out what is causing that, exactly.
Comment: Debugging tip- you can check what's equivalent (contents, dates, owners, and perms) or not by using `tar -cf -  | md5sum`. I built twice, then I started at the top level directories in my jenkins workspaces and worked my way down until I found where hashes started matching, then I worked up until I found what didn't. In my case, I had to set a couple git directories' last modified time.
Answer: The docker cache needs the following:

Build has been run on the same docker host previously (or you explicitly added flags to trust a pulled image) and
The previous image needs to still be on the build host (not pruned) and
The same previous layer and either
The same command being run (including the same environment/args) or
The same hash on the files being copied

If you see the cache being busted on a COPY or ADD command, and not the previous step, then you need to look at the hash being generated. All the files need to be identical, same file names, cases, file permissions, file owners, and the contents need to be bit for bit identical. You can look at the resulting checksum for this hash by running a docker image history command, e.g.:
$ docker image history golang:alpine
IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
6b21b4c6e7a3        3 weeks ago         /bin/sh -c #(nop) WORKDIR /go                   0B
<missing>           3 weeks ago         /bin/sh -c mkdir -p "$GOPATH/src" "$GOPATH/b…   0B
<missing>           3 weeks ago         /bin/sh -c #(nop)  ENV PATH=/go/bin:/usr/loc…   0B
<missing>           3 weeks ago         /bin/sh -c #(nop)  ENV GOPATH=/go               0B
<missing>           3 weeks ago         /bin/sh -c set -eux;  apk add --no-cache --v…   344MB
<missing>           3 weeks ago         /bin/sh -c #(nop)  ENV GOLANG_VERSION=1.12.7    0B
<missing>           3 weeks ago         /bin/sh -c [ ! -e /etc/nsswitch.conf ] && ec…   17B
<missing>           3 weeks ago         /bin/sh -c apk add --no-cache   ca-certifica…   551kB
<missing>           3 weeks ago         /bin/sh -c #(nop)  CMD ["/bin/sh"]              0B
<missing>           3 weeks ago         /bin/sh -c #(nop) ADD file:0eb5ea35741d23fe3…   5.58MB

You can include the --no-trunc option to get a full line. The key piece of data relevant to your question from the above image is in the ADD step where you see file:0eb5ea35741d23fe3…. If that checksum changes between two image builds, the cache will bust and you'll start a new set of layers.
Comment: Could you be more specific on this statement, please? "or you explicitly added flags to trust a pulled image" For Gitlab CI pipeline development I build an image locally and push it into the Gitlab registry. The remote CI does not pick up the cache, while the layers are cached for local builds.
Comment: @Stefan_Fairphone there's a `--cache-from` flag that marks an image you pulled as being trusted for reusing the layers.
Comment: Thank you for your prompt confirmation. It seems I might be affected by a BuildKit issue: [Inconsistent cache behavior from CI and local environment (or from env to env) · Issue #2010 · moby/buildkit](https://github.com/moby/buildkit/issues/2010)
Answer: According to Docker documentation search for: "Leverage build cache", there is checksum calculated on the directory - please see the article for details.
What I will suggest is a multistage build.
If we have static content of directory we could create container/image with its content. Then instead of using Docker copy, we could use FROM as a build stage and copy that directory into a new layer, which in fact will reuse that layer.
That is based on a fact that we don't operate on a directory (when a file could get a changed attribute like last accessed time).
Base Dockerfile
FROM alpine:latest
COPY /myDirectory .

Then you could tag this container as storage-base
O
MultiStage Dockerfile
FROM storage-base AS storage

FROM alpine:latest
RUN a command
WORKDIR /root/
COPY --from=storage /myDirectory .

Please check more references here: Docker Multistage Build
Edit

the image/container created in step 1 shall be only recreated when
directory content will change (by a trigger that knows that the data changed), so that means it will not be created on every build.
then we use the image that was created once (and re-use that layer)

I just created a simple example to help express my idea - Git repo - run build-docker.sh script
I found that on reboot Docker is re-creating cache instead of reusing, but it takes just a few minutes and it is not critical.
Comment: Unfortunately, this doesn't help me at all. I did look at the article in my own research. It gives no detail and no help in debugging why a directory that is bitwise identical does not get cached. Splitting the build up into multiple parts also would not help, since the first stage would get the cache busted triggering all later stages being uncached as well :(
Comment: @Torque please see my edit, as I poorly expressed my thoughts.
Comment: While I appreciate the effort you took, this really doesn't address the issue - writing your own programs or scripts to get around a bug in Dockers caching is not a sane way. Docker already does have this functionality, and I'm looking for ways to debug why it's not working as defined, not hack my way around it. Furthermore, like I said, we are using this in CI/CD so no old files would be there, it's always a fresh checkout. Lastly, a cache invalidation adds over an hour of compile time to our builds, not a few minutes.
Comment: @Torque thanks for the comment. Is your build system restarted?
Comment: Restarts are not what invalidate the cache, if that is what you are asking.
Answer: I have to deal with that same issue and the main problem is not the cache itself is the time that takes to make a build but also the problem of being sure you have the right changes on the image you are building.
I can recommend you some different options you can make separately or all together:

Make cronjob that cleans your docker Daemon of old images periodically, for example, once a week. With that, you are sure to have fresh images every week and have a good performance with the cache for the daily build, the only one that takes a little bit more time is the first build after the flush.
Make your own base image with all the content you know you don't change too often, for that you can have more than one Dockerfile on your project and launch a build process of the base image after the flush on the previous step to be sure you have the latest changes on a fresh image
Use multi-stage build or build patter to have a good size image at the end of the build.
Comment: What you recommend is exactly what we do. The problem is in my last two sentences - this rarely changed stuff DOESN'T change, but the cache is still invalidated, which is what I am attempting to debug.
Answer: Did you try
docker inspect TAG

Also try the manual binary search method in the answer by Timmay to Server Fault StackExchange question "How to debug Docker cache invalidation?"
Answer: As I've discussed in this blog post, I found the following reasons for (unexpected) cache misses in Docker:

If the problem happens in a CI pipeline, and if you use multiple build agent machines (or "ephemeral" machines), it might happen that build job #1 was executed on agent #A, but build job #2 was executed on agent #B, which has a different local cache than agent #A. Consequently, when you look at your CI pipeline output, be sure to check on which agent the jobs are executed. To prevent these kinds of cache misses, you can use a remote cache, storing caching information in a remote image registry. There are two implementation approaches: inline caching (where the image builder embeds caching meta-data into the image it builds), or using a separate registry cache (where a separate image is pushed that contains only cache blobs). The usage details of remote caching depend on your image builder tool. For instance, docker build supports only inline caching (see here), docker buildx (or when using BuildKit directly) supports both approaches (see here), Buildah and kaniko only support the registry cache.
If you use ARG in your Dockerfile, it is easy to accidentally break the cache invalidation. Whenever the value of some ARG is different between two docker build executions, the second execution won't be able to reuse the previously cached layer for a RUN or ENV command that uses the ARG's value. This then also invalidates all follow-up layers. See here for background information. If you use multi-stage builds, and if you run docker build several times (for different targets), make sure you always provide the same ARG values to all docker build calls!
Sometimes the entire image is rebuilt whenever a new base image has been released (that you reference in a FROM statement). This particularly happens if you use docker build --pull. You need to closely look at the builder's output of the first layer, which includes the SHA-256 checksum of the base image. If it keeps changing frequently, there is no real "fix". Your image should be rebuilt, to include the most recent security fixes of the base image. However, if the base image is rebuilt very often (e.g. multiple times per day), you may want to stop using the --pull flag, and instead have a different approach that only runs docker pull <base image> (or delete the base image) more rarely, e.g. once per day.
Layers for COPY or ADD statements are rebuilt "unexpectedly" whenever files change that you did not have on your radar (which you did not include into your .dockerignore yet). This could be the .git folder, or files created during building/testing (e.g. unit test report files, or log files). This typically happens when running COPY . ., because then your entire project directory is copied from the build context into the build container, which increases the chance that you missed excluding some superfluous files (that do not belong into the container anyway) via .dockerignore. To make it easy to address this issue, I developed a small CLI tool called Directory Checksum. It recursively computes the checksum of the contents of a directory, and prints the checksums up to a depth you can specify.

Debug Docker caching issues


1999 Malibu Braking System

Question: Just changed my whole braking system in the front. My brake line on the left blew a hole and I replaced it. Decided to change calipers and hoses. Bled the lines. When the engine is started the pedal goes to the floor,any thoughts?
Comment: Have you checked the reservoir? Did you bleed, refill, bleed, etc.?  Are there any leaks?
Answer: You still have air in the system.
Check the brake fluid level.
Then repeat the bleeding. Start with the right rear wheel.  Left rear.  Passenger front.  Driver's front.
Comment: I suspect you mean to say "check the brake fluid level." It's too small of a change to allow me to edit in the correction.
Answer: Did you let the master cylinder run dry during the caliper replacement? If so, you'll have to bench bleed the M/C. You may also have to perform an ABS bleed procedure.
After you installed the new caliper and pads, did you press the pedal several times with the engine OFF to move the caliper piston into contact with the pad? If not, do that now.

1999 Malibu Braking System


Giant file full of event handlers! How to organize a large jQuery file in an AJAX web app?

Question: I've made an AJAX-heavy web application and included jQuery as a library to help facilitate DOM manipulation and AJAX requests, etc. Here is the problem:
My JavaScript file is a giant collection of event handlers!!!!!
I'm being serious, probably 30+ event handlers and I don't even want to count. It basically looks like:
<code>$(document).on('click', '#element', function() {
    $.get('url' + id, function(data) {
        //do stuff
    });
});

$('div.selector').hover(function() {
    //do stuff
}, function() {
    //undo stuff
});

$(document).on('submit', 'form#form-selector', function() {
    $.post('/url', $('form#form-selector').serializeObject(), function(data) {
        //do stuff
    });
});
</code>
ad infinitum with a few functions and prototype stuff in there to get the commonly-repeated functionality I need. It works just fine, but I know this cannot be right and it seems really ugly. On top of that, it seems bad to wrap most of it in a <code>$(document).ready()</code> and it's miserable to try to sort through the code and find the section I want without using my text editor's find functionality.
How do you organize a large project like this? I am aware of stuff like Backbone.js, but I wasn't sure if this is the intended use-case and I am already using a server-side framework in PHP to do templating and other things, so I don't need a full-blown JavaScript framework. Are namespaces the answer/are they really going to help anything? I've done some research and didn't find much besides namespaces... much to my surprise/frustration.
Help me escape the event handlers of doom!
Comment: More info: I'm using Laravel and already have the backend set to handle all the requests/pass back data.. it seems like my JS file is just a place to fire AJAX requests and then manipulate the DOM in response. There must be a better way...
Answer: You could group elements which trigger the same event into a group. And perform operations in a single event function in the following way:
<code>$("#b1,#b2").on("click",function(event){
 var target = event.target || event.srcElement;
 switch(target.id)
 {
    case "b1":
      alert("Im One");
    break;
    case "b2":
      alert("Im Two");
    break;
 }});
</code>
Sample code here : http://codepen.io/tejzpr/pen/pvMxMw/


How much air comes out of the tone holes in a woodwind or brass instrument

Question: When a woodwind or brass instrument is played, how much air, if any, comes out of the tone holes?
Or does the air go into the tone holes due to the Bernoulli / venturi effect?
Comment: There aren't many *brass* instrumnents with tone holes, BTW
Comment: Simple experiments with, e.g. bits of tissue paper, will show you air going out (or in :-) ).
Answer: Modern brass instruments do not have "sound holes" -- all of the air blown into the horn exits through the bell of the instrument.
On woodwinds, air comes out both the sound holes and the bell.  How much air vents through the holes depends on how many holes you have open.  The more open holes, the less air will exit through the bell, and the more through the holes.
You can easily verify this for yourself.  Take a clarinet or a flute and stuff a sock in the end.  You will still be able to play all but the lowest note, and while the lower notes may sound a bit stuffy, you may not even be able to hear a difference in the higher notes.
This has ramifications for amplifying wind instruments, since not only air, but also -sound- emerges from the holes.  A lot of people mistakenly point a microphone at the bell of a sax or clarinet, which makes the lowest notes "honky" and the upper noted weak.  In fact the mike should be pointed at about the center of the instrument body, to pick up the sound emerging from the holes, and allow better balance over the full range of the instrument.
Answer: I would say that the amount that comes out the sound holes and the bell is directly related to the amount and pressure of the air that is being put into the instrument at the mouthpiece of the instrument. Internal pressure in an air column such as a sax is greatest at the mouthpiece and decreases as the air column approaches the bell of the instrument, so the air escaping through the sound holes near the mouthpiece does so at different pressure than the sound holes that are located closer to the horns bell. Also the sizes of the different sound holes would also affect the amount of air escaping through the hole.
Comment: This appears to be chat without content - you discuss some thoughts but do not provide either an answer to the OP or a reference validating your claims.


Can't Access The Dashboard Functions

Question: I just changed the theme of my website https://stammer.in but after changing the theme some functions from my Dashboard are missing. I can only Acess Post, Media, Pages, Comments, Events, Profile, Tools and WPBakery Page Builder. I can't access to other functions like appearance, settings etc. Nor I can access to the visual composer to which I can access earlier. Please help.
Answer:
have a look at this, cause that seems to have changed for ur user with ur modifications: https://wordpress.org/support/article/roles-and-capabilities/#:~:text=WordPress%20has%20six%20pre-defined,"%2C%20and%20"edit_users".

would be better to tell us which theme modifications u made, otherwise it's impossible to tell why what happened!

Can't Access The Dashboard Functions


Manchester and NRZ coding schemes

Question: How does NRZ recover the clock? For example, Manchester coding is a self-time scheme, but we still need to have DLL or PLL for the recovery, it can be done without those CDR circuits? and back to NRZ, can NRZ be used without DLL or PLL for recovery?
Comment: I have only time for a short answer. I've added it. But are you seriously asking for a long discussion on this topic? There are many 100-page theses on this topic! You wrote but just a few sentences and hand-waved in many directions. That leaves me uncomfortable writing more than I have.
Answer:
You can attempt to recover the clock (regenerate it) from the signal itself by detecting the waveform transitions. This technique, while theoretically possible under ideal circumstances, is usually not employed because jitter and noise easily corrupt the perceived timing of incoming transitions. And the corruption of even so much as a single case during reception of a data block will cause loss of synchronization and the loss of pretty much the entire rest of the block.
I don't think anyone does this, in practice.

The alternative is to include a local receiver clock (VCO) and then phase-lock it to the incoming signal using some manner of PLL. (There will be a lock-in range.) This way, there's a very clean, locally generated clock. Even under bad conditions. An error will now likely only affect one bit and this can be corrected using fairly well-understood error correction techniques. This local receiver clock, after lock, is also called a recovered clock

So the short answer is, "Yes". I believe Manchester requires local clock recovery that involves a PLL, a local VCO, and some manner of phase detection (but not sequential phase detection) and clock recovery circuitry leading to a locked local VCO that yields the recovered clock along with retimed data.
The above discussion applies to Manchester (of which there are a variety of techniques... so it's not just one thing.)
Of course, no one is stopped from directly recovering the clock signal from the received signal. It's just that once synch is lost, it stays lost until it can be recovered again. In that case, I suppose you could say that a local VCO and PLL aren't strictly necessary. But this only works well when everything is very clean and losing synch is tolerable.
These problems with NRZ make the above discussion less applicable:

Long strings of 0s are easily confused with no signal present

Long strings of 1s cause the baseline to wander

And both make clock recovery difficult/hard/impossible

NRZI solves one of these (the 1s) but not the other. However, going to 4B/5B (which uses NRZI afterwards) can increase the data rate for a given bandwidth over that which Manchester allows while also solving the issues with NRZ and naked NRZI.
Answer: For synchronous channels there are many different protocols that lend themselves for easy SERDES design and clock recovery.
This includes many options;

Using a harmonic method of locking a PLL VCO to harmonics of the smallest transition interval.
Include odd parity to ensure at minimum transition density and also for gain control if necessary for Vpp detection and accurate PW50%.
Use a scrambling method to randomize the data for maximizing transition density.
Use a preamble of of 1010 to enable fast clock sync then a bit pattern for Byte Sync, then a Frame Sync byte pattern for multi-byte packets or continuous frames.
Use tight tolerance on frequency error, so that transition density matters less.
Use a global clock reference (Stratum level clock) that only requires phase control to get in sync.
Use a much faster clock to count phase error rapidly and data clock phase error instantly with low jitter and low frequency error links.
Use Raised Cosine filtering if any is required to minimize ISI that reduces BER from phase or eye pattern margin between clock and data.

My earlier experience was designing a BER Test set for DS1 1.544 Mbps in a custom designed two-way ISDN network trial in 1980 using the Stratum clock sync method.
Then a few years later using PLL with a VCXO for a 4 Mbps link that was broadcast in the unused TV blank lines. I chose a PLL method that could lock in 4 sync transitions , yet stay in for 1000 bits with no NRZ transitions, primarily due to the high SNR for TV and low jitter and dual BW PLL.
I chose a sawtooth S&H of the VCXO and used XOR pulses from data transitions to sample the sawtooth voltage for VCXO phase error correction and lock quickly on 1 byte of 10101010. Then I changed loop BW so as to not drift in phase for the rest of the channel burst of 15.6 ms while correcting any drift with data transitions. The  BER spec of < 1e-12 was achieved.
Answer: How does NRZ recover the clock?
Simply by detecting edges and synchronizing a data clock to the recovered edges. This does not (necessarily) require a PLL. The classic technique is the standard UART philosophy, which uses a largish multiple of the data frequency to over-sample the data, then reset the data clock at each edge. Of course, this means that both the transmit and receive clocks must be quite accurate, or the data must guarantee some maximum number or data bits without transitions.
In the classic RS232 scheme, a start bit is used for initial synchronization, and the word length must be small enough to guarantee that the recovered clock will not drift more than 1/2 bit during a word. This requires, for an 8-bit word, that the two frequencies are matched to better than 6%. Since it's easy to get much better matching using crystal oscillators, this is not usually an issue, although it also requires a fairly high SNR on the received signal to avoid spurious edges.
CANBUS, another NRZ protocol, employs bit stuffing. When there are 5 bits in a row with the same value, the transmitter inserts a dummy bit of the opposite value, which is detected and ignored by the receiver.

Manchester and NRZ coding schemes


Click event on document.body not working as it should on IE8

Question: I'm working on some tweaks for a web page, I'm using MVC and jQuery.
Basically I have some help icons on my page, when the user clicks on the icon, a bubble appears with a help description.
I have this code in my JavaScript for that page:
AddHelpIconMouseEvents: function(element, msg, divForm) {
   $(element).live('click', function(event) {
      if (event.type === "click") MyClassHelper.showHelpIconBubble(msg, divForm, event);
   });
   $(document.body).click(function() { $(divForm).hide('fast'); });
}

As you can see I'm using the document.body.click event to capture any click outside the help bubble, and hide the bubble.
Now consider this situation, I click on the help icon and the bubble is displayed, if I click anywhere else on the page, the bubble disappears as expected, but the problem I have is, if instead of clicking on a blank space on the page I click on a link, the link displays another section of the page, hides the section that contained the help icon but the help bubble does not disappear, it remains displayed.
This doesn't happen on Firefox, in which I can click on a link or on an empty space and the bubble disappear.
I think this may be related to the way in which IE handle events, I think I read something about it, so I wonder if anyone knows how can I fix this, I think I can put some code on the links and validate if the bubble is visible, hide it, but I don't like the idea, I think it is not a good solution, I wonder if there is another better way to handle this.
Answer: You can make a function which checks for the help bundle to check in DOM if it already exists. If so remove it from DOM. You have to call this function on every other link.


Preventing recall in Outlook (2010)

Question: Is there a way to avoid auto-accepting recall requests on messages you have received?
Answer: To enable/disable:
Tools
Options
Preferences -> Email Options
Tracking Options
Uncheck "Process requests and responses on arrival
Uncheck "Process receipts on arrival"
Answer: According to this article describing how message recall works, you can do this with two steps:
First, in Tracking Options, disable "Process requests and responses on arrival". This prevents the recall from taking place until you actually open the recall request. Moreover, if you have already read the original message before you read the recall message, the recall will fail.
Then, via a rule, move recall requests to a new folder upon arrival. Recall requests will fail if the recall message is not in the same folder as the original message, so this prevents it from happening automatically.
Comment: Here's the missing trick, though: [advice about how to build a rule that matches recall requests here].
Comment: I did this myself by creating a rule that matches "Recall:" in the subject line or the words "would like to recall" in the body.  Not ideal, but tested to work successfully.

Preventing recall in Outlook (2010)


Check when the last time someone visited a specific node

Question: I need to make sure my users are visiting a specific node. What could I accomplish this?
A counter would be nice (e.g. "viewed three times by User234 in the past week"). Would that be hard to implement?
Answer: The Statistics module that is part of Drupal already get that information. Its hook_exit() implementation contains the following code.
  if (variable_get('statistics_enable_access_log', 0)) {
    drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION);

    // For anonymous users unicode.inc will not have been loaded.
    include_once DRUPAL_ROOT . '/includes/unicode.inc';
    // Log this page access.
    db_insert('accesslog')
      ->fields(array(
      'title' => truncate_utf8(strip_tags(drupal_get_title()), 255),
      'path' => truncate_utf8($_GET['q'], 255),
      'url' => isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '',
      'hostname' => ip_address(),
      'uid' => $user->uid,
      'sid' => session_id(),
      'timer' => (int) timer_read('page'),
      'timestamp' => REQUEST_TIME,
    ))
      ->execute();
  }

The data contained in that table are reset after 72 hours. statistics_cron() contains the following code.
  // Clean up expired access logs (if applicable).
  if (variable_get('statistics_flush_accesslog_timer', 259200) > 0) {
    db_delete('accesslog')
      ->condition('timestamp', REQUEST_TIME - variable_get('statistics_flush_accesslog_timer', 259200), '<')
      ->execute();
  }

The Statistics module has a setting page (admin/config/system/statistics) that allows you to decide when the access logs are discarded; you can choose to discard then when they are older than 1 week.

The Views module has code to expose in a view the data saved from the Statistics module; you can add a field to expose the number of times a node is viewed in a view.
Alternatively, you can create a custom module basing on the Statistics module's code. In this case, you would need to implement the code for integration with the Views module, if you need it.
As side note, hook_exit() is probably going to be removed from Drupal 8; if you are using it in a Drupal 7 module, you will need to change your code when porting it to Drupal 8.
Comment: Keep in mind that logging statistics like thing can be a serious drag on performance.
Comment: Perfect. I'm now able to go to a node and see who was there. Awesome!
Answer: Because you need per-node per-user counts, the easiest approach I can think of is a small custom module. There were a few advanced statistic modules for Drupal 6 that might be able to track this info, but I'm not aware of any that accomplish this in Drupal 7. Writing a small module to simply increment a view count paired with uid and node vid in a table using hook_node_view would be a relatively small job for a drupal module developer.


Raspberry AM radio transmitter

Question: Is there a AM radio trasmitter library for raspberry? Like PiFMRDS ? AM travels further and it would get better range on low power RPi trasmitter. Or how could I do that myself? Generate high (~1Mhz) frequency and modulate it according to audio input.
Comment: While it might be possible to generate a FM (frequency modulated) signal using a PWM output (I did not test this libary, but it looks interesting), this won't work with AM, since that requires analog electronics for modulation. If it is only about the range, I would rather add some extra power amplifier to the output. Just be aware that you may get into big trouble if you build an FM tranceiver that has a range of more than a few meters.
Comment: Oh, so FM is possible because it is just a PWM signal basically, but AM would need different amplitudes? But it also could be achieved with PWM, no?
Comment: I'm not the expert here, but I would say no, Amplitude modulation would need an analog output. It could probably be done with a fixed frequency PWM signal (as the carrier) and an analog sound output.
Answer: Yes, there is: rpitx
It does AM as well many other modulations: FM, SSB, etc. All thanks to some cunning PWM.

Though, I highly advise you to go and learn a lot more before using it! Really, go grab some books on the basics of radio communication and also check the laws and regulations surrounding it. If you fail to do so you may end up disrupting some critical equipment and get yourself in jail.
Your follow-up questions show a lack of understanding of some basic principles. AM does not travel further. AM is just a type of modulation. What travels further are the carrier waves usually employed with AM modulation: they have a lower frequency than those typically used for FM, and can propagate as ground waves, following the Earth's curvature.
Your intention (getting a better range) also shows that you are unaware of the consequences of transmitting on allocated frequencies, specially with a noisy transmitter. You should have read PiFmRds's Warning and Disclaimer more carefully. Let me quote the most important bits:

In most countries, transmitting radio waves without a state-issued licence
specific to the transmission modalities (frequency, power, bandwidth, etc.)
is illegal.
[...]
Even if you are a licensed amateur radio operator, using PiFmRds to
transmit radio waves on ham frequencies without any filtering between
the RaspberryPi and an antenna is most probably illegal because the
square-wave carrier is very rich in harmonics

All this applies to rpitx as well. These are meant as learning and experimentation tools. You should never transmit further than your room, or better, as PiFmRds advises:

connect a shielded transmission line from the RaspberryPi directly to a radio receiver, so as not to emit radio waves
Comment: +1, but your "go to jail" warning is a bit of an overstatement. Unless the OP builds an actual RF amplifier and a decent antenna, he is unlikely to be discovered at all, let alone go to jail. He will be stuck in a long line of criminal offenders who have bought uncertified RC drones, garage door kits and LED lightbulbs on eBay :)
Answer: USB SDR (software defined Radios) exist that will transmit.
However, you have to obtain a legal license to transmit any significant distance.  Thus probably defeating the whole benefit of long distance.
You want to use it as a CB or Ham Radio you need to be legally licensed to do so.  Take a class and pass a test and pay a fee.
At least with an SDR you can choose alternate frequencies that don't collide with AM or etc transmitters.
Still you need to have a license to do what you want.
Comment: You don't need a licence in the PMR (Personal Mobile Radio) bands.  But, as you suggest, it is over a restricted distance.
Answer: It is not the distance, it is the ERP (Effective Radiated Power) and the band that can get you into trouble.  By limiting the ERP it has a big effect on distance but on the correct band and atsmopher conditions Amaturer operators have gone thousands of miles. CB across the US with 5 watts power was common in the mid 60's. The best place to increase your distance and not get in trouble is to increase the sensitivity and selectivity of your receiver.
You can purchase commercial communication equipment that will do the job and have a lot more power and range. They will be licenced by the appropriate agency in your country. In the US it is the FCC ()Federal Communications Commission).

Raspberry AM radio transmitter


Structuralism's influence on Biblical interpretation

Question: What is the structuralist view of literary criticism, and how has structural literary theory influenced modern approaches to Biblical interpretation?
Comment: This question seems to be asking about structuralism first and hermeneutics second, which is exactly backwards.  Perhaps if you started by explaining [structuralism](http://en.wikipedia.org/wiki/Structuralism) you would have a better chance of getting some answers.
Answer: This is a huge topic. I'll mention a couple things that I'm aware of.
Bruce Benson writes

Simply put, structuralism is the view that meaning in language and culture is
  based upon internal relations within the linguistic or cultural system as a
  whole, rather than something outside the system that is substantial.

(Dictionary of Theological Interpretation of the Bible, "Structuralism", Vanhoozer Ed.)
One thing that has come about because of structuralism is the concept of narrative exegesis. The idea is that stories in the Bible (e.g. the Gospels) have a certain structure to them. They contain things like a plot, a protagonist etc. There are differing theories as to what the structures are but that they exist at all come from structuralism. That is to say there is more going on the the Bible than a mere historical report of events.

Another thing that structuralism led to is Post-Structuralsim (as the name implies). Post structuralism emphasizes the cultural side of language. That is to say, each culture constructs their language to work in a certain way. It also provides the meaning to words. Words are not static entities which always have a specific meaning. Rather the meanings of words and texts are determined by the culture that uses them.
Think about the words "gay" and "mouse." The former previously meant happy now it refers to homosexuality. The latter refers to a small rodent (and still does) but I think many people would first think of a computer device when they initially hear the word. Over the past 50 years the chief meaning of these two words have changed considerably in western English parlance. Not because the words changed but because our culture has shifted and now attributes a different meaning to these words
To make along story short. Post-structuralism has challenged the view that there are absolutes that can be drawn from scripture that apply in the same way to every culture and time. The reason for this is that the scriptures as they were written were embedded in a particular cultural and linguistic structure. In order to extract the meaning one must translate from the one culture to our current culture and there is much disagreement on how to do this properly.
Comment: Thank you for pulling together an answer to this question that's been unanswered for a very long time!
Comment: Words may take on a different context. However, the fact that words can take on different context doesn't mean the text changes. Certainly, if one were exposed to only one context of a word then one's interpretation of the text will be confused. Yet, one's confusion doesn't change the text. It simply means one needs more exposure. It doesn't mean the scriptural narrative is subjective and open to any interpretation.


How are my top tags chosen?

Question: My top question is a species identificatfion question with the fitting tag and 10 votes. Yet "toxicology" was and is shown as my top tag in my profile. Then all my tags were set to zero, possibly due to my initiating a bounty. Is my identification question exempt because it was deemed duplicate?
Answer: It's just based on your participation in topics involving those tags.
You can see your # of posts under each tag on your user page. You'll see that there isn't much point in focusing on your "top tag" at the moment because you have 1 post in many different tags; essentially they are all tied for the top, but it only shows one as a 'top tag'.
Comment: So scores are irrelevant?

How are my top tags chosen?


count down on button press in blender game engine

Question: In game when I press a button on my keyboard it will start a countdown on a timer  until it hits zero. Is this something that is possible to make in blender game engine?
Answer: Yes, easily through logic bricks and using a text object.
In this example, the property start rules if the countdown is started. When Spacebar is pressed start becomes True, then the Text property gets decreased each 60 frames (that is, 1 second).
Example blend file provided below.

Example file:


Why are many files and folders greyed out in Finder?

Question: When I navigate in Finder (or in File Save/Open windows) I often see various files and folders are shown in grey. I can navigate them as normal, so what does this mean?
Comment: Does `shift-command-.` (show/hide hidden files) change it?
Answer: I had the same problem with a file under Ventura. Terminal showed me
-rw-r--r--@
chflags did not seem to work but xattr -c *.pdf cleared that flag.
Answer: I have seen that in three circumstances:

When the grayed files are in the process of being copied by Finder.

In an Open dialog when they are not of a type the app can handle

In Open With→Other, when they are apps that aren't able to open that file type.

hidden files do not show at all in Finder.
Comment: `2,` should be `2.` to get correct list formatting.
Answer: It is a shame for Apple that this problem still exists from early 2010s.
To see these hidden downloads, the quickest way I found is the cmd+shift+. key combination.
To make those files visible, I figured duplicating them helps. But, I still need to delete those files and remove the appended ' copy' from copies. (Thanks to Finder's Rename function we can do that in one move.)
Answer: Generally that means the file or folder is hidden. @Gilby accurately points out that ⌘ + ⇧ + . (Command+Shift+Period) will toggle their collective visibility on or off, though it doesn't change the hidden flag. Instead, the entries will appear as grayed out.
If you open a terminal window the command chflags nohidden  followed by the name of your file or folder (so, for example: chflags nohidden ./2020) will toggle its visibility back to on in finder, but you'll need to click off the folder and then return to it (or in some cases run the ⌘ + ⇧ + . twice) to get Finder to "notice" the change. Note that protected system files, dotfiles (files whose name begins with a ".") and files for which you are not the owner will not be affected by this.
Edit: It's entirely possible that some other program or process has claimed ownership of those folders. If the above doesn't work for you, please post back and we'll try to debug it.
Comment: Is there some functionality that files/folders are automatically hidden if they reach a certain age, or get no activity for a given time?
Comment: @Mr.Boy
Not as a general rule... it's possible you have some software that implements that functionality as a feature though. I'm a UIUX Specialist, myself, and I've been a long-time advocate for what I call "decaying UI" (making UI elements slowly reduce themselves as the user becomes more familiar with them, so they take up less screen real estate in those instances we can be certain the user is the same person each time. Gmail uses these tactics to great effect).
Those are clearly years: is this a photo gallery? Message archive? MP3 store? That is to say, what are the folders related to?


ArcGIS 10.1 arcpy Update Cursor is returning a list instead of a row

Question: I keep getting the following error:

Traceback (most recent call last):
  File "R:\GIS_ScriptsandTools\PullHotParametersLabel.py", line 16, in

      TitleLine = ""+row.getValue(IDfield)+" ("+ row.getValue(Datefield)+")
  "
AttributeError: 'list' object has no attribute 'getValue'

When I am trying to run a typical for row in cursor loop when working with an UpdateCursor.
For the life of me, I can't figure out why it thinks the row is a list and not a row object.
Here is my script:
import arcpy
SourceTable = arcpy.GetParameterAsText(0)
IDfield = arcpy.GetParameterAsText(1)
Datefield =arcpy.GetParameterAsText(2)
SelectedParams = arcpy.GetParameterAsText(3)
OutputField = arcpy.GetParameterAsText(4)
SelectedFields = SelectedParams.split(';')
AllFields = arcpy.ListFields(SourceTable)

FieldDict = {}
for field in AllFields:
    FieldDict[field.name]=field.aliasName

with arcpy.da.UpdateCursor(SourceTable,"*") as cursor:
    for row in cursor:
        TitleLine = "<und><bol>"+row.getValue(IDfield)+" </bol>("+ row.getValue(Datefield)+")</und>"
        LabelList = [TitleLine]
        for Field in SelectedFields:
            if row.getvalue(Field) <>0:
                Alias = FieldDict.get(Field)
                ParamValue = row.getValue(Field)
                ParamLine = '{0} = {1:,}'.format(Alias,ParamValue)
                LabelList.append(ParamLine)
        if len(LabelList)<2:
            LabelList.append("All < 2L")
        Label = '\n'.join(LabelList)
        row[OutputField] = Label
        cursor.updateRow(row)
del row, cursor

Does anybody have any ideas where I'm screwing up on this?
Answer: You're using an arcpy.da.UpdateCursor. It by definition and design returns rows as lists, not as row objects. You need to use an arcpy.UpdateCursor if you want row objects.
The old arcpy objects from 10.0 like arcpy.*Cursor are still there in 10.1 and still behave as expected. You can even use the old 9.3 arcgisscripting APIs and they'll still work the same. You don't need to "upgrade" your scripts to use the new APIs if they already work.
Answer: The line:
arcpy.da.UpdateCursor(SourceTable,"*") as cursor:
sees cursor.updateRow(row) as updating with a "tuple",
Try the following:
cursor.updateRow([row])
instead


Why is Firesheep Unable to Session Hijack over SSL?

Question: Why is Firesheep unable to session hijack when a user is using SSL?
Answer: It needs to read the content of the HTTP transactions between the victim's computer and the remote server. SSL features point-to-point encryption using a key that's negotiated by the two systems, so a third system passively eavesdropping cannot read the content.
Note that it is possible to inspect SSL content by interposing the attacking system between the two parties. This is called man-in-the-middle, and is used by corporate content filters so that they can filter both HTTP and HTTPS communication.
Comment: "Note that it is possible to inspect SSL content by interposing the attacking system between the two parties. This is called man-in-the-middle, " - This should be reworded since SSL is supposed to, and indeed can, prevent this. The corporate content filters described work by breaking SSL using a horrible kludge that involves a self-inflicted compromise of SSL's trust model :-)
Comment: @frankodwyer: which still means it's possible ;-)
Comment: @graham - not in the firesheep 'coffee shop' scenario though, or at least it is possible for the user to detect it (granted, this doesn't mean the average user will, I'd fully expect most of them to dismiss the browser warning and carry on regardless - indeed if I hadn't had my coffee yet I might myself :-)
Comment: @frankodwyer your parenthesis expresses almost everything that is wrong with SSL. "Dear user, here's some stuff that I, a developer, understand and you do not. However, I have decided that you should be the person to decide what we do here." The remaining stuff that is wrong is brought to you by the letters C and A.
Answer: The web browser and the web server establish an encrypted connection before any HTTP communication, so when the session data is exchanged it is within the encrypted tunnel and is protected from man-in-the-middle attacks or eavesdropping.
For details, check out the SSL sequence diagram from: http://www.eventhelix.com/RealtimeMantra/Networking/
Technically Firesheep could session hijack SSL connections, but then you would likely get a warning from the browser about establishing an untrusted connection, for example:
If this:

you  <--- SSL ---> attacker <--- SSL ---> bank.com

then:
Comment: In my opinion the warning is not explicit enough for users.  There are no good scenarios where end user should probably continue ahead.  The we "can't confirm" the connection is secure = "it might be secure" in the eyes of most non-technical users.  The biggest problem with SSL is the assumption that the user knows what to do when something goes wrong.  The reality is they don't and while 100% of users may not click "I understand the risks" some significant portion will.


Flux and flux linkage through a solenoid

Question: If there is a solenoid of length L , radius R, number of turns N immersed in uniform magnetic field B with axis of the solenoid being parallel to the field, then what will be the flux linkage and the flux through the solenoid ?
I am a bit confused with the terms , I think the flux through the solenoid should be BN(pi)(R^2) . But then my book says that the magnetic flux through the solenoid is B(pi)(R^2) and the flux linkage is N times the flux through the solenoid .The book is saying that the flux through the solenoid is B(pi)(R^2) not BN(pi)(R^2) . Please could you help me clarify this what is the flux through the solenoid and what is the flux linkage ?
Answer: You might be confused because the flux through one solenoid coil is $BA$, where $B$ is the magnetic field and $A$ is the area, so if you stack a bunch of coils then it should be $N*BA$.
However, this is not the case. What magnetic flux concerns itself with is how much magnetic field passes through the coil. Think of it this way:
Consider a hose that is running. We will let water be the magnetic field in our example. Now, I put a ring with the same radius as the opening of the hose, and I ask what is the flux of water, that is how much water is passing through the ring? Let's say it's a certain amount W. Now, to the first ring I add a few more rings, like a solenoid, and I ask, how much flux of water is passing through it? It's going to be W, since adding more rings does not increase how much water is passing though, and analogously, this is what magnetic flux is quantifying -- how much magnetic field is passing through.
What magnetic flux linkage is quantifying is, in a sense, how much the total impact the magnetic field has on the coils, that is, if the magnetic field is passing through $N$ coils, the effect of the field is multiplied $N$ times, and that's why we quantify it as, in this example, $N*BA$.
I hope that you do revisit the definitions after reading the analogies. They tell you what is and what isn't. The analogies can only go so far as to describing the physical quantity in question.
Comment: What if I increase the radius of the first ring then put it infront of the hose , the amount of water will still be W so will the flux remain the same ?
Comment: Yes, the flux will remain the same. If the coil is bigger than the region which has a magnetic field, then the flux is $B\times Area \, of \, region$. If the coil smaller, then the flux is $B\times Area\, of \, smaller \, coil$.
Answer: Perhaps you are confused by the equation for EMF induced in the solenoid by extension of Faraday's law:$$\varepsilon = -N\frac{d\Phi_B}{dt} $$
The total EMF induced in the solenoid is the sum of the EMFs induced in each turn of the solenoid. This is why the change in magnetic flux over time for every turn,$\frac{d\Phi_B}{dt}$, which gives the EMF induced in that turn of conductor, is multiplied by N, the total number of turns.
But in the case of magnetic flux through a solenoid, the equation is $$d\Phi_B = B\cdot dA$$
This is because the magnetic flux is determined for a cross section of the solenoid, and the number of turns N, a parameter in the perpendicular space-direction to our plane of our reference (which is the cross section of the solenoid) does not have to be considered in this context.
Answer:
I think the flux through the solenoid should be BN(pi)(R^2) .

No, the book is correct, the magnetic flux (the amount of magnetism) going through the solenoid is the magnetic field strength $B$ multiplied by the area of the solenoid $A=\pi R^2$. The magnetic flux linkage is the amount of magnetism multiplied by the number of turns of the coil. The point of the flux linkage is that a current induced in the solenoid by a changing magnetic field will be proportional to the flux linkage, not the flux.
Comment: So are you saying that the total magnetic flux through the solenoid is B multiplied by the area of the solenoid ?
Comment: @VarunChandra - yes, the total magnetic flux just means the amount of magnetism is going through some area, it's completely unrelated to how many coils there are.
Comment: But can't we say that N number of turns increases the area N times through which the magnetic field lines are passing and thus the flux is NB(pi)R^2. Isn't it true that N turns add N plane surfaces that the field lines has to pass through and thus the total magnetic flux is NB(pi)R^2 ?
Comment: @VarunChandra - did you not read what I wrote above? For the third time I will repeat myself: the magnetic flux is nothing to do with the coils, it is just to do with the amount of magnetic field through a certain area. Please don't reply any more to ask the same question again and again.


Inertia matrix of a rigid system of rigid bodies

Question: I am interested in finding a formula for the inertia matrix of a rigid body about its center of mass. This particular rigid body is composed of other rigid bodies with known inertia matrices about their center of masses. An example is more cubes and some spheres welded together in some shape. Supposing the mass and center of mass of each of the component rigid body is known, then I find the following result:
Theorem:
Let $B$ be a rigid body made out of $N$ distinct rigid bodies $\{B_1, ..., B_N\}$. Let $\overrightarrow{OC_i}$ denote the center of mass in world frame $\{O,\vec{i},\vec{j}, \vec{k}\}$ of the rigid body $B_i$ and $m_i$ denote its mass. Let also $I_i$ denote the inertia matrix of rigid body $B_i$ about its center of mass $C_i$. Then the center of mass of the rigid body $B$ is
$$ \overrightarrow{OC_B} = \frac{m_1 \overrightarrow{OC_1} + ... + m_N\overrightarrow{OC_N}}{m_1 + ... + m_N}$$ and its inertia matrix $I_B$ about its center of mass $C_B$ is
$$ I_B = I_1 + ... + I_N + I_{points}$$ where $I_{points} = -\sum_{i=1}^N m_i \left[\overrightarrow{OC_i} - \overrightarrow{OC_B}\right]^2$  with $[v]$ denoting the skew-symmetric matrix constructed from the vector $v$.
Proof:
The formula for the center of mass is well known. For the inertia matrix suppose each rigid body $B_i$ is composed of $N_i$ particles of mass $m_{ij}$ at position $\overrightarrow{Or_{ij}}$. Then by definition
$$ I_B = -\sum_{i=1}^N \sum_{j=1}^{N_i} m_{ij} \left[ \overrightarrow{Or_{ij}} -
 \overrightarrow{OC_B}\right]^2 = -\sum_{i=1}^N \sum_{j=1}^{N_i} m_{ij} \left[ \overrightarrow{Or_{ij}} -
 \overrightarrow{OC_i} + \overrightarrow{OC_i} - \overrightarrow{OC_B}\right]^2$$ hence
$$ I_B = -\sum_{i=1}^N \left( \sum_{j=1}^{N_i} m_{ij} \left[ \overrightarrow{Or_{ij}} - \overrightarrow{OC_i}\right]^2 +\sum_{j=1}^{N_i} m_{ij} \left[ \overrightarrow{Or_{ij}} - \overrightarrow{OC_i}\right]\left[ \overrightarrow{OC_i} - \overrightarrow{OC_B}\right] + \sum_{j=1}^{N_i} m_{ij} \left[ \overrightarrow{OC_i} - \overrightarrow{OC_B}\right] \left[ \overrightarrow{Or_{ij}} - \overrightarrow{OC_i}\right] + \sum_{j=1}^{N_i} m_{ij} \left[ \overrightarrow{OC_i} - \overrightarrow{OC_B}\right]^2 \right) = \sum_{i=1}^N I_i + I_{points}$$
Is this correct? Is this property known and used? Can someone give me a reference for this ... I want to use this in a paper ...
Answer: It is called 'parallel axis theorem'. Here is the wikipedia entry for it: https://en.wikipedia.org/wiki/Parallel_axis_theorem


How to arrange test dataset distribution for an imbalanced classification problem?

Question: I have a dataset that contains 560 datapoints, and I would like to do binary classification on it. 400 datapoints belong to class 1, and 160 points belong to class 2. In the case of an imbalanced dataset like this, how to arrange the test dataset to get valid performance results? Should I keep the same imbalanced data distribution for the test set which is similar to the distribution of the training data, or arrange it in a way that half of the test points belong to the first class and the remaining half belongs to the second class?
Comment: We had similar questions in the past. For example, see [here](https://ai.stackexchange.com/q/27404/2444).
Answer: The test set should represents the "real" data distribution your model will tackle once deployed and used in real applications. So the quick answer is yes, the test data should be imbalanced, which comes also as a sort of forced choice for you considering the super small size of you dataset.
You want to keep in mind though that this makes a bit trickier to interpret the resulting metrics.
For example, if your test set is made of 90 instances labeled A and 10 instances labeled B, a model might predict class A for all instances and still have a final accuracy of 90%, correct, but completely unrepresentative of the real behavior of the model. So make sure to compute metrics like precision and recall for each class.
Extra: considering the size of your dataset, you might consider using k-fold cross validation. Split your dataset into k train-test subsets, train k models and average the resulting metrics. The logic being that with such few instances the dataset is almost guaranteed to contain biases of some sort.
Comment: If the real distribution is imbalanced, the test dataset should be imbalanced. However, note that, even if the training dataset is imbalanced (which is the case of the OP), this does not mean that the real distribution is imbalanced. So, if the real distribution isn't imbalanced, then one may want to consider oversampling and undersampling.


How to make this kind of typography in blender

Question:
How to create model with this type of typography in blender? I tried using single vertex to make the curve and then fill it until it become a flat plane. I extrude the plane and add subdivision modifier but the result ain't smooth.
Comment: Apart from @Nathan's answer below, you might find Joey Carlino's [Text in geometry nodes](https://youtu.be/_7GLcKJbWDw) tutorial suitable.
Comment: Intranetgirl has a good tutorial on this
Comment: Why don't you just sculpt the letters? A few Metaballs and vertices with a skin modifier, then remesh, smooth, etc
Comment: @Blunder: maybe she wants to animate them with trim... ;)
Answer: Blender's curves don't support branching (not without some really extreme difficulty) so I don't think we want to use curve objects to do this.  Instead, we can use a skin modifier to make these kind of branching letters:

I start with geometry that is just a string of verts (pictured on the right), give that string a single level of subdivision to smooth/curve it a bit, then give it a skin modifier to create the geometry.  Then I can tune the radius of each vertex in edit mode to eye, using ctrl a.  A final subdivision modifier adds additional geometry after the skin to smooth everything out nicely.


Can I set on which monitor will application run through the Visual Studio appear?

Question: I am using multiple monitors and I prefer to have my Visual Studio open in the center one and I would like the application that I am testing / running through Visual Studio open on either left or right side, rather than on top of my code.
Do you think there is a way of doing that, that is automatic ? Can this be set somewhere in the options ?
I know that one solution is to change the main monitor to the left, but that would make all apps start on the left rather than in the center.
Answer: Unfortunately not. The application is positioned by the OS and is not an option that you can set from Visual Studio.
Solution: It is simple to save the position of the application window on exit and restore it again on start-up (a MSDN blog post). Wrap it all in <code>#if DEBUG ... #endif</code> pre-processor so that it only occurs during development.
HTH,
Dennis
Answer: I had the same problem and eventually thought of the now-obvious solution -- make the left monitor the primary....   ;-)
Answer: I had this problem, when connected to my work place with 2 monitors through RDP from a laptop. Visual Studio opened my app in the second monitor and I could not reach it.
Win + Arrows helped me.


Recommended Gardening books for Toddlers?

Question: We live in an apartment with a small balcony. I've decided to start a small container garden to teach my two year old about gardens and taking care of plants. she's very excited. does any one recommend any good books, targeted at children. also any techniques or tips for children.
Answer: There's an RHS book called Ready, Steady Grow - available on Amazon. Also an Usborne one called Gardening for Beginners very much aimed at children. The trouble is, your child is only two, so reading it will probably be beyond her - most children's gardening books are aimed at 7 years up, that is, from the advent of the age of reason at seven years old. In the meantime, just show her - get some pots, fill up with potting medium, then maybe plant some seeds, letting her copy you, and talk to her about what you're doing and why. Get her to water and watch and wait for growth.
If you want to grow edible stuff, such as tomatoes, probably best to get a plant or two, pot those up and she can watch you not only water and fertilize, but then see flowers turn into fruitlets and then ripe fruit. If you do this, though, make sure you teach (as far as possible with someone that age) that some plants are edible, or have edible parts, and many more don't, otherwise you're at risk of her picking poisonous fruits when outside if there are any about. She's only two and not yet capable of determining the difference, even if you show her, so she'll need watching - it may not have occurred to her that you can eat plants, and once she knows, she's not old enough to understand the difference between what you can eat and what you can't on her own. And also ensure that anything else you decide to grow isn't poisonous if consumed, in case she decides to try them. 52% of plants grown in the average garden are toxic if eaten, so some thought is required. If she shows a lot of interest this year and next, maybe a book or three later on. Or even a child's gardening app, there's bound to be one soon if there isn't already.
Ultimately, there's no substitute for adult enthusiasm, experience and time where a child's concerned - your own interest should transmit itself to her, even if she just observes what you're doing over time. Although its always possible she won't be in the least interested as time goes by, everyone's different.
Comment: Great point. I hadn't thought about her eating or picking non edible things. As we started potting the containers, I made sure she had similar tools and clothes as me. She like mimicking everything I do, so it helped in the teaching.


Get text from user with pythonaddin

Question: I'm trying to figure out the best way to get text input from a user through a pythonaddin. After watching this video it appears that a editable combo box is an option, but it's maybe not ideal due to its size. Message boxes only allow for Yes/No/Cancel so that's no good. Is there a better way?
Answer: The only way I have found to give you this type of functionality is to create a script tool, and reference it from within the addin.py.  This will require you to create and reference a .TBX and .PY file.  The external script should then pass whatever you need back to the addin.  Use pythonaddins.GPToolDialog() to kick off the external script.
Check out blah238's response.
Answer: I've found that the editable combo box, upon further investigation, is a good way to go to get short text inputs from users.

Get text from user with pythonaddin


Smooth complex threefolds with the same Betti numbers as $\Bbb CP^3$ but different rational cohomology rings

Question: Let $X$ be the smooth complex projective variety of complex dimension $3$. I need the examples of $X$ which have the same Betti numbers as $\mathbb{C}\mbox{P}^{3}$ but different cohomology rings over the rational numbers. Moreover, is there any complete classification of $X?$
Comment: @AGlearner: For a quadric $L \cdot Q = 1$ (because $Q$ is a hyperplane section), but $Q^2 = 2L$.
Comment: @Sasha: I see, thanks for the correction. $H^2_{\mathbb Z}\times H^4_{\mathbb Z}\to \mathbb Z$ is always unimodular by Poincare duality. It should be $H^2_{\mathbb Z}\times H^2_{\mathbb Z}\to \mathbb Z$ by cupping with Lefschetz class not unimodular, because $Q^3=2L\cdot Q=2$.
Comment: This is just a remark that any threefold with same Betti numbers as $\mathbb P^3$ necessarily has the same _rational_ cohomology ring with $\mathbb P^3$ simply because there is only one nondegenerate pairing $H^2\times H^4\to H^6$ over $\mathbb Q$. However, the pairing does not need to be unimodular (over $\mathbb Z$), for example, when $X$ is the quadric threefold,  $H^4$ is generated by a line $L$ while $H^2$ is generated by a quadric surface $Q$ (hyperplane section), and $L\cdot Q=2$. What OP actually want to ask is "different cohomology ring over $\mathbb Z$".
Answer: There are three examples besides $\mathbb{P}^3$:

 a smooth quadric $Q^3$;
 a smooth quintic del Pezzo threefold $V^3_5 = \mathrm{Gr}(2,5) \cap \mathbb{P}^6$;
 a smooth prime Fano threefold of genus 12 (and degree 22) $V^{3}_{22}$.

The first two are rigid (do not deform); the last deforms in a 6-dimensional family.
EDIT: See Wilson, "ON PROJECTIVE MANIFOLDS WITH THE SAME RATIONAL COHOMOLOGY AS $\mathbb{P}^4$" for the classification.
Comment: @AGlearner: You can construct a birational transformation to $\mathbb{P}^3$ and check how the cohomology changes in the process.
Comment: Dear @Sasha, thanks for your answer, but how to show $H^3(V^3_5)=0$? And is the classification a consequence of classification of Fano threefolds plus computation on $H^3$?


soap:ServerServer was unable to process request. The file does not exist

Question: We are upgrading SharePoint sites from MOSS 2007 to SharePoint 2013 using Content DB attach. Upgrade from 2007 to 2010 works fine. When we upgrade from 2010 to 2013, site has a lot of issues. List views shows a message that 'The web Page cannot be found'. NewForm/DispForm/EditForm of the lists are also missing. When I open the site using designer, I can see these files. When I try to open them I am getting this error message.
"soap:ServerServer was unable to process request. The file does not exist." Are we missing on something?
Answer: As mentioned, I could see the New/Edit/Display forms in the designer but couldn't open them. I resolved this issue by deleting the corrupt files and uploading the forms again from 2010 site.


Hive/Beeline, how can I set the job .staging directory?

Question: On the cluster I'm working on every user is given 60GB of Hadoop quota.
Historically the project I'm working on generates a lot of Hive queries.
In order for things to work faster I'm trying to parallel these queries (which are unrelated) but as a result the directory /user/{myusername}/.staging/ is being filled with job_{someid} directories which in turn are filled with the hive jars and consume these 60GB very fast. While I can limit the parallelization factor I would also like to see if I can ask Hive to put these jars on a different directory. Say /tmp/{myusername} where I have a lot more space.
Any idea how do I tell Hive/Beeline to create the .staging directory under /tmp/{myusername}?
Answer: Easiest way is on execution of your beeline session.
<code>beeline --hive.exec.stagingdir=/tmp/{myusername}
</code>
Think you can do it via !set inside beeline but don't have the syntax to hand.
Answer: The above doesn't work.
We found the following working
beeline --hiveconf hive.exec.stagingdir=/tmp/{myusername}


How to change a grouping field in a view programmatically?

Question: I've added a custom field to a view and want to display results as a grid grouped by this field. How do I set that "Grouping field Nr.1" option in my code? I tried the following but it doesn't work (probably I'm doing it in the wrong place or change wrong setting...)
function MYMODULE_views_query_alter(&$view, &$query)
{
    $view_name = 'MYVIEW';
    $display_name = 'MYDISPLAY';
    if ($view->name == $view_name && $view->current_display == $display_name)
    {
        $custom_field = 'field_MYFIELD_value';

        //code piece adding this field to a view's SELECT statement, sorting by it etc

        $style_options = $view->display['default']->handler->options['style_options'];
        $style_options['grouping'][0]['field'] = $custom_field;
    }
}

Answer: function MYMODULE_views_pre_build( &$view ) {
  $custom_field = 'field_MYFIELD_value';
  $view->display[$view->current_display]->handler->options["style_options"]["grouping"] = $custom_field;
}

Answer: this worked for me in Drupal 8 https://www.drupal.org/project/views/issues/1907940
function utility_views_pre_view(\Drupal\views\ViewExecutable $view, $display_id, array &$args) {
    $view->getStyle()->options['grouping'][0]['field'] = 'field_category';
    }


How can I export an MS Outlook .pst file to Apple Mail?

Question: I want to export an MS Outlook .pst file to Apple Mail. How can I do this?
Answer: Do it via an IMAP server, which you can install on the Mac. I used dovecot, created an account on it, added that account to Outlook and just moved it all over. Then in Mail, I created the same account, and copied everything over.
I prefer this method because it completely preserves all the properties of each message, including attachments. Exporting and importing through another method (including Thunderbird) doesn't preserve everything properly.
Comment: thank for answer but now i use pop3 to get email
Comment: Irrelevant. You're setting up a mail server on your own computer for the purpose of transferring mail between Outlook and Mail.app. This has no bearing on your current email account.
Comment: +1 - This is reasonably simple to do and complete. It doesn't hurt that it's free too.
Answer: You can use Outlook2Mail. It can export mails, contacts and calendar entries.
But there are a few caveats:

12,95USD
Only U.S./English versions of Windows and Outlook are supported at this time. Little Machines does not guarantee the successful conversion of non-English characters, languages other than English and date formats outside of the United States.
You need a computer which is still running Outlook to export. You can't just copy the PST to your Mac and convert it.
Comment: slomojo, you are wrong to vote this down simply because it requires a commercial utility. People who develop commercial utilities need to make a living.
Comment: -1 - Limited and not free, just go the IMAP route.


Solutions for orphan rate in Casper PoS?

Question: What are some possible solutions to deal with the increased orphan rate when Ethereum shifts to its Proof-of-Stake system, Casper?
Comment: Why would ophan rate inscrease with PoS ?
In PoS the validator of a block is picked at random
Answer: I'm not sure that Casper will cause an increase in the number of blocks that are orphaned - and on top of that, I don't think Ethereum even really has a concept of orphaned blocks.
Because the Ethereum consensus algorithm uses a modified version of the GHOST protocol and, as a result, valid blocks are included in the chain (albeit indirectly) even if they aren't in line with of the main chain.
In PoS, I have a feeling this uncle rate would actually fall, because instead of all miners working on a block at once (and therefore possibly coming to different finalized blocks at the same time - causing uncles), validators will be stochastically chosen to create blocks during specific time intervals (leading to much less overlap).


Restore all items from Document library recycle bin

Question: Running SharePoint Online under Office 365.
Is it possible to restore all items from a Document library recycle bin? e.g. a PowerShell command? I can only see how to restore selected items.
Answer: You can loop through items in recycle bin to restore all :
<code>$recyclebinitems = (Get-SPWeb "_http://< sitename:portno >" ).RecycleBin
foreach($recyclebinitem in $recyclebinitems)
{

    (Get-SPWeb "_http://<site>").RecycleBin.Restore($recyclebinitem.ID)
 }
</code>
Ref: Restore all items from recycle bin
Edit: I missed that you are looking for MSOnline. This code is for on-prem. But may be helpful for getting insight as it works perfectly for on-prem.
Answer: You can read this article from
http://sharepointandaspnet.blogspot.com/2015/09/sharepoint-online-how-to-restore.html
The script takes the following params:
 Site collection administrator
 User name who deleted files
   Site collection url
    Timestamp of items deleted date (ex., strart 2015-09-03 00:00:00 and end date 2015-09-03 23:59:59)
The script does the following actions:
Takes  all site collection Recycle bin items and assign it into an array variable
 It sorts an array in descending using merge method (https://gallery.technet.microsoft.com/scriptcenter/Merge-Sort-for-PowerShell-e5fdf3ab) (the first record in the last deleted)
Limit deleted items count to the start date you enter in the script (ex. If recycle bin contains 8000 items from 2015-06-01 till 2015-09-09 and you want to restore items deleted for one particular day 2015-09-03, the items count will be limited to the start date)
 Checks if deleted item is equal to timestamp
Checks the user you entered in input
Creates CSV report with sorted and deleted by the user items
  Restores deleted items one by one from $csvReport filtered and sorted array with following methods
<code>                                 $_.DeletedItem.Restore()
                                 $ctx.ExecuteQuery()
</code>
Maybe you will find an answer.
Comment: Quote some of the most important parts of the article.
Answer: We ran into a very frustrating issue when one of my client's employees hard drives ran out of space, and that employee deleted all the files in his documents folder, which happened to be synchronized with Sharepoint.
55k files deleted. We could see them in the recycle bin, but could only recover ten or so files at a time. It would take years to recover at that rate!
After much fiddling - we tried using the above powershell script, tried different approaches to the web portal, talked to support - nothing yielded results until...
I found a link at bottom left of the recycle bin window that said "Open Classic Site". I clicked it, and lo and behold, through this classic site I was able to restore 200 files at a time!
It took a couple of hours to recover everything but that is less time than I lost screwing around with scripts and other methods.
Here is the difference between the sharepoint links:
Could only restore up to ten items at a time through this link:
https://(customerurl).sharepoint.com/sites/(sitename)/_layouts/15/RecycleBin.aspx?view=5
Could restore 200 at a time through this link:
https://(customerurl).sharepoint.com/sites/(sitename)/_layouts/15/AdminRecycleBin.aspx?ql=1
Hope this helps someone!


Is it possible to use an intentional plot hole as a literary device?

Question: Is it possible to use an intentional plot hole as a literary device? If not as a literary device, can you use a plot hole intentionally for other reasons? I am wondering if there are authors who use plot holes intentionally in order to achieve something.
Comment: Yes, it is possible. Yes, it has been done: https://en.wikipedia.org/wiki/Waiting_for_Godot#Interpretations
Comment: A "plot hole" used this way isn't really a plot hole anymore. It's foreshadowing.
Comment: Question is kind of vague - do you mean as a form of deliberate abstraction / surrealism / comedy?  Or in an otherwise "straight" story? Or is it that it only appears to be a plot hole, but actually serves to highlight that "all is not as it seems"?
Answer: Depends on what you mean. If there is something in the story that seemingly doesn't make sense based on the information presented to the audience, and this is deliberate to highlight some inconsistency or plot element to the audience that the characters don't see, then what you have looks like a plot hole but isn't. The truth is that "under the hood" the story is logically consistent, the characters and point-of-view just aren't showing the whole story. This would be considered foreshadowing.
Other times, entire stories have been created based on what was initially a plot hole (by which I mean a real one, not a fake one used as foreshadowing). For example the Justice League Unlimited episode "Epilogue" was inspired when fans of Batman Beyond pointed out it was genetically impossible (or at least very, very unlikely) that the blonde Warren and the redheaded Mary would produce two brunette children (because blonde or red hair only occurs with double recessive genes whereas brunette hair is the dominant phenotype). However, whereas this was a plot hole when it was first pointed out (the creators admitted they hadn't thought about the implications of that when designing the series), the subsequent retconned explanation meant it was no longer a plot hole (regardless of one's feelings on "Epilogue").
The reason I say it depends is that an actual plot hole by itself is considered a bad thing. A plot hole is a point where the story fails to follow its own presented logic and the sequence of events make no sense. An unaddressed plot hole that is never filled in is always a bad thing, because it takes the reader out of the story and makes it harder for them to follow the plot. From a logical perspective, it is a non sequitur in the argument the story is trying to make.
The only time I've actually seen a plot hole used and not filled in to become a "fake" plot hole is in comedy, in which the lack of logic is used as bathos to produce humor, as the original context of the meme below from The Emperor's New Groove provides a good example of.

What it sounds like you are asking about with your question is the first example, a "plot hole that is not really a plot hole", with the lack of explanation being a feature, not a bug. However, what is important in these cases is to make it clear to the reader that the story seemingly "jumping the track" is intended and not an accident, which can often be done by having the characters react to the so-called "plot hole" in as much confusion as the readers would be, showing that the unexpected appearance is intentional. Be warned, though, because as an author doing this means you're making a promise to your readers that eventually they will get some context as to what is going on.
tldr: "Fake" plot holes are useful literary devices, but a real plot hole that is not subsequently retconned or otherwise filled in to become a fake plot hole are almost invariably a literary flaw, not a useful literary device
Answer: Yes. There are rare cases when an international plothole can be used to show how unfathomable a character/entity or reality is.  To essentially show that both explanations can't be right....but yet they are.
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).


LEDs on TX/RX lines interfering with the programmig of the device

Question: I have recently designed a shield to my Arduino Duemilanove, which has 8 LEDs, on the digital GPIO, from 0 to 7, but it won't program with the shield on because the voltage drop is too much on the RX and TX lines. My question is: can I have a LED on the TX/RX line with a minimum resistor value that allows me to program the Arduino?
Comment: how do you have the pins configured/wired? Pullups/pulldowns? Are you sinking current or providing current to the LEDs?
Comment: I have from `digital pin 0(RX)-->330R-->LED-->GND`, and its pretty annoying on the developing fase to be constantly taking on and off the shield.
Comment: try something in the order of 5-15k and see how that goes. If brightness becomes an issue you might have to put a transistor in as well.
Answer: I just found this reference (using ICSP for output as well as programming -- essentially the same thing), and it suggests a 4.7kOhm.
I didn't have a 4.7k handy, and used a 15k instead and it works.
In my scenario, I have run a sketch with a polarized buzzer connected between RX (digital 0) and GND. When connected directly (with no resistor) the sketch fails to load (but the buzzer works as expected).
If I put the resistor in series with it, the sketch uploads without fail.
You also probably realise, but mentioning for clarity/completeness, you will lose all serial port functionality for debugging purposes and won't be able to use Serial.[anything]. Make sure to not even initialise the port.
Comment: After trying several resistor sizes i got to the smallest possible size of **470R**, now i can program whitout any problems at least for this kind of LED, it will probably change if you have an LED with a bigger voltage drop, thank you very much again for your help @Madivad :).
Comment: Oh well, that saves me from finishing this project. I was just putting together a breadboard to try different values myself. Glad I could help.
Comment: Thats some dedicated fellow :), if your interested i can show you my shield it will be shared soon on OSH Park.
Is there a way to contact people here with private messages ?
Comment: Well, I was using it as a learning experience for me as well. Which is why I answer a few XBee questions. As far as I know there is no PM system, but just below in the footer is a "chat", head over to "pin13"


Asking for a refund for a conference not attended

Question: I paid for a 3 day professional conference in March that was to be held in July. On the day I was to leave home, I became quite ill and was unable to attend. The conference registrar is refusing to give me a refund of my registration because "we held a spot for you". It cost me $450. How can I persuade them to refund my money?
Comment: You have no case here.  You canceled on the day of the event.
Comment: I suspect if you had gotten travel insurance, you might have been able to get the conference cost covered too.  But that is a lesson learned in hindsight.
Comment: I did check the cancellation policy but asked for a refund anyway. I did not have travel insurance. I did not have airline reservations as I was driving. The conference was 6-1/2 hours from home.
Answer:
How can I persuade them to refund my money?

You could ask again and say "please".
Or you could ask if they could apply all or a portion of the cost toward a future conference.
Answer: You can't. I'd put a fair amount of money that the T&Cs for the conference include details of how much of your fee you get back if you cancel at certain points before the conference, and it will be "nothing on the day of the conference or later" - if you even told them you were cancelling, which it sounds like you might not have done.
And this is the right policy for them to have. Their marginal gain from you not showing up is just about zero, but they couldn't resell your spot to another potential attendee at such short notice.
Answer: Since you asked for a refund knowing that you were outside the cancellation policy, and were declined, you have no further recourse. They fully met all their obligations.
Asking us after being turned down by them will not help.
Answer: Both of the above answers are correct (+1).  The conference spent the money on all of your training materials, facilities, speakers, A/V equipment, meals, and other expenses,  and that did not change with your not attending.
Further cancelling the day before the event did not allow them enough time to go to their potential wait list to see if another candidate previously not going could then go.
Comment: @CarolAnnRaymond The problem is that you are probably not the only no-show. Out of 500 people there are going to be multiple illnesses, family emergencies, and work emergencies. If they are going to change their policy to refund on late cancellation, it is going to cost them a lot more than your refund.
Comment: Just to clarify and respond to the last answer: No money was spent on training materials by the conference, as we were all sent  materials emails ahead of time to download and print ourselves.  If there were 500 other folks attending, how could my non-attendance have affected their budget? I just want to try and figure out a win-win situation from this circumstance by perhaps asking if they could offer registration for free at next year's event.


Are there any risks in just sshing into a compromised server?

Question: Let's say that the server is completely compromised (and the hacker has root access to the compromised server). If I ssh into the compromised server, is there any way (e.g., in the key exchange) that the hacker could gain any access to the (uncompromised) server from which the ssh is initiated?
Comment: [similar question on serverfault](https://serverfault.com/questions/510154/if-using-public-keys-only-an-ssh-client-logs-into-or-is-already-logged-into). For an example of a SSH client vulnerability, see eg CVE-2016-0777.
Answer: I would say that if you will just connect there, nothing should happen. Except you give him your IP so he can theoretically focus you. If you have correctly configured your client.
It really depends on the security of your client setup and another servers you use. If you authorize / sudo yourself using the key the probability he will be able to exploit another server is quiet low.
But many times I also saw tunelling over SSH setup in the way the servers were able to access each other over the SSH channel opened by the user. And keys were stored on "compromised server".
As I said in the beginning. It really depends on many other things, I would say, its hardly possible but not probable if other security recommendations will be followed.


Marinating venison?

Question: I have tried again and again to find a good solution to marinating venison as it never turns out right because of the natural jucies. So what is the correct process of doing this or what should i use?
Comment: Some more detail would be helpful here - I can't think of anything special about venison in particular that would make it difficult to marinate. What specifically have you tried and how has it failed to meet your expectations?
Comment: Could it be the cooking process and not the marinade? Venison is very lean and tricky to cook. What is it that you don't like in the final outcome?
Comment: @jasonwhipple Definitely could be the process; what i dont like is no matter what I use it always turns out really gamie.
Answer: In part you have to re-train your mind when eating any wild animal. It will never taste like grain fed cattle. They are wild animals and eat wild things.  Other things that could affect the taste is the processing of the deer. If not bled out very well before  butchering it could have a stronger taste to it. Also, the age of the deer can be a factor. Older deer tend to have a stronger taste.
Some things you could try are soaking it in a brine base marinade for several days in the refrigerator to let the blood escape. You can add fruit juices to this brine as well. Once you do this the silver "skin" on the muscles will become more obvious and easier to remove. Removing that skin could help a lot and make the meat more tender.
Another option is to soak it for at least 1 day in milk and seasonings. Buttermilk, low fat yogurts (even fruit flavored), or ranch dressing is also used by some people.
Lastly, always cook as slow as possible. Roasts should be done at about 275 and steaks should cook as slowly as you can. Cooking to quickly may not give the meat enough time to "bleed out" but then again, it's a balancing act because if to much of the juice comes out you're stuck with a piece of meat that is very dry.
Experimentation is the only way to perfect it for your tastes. Hope this gives you a few new idea's to try out.
Answer: As one who has harvested a fair number of deer over the years, I have determined that in order to lessen the "gaminess" taste of venison, marinating it no longer than overnight in a solution of wine (any cheap version will work) and a small amount of fruit juice like lime, lemon or even oranges, works. Just don't add too much and thin out the wine with some water unless you like meat with a heavy wine taste (I don't, personally).
The key is to not let the meat marinate too long otherwise the flesh becomes quite soft and/or mushy, taking away from the cut steak or roast consistency.
I've found that 6-8 hours is what I prefer but, again, YMMV depending on your preference.
The acidity of the wine and fruit juices work to break down the tougher fibers of the meat, but as mentioned, going too long will be counterproductive.
Also, having some of the taste of the actual venison remaining is why I enjoy the meat. After all you aren't desiring the same taste and texture of beef, are you, since that is the whole purpose of cooking venison?
Lastly, I don't have a specific recipe that I use. It all depends on what my taste buds are looking forward to and knowing how various spices and marinades interact with the meat and that comes from decades of experimentation and personal preferences.

Marinating venison?


Laravel 5.2 routing. Struggling for days now

Question: I have been sitting for days now and my routing does not want to work.
I installed Laravel on Amazon Linux AMI (about 8 times) and I CANNOT get routing to work.
I added one route to test in routing.php and this works and I see the login page:
Route::get('login', function() {
    return View::make('login');
});

I copy the same view to a users subfolder and if I do this it does not work.
Route::get('login', function() {
    return View::make('users.login');
});

Basically it looks like any subfolder I call does not work and I get a 500 error.
I have installed Laravel in the /var/www folder and changed the directory and DocumentRoot to point to /var/www/public folder.
This is my .htaccess file in the public folder:

<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

RewriteEngine On
RewriteBase /

# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Send requests to public directory...
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L]

</IfModule>

My storage and bootstrap folders does have 777 permissions.
I really need help on this one, I am out of options.
Thanks.
Comment: Try using `users.login` instead of: `users/login`
Comment: Thanks for the reply but I have :( I will just edit the post to fix it.
Comment: I opened a trial account with cloudways.com, started up Laravel, copied my stuff and the site works :)
Comment: Then it was probably a file permission issue
Comment: I triple double checked the permissions before moving, so that was not it.
Answer: I had the same problem. After many hours trying to get this done, I figured out that my .htaccess file was the problem.
Just remove any blank space and put the file in UTF8. Sometimes windows add special characters which causes the problem.


A book series about an engineer sent back in time to medieval times

Question: I am trying to remember a book series where the main character, a male engineer, is sent back in time to medieval Europe (it is a historical setting with no magic) and applies his knowledge, in the style of a Connecticut Yankee in King Arthur's court.  It was a multi-book series published after 1960, and in one of the books he makes an aircraft.  It was not a very well known series.  At least one of the books' titles was in the format "The Blank Knight" or "The Knight of Blank".
Answer: This sounds like The Cross-time Engineer by Leo Frankowski. #4 in the series is The Flying Warlord; #2 is The High-Tech Knight.
If I remember correctly it is inspired by Lord Kalvan of Otherwhen.
Comment: Fair warning that a lot of fans of the series felt that the quality dropped after the fourth book.
Comment: @InTheAbsenceOfFear: True. I mainly felt like the stakes changed massively when it went from "Conrad brings modern technology through intelligent use of modern design" to "Time travelers cave in and just make everyone resistant to all diseases" to "Conrad survives a shipwreck by suckling on the breast of his decapitated servant".
Comment: @InTheAbsenceOfFear: Anne McCaffrey managed to maintain consistent literary quality over fourteen *Pern* books mainly by setting low expectations from the beginning.
Comment: And book 2 is called "The High-Tech Knight"
Comment: Its Leo Frankowski, but otherwise right on.
Comment: @FuzzyBoots How often do authors manage to retain the same quality for a series of eight or nine books?
Comment: @A.I.Breveleri and they won Hugos!
Answer: As already answered, this is probably Leo Frankowski's Cross Time Engineer/Conrad Stargard series. But if it isn't, then it could also be a much older book:
L. Sprague de Camp's Lest Darkness Fall
I seem to recall that this story sends the modern man (an archaeologist, rather than an engineer) back to ancient Rome, but if you liked one, you'll probably like the other.
Answer: Might be "A Connecticut Yankee in King Arthur's Court" by Mark Twain too. Has the plot you described. An oldie but a goodie.
Comment: [AlanT's answer](https://scifi.stackexchange.com/a/262968/122024) (of _The Cross-Time Engineer_ by Leo Frankowski) was already [accepted](https://scifi.stackexchange.com/help/accepted-answer) by the OP, as denoted by the green check mark to the left of it. Also, the [question](https://scifi.stackexchange.com/q/262967/122024) cites _A Connecticut Yankee in King Arthur's Court_ as being similar in style to the story the OP was looking for, which would suggest it's not the actual story. Not to mention that that protagonist in _A Connecticut Yankee in King Arthur's Court_ is not an engineer.


Testing my HB-1B QRP CW Transceiver on 40m

Question: I'm a new ham and have only used 2m/70cm so far. I have recently completed a QRP CW setup: a YouKits HB-1B transceiver and a simple wire dipole. I haven't made any contacts yet, and I'm wodering if the radio is even working. A SWR meter shows power to the antenna when keying, but an HF radio nearby is only registering clicks. My question is twofold: how far away would a HF-SW radio have to be from the transmitting antenna to hear a clear groundwave CW signal on 40m, and is there a better way for me to test my rig if I still haven't made any contacts?
Comment: If you are hearing clicks in a receiver, I would have to ask what "mode" is that receiver set to.  By mode, I mean CW, USB, LSB, AM, etc.  It should be in CW mode.  If the receiver is older than you may have to adjust the BFO to hear the CW tone.  You adjust to please your ears (mostly).
Comment: I found that either the receiver I'm using or the transmitter is "off" by about 1 kHz. I'm able to hear my CW tone on the receiver now. Next, to figure out if there is some adjustment I can make to actually be transmitting on the frequency I'm seeing on the HB-1B's display.
Comment: You might want to verify which radio is off by 1 KHz:  the transmitter or the receiver.  Do you have a nearby friend who can listen in on the signal?
Comment: If you key the transmitter continuously, does the SWR meter register a (reasonably) constant output power? If it does, you are transmitting *something* on *some* frequency. Next step: call CQ! That's exactly what it's for. 40 meters is good at local grayline to nighttime.
Answer: Call CQ, preferably using a keyer, and see if you are spotted by the Reverse Beacon Network.


A better definition of InfinitePlane

Question: Is there any reason why an InfinitePlane needs a point and two vectors? One would be sufficient. (The one perpendicular to the plane)
Comment: As noted in the answer below, you can use `Hyperplane` if you have a normal vector `n` and point `p`. An equivalent form would be `InfinitePlane[p, NullSpace[{n}]]`.
Comment: Because in **more than three dimensions**, a normal and a point do not uniquely determine a plane.
Comment: Possible duplicate of [How can I create a plane using a point and normal vector?](https://mathematica.stackexchange.com/questions/161205/how-can-i-create-a-plane-using-a-point-and-normal-vector)
Answer: You can think about it like this: If you have only one vector, you can rotate the plane around this vector and it would still be valid. Your point would lie on the plane and the vector would point along the plane. You would get infinitely many planes that match this description.
Please see here for more details.
Comment: @J.M. Exactly, they are equivalent for $n = 3$. That is what I was hoping to confirm. Consequently, WRI could have supported the point + normal syntax for `InfinitePlane`, as they did for `Hyperplane`, if they wanted to, they just chose not to.
Comment: Since the plane is infinite, orientation doesn't matter, they will all be the same plane regardless of how you turn it about the axis, I think. Also, consider `Hyperplane` which works the way OP suggested. You could say the same about the hyperplane, so why does this work for `Hyperplane` and not for `InfinitePlane`?
Comment: In $n$ dimensions, `Hyperplane[]` is $n-1$ dimensional, but `InfinitePlane[]` is always two-dimensional. It is a fortuitous coincidence that these two concepts are equivalent when $n=3$.
Comment: Allright, I now take the cross product of my perpendicular vector with  {1,0,0} and {0,1,0} and my school geometry tells me that this should work.
Comment: @C. E., I agree that it was a deliberate choice to keep the concepts separate.

A better definition of InfinitePlane


How to see the process table in unix?

Question: What's the UNIX command to see the processes table, remember that table contains:

process status
pointers
process size
user ids
process ids
event descriptors
priority
etc
Comment: You can run: `man ps`
Comment: What exactly do you even mean by "pointers" and "event descriptors"? Is this a list you've copied from somewhere, or are you just guessing at what the process table should contain?
Answer: The "process table" as such lives in the kernel's memory.  Some systems (such as AIX, Solaris and Linux--which is not "unix") have a /proc filesystem which makes those tables visible to ordinary programs.  Without that, programs such as ps (on very old systems such as SunOS 4) required elevated privileges to read the /dev/kmem (kernel memory) special device, as well as having detailed knowledge about the kernel memory layout.
Comment: But the command to list the processes is `ps`; on Linux, you could also use `top` or `htop` and all of them are accessing `/proc/`
Comment: I did mention ps (the most common example).  top would be similar.  In a quick check of HPUX though it has no /proc, ps and top are not setuid (something to check further).  So I changed that to SunOS 4 :-)
Answer: Your question is open ended, and an answer to a specific question you may have had can be looked up in any man page as @Alfasin suggests in his answer.  A lot depends on what you are trying to do.
As @ThomasDickey points out in his response, in UNIX and most of its' derivatives, the command for viewing processes being run in the background or foreground is in fact the ps command.
ps stands for 'process status', answering your first bullet item.   But the command uses over 30 options and depending on what information you seek, and permissions granted to you by the systems administrator, you can get various types of information from the command.
For example, for the second bullet item on your list above, depending on what you are looking for, you can get information on 3 different types of pointers - the session pointer (with option 'sess'), the terminal session pointer (tsess), and the process pointer (uprocp).
The rest of your items that you have listed are mostly available as standard output of the command.
Some UNIX variants implement a view of the system process table inside of the file system to support the running of programs such as ps.  This is normally mounted on /proc (see @ThomasDickey response above)
Typical reasons for understanding the working of the command include system-administration responsibilities such as tracking the origin of the initiated processes, killing runaway or orphaned processes, examining the file size of the process and setting limits where necessary, etc.  UNIX developers can also use it in conjunction with ipc features, etc.  An understanding of the process table and status will help with associated UNIX features such as the kvm interface to examine crash dump, etc. or to get or set the kernal state.
Hope this helps

How to see the process table in unix?