Is Cyclops' mutant power just an organic version of Iron Man's repulsor tech?

Question: They occupy the same universe so we have to assume the same physics apply. Iron Man's repulsor tech is described as an inertia-less one-way kinetic blast. At higher energy levels, it can can even disintegrate matter in front of it. Cyclops' eye beams are described exactly the same way. Is there any place in comics or the animation where the two beams are shown to have different powers?
Comment: Cyclops does not use the ruby quartz to fire his optic blasts. The ruby quartz is to *PREVENT* the optic blasts from firing.
Comment: The "X-Gene" is not a traditional gene, it is a DNA change or anomaly. Regardless, even if you say "a gene is responsible" for his optic blast, it doesn't  mean the gene is creating it, it is responsible for the faculties that manifest it. Iron Man certainly can't embed some genes into his suit and expect it to shoot optic blasts. You can't fly using a blueprint for a jetpack, you need to make the jetpack.
Comment: It's never shown what biological anomaly causes Scotts eyes to shoot an "optic blast". All we know is that he uses a Ruby-Quarts lens. Iron man does not appear to use any Ruby in his lensing.
Comment: @GorchestopherH we know the biological anomaly, it's called the X-gene. At least that's what I thought, I will admit that X-men has always been a hard book for me to get into.
Comment: They don't have the same special effects so they're probably not the same. Even though energy projecting superheroes are one of the main types so it's not unusual to expect that they're each unique.
Comment: Well it's a fact that Cyclop's optic blasts have no heat, just force.  Do the Repulsor's generate heat?
Comment: @phantom42 Of course. What I'm saying is: The ruby-quartz lens is the only known non-biological faculty interfacing with the beam. Iron Man does not employ this faculty. Regardless of its function, Iron Man is not using the only non-biological link in the chain.
Answer: No, Iron Man's repulsor technology and Cyclops' optically-directed ruby beam (called his optic blast) are not the same effect even though there are potential similarities in the types of damage they may both produce.
Iron Man's repulsor is a particle beam.

Iron Man repulsor technology is a particle beam weapon with explosive and concussive effects. These effects include knockback, explosions and burn effects. The repulsor has been used as a navigational aid, directing Iron Man during flight operations. The technology evidently creates more energy than it uses since Stark plans to use it and the arc reactor energy technology to generate fossil free energy.

The repulsor technology has also been used as a weapon, able to damage, concuss or destroy matter in its path. Repulsors have an electromagnetic signature and actively interact with matter in a physical process. Some descriptions describe a neutron interaction, others describe a more plasma-driven effect.

Since Stark Industries has been destroyed in the recent Iron Man Disassembled storyline, he is starting a new enterprise, Stark Resilient, which promises a business model focused on fostering international cooperation and ushering in an era of world peace. How does he arrive at this goal? Simple. By providing the world with an alternative energy source, his patented repulsor technology, Tony hopes to one eliminate Earth's dependence on fossil fuels.

Tony Stark about to try and release repulsor technology to the world as a fossil free energy source.
The mutant Cyclops' energy beam is an extra-dimensional kinetic force beam with concussive effects.

Cyclops' optic blast does not function in any way similar to repulsor technology with one exception: the optic blast can smash and compress matter in a fashion using concussion effects that resemble an explosion in terms of the type of damage dealt to the target.

The optic blast does not have a radiation signature. Nor does it emit infrared radiation or heat of any kind. It's only concession to resembling radiation as we know it, is that it travels at the speed of light and appears to be a beam of powerfully bright, red light. (referenced from a cross-over between the Fantastic Four and the Xmen).

Cyclops also has an extreme range of precision and control rarely seen with repulsors. Cyclops can spread the beam widely, blanketing an area 90 degrees in front of him. He can also tighten the beam and make it precise enough to snuff a candle without damaging anything else in the room.

The optic blast, while emitted from the eyes of Cyclops does not originate from him, nor is it "energy" in the classic sense. His eyes act as a portal to a dimension filled with the ruby "energy" and Cyclops acts as a release valve into our universe with devastating results.

The optic blast has a curious ability not possessed by repulsors. Cyclops can use the beam to carom off of various surfaces striking more than one target with the same beam. His ability is augmented with Cyclops curious sense of spatial awareness allowing him to do this using surfaces which should normally not have this potential.

Cyclops ricochets his optic blast destroying multiple targets.
That these two powers have similar effects has less to do with the source and more to do with the depiction of the effects of the damage. To the average viewer, the concussive force of a repulsor and the knockback ability of Cyclops' optic beam would seem very similar despite their completely different physical origins.
Comment: Stark's weapon DOES produce particle and radiation damage. Cyclops' optic blast does not. The damage done is purely kinetic in nature. The visor is necessary to control all aspects of the beam's intensity, width, and longevity. Due to the damage his brain has suffered, he cannot control any aspect of the optic beam without his visor. As far as its been shown without his visor its all or nothing.
Comment: No. We are never privy to him trying to figure out how much energy is there. As far as he could tell, there is no effective limit. There have been occasions where he has tried to see how long he could use his powers. He fatigued and never noticed a reduction in output.
Comment: So neither blast produces burns or radiation damage (as would be caused by high energy particles and ionizing radiation)? Does that mean all damage is done through kinetic energy or is it some sort of unknown psionic effect? Also, does he use his visor to focus/diffuse/modulate the beam or is this an innate ability his eyes possess?
Comment: As posted above , his eyes act as a portal to a dimension filled with the ruby energy , does cyclops ever think that the energy will ever run out ? has he measured it like someone checking for oil in the ground??!

Is Cyclops’ mutant power just an organic version of Iron Man's repulsor tech?


Android - Google Play Billing Library error in production

Question: I have an Android app released on the Google Play Store, and last week I released a new update, just to fix some small issues. Starting with the day when I added the updated version on the Play Store, I could see on Firebase Crashlytics that there are issues when someone is trying to purchase an app feature.
Before I released the updated version in production, I added the app on the Alpha Testing so I can make sure that the InAppPurchase work, and it does.
When someone else is trying to purchase an app feature I can see that this Fatal Exception is thrown:
Fatal Exception: java.lang.IllegalArgumentException: SKU cannot be null.
   at com.android.billingclient.api.BillingFlowParams$Builder.build(com.android.billingclient:billing@@3.0.0:23)

The SKU's are still active on my "Managed Products" list.
This is the code that I use to initialize the billing client (within a fragment):
        billingClient = BillingClient.newBuilder(getActivity())
            .enablePendingPurchases()
            .setListener(purchasesUpdatedListener)
            .build();

This is the code that I use to start the connection:
billingClient.startConnection(new BillingClientStateListener() {
        @Override
        public void onBillingSetupFinished(@NonNull BillingResult billingResult) {
            Log.d(TAG, "Connection finished");
            if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK) {
                // The BillingClient is ready. You can query purchases here.
                List<String> skuList = new ArrayList<>();
                skuList.add("unlock_keyboard");
                SkuDetailsParams.Builder params = SkuDetailsParams.newBuilder();
                params.setSkusList(skuList).setType(BillingClient.SkuType.INAPP);
                billingClient.querySkuDetailsAsync(params.build(),
                        new SkuDetailsResponseListener() {
                            @Override
                            public void onSkuDetailsResponse(@NonNull BillingResult billingResult,
                                                             List<SkuDetails> skuDetailsList) {
                                // Process the result.
                                if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK && skuDetailsList != null) {
                                    for (Object skuDetailsObject : skuDetailsList) {
                                        skuDetails = (SkuDetails) skuDetailsObject;
                                        sku = skuDetails.getSku();

                                    }
                                    Log.d(TAG, "i got response");
                                    Log.d(TAG, String.valueOf(billingResult.getResponseCode()));
                                    Log.d(TAG, billingResult.getDebugMessage());
                                }
                            }
                        });
            }
        }

This is the code that I use to handle the purchase:
PurchasesUpdatedListener purchasesUpdatedListener = new PurchasesUpdatedListener() {
        @Override
        public void onPurchasesUpdated(@NonNull BillingResult billingResult, @Nullable List<Purchase> list) {
            if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK && list != null) {
                for (Purchase purchase : list) {
                    handlePurchase(purchase);
                    Log.d(TAG, "Purchase completed" + billingResult.getResponseCode());
                }
            } else if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.USER_CANCELED) {
                Log.d(TAG, "User Canceled" + billingResult.getResponseCode());
            } else if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.ITEM_ALREADY_OWNED) {
                if ("unlock_keyboard".equals(sku)) {
                    KeyboardAlreadyPurchasedConfirmation();
                }
                Log.d(TAG, "Item Already owned" + billingResult.getResponseCode());
            }
        }
    };

In order to launch the billing flow, the user must click on a button within a dialog. Here is the code:
        builder.setPositiveButton(
            getString(R.string.purchase_keyboard),
            new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int id) {

                    sku = "unlock_keyboard";
                    BillingFlowParams flowParams = BillingFlowParams.newBuilder()
                            .setSkuDetails(skuDetails)
                            .build();
                    billingClient.launchBillingFlow(Objects.requireNonNull(getActivity()), flowParams);

                }

            });

In the previous version of my app, this situation never happened, it just started after the new update. I'll just need to know what can cause this issue, could it be a problem with my code or just a issue with Google Play Services? I'll have to specify that this was happening on different devices with different Android versions.
Thanks a lot in advance.
Comment: remove   .setSkuDetails(skuDetails) and add  .setSku(YOUR_SKU)
        .setType(BillingClient.SkuType.INAPP)  to your flowParams
Comment: do you have items on List skuDetailsList?
Comment: Do you have solved the issue? I have the same problem. For me it started to occur after I upgraded Google Play Billing library to version 3.0.
Comment: Unfortunately I did not solve the issue yet. I tried many different things like removing the app from some countries thinking that it might be just a problem with the Google Play Service that is no longer working for those countries but that solution did not work. The thing is that a few users were able to purchase the products after I upgraded Google Play Billing library to version 3.0. So this makes me think that the issue is not with my code, it's just an issue with the Google Play Billing library, an issue that no one from Google is informing us about, which is very disappointing.
Comment: any solution for this?
Comment: Unfortunately I couldn't find any solution to fix this issue. I tried different things, neither work. What's so sad is that these errors impact the user experience. The app crashes sometimes when users click on the "Purchase this item" button and because of that I start getting negative reviews. I'm thinking of removing the Google Billing Library from my app at least for now just to improve the user experience. If anyone will have an idea about how this issue can be fixed please leave a comment here. As I see, I am not the only one who is interested to find out how to fix this issue
Answer: I have not solved the issue yet but I found a way to reduce the numbers of errors generated by this library upgrade.
What I did was to downgrade the Google Billing Library from version 3.0.1 to version 2.1.0 and even though I still get some errors in Firebase (SKU is null), the majority of users are now able to purchase the products.
Also, I implemented a method that is called whenever the Google Billing library connection cannot be started when the activity is first opened, so more exactly this is restart billing connection method.
I would recommend you to try the same thing at least for now if you are experiencing the same issue because it seems that the Google Billing library still has some issues that need to be fixed.
1. In  build.gradle(app) add this line:
implementation 'com.android.billingclient:billing:2.1.0'

2. Add the BILLING permission in AndroidManifest.xml file because the older versions of this library still require it:
<uses-permission android:name="com.android.vending.BILLING" />

3. Create a restart billing connection method:
public void restartBillingConnection() {
    billingClient = BillingClient.newBuilder(Objects.requireNonNull(getActivity())).enablePendingPurchases().setListener(ChooseOptionsFragment.this).build();

    billingClient.startConnection(new BillingClientStateListener() {@Override
    public void onBillingSetupFinished(@NonNull BillingResult billingResult) {
        Log.d(TAG, "Connection finished");
        if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK) {
            // The BillingClient is ready. You can query purchases here.
            List < String > skuList = new ArrayList < >();
            skuList.add(ITEM_SKU_AD_REMOVAL);
            SkuDetailsParams.Builder params = SkuDetailsParams.newBuilder();
            params.setSkusList(skuList).setType(BillingClient.SkuType.INAPP);
            billingClient.querySkuDetailsAsync(params.build(), new SkuDetailsResponseListener() {@Override
            public void onSkuDetailsResponse(@NonNull BillingResult billingResult, List < SkuDetails > skuDetailsList) {
                if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK && skuDetailsList != null) {
                    for (Object skuDetailsObject: skuDetailsList) {
                        skuDetails = (SkuDetails) skuDetailsObject;
                        sku = skuDetails.getSku();
                        String price = skuDetails.getPrice();
                        if (ITEM_SKU_AD_REMOVAL.equals(sku)) {
                            skuPrice = price;
                            BillingFlowParams flowParams = BillingFlowParams.newBuilder().setSkuDetails(skuDetails).build();
                            billingClient.launchBillingFlow(Objects.requireNonNull(Objects.requireNonNull(getActivity())), flowParams);
                        }
                        else {
                            Log.d(TAG, "Sku is null");
                        }

                    }
                    Log.d(TAG, "i got response");
                    Log.d(TAG, String.valueOf(billingResult.getResponseCode()));
                    Log.d(TAG, billingResult.getDebugMessage());
                }
                else if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.ERROR) {
                    Toast.makeText(getActivity(), "Error in completing the purchase!", Toast.LENGTH_SHORT).show();
                }
            }
            });
        }

        else if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.SERVICE_TIMEOUT) {
            Toast.makeText(getActivity(), "Service timeout!", Toast.LENGTH_SHORT).show();
        }
        else {
            Toast.makeText(getActivity(), "Failed to connect to the billing client!", Toast.LENGTH_SHORT).show();
        }

    }@Override
    public void onBillingServiceDisconnected() {
        restartBillingConnection();
    }
    });
}

4. Make sure that this method is called when the Google Billing service gets disconnected:
@Override
    public void onBillingServiceDisconnected() {
        restartBillingConnection();
    }

Hope that this solution will help you to fix the issue for now. If you will have another way to have it completely fixed please leave an answer in this post.
Answer: I had the same or maybe just a similar problem. But I have found the reason in my case. I could reproduce it in the following way:

Disable internet connection
Reinstall the app
Try to start the In-App purchase like described here: Link

Seems to be similar to your routine

The querySkuDetailsAsync returned null for every item and when initiatePurchaseFlow is called null is passed to it and the BillingFlowParams.Builder. I assume that that has changed and before it did not throw the Exception but just handled it differently. I fixed this now by checking if the item in the Map is null and then I display a warning that an Internet connection is required.
Answer: I believe this may be occurring due to concurrency (ie: buy button being hit twice).
Try disabling the "buy" button while the whole billing flow is running.


How can you repair split wood that cannot be moved?

Question: My goal is to install a new set of blinds in an existing window. It looks like a former owner tried to do the same thing and split the wood on the side of the window casing. Unfortunately the location of the split is exactly where I need to screw into. There are plenty of videos out there on how to repair split wood, but I can't figure out how to do it without removing the window. I'm not excited to go down that road - any other suggestions?
Comment: It looks like the existing shade holder was mounted in the sash channel...where the window slides up and down.   That isn't right.
Comment: @BenS  That's always a hard call.   Still, I'd epoxy it and then drill a lead hole of a size just shy of the intended screw.   Epoxy is pretty strong, G
Comment: @GeorgeAnderson I'm worried about epoxy, because although that would fill the gap I wonder if driving a screw afterward would still put pressure on the wood and re-split it? I dont know, maybe that's a silly thing to worry about
Comment: You probably need to clamp the wood down after you glue it (epoxy or other), so that it has its original width again afterward.
Comment: Yes, a pic would help.  But my first suggestion is filling the crack with epoxy.   Others here may have a better solution.
Comment: Can you take a picture that's a bit further zoomed out?
Comment: @SteveWellens it's not in the sash channel, it's on the piece of wood in front of that.
Comment: @BenS Isn't that the rope pulley for the sash weight right under the holder?
Comment: @SteveWellens Ahh, that's not the holder for the blinds I was talking about (though maybe that's a really old one!). The most recent holder for the blinds was removed for the photo but attaches to the piece of wood where the holes are.
Answer: Option 1
You don't have to repair the holes.  Use longer screws that go all the way into the framing and hold the blinds' brackets solidly.   For blinds that will be yanked and handled constantly that's the better thing to do anyway.  After mounting the brackets you can decide whether to superficially fill and stain the holes.   I think filling will look worse because a certain amount of damage such as yours is part of the vibe of an old house.  Besides, it'll be hidden by the blind whether closed or open.
#6 screws should be thin enough to go through the existing holes without causing more damage.    If you put a screw where there isn't already a hole, drill a hole 1/2 inch deep and big enough for the screw to pass through the sash stop (trim) without turning.
A #6x1-1/4" screw will pass through the sash stop (your damaged piece) and fasten to the jamb (the window frame) assuming that isn't also damaged.  A #6x3" screw will pass through both of those, through any gap behind them and into the wall studs enough to make a solid hold.
Option 2
Drive a couple of screws half way into the frame a little to the right of these holes.  This provides a way to use a clamp.  Inject good wood glue into the cracks, clamp it down (using the half-inserted screws) and let dry.
Then for the holes you intend to use for the new brackets, drill them out to a consistent with where you can insert a dowel.  Glue the dowel in, then predrill for your brackets.    Finally fill the other holes and any remaining cracks with wood filler then stain.   But you know what?  It'll look bad, and even if you do all this you still ought to use longer screws that drive all the way into the framing .... so why bother?
Comment: Option 1 is perfect, I don't care about the holes just need to install these blinds! Thanks for the idea
Answer: Who says that piece of wood can't be moved?
That looks like a standard piece of window sash stop. Right next to the top hole is a hole from the nail that holds it on. If you look down the trim, you'll find several more nail holes. It would be easy to gently pry the sash stop off of the window frame to fix it. All you'd need is a stiff putty knife to slide under the edge and gently pry up right by the nails. Once you've got it started, you can use a larger tool to finish the prying.
Once you have the stop off, use wood glue injected into the crack (you'll have to pry the split apart to gently open the crack to ensure glue gets into the split, and doesn't just sit on top), then clamp it very tightly closed until the glue sets - probably 1-2 hours, check the instructions on your glue.
Once the split is repaired, you have options for dealing with the screw holes:

Insert some small hardwood dowels and glue them in place. This will give you a good solid bit of new wood to drill a new hole and for the new screws to bite into
Use epoxy to fill the holes. Once it's fully set, you should be able to drill a new pilot hole and drive your screw into it. If you can't find dowels the size of the existing holes, you can make the holes larger with a drill bit to match the size dowel you can find.
Use tooth picks and wood glue to fill the hole. Usually, this is best done with the trim back in place. Squirt some glue into the hole. Add 2 or three tooth picks. Drive the screw into the hole. Wait for the glue to set up. Remove the screw. Cut the tooth picks flush. Mount the new blind.

Of course, once you've got the trim off, you could go down to your local wood supplier (you may have to go to a lumber store or woodworker's supply store, this might not be a common trim piece to find at a big-box store) and pick up a new piece of window sash.
If you go this route, you'll have to stain it to match, and that can be a bit of an art as much as science. However, you'll have a brand new, solid piece of trim to hold the new screws.

Whichever method you choose, your best bet is to pre-drill pilot holes for the screws as you install the new blinds. That will go a long way to ensuring the wood doesn't split again.
Also, as noted in other answers/comments, use longer screws (and a deeper pilot hole) to get the screw mounted into the window frame and possibly the house frame and not just in the trim piece.
Comment: Toothpicks + wood glue is a cheap and easy solution here
Comment: Noted that OP has said that it's more important to install the blind than to fix the damage, but the photo suggests that the whole thing is basically just several layers of poorly-matched moulding any one of which may be removed and repaired or replaced.
Answer: I would make sure the holes and the cracks are clean, then glue and clamp.
You might have to be creative with a clamp - one possibility is to have a large or long bar across the front of the window and a smaller one behind to pull the gap closed. Some long screws needed.
Comment: And after you used whichever filler you applied, predrill the holes (again) so you won't reintroduce the split.
Answer: Use old hole.
You could put some of these in.

Then screw into them.  You could use longer screws that go all the way to the bottom of the hole and into the wood there.  You could do both of these things.
Or instead of a plastic anchor you could find a bunch of long slivers of wood that you have lying around (scraps, dowels, popsicle sticks, split pieces of firewood) and tap them them into the hole, maybe with some glue or maybe not if you have no glue.  Then screw into that.

Fooling with the holes might force the split larger.  Glue in the split and clamps for the split is a good idea.  Some long thin screws perpendicular to the split and traversing it from the side next to the metal hardware will hold the split shut forever.  Drill pilot holes for those long thin screws.
Comment: Is it not likely that hammering in the plastic anchor is likely to split the trim piece further? Also, with the anchor taking up most of the space in the existing hole, the mounting screws would have to be smaller to fit into the anchor, no?
Comment: This answer would be OK if it was more like "Drill the hole larger (the exact size of a dowel), coat a dowel and the hole sides with glue, and tap it in, wait for it to dry, pre-drill the hole (because you're now screwing into end grain) and wind a cutting screw (or a screw you've ground a flat spot into, at the tip) into it.." .. could also skip a bit of the messing around if you have a plug cutter and can fill the hole with a side-grain plug (but I'd still at least pre drill it before screwing).. Using plastic anchors that rely on forcing the surrounding material apart = problem..
Comment: @FreeMan - yes, fooling with the holes could force the split larger.  Best to fix that first.   Re taking up space - I get the impression that screws cut their way into those anchors and push their material laterally against the walls of the hole.


Are design patterns paradigm specific?

Question: I've been looking alot into design paterns lately, and really took in O'Reily's Head First Design Patterns.  The languague the book chooses to use, however, is Java where I mainly work in .Net.  There's actually a post on SO that talks about the book being addapted to c++ with little to know propblems, and I find that many of patterns shown for Java can also be used in other OO languages like .Net or C++.  Granted, when I hear design patterns, I assume object oriented languages.  But I realize that design patterns exist across other paradigms like procedural oriented languages, etc.  Is it safe to assume that design patterns are paradigm specific as opposed to being technology specific?  Are there paterns that work for Java that don't for .Net?
Answer: Design patterns are common solutions to problems that arise from degenerate problem-solving strategies and poorly designed languages. The design patterns you're familiar with are specific to the mischaracterisation of the object-oriented paradigm embodied by Java, C#, and many other languages. So yes, design patterns are paradigm-specific.
Answer: Almost all the design patterns are builded with consideration of OOPs funda. So, we can implement design patterns in any language that supports basic oops property.
In short it is not language or framework specific. It is just blue print which can be followed to build any kind of building(Keep in mind OOPs basic properties).

Are design patterns paradigm specific?


TFS Query for Individual Daily Completed Work

Question: My company uses TFS to manage our Agile workflow.  I would like to build a TFS query that will show which individual team members reduced the Remaining Work field on Tasks assigned to them.  Alternatively (or in addition) I'd like to build a query to show which individual team members increased the Completed Work field on Tasks assigned to them.  Is this possible in TFS?
Answer: I think that because you cannot have time based statements in your query (what was the Remaining Work yesterday, for example) you are not going to be able to compare a field from today with a field from yesterday.  TFS simply does not have this capability (at least in the web access view).
Comment: Sadly, TFS is lacking in the ability to compare state from date to date, as you have said.  I feel sorry for anyone who has to use it.  Jira is an infinitely better choice.


How to erase stored data in MRAM memory devices

Question: When searching in Google about MRAM I was only able to find the reading and writing process for MRAM.  How does erasing happen in MRAM?  Also why there is no need of error correction and checking algorithm in MRAM?
Comment: Dis you consult the relevant datasheet?
Comment: I'm not sure enough to post as an answer, but I believe like RAM it's byte addressable and has no endurance converns so you can just write zeros (or whatever else) to erase it just like you do with RAM.
Comment: What @PeterJ says is absolutely possible. However, there might be a single erase instruction which would be faster.
Answer: Writing is functionally equivalent to erasing.
Depending on the physical construction, writing may actually be a two step process, where the first step resets the memory to a "cleared" state, and the second step "sets" some of the bits.
Whether the state of a "cleared" bit is 0b11111111 or 0b00000000 is dependent on the specifics of the hardware.
Some memory, like flash, can only erase large sections of memory at once, so the process for "writing" to a byte may actually involve reading, and then storing a large section (It can be upwards of 512 bytes! This is called the "Page size"), and then updating the stored data (which is likely held in SRAM) with the new value, and then writing the updated data back to the page.
Anyways, from an IC-level perspective, this is largely irrelevant -
To "erase" something in the MRAM, you simply overwrite it with a new value.
If you want to make the erase option a separate step, simply write 0b00000000 or 0b11111111.
Comment: You might want to address the ECC aspect--that, like NOR Flash, MRAM is more resilient than NAND Flash (a trade-off with density), I seem to recall reading that even reads can risk disturbing some NAND Flash.  I think MRAM is also less vulnerable to radiation single-event-upsets (which--plus working as single universal memory, persistent and random access read-write, thus reducing weight and possibly failure modes--makes it more attractive for aerospace applications).
Comment: On large-block flash devices, writing a byte would not generally require reading, updating, erasing, and rewriting such a large section.  More typically, data would be subdivided into relocatable pages of around 512 bytes which would be read or written as a unit.  When a page is written, the system finds a blank page, writes the page there, makes note of its new location, and marks the old page as having been superceded.  If no blank pages are available, it may be necessary to copy data out of a block and erase it, but one can choose for that purpose a block whose pages have mostly...
Comment: ...been superceded.  If one wants to avoid a long worst-case update time, one could have each page write also consider moving a block from a page that contains a lot of dead pages to a fresh block, so that by the time there were no blank pages available, there would be a block which contained nothing but superceded pages. [note: I've generally seen "page" used to refer to an area of memory that may [or in some cases must] be written as a unit, and "block" used to refer to an area of memory that must be erased as a unit.


Check retaining wall drawing

Question: Wondering if I can have people's thoughts on this retaining wall I'm building. It's a mortared CMU wall with rebar 24" o.c. It's on a slope and it will have a concrete slab and a fence right above the backfill. Above we'll have a combination of foot traffic, outdoor dinning area, outdoor sitting area (with outdoor sectional), etc. Taking that into account, from the drawing does this look like it's a sound and strong enough wall to hold the conditions above? Thanks!!
Comment: What are the qualifications of the person that drew it?
Answer: There are too many unknowns to answer this question. What type of soil is there so a reasonable active pressure, passive pressure, and sliding resistance can be determined? What surcharge is on the 7" slab? How far from the face of slope is the wall located? What is the frost depth? What type of masonry? Grout? Mortar? Reinforcing?
This wall is high enough that a building permit and engineering is required. Do not attempt to design it yourself.  Without all the answers to the above questions, I already know whoever drew the detail is not qualified. The vertical reinforcing is too far apart, and it all should be located on the tension face (soil side) of the wall. There is also a need for horizontal reinforcing in the wall, and vertical and horizontal reinforcing in the footing key. Sorry, but spend the extra bucks to get it designed right.
Answer: My gut would be happier if the footing went back (right) further, but my gut isn't going to beat a licensed civil engineer, if one designed it.
Retaining walls are trying to overturn (fall down to the left in this picture.) If there's no particular need for it to be vertical, a few degrees of slope into the hill (bottom a bit left, top a bit right) helps to make it more difficult to overturn, too.
I question moving the vertical rebar to the outer side of the core at the second block - rebar holds tension, and the tension is going to be towards the backfill as it tries to push the wall over.
If all the soil to the right is backfill, I'd prefer to see drain lines extending into it. I'd also like to see one at the lower front (left) edge of the footing.
You'll have a fun time compacting that much fill enough that the slab on top isn't sitting over a void after a while, unless you can wait through a winter to help settle it before pouring the slab.

Check retaining wall drawing


Are "Balls in Bins" and "Stars and bars" the same?

Question: I want to know that if Balls in Bins and Stars n Bars problems in combinatorics are similar?
Can we reduce one into other? How?
How can they be mapped to each other?
Comment: Balls in bins is a general class of problems. For a finer classification see Wikipedia, The Twelvefold Way. Stars and Bars is helpful in solving some of these.
Answer: They are similar concepts in the sense that they both help you visualize and derive some combinatorial theorems. In some cases one is more suitable than the other.
Think for example a stars and bars representation:
$$
\star \star \star |\star\star || \star
$$
You can think of that as having $6$ balls divided into $4$ bins: the first bin has $3$ balls, the second $2$, the third is empty and the fourth has $1$ ball.
In that sense, the two representations are similar.
At the same time, however, the previous stars and bars representation also induces a labeling on the bins -- it is the first bin that has three balls, and it is the third bin that is empty -- while the balls are unlabeled. If we want to find in how many ways we can partition the $6$ balls into the $4$ bins, we would have to clarify whether the balls are indistinguishable and the bins are labeled (i.e. whether the partition $3,2,0,1$ as above is different than $2,0,1,3$). If yes, then the stars and bars representation comes handy for this problem.
Answer: The "balls in bins" problem is a "word" problem. Let $\Lambda$ be our alphabet. So we have a finite set of characters. For example, take the capital letters of the English alphabet as an example. We are constructing strings or "words" from these letters. So if we have an $n$ digit string, how many possibilities do we have?
There are $26$ capital letters and $n$ spaces. So the first space has $26$ options, the second space has $26$ options, etc. Each space is chosen independently of the other spaces, so by rule of product we multiply, to get $26^{n}$ as our count.
With the balls in bins analogy, the "bins" are the slots for the letters and the balls are our characters. So we could have red and blue balls, and $10$ slots. Each slot can have either a red or blue ball, giving us two options per slot. By rule of product, we multiply, as each bin gets a ball independently of the others. This gives us $2^{n}$.
Notice with "balls in bins" that ordering matters. So $RBR \neq BRB$ if you have red and blue balls. With stars and bars, ordering isn't so important. This is the "doughnuts" problem. I send you to the store to get a dozen doughnuts. I need three glazed doughnuts, five chocolate frosted doughnuts, and four eclairs. Do you care if the cashier puts in glazed, frosted, eclair, eclair vs. glazed, glazed, frosted, eclair? Not really. This is an important difference for stars and bars vs. balls in bins.
Personally, I don't like the visual of "stars and bars." I think the Diophantine equation is a nicer way to reason this out. So we have $n$ distinct items (in the case of the doughnuts example above, $n = 3$). We need $k$ items. How many ways are there to get $k$ items using only the $n$ distinct products. So we have:
$x_{1} + x_{2} + x_{3} + ... + x_{n} = k$
Now suppose I don't care how many of each type of doughnut you get, just that you get a dozen doughnuts. Our equation is:
$x_{1} + x_{2} + x_{3} = 12$
We can derive the stars and bars formula using a generating function. So we use a formal geometric series to count, where the exponent of $x$ indexes. So $x^{0}$ says get none of that kind, $x^{1}$ says to get $1$, etc.
Now for glazed doughnuts, our generating function is:
$$f(x) = \sum_{i=1}^{\infty} x^{i} = \frac{1}{1-x}$$
We have no restrictions on eclairs or frosted doughnuts, so $f(x)$ describes the number of ways to get those as well. So the number of ways to choose a dozen doughnuts can be described with $(f(x))^{3} = \frac{1}{(1-x)^{3}}$. We want a dozen doughnuts, so we care about the coefficient of $x^{12}$, which gives us the number of ways of ordering a dozen doughnuts. We can either manually expand out the product or we can use an identity.
Note that:
$$\frac{1}{(1-x)^{r}} = \sum_{i=0}^{\infty} \binom{i + r - 1}{i} x^{i}$$
And so our count for $x^{12}$ is $\binom{12 + 3 - 1}{12}$.
Notice how the generating function gives us a clean way to set it up and model the situation, which makes it easier to see combinatorially what is going on.


can i use an inline exhaust to vent a kitchen and bathroom?

Question: I have 2 bathrooms and a kitchen that are currently unvented.  I would like to install an inline exhaust fan to service all three.  I will be putting the exhaust fan just inside a gable that will have an exhaust port to the outside.  Are there any issues with having a kitchen and bathroom share exhaust ducting?  They will all have dampers at the intake vent.  See picture for diagram.  I have already calcuated the CFM needed for the kitchen which will be about 360 CFM and will be getting an appropriate fan.  Are there any issues, safety or otherwise, with the sharing of the ductwork?  Grease buildup?
Comment: I don't think you can use the same ducting for kitchen exhaust that you use for ventilation, especially if it's a gas range.  You'll also likely have to have both ducting and a fan capable of moving enough air to service all three spaces.
Answer:
International Mechanical Code 2012
Chapter 4 Ventilation
Section 401 General
401.1 Scope.
  This chapter shall govern the ventilation of spaces within a building intended to be occupied. Mechanical exhaust systems, including exhaust systems serving clothes dryers and cooking appliances; hazardous exhaust systems; dust, stock and refuse conveyor systems; subslab soil exhaust systems; smoke control systems; energy recovery ventilation systems and other systems specified in Section 502 shall comply with Chapter 5.
Chapter 5 Exhaust Systems
Section 505 Domestic Kitchen Exhaust Equipment
505.1 Domestic systems.
  Where domestic range hoods and domestic appliances equipped with downdraft exhaust are located within dwelling units, such hoods and appliances shall discharge to the outdoors through sheet metal ducts constructed of galvanized steel, stainless steel, aluminum or copper. Such ducts shall have smooth inner walls, shall be air tight, shall be equipped with a backdraft damper, and shall be independent of all other exhaust systems.

Chapter 4 says you cannot use the same ducting for ventilation, as you do for your range exhaust.  Chapter 5 is quite explicit in what materials should be used for the range exhaust ducting, and also says that the ducting cannot be shared.  If you're using the ventilation ducting between two or more spaces, you'll have to be sure the fan and ducting are both adequate to move the amount of air required.  you'll also have to insure there is an adequate supply of makeup air.
NOTE: Local codes may vary. Contact your local government for all applicable codes.
Comment: The IMC says "...shall be independent of all other exhaust systems."  Wouldn't (air tight) check valves count as making the system independent?  If not, then even two separate systems venting out the same roof in close proximity wouldn't be considered independent since air from one exhaust vent could touch the other vent.


Why is there conservation of kinetic energy in elastic collision and not in inelastic collision?

Question: Why is there conservation of kinetic energy in elastic collision and not in inelastic collision? What would be the difference that lead to conservation of kinetic energy in elastic collision and not in inelastic collision?
We also know that mechanical energy is not converted to heat, light, sound etc. in elastic collision but converted to heat, light, sound etc. in inelastic collision. Why is mechanical energy converted as total energy is conserved in inelastic collision?
Answer:
What is the difference that leads to
  conservation of kinetic energy in elastic collision ?

The difference is only in the properties of the material of a body. If it is elastic (happy ball) it can deform itself (thus absorbing KE) and then recover the original shape, giving back roughly the same amount of KE, which is considered as temporarily stored in the lattices: this question can be of help to you if you want a deeper insight.

You saw this image here: If a body is not elastic (sad ball) the KE will deform the body and this change is irreversible, the KE will be transformed into heat, sound etc. and will not be available anymore as mechanical energy. In this video you can see the enormous difference between a sad and a happy ball of same mass and momentum. If the concept of impulse is not clearly explained there this answer can be of great help

Why is
  mechanical energy converted as total energy is conserved in inelastic
  collision?

Kinetic energy is transformed into an exactly equal quantity of other forms of energy in inelastic collisions, therefore the total energy of the system does not change: KE is not conserved whereas momentum is, but energy in general is conserved anyway
Comment: what if the moving ball is elastic , and the stationary ball inelastic ?
Answer: The simple answer is that in an elastic collision (for objects >> in mass than typical molecules) energy moves from kinetic to potential then back to kinetic as long as the "elastic limits" of the materials are not exceeded. In other words, as long as they act like springs.
In non-elastic collision the energy goes mostly from kinetic of the colliding masses to kinetic of the particles that make up the masses and surrounding medium - if any. For example, an increase in heat is an increase in the kinetic energy of the particles that make up the material. Same for sound. On a macro scale these are deformations but on a micro scale they are changes in motions of atoms and molecules. Or electrons, in the case of light. Add it all up and you should get the total energy before and after.
I'm not sure about the meaning of the second question. Hope this helps.
Answer: In Elastic collisions the interaction forces are conservative.
We can represent the total Energy of the System as : E = U + K
When the particles are far away from each other (separation > 2R) their potential energies remain constant which I choose to be U. This is true except when the particles are in contact which other.
After collision the colliding particles return to their original configurations - Their dimensions remaining unchanged.
At the instant of collision the total kinetic energy changes into the potential energy of the System. The Potential energy actually increases when the separation between the particles < 2R.
During recoil the potential energy is converted back into the kinetic energies of the particle.
On the other hand in Inelastic collisions the force is non-conservative in nature.
After collisions the particles do not return to their initial configurations -
Permanent deformations being produced or due to loss of energy in other forms.
This  accounts for the fact that $K_{1} ≠ K_{2}$
Answer: This is the definition of the elastic and inelastic collisions - whether the kinetic energy of the colliding objects is conserved or not.
Note that the total energy is always conserved, but in inelastic collision a part of it is transferred into the internal energy of the colliding objects (typically heat in case of macroscopic objects or excitation energy in microscopic case, although the strict distinction depends on the context).
See also this post.


Commutation of vector operators

Question: I'm supposed to show that $\left[\mathbf A,\mathbf B\right]=0$ (for two vector operators $\mathbf A$ and $\mathbf B$) if and only if all components of $\mathbf A$ commute with all components of $\mathbf B$. What I have so far is this:
\begin{align*}
\mathbf A \otimes\mathbf  B &= \mathbf A\mathbf B^T \Rightarrow \left[\mathbf A,\mathbf B\right] = \mathbf A\otimes \mathbf B - \left[\mathbf B \otimes \mathbf A\right]^T=\mathbf A\mathbf B^T - \left[\mathbf B \mathbf A^T\right]^T = \mathbf A\mathbf B^T - \mathbf B^T\! \mathbf A = 0.
\end{align*}
So much for the basic algebra... what am I supposed to do now? I can expand into components, but the next question "give an expression for $\left[\mathbf A,\mathbf B\right]_{ij}$ in Einstein notation" kind of suggests I should avoid saying $\mathbf A = a^i_j$ and go from there. I tried doing so anyway, with the obvious result of:
\begin{align*}
\mathbf A\mathbf B^T - \mathbf B^T\! \mathbf A = a^i_j\left(b^i_j\right)^T - \left(b^i_j\right)^T a^i_j = a^i_jb^j_i - b^j_i a^i_j  = 0.
\end{align*}
Should I be interpreting the result as "One of these vectors will produce a matrix, the other will produce a scalar (an inner product), which means that this expression can only be zero when the matrix equals zero" (?). I'm at a loss as to how to approach this..
Comment: **A** and **B** are vector operators so, ${\bf A} \equiv a_i$ and ${\bf B} = b_i$. Then you result reads $[a_i , b_j ] = 0$ implying that each component of **A** must commute with every component of **B**.
Comment: @Prahar How did you go from $\left[\mathbf A,\mathbf B\right]=0$ to $\left[a_i,b_j\right]=0$? Since $\mathbf B \equiv b_i \neq b_j$?
Comment: Why do your vectors have two indices? And where did you get that definition for $\otimes$ from? That looks very odd..
I guess you could write $[\vec A_i,\vec B_j]=(\vec A\otimes\vec B)_{ij}-(\vec B\otimes\vec A)_{ij}=[a_i,a_j]$
Comment: @Daniel I'm quite certain that this post screams "CONFUSION!!!" and I quite honestly can't debate it. The more in-depth your (or anyone's) explanation on the matter, the better. :-)
Comment: First of all, "direct product" $\neq$ "algebraic product" (as in algebra of operators), so $A\otimes B \neq AB$ and $A\otimes B \neq AB^T$. Then ${\bf A} = {A_i}_i$, meaning vector operators are labeled by one index each, not two. Third, see Prahar's first comment above. Don't complicate things just because you think this is a complicated thing.
Answer: I think your confusion is arising from the fact that you are imagining operators as matrices. This is mostly fine, but in this case, the operator itself being a vector is what is causing the confusion - so let me elaborate.
${\bf A}$ is a vector of operators. For example
$$
{\bf A} = \pmatrix{ A_1 \\ A_2 \\ A_3}
$$
We can denote this collectively as $A_i$. Now, note that each of these $A_i$'s are themselves operators. In other words, they are matrices $(A_i)_{ab}$. Thus, each element of $A$ has three indices. One index is the vector index and the other two are the matrix operator indices.
Finally, the very definition of $[{\bf A} , {\bf B}]$ is the following
$$
[ {\bf A} , {\bf B} ]_{ij} = [ A_i , B_j ]
$$
The latter can further be written in matrix notation as
$$
[ A_i , B_j ]_{ab} = (A_i)_{ac} (B_j)_{cb} - (B_j)_{ac} (A_i)_{cb}
$$
Thus, $[{\bf A} , {\bf B} ] = 0$ is precisely the statement that all components of ${\bf A}$ commute with those of ${\bf B}$.
Let me finally point out that this question is really poorly worded. I would say that $[ {\bf A} , {\bf B} ] = 0$ is by definition the statement that the components commute. More clearly, (if it is not already) I mean that $[ {\bf A} , {\bf B} ] = 0$ already means that the components commute. There is nothing to derive here.
Comment: Minor remark: although $[\boldsymbol A,\boldsymbol B]$ is a rank-2 tensor, in three dimensions it is sometimes (implicitly) mapped into a vector by Hodge duality. This justifies formula $[\boldsymbol L,\boldsymbol L]=i\boldsymbol L$ sometimes find in the literature.
Comment: This was very illumating!
Comment: @Prahar *"Thus, each element of A has three indices..."* although quite clear from the context, notice that indices of a vector operator are **not** the same as vector indices, as there is no basis they expand on. "Vector" operator is an unfortunate terminology given to a collection $A_i$ of single operators that happen to all together transform like a tensor under the action of the angular momentum operator.

Commutation of vector operators


MacbookPro 10.9.1 Installing linux wirless drivers

Question: I've just installed Linux on my Mac 10.9.1 and I have no Internet connection or any Wi-Fi signal. I've installed Linux by creating a partition and I really need help on this. None of the tutorials I've found works on my MacBook Pro version, so if somebody could help me with this issue I would really appreciate it.
Comment: Please edit your question to add details of your networking devices. Open a terminal Ctrl+Alt+t and run and post: lspci -nn | grep -e 0200 -e 0280. The pipe symbol | is on the right side of my US keyboard on the same key with \.
Comment: Also, FWIW, you can purchase wireless USB cards that are 100 % compatible with linux for $10. Might be a better option then fighting with an unsupported card.
Answer: You need to plugin Ethernet LAN cable to computer to have network first. Then open Software & Updates, open Additional Drivers tab. If nothing is wrong, the driver you need will be there, just put a check on the Broadcom wl driver


Fraud or just forgery

Question: Gaming machine clearances at a licenced club require two employees to be present to count the monies from the machines. One employee only has done the clearance by himself ( employee A) then signed the official clearance document in his name and then falsely co-signed another persons signature (employee B) as if the other employee (B) was present at the clearance when he was not.
When questioned, employee (A) declared in writing that the second signature was indeed that of employee (B). Employee (B) has signed a stat. dec. that the second signature is not his.
Thus (A) has forged (B's) signature. Is this deliberate deceit fraud?
Answer: Not a lawyer, but I expect that there are multiple count;

forgery of signature
violation of license (which i expect could be revoked for causes)

The club owner may also be negligent of not having sufficient procedures in place, so as a double key lockers, security cams, etc, so that they don't have to rely on people honesty and signatures alone.  Conflicting statements between person A and person B may come down to a examination of a signature expert.
Unless monies are missing, there may not be any fraud other than the signatory issues, but falsifying a signature does not automatically mean that the person have stolen anything.
Comment: If there has been money taken, the crime would be theft, not fraud.
Comment: Money taken = theft. Convinced someone through lies to hand over money = fraud.

Fraud or just forgery


Can you use the Apple Magic Keyboard with a Windows Machine as well?

Question: I just wanted to ask if it is possible to use Apple`s Magic Keyboard with a Windows machine (given that it has bluetooth). Is this possible?
Comment: Windows runs on Mac hardware so the limitations might be better asked on another question since that might depend on what version of Windows  and what drivers you select for the keyboard.
Comment: @bmike I was just wondering if Windows does also run with Apple hardware (as in Windows not being installed on a Mac). The reason being that I might want to use the keyboard with my desktop windows PC next to my MacBook. Regarding the extent of functionality, you are of course correct. Though I think that at least between Win 8 and 10 there won't be any major differences. I might be wrong, though
Comment: I've heard they work on android and windows as Bluetooth, but I can't answer any better than doing a google search. I assume you'll get some good answers here over time if the bootcamp answer doesn't encourage you to try it and answer back with your results.
Answer: Yes, the new Magic keyboard works just fine (the 2017 wireless extended one that is) with the supplied USB/lightning cable. In fact I'm using a third-party PUR braided cable, typing on the Apple keyboard right now. There's a tiny On/Off switch on the back right edge, that needs to be on even if you are plugged into USB. My cheesy Dell here at work doesn't have BT but I'll get a cheap dongle from Amazon and try it.
Next I will use KeyTweak and remap some of the keys. Right now Command is the Windows key and the tiny Option ket is ALT. Those need to b reversed so they are used to where we know them. I also like to to make F16 my Play/Pause button for iTunes, and F17 & F18 my Up-Down Volume keys and F19 my Mute. Oh, and F13 Print Screen, and the Clear button I make Num Lock. These are just my suggestions but for Windows it works. There's no way to program the Eject button to do anything but Optical is fading into the horizon anyway, lol. All This changes the registry in Win 10 so if you pop on a std keyboard, make sure to run KeyTweak again to reset the Registry back to normal!
Why go through all this for a Windows machine? Sanity. Got my first Mac in '90 (16lb Portable) and my SE/30 is sitting right next to me in my office. If I have to use Windows, at least my keyboard interaction is Apple. All my devices are, lol.
BTW, KeyTweak is downright confusing to use. Here's how you do it. It'll take a little time but worth it.
For EACH Key you want to change:

Click Half Teach Mode
In the windows that pops up, click Scan Single Key
Then press the key you want to change. For example, I clicked F19. You'll see a numeric ID for the key appear.
Then select, from the DropDown, what Function you want the selected key to do. In my example I selected Mute.
Then click the Remap button.

At that point you will see your choice in the Pending Changes Box. Continue on changing all the keys you need by REPEATING ALL THE STEPS.
Once done, click Apply. THAT will change the Registry and remap your keys! IMPORTANT: The app will ask if you want to reboot. Say NO. Instead, go to File-->Save Remap File As, and save your mapping. Then if you ever have to reinstall Windows, just open KeyTweak and load the file! Or if you put an Apple keyboard on another machine, do the same, and you won't have to redo all the tedious mapping.
NOW you can reboot for it all to take effect. ;-D
Comment: Update: My mobo has built in Bluetooth. I turned it on and the Magic Keyboard paired right up! I'm totally wireless now, love it.
Comment: Beautiful! This is the best solution I've found, no crazy Bootcamp drivers or other nonsense. Thanks, one year ago you.
Answer: Yes, it will work as a Bluetooth keyboard but you'll have to think about drivers if you're not running in Boot Camp. Apple does offer the required drivers with Boot Camp Assistant.app (> Action > Download Windows Support Software) and you could try transferring it to your Windows installation.

You can see all mappings on Apple's support page. Aside from the obvious keys (Expose, Dashboard, etc.) all other keys should work just fine in Windows.
The keys you can't replicate, however, are

'PrintScr'
the 'Context menu' key
Pause/Break
Insert
Forward Delete
Home
End
Page Up
Page Down
Number Lock
Scroll Lock

Although Apple doesn't support Windows directly, this support article explains how to remap keys and some of the Boot Camp differences and keyboard differences between macOS and Windows.
Comment: Are these drivers also available outside of boot camp? And / or will basic functionality also work without drivers? In case said Windows installation is not running on Apple hardware: The reason being that I might want to use it with my desktop at some point in the future
Comment: Let's leave this about "will it work". A second question detailing how to get around missing keys on windows 10 would make for an awesome second question linking back to here, @CrazyQwert
Comment: @bmike alright. So the gist is it does work? Even on non Mac hardware like any ordinary Bluetooth keyboard (as long as there is support for Bluetooth, of course)?
Comment: @CrazyQwert  see here for an example  http://www.techrepublic.com/article/how-to-connect-an-apple-wireless-keyboard-to-windows-10/


Confusion in MAP estimation

Question: Consider the situation $r = a+n$, where $n \sim \mathcal{N}(0,\sigma_n^2)$. I am having confusion with respect the computation of $p_{a|r}(A)$ for the above scenario.
Option 1, $r = a+n \implies a = r - n \implies p_{a|r}(A) = \mathcal{N}(R, \sigma_n^2)$
Option 2, from Bayes theorem gives, $p_{a|r}(A) = \dfrac{p_{r|a}(R)p_a(A)}{p_r(R)}$. Assuming $p_a(A) = \mathcal{N}(0, \sigma_a^2)$, we get $p_{a|r}(A) = \mathcal{N}\left(\dfrac{R}{1 + \frac{\sigma_n^2}{\sigma_a^2}}, \dfrac{\sigma_n^2}{1 + \frac{\sigma_n^2}{\sigma_a^2}}\right)$.
1. My first question is why do these two approches give different anwers? I understand option 2 depends on the prior for $a$, but even in that scenario we compute the likelihood $p_{r|a}(R)$ using the approach described in option 1.
2. Option 2 converges to option 1 when $\sigma_a^2 \to \infty$. This can be seen with the gaussian prior, however is it true for other prio distributions on $a$ as well?
Answer: The dependence structure of $a,n$ and $r$ is important! Typically in such "inverse problem" scenarios you assume that $n$ is independent of $a$ and therefore
$$
p_{r|a} = \mathcal{N}(A, \sigma_n^2),
$$
but since $r$ and $n$ are not independent (knowing $r$ gives some information on $n$), you can not conclude
$$
p_{a|r} = \mathcal{N}(R, \sigma_n^2).
$$
(I tried to adopt your notation, which is not very intuitive to me).
So, under the above assumption, Option 1 is not correct, while Option 2 is (for that prior).
As far as I know, any "stretched out" prior will have the property you describe in question 2 as long as it is strictly positive everywhere.
Comment: Thanks for the response, but whenever we have a random variable say $z = x + y$, to find $z|x=x_0$ we simply use the distribution of $x_0+y$ , rarely do we have to check for independence between $x$ and $y$. Please help me figure out where am I making a mistake?
Comment: Independence of $x$ and $y$ is crucial for this step. Imagine the extreme case $x=y$ ("maximal dependence"), then $z|x=x_0$ would equal $2x_0$ almost surely. Since $y$ is often some sort of noise, the independence is sometimes not mentioned explicitly, which is negligent, but it is definitely necessary for writing down the distribution of $z|x=x_0$ in that form.

Confusion in MAP estimation


Uniform electric field, find potential at point

Question: In a uniform electric field the potential at origin is V and V/2 at points (a,0,0) , (0,b,0) and (0,0,c) .then find the potential at point ( a,b,c) .
I don't really get how are we supposed to solve such type of questions I always get confused. A hint would be enough
Answer: In a uniform electric field, the plane which is perpendicular to the electric intensity vector is the plane where potential is the same. The difference of potential along the intensity vector can be calculated as: $\Delta V=E \times \Delta D$, where $\Delta D$ is distance between two points. In this question, three points fix a plane of same potential, and the electric intensity can be calculated by the difference of potential between the origin and the plane. Then you can calculate every point in the space.
Comment: How do we calculate at any point in space?
Comment: @LakshyaGupta Making a line from the origin perpendicular to the plane fixed by three points, you will know the direction of electric field. Calculate the distance between origin and plane, then the intensity can be derived by the formula. Then  you know both the intensity and direction of the uniform electric field and the field is uniquely fixed.
Comment: @LakshyaGupta sorry i made a mistake on the formula, and i have already corrected it.
Answer: Since the electric field is uniform, if you move $l$ meters in a direction that makes an angle of $\theta$ with the electric field, the electric potential rises by an amount of $E\times l \times \cos(\theta)$. So we can say that:
$-\dfrac{V}{2}=a\times E\times \sin(\theta_1)=b\times E\times \sin(\theta_2)=c\times E\times \sin(\theta_3)$
So in order to solve this question, I move $a$ meters in the $x$ axis, which will decrease the electric potential by $\dfrac{V}{2}$, then I move $b$ meters in the $y$ axis, which will again decrease the electric potential by $\dfrac{V}{2}$(because the term $b \times E\times \sin(\theta_2)$ doesn't depend on the position of the object that is moving, it only depends on the movement vector). Now I move $c$ meters in the $z$ axis which will also decrease the potential by $\dfrac{V}{2}$. So the final answer would be $-\dfrac{V}{2}$

Update:
The question says that if we move $a$ meters in the $x$ axis, the potential decreases by $\dfrac{V}{2}$. Because at the origin it was $V$ and at $(a, 0, 0)$ it is $\dfrac{V}{2}$. And the important thing is that since $E$ is uniform, the difference in potential doesn't depend on the place you are, it solely depends on the movement vector. For example if I move from $(a, 0, 0)$ to $(2a, 0, 0)$ then the potential decreases by $\dfrac{V}{2}$ so the potential at $(2a, 0, 0)$ is $0$. Now because we want to calculate the potential at $(a, b, c)$ we can move $a$ meters in the $x$ axis, $b$ meters in the $y$ axis and then move $c$ meters in the $z$ axis. In each part, the potential is decreasing by $\dfrac{V}{2}$. And the initiating potential(the potential at the origin) is $V$. So the final potential is:
$V - \dfrac{V}{2} - \dfrac{V}{2} - \dfrac{V}{2} = -\dfrac{V}{2}$
Comment: How is the final answer -V/2 if it decreases 3 times? And I didn't get how u wrote the potential equations.
Comment: Hi, I have updated the answer please take a look


Crystal Report- Sub Report

Question: I could not print the subreport created. Whenever I click the print button, it takes me to main report and export main report in a pdf instead of doing the same for subreport. Will you please let me know why it is happening so in Crystal Report 10.5 and Asp.Net (VS 2008). It works fine in VS 2005 (ASP.Net and Crystal Report 10.2)
Answer: It's kind of a stretch, but maybe the subreport that you want to print does not contain any records and the subreport option to "Suppress Printing if no records" is checked. If the subreport does not have any records then to check the second part you can right click on the subreport and choose "Edit Subreport". Then choose File/Report Options and see if "Suppress Printing if no records" is checked.
I doubt this is the case since it is unchecked by default, but it is something to try.

Crystal Report- Sub Report


How to customize user registration in Joomla 3.7?

Question: Now that Joomla 3.7 supports custom fields, can anyone point me to documentation or a YouTube video that outlines how to customize user registration? I assume that additional work is also required to view these fields in user management in the administrative view? If so, what needs to be done?
Answer: If you want an easy way to do it just install the Easy Profile component from the JED. It integrates with registration and with advanced fields in the user's profile which they may edit. I use it a good bit, very simple to setup and manage all of the custom fields you want with direct integration.
Answer: As of now Content & Contact components are supporting custom fields.
Ref: https://docs.joomla.org/J3.x:Adding_custom_fields/What_components_are_supporting_custom_fields
Comment: That documentation is incorrect. I just checked and fields are supported in user management. Unfortunately it doesn't appear that the user profile plugin was updated to support fields. I'm guessing that I'll need to a custom user profile plugin. I was hoping that someone has had some experience with this new feature and could impart their knowledge to save me time and from re-inventing the wheel.


Is it possible to have a Datasheet view as a Webpart?

Question: I am looking for a solution to the above. If it is not possible... is there an alternative to the same?
Answer: Yes it is, I have it in several locations.
Create your desired datasheet view in the list, go to your web part page and add the list web part and change the view to use the datasheet view.
Comment: Depending what coulmns you have in the view can make it read only. Try removing one at a time to see what columns are triggering it to be read only.
Comment: I tried it.. But my Datasheet view is always read-only in the webpart. What to do for it?
Comment: Have tried it! Works perfectly on SP2010. In WSS it was a pain to make it work!! Thanks @PirateEric


What age is too old for research advisor/professor?

Question: I feel like I wouldn't want to work with >70 years old professors because they're too old and have less chance of coming up with new ideas. is this a reasonable concern?
Comment: No …………………………..
Comment: I had a friend who graduated as a last PhD student of a professor emeritus. While the professor had some health issues towards the end of my friends PhD, I heard my friend describe his supervisor as "A mind of a 20-something trapped in the body of an 80+ year old. I could barely keep up with him". Besides, there's this: http://phdcomics.com/comics/archive.php?comicid=2031 :)
Comment: @Mandrill Maybe, but the key here is "most people". Professors are not "most people". It is well-known that keeping body and mind occupied slows down the inevitable decline of both, and professors often are *very* active until a very high age. I have often discovered academics who wrote their most significant books after retirement, sometimes age 80+.
Comment: One thing to consider: if you plan for a PhD under their supervision, keep in mind their health may be more fragile; you should have a Plan B for what happens if they are not able to continue supervising you.
Comment: If a person has seen the world, all its beauty and many of its warts, and is willing to share his or her opinions, that's a person I want to have a beer with. Now the fact is—you never really know how deep another person's experience runs, but that's where you roll the dice.
Comment: I would say 75. After that most people will decline even those with very active minds. But experience may vary.
Answer: No. It is a bad idea to make assumptions about a person's productivity and level of creativity, in the context of academic research, based on their age. This seems to me like an example of using the "fast" (aka System 1), heuristic-based type of thinking described in Kahneman's book Thinking, Fast and Slow, to form judgments, instead of the more deliberative, slow, "System 2" mode of thinking. Kahneman describes many examples of this type of fallacious reasoning and the ways in which it can lead us astray in decision-making situations.
Each professor is an individual. Some make better advisors than others, but you'd have to estimate how good they are based on actual details about their personality, recent and less recent track record of success in research and in mentoring, and other relevant factors. Age can only be relevant insofar as it relates to someone's physical health or an imminent retirement. Many academics in their 70s still produce excellent research and successful PhD students.
Don't make assumptions, and don't use heuristics in making important decisions like choosing a PhD advisor.
Comment: @Kimball wouldn't you be embarrassed if you were in charge of a prize claiming to be the highest honor in mathematics but found yourself unable to award the prize to the mathematician who solved the most famous open problem of the last century (or two), due to an outdated and blatantly discriminatory technicality in the prize rules? I know I would be…
Comment: @CaptainEmacs Why was it a major embarrassment?  I've never heard this.
Comment: @DanRomik Not if I believed the purpose was to recognize younger mathematicians, rather than honoring the best results or body of work.
Comment: @Kimball if the people behind the Fields Medal want to market it in such a way, that is their right. However, they shouldn't then be surprised when other prizes such as the Abel Prize become equally or more highly regarded by many than the Fields Medal, or even worse, when a situation emerges in which no single mathematics prize can hope to match the Nobel Prize in its cachet and public recognition as a canonical, ultimate honor. This confusing state of affairs is the legacy of the Fields' age limit.
Comment: Seconded. Some profs dry out on receiving tenure. If they are still active after that, you are probably fine (just kidding). The Fields Medal for math has famously limited its recipients to the age of 40 or below - when Andrew Wiles proved Fermat at the age of 47, this was a major embarrassment for them because they could not easily award him the medal and had to find a way to substitute for it. In short, "don't make assumptions". +1
Comment: @DanRomik Excellently put. James Gleick's book on Feynman has a very crisp explanation of the issue, I paraphrase: a prize builds up reputation by excellent recipients no less than recipients, esp. excellent ones, get reputation by it; one of the reasons why the Nobel is so successful - not only was it early, but it gave, from the beginning, the prize quite consistently to outstanding contributions with only few blunders. It is in the interest of a prize as a signal of excellence to avoid false positives as well as false negatives. Fields messed up in that respect.
Comment: @CaptainEmacs: For what it's worth, it wasn't John Charles Fields himself who messed this up, see https://www.nature.com/articles/d41586-018-00513-8
Comment: @Kimball If you want to develop younger researchers, there are channels for that. But if you are the *top* prize in your field, limiting it to young researchers only becomes discriminatory. If you had started out as a prize for developing young researchers and turn into the top prize because most top results are achieved by these, and you are unfortunate enough to miss out on a major breakthrough of an older researcher, your prize sends out a message of prejudice and stereotype instead of an encouraging one. The IMU felt embarrassed enough to create a special prize for Wiles.
Comment: @MarkMeckes Interesting find. To clarify, I intended "Fields" to denote the institution, not the person themselves.
Answer: I'm quite a lot closer to 80 than to 70, but if you made a proposal to me that was in my lane, or accepted a suggestion that I made for a research project, I'd serve you pretty well. I have a lot of experience and with that, a lot of ideas.
However, I'm retired, so that would be a potential obstacle and we would need to get the university to make a decision. But even if I were not quite yet retired, that would be an issue. I also enjoy the fact that I currently have very little professional responsibility and can pretty much do as I please. Some of those things are actually fairly "academic" though.
I'd be useless to you outside my lane, of course, but that was probably always true, though I was able to give some guidance to people with quite different research directions. Not as advisor, but as a committee member.
Some of us old folk still have a functioning brain. Some of us still have an interest in field, even if we don't publish, ourselves, anymore. But it is an individual thing, and not one to make generalizations about.
It might be worse to have an advisor who was so young and active that they had no time to give you when you need it. Every case is different.
There are a lot of things that go in to making a good advisor. One of them is the attitude that you are an important person and that they will do what they can to extend your education and advance your career. That probably isn't age related, but it might be.
Comment: @Mandrill, My kids are in their fifties.
Comment: Wow, I read most of your answers and for some reason I assumed you were on your mid-thirties...
Comment: Fascinating -- I would have assumed you to be in your late 40s or 50s. Also fun to learn something about the personal details of a long-time contributor on this forum :-)
Answer: So long as an academic is not suffering from cognitive decline in old age (and I speak here of serious cognitive decline; e.g., dementia, alzheimers, etc.), I wouldn't think there is any reason why they would lack ideas for research.  In fact, you would probably find that the opposite is the case --- by the time they are at the end of their career they have probably stocked up so many research ideas over the years that they have more paper ideas than they could possibly complete, giving their students plenty of possible topics they could take on as papers.  I speak here as someone in my early forties, and I already find that the rate at which new ideas come to me is faster than the rate at which I can turn them into publishable papers.  Consequently, I already have many many half-written papers and jotted down ideas, and I'm not confident I'll ever finish all of the ideas I've started.
It is possible that there might be some drawbacks to having an elderly professor as a supervisor, but I wouldn't think this would be one of them.  An older professor will also have some advantages in terms of breadth of knowledge and experience, and I can certainly think of a number of professors in my own field who are now in their seventies who are absolute giants in the field; any research students would be lucky to have them as supervisors.
Finally, you should also bear in mind that research supervision usually involves a "panel" of multiple supervisors, and while one is usually the primary supervisor, there is also support from others.  It is not unusual to have a mix of supervisors with different levels of age and experience (and academic level) and this will usually help ameliorate any disadvantages of younger or older advisors.
If an academic is in their seventies (or whatever advanced age is "too old") and feels that they can no longer do a good job supervising a research student, most likely they will just self-select out of the supervisory pool and only take on a supporting role on the panel, if that.  Others will self-select out of supervision roles completely because they are close to retirement and they don't want to take on a multi-year commitment of seeing a research student through grad-school; they have earned the rest after all.
Comment: @Kimball - you would be surprised just how many retired academics (and industry folk) are closely associated with conferences, national-level review committees, and so forth. They are highly valued because of their experience and insight into the whole field.
Comment: _It is possible that there might be some drawbacks to having an elderly professor as a supervisor_ - Yes, such as a greater chance of health issues and not being able available to provide secondary support for you down the line (e.g., getting you conference invitations, advice after you graduate, etc).
Answer: I can't comment if a professor that is older in age is necessarily less capable to be productive from a physical/psychological perspective, but an issue to consider are the regulations regarding mandatory pension after a specific age. Depending on the country of the professor, they may be forced to leave academia after a specific age (in my country it is 67).
Having your advisor leave academia for a pension in the near future may be detrimental to your future carrier for many reasons:

If they leave before you have completed your PhD, you will need to change advisors, which may or may not delay your diploma.

People that are going to exit imminently are likely to not be as motivated as someone who has potential for future promotion.

If they are in pension after you have completed your degree, and you are looking for a new job or a promotion in academia, they won't be able to participate in any department meetings that would create a position for you, or in electoral committees to actually have you elected/promoted, so you are likely to have fewer allies in these key roles. A younger person will be able to help you for many years after you complete your degree, if you maintain a good relationship.
Answer: I for one can understand your concern. BUT it also depends on your field, no?
In computer science I would trust an 80 year old professor who hasnt been working in the industry for 40 years less, than a professor who is 50 and still had some experience with rather modern technologies.
On the other Hand I believe a 80 year old professor of biology, psychology or medicine to be just as fit as the 50 year old professor. That is because usually professors still work in that field.
In the end it always depends on the person honestly. Had professors talking about how great they were in the 70s and are completely disconnected from the modern breakthroughs in that field, but had also professors in their 50s telling about how they worked in a really really big company just recently and worked with all new advancements but were just bad at teaching and I felt like they didnt even understand the new advancements.
Also had really great and up-to-date professors that were about to retire and it actually was sad when they retired as I would have loved to learn more from them.
Answer: Actually there might be significant advantages to working with an older professor. Consider that an older professor is more likely to be well-known and respected in the field. Reputation is a very important currency in academia. Your advisor's reputation could open doors for you.  E.g.

You want a job after you graduate?  A letter of recommendation from a very well-known professor will carry much more weight than a letter from a new professor that no one has ever heard of.
You need access to some specialized equipment?  A well-know professor probably has friends at other universities or national labs that would let you borrow it.
You need funding to complete some portion of your research?  An older professor probably has many contacts at various funding agencies from over the years.  A few phone calls might get your research funded.  A new professor just getting started won't have as many contacts.
You want to get your work published in a top tier conference or journal?  An experienced professor knows what it takes to make that happen, whereas a younger one may not.

As the other answers point out, this will be dependent on the individual.  Just because a professor is old, doesn't necessary mean they are well-known.  Evaluate each specific potential advisor.


Need to reinstall Ubuntu 12.04, but my computer doesn't recognize my USB startup disk. (Dual boot)

Question: I need to do a clean reinstall of 12.04 OS.  I don't have a CD drive, and have created a USB startup flash drive.  I am running dual boot Windows 7, and Ubuntu 12.04.  The BIOS is booting from removable, but it does not seem to recognize the thumb drive, it goes straight to the GRUB menu. Am I doing something wrong?  Is there another way?
Comment: Booting from USB is something that is machine and BIOS specific, so you should give us the details of your machine.  You should find specifics about USB booting in your machine manual under BIOS.
Answer: check to see if there is legacy usb support in bios. you may need to enable that to boot from the flash drive.  Also  escape or f12 f11 depending on the system board often brings up the boot menu where you can manually select what to boot from. Select it there and see if that lets you boot to the flash drive. If that doesn't work see if another device will boot from it or load vmware player and see if it boots from the flash drive to verify it was properly created.


How to pronounce the family name "Penhallow"

Question: How to pronounce the family name Penhallow? I'm translating the story "A Tangled Web" by L. M. Montgomery into Russian.
Comment: That's actually a Cornish name.
Comment: @Tristan - ...which likely would have been "Canadianized" when the family moved there. So really its anybody's guess what the pronounciation would have landed on.
Comment: T.E.D., that's a good point. It seems that the question should be asking for a typical Canadian pronunciation of the name.
Comment: Is "Canadianized" a real word or just something used for the purpose of commenting here?
Comment: @Tristan - I know [Americanized](http://www.mifamilyhistory.org/bay/Americanization_Names.htm) is the word used for the same phenomenon with USA immigrants. I made an extrapolation to Canada (and put irony quotes around it, just in case).
Answer: I would pronounce that /penˈhæloʊ/ but there might be a particular Cornish way of pronouncing it — Penhallow is a place in Cornwall — or a Canadian way. I can imagine that Cornishmen might say /ˈpeloʊ/ or /ˈpenloʊ/.
Comment: Or possibly even have it rhyme with 'pallor'!
Answer: Being a Penhallow, the name is pronounced as follows, disregarding local accents.
Pen (like something you write with)
ha ("a" like that in bat, cat etc)
llow (like grow, toe etc.)
The emphasis is very subtly on the "ha".
In Russian it is translated as "пенхаллоу" (this is my name in the credits of a Russian TV show I worked on).
Comment: Presumably you mean _Пенхаллоу_: even the Russians capitalise their proper names. (Also, to be exact, it's a transliteration, not a translation.)
Answer: Perhaps that's a common enough name in Canada, but here in the US there would be no canonical way to pronounce "Penhallow", so you'd have to ask the holder of the name.
There is perhaps a certain small subset of names that have an expected "correct" pronunciation, (eg: Smith, Brown, etc), but this is not in them.
Complicating matters is that it contains the word "hallow", which different English accents pronounce differently. I doubt it is consistent across all of Canada. For instance, where I live that word is pronounced with a short a and the "ow" as a long o for the sense of "to make holy", but more like a short o and the "ow" as either a short a or more like an "er" if it is in the sense of "a valley between two hills".
Your best bet is probably to either change the question to "Canadians: If you were saddled with this last name, how would you chose to pronounce it?", or to just pick a pronunciation you like, and move on.
Comment: The one between two hills is a *hollow*, not a *hallow*.
Comment: @tchrist  The one between two hills is also a *holler* in some parts of the American South.
Answer: I find it much easier to explain this syllable by syllable. I'm a Canadian after all. The sounds are bold.
Penhallow
Pen- The E is pronounced like the E in lend, pending, renting, and mend.
Hal- The A is pronounced like the A in malleable, grass, statistics, and batter.
Low- The O is pronounced like the O in toe, grow, sow, moe, throw, and score.
Comment: And I think pretty much every native English speaker pronounces the a in 'statistics' differently to both the one in 'malleable' and the one in 'grass' (whether they differ or not).
Comment: @Fatima  Where would you put the stress?  PEN-hallow or pen-HAL-low?
Comment: I pronounce the A in malleable different to that in grass. That's the problem with
Comment: @mikeY PEN-hallow


Snapping doesn't work - MapInfo Pro 17 (64 bit)

Question: I've experienced a strange behaviour during drawing in MapInfo. Snap function doesn't work. Pressing the S key has no effect. I can't turn off snap. When I start drawing in snap mode, the program freezes. Any ideas what the reason is?
Comment: sounds like a bug, you should report it to the devs. did you make sure the layer you want to digitize on is editable?
Comment: yes, the layer is editable :) SNAP should be displayed on the bottom bar when the snap function is active and when it's not active, it's gone, but my program doesn't respond to pressing the S. SNAP key is still active and I can't turn it off. Next the program freezes.
Answer: Some years back I saw a client with some seriously bad performance with snap enabled. It turned out their data was on a network drive, they had a poor network connection and finally, they have 50-70 layers all selectable.
A few hints:

try to only make one layer selectable, the one you want to snap to. You can right-click the layer and use Make all other layers not selectable. Or at least limit the number of selectable layers if you have a lot of layers.
try to use the Snap options from the Nodes dropdown on the SPATIAL tab


what is the best way to approach the construction of nondeterministic PDA's?

Question: I'm trying to construct a PDA for $L = \{w0^i1^j \mid w\text{ ends in } 01 \wedge 2i=3j\}$. My understanding is that I have to first accept an arbitrary number of zeros and ones and then nondeterministically guess "$01$" in $w$, however I am stuck with the rest. I understand the condition $i/3=j/2$, but how do I make my PDA accept that? Does it have to be nondeterministic too? How do I approach this?
Answer: For the "$w$ part", as you said (or implied) yourself, you don't need the stack at all. After switching to the "$0^i1^j$ part", in some state $s_2$, you can put for the $0$'s in the input alternatingly first an $a$ on the stack, then delete it with a $b$ for the second $0$, then add a $c$ for the third $0$, then start over. By adding only two of the three symbols for each stream of three zeros (as you delete $a$), you get $2/3i$ symbols in the stack which is just equal to $j$. You get a stack like this:
$kbcbc\ldots$ ($k$ being the bottom stack symbol).
Now, you just have to delete each $b$ or $c$ with the ones coming on the input tape and accept iff you reach the bottom of the stack ($k$) when the input is complete.
The second part of the PDA might look something like this ($\lambda$ being the empty word):
$(s_2, 0, k) \rightarrow (s_2, ak)$
$(s_2, 0, a) \rightarrow (s_2, b)$
$(s_2, 0, b) \rightarrow (s_2, cb)$
$(s_2, 0, c) \rightarrow (s_2, ac)$
$(s_2, 1, c) \rightarrow (s_3, \lambda)$
$(s_3, 1, c) \rightarrow (s_3, \lambda)$
$(s_3, 1, b) \rightarrow (s_3, \lambda)$
$(s_3, \lambda, k) \rightarrow (s_e, k)$
Comment: Check out my answer!
Comment: You don't need to put several symbols on the stack as my solution shows. Btw. you should rethink the title of your question as it does not really have much to do with non-determinism (and also is not at all specific).
Comment: Regarding your answer: I am not quite familiar with your notation, but I suppose, this: (q2, 1, 000, (q2, 0)) is intended to mean: in state q2, when reading 1 and 000 are the three topmost stack symbols, go into state q2 and put 0 on the stack. This you can't do. You can only read the one single top-most symbol on the stack.
Comment: Your solution won't work for me, because I can only use ones and zeros, and no k, a, b or c, the alphabet of my PDA = {0,1} (not counting the bottom marker). And regarding the "000" you're right, however, I used "000" because I didn't wanna create an extra state responsible for deleting 3 symbols, I can change that if you want. However I can PUT 000 on the stack.
Comment: With PDAs, you have separate alphabets for the input and the stack. Using a, b, c as stack symbols is perfectly fine! k is what I called the bottom symbol which is z0 in your attempt.
Comment: Right, then your solution is also correct, thanks
Comment: (You really should take a closer look at your definitions.)
Answer: I have thought about this about realized that the solution is the following:
1) read w how i described
2) as you read 0, put 000 on the stack, and then as you read 1, remove 00 from the stack, and that's how you get the correct PDA.
So, the PDA is the following(z0 is the bottom marker):
(q0, 0, z0, (q0, z0))
(q0, 1, z0, (q0, z0))
(q0, 0, z0, (q1, z0)) // non-deterministically guess that the next 2 symbols are "01"
(q1, 1, z0, (q2, z0)) // accept "01"
(q2, 0, z0, (q2, 000z0)) // put 000 when we see the bottom marker
(q2, 0, 0, (q2, 0000)) // put 000 on top of the other zeros
(q2, 1, 000, (q2, 0)) // remove 00, here I omitted the extra state responsible for deleting 3 symbols at once and wrote it as "the PDA is seeing "000""
(q3, lamda, (q3, z0)) // stop
Really sucks that I always overlook the little parts in formal definitions of things, I didn't know that the string that I could put on the stack could be of any length and not just 1 symbol.


raspberry pi pico to pc communication

Question: I have a raspberry pi pico and want it to execute files on my windows pc(for example: if I press a button it opens a file). Because I am new to microcontrollers I have no idea how to do this. there is also no real tutorial trying to explain this. Help would be greatly appreciated
Comment: please add an explanation of what this means to your question above ... `execute files on my windows pc` ... do not add explanation in a comment below
Answer: Serial communication over the USB port is a great way to have your pi Pico talk to your pc. Also, before posting a question on Stack Exchange, look up what you are trying to do on google. I'm sure that there are plenty of guides that show you how to have your Pico and pc talk to each other.
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).
Comment: I tried but most of these tutorials use a serial monitor or let the pc communicate with the pico but I want the pico to communicate with my pc
Comment: I know that this is a little late, but try looking up having the pi pico communicate with Python.

raspberry pi pico to pc communication


Finding a point on a circle

Question: I have a circle that I am trying to find series of points on.  I know the radius and horizontal tangent point at the top of the circle.  I need to find a point that lies on the circle's circumference that is $x$ distance below the top point.
Answer: The vertical coordinate of that point will obviously be $Y=R-x$, where $R$ is the radius. The horizontal one follows from Pythagoras as $X=\sqrt{R^2-(R-x)^2} = \sqrt{2Rx - x^2}$. I don't see where you need this tangent for? Or is this by construction?
Comment: I am trying to write a program that fills a circle with horizontal lines at an even distance.  The lines start at the top of the circle and continue down.  I know the point that is in the middle of the circle and at the very top.  I need to calculate the points on the circumference every second x points down from that point.
Comment: Your equation solved my problem.  It took a little bit for me to realize that I needed to use the negative of that equation to solved for the points on the right side of the triangle though.
Comment: I meant circle, not triangle.
Answer: Let the equation of the circle be $$(x-h)^2+(y-k)^2=r^2$$
So, the  horizontal tangent point at the top of the circle will be $(h,k+r)$
So, we know $h,k,r$
Any point $(P)$ on the circle  can be $(h+r\cos\theta,k+r\sin\theta)$
So, $(h+r\cos\theta-0)^2+\{k+r\sin\theta-(k+r)\}=x^2$
So, we need to find $\theta$
Comment: I thought of r*cos(theta) and r*sin(theta) immediately, but I cannot work with angles - see my comment to @Lucozade.

Finding a point on a circle


I'm not receiving daily e-mail updates

Question: I have three stack overflow items that I never received updates for in the last few days. I have my preferences set to receive daily inbox updates to my gmail address but I didn't get any updates. I was viewing a SO question today and I saw that there was stuff in my inbox so that's how I noticed. Admins if you need more information you can e-mail me because I don't know if I'll receive an update when you reply to this bug. Thank you
Comment: I noticed the same. I just figured notifications are sent at the end of the day only if they haven't been viewed on SO itself.
Answer: I've checked you user history records and you access SO very frequently, almost every day; in addition, your inbox notification email frequency settings is set to daily. Keep in mind that you get a notification email only if there are unread notifications in your global inbox at the time the scheduler sends out the emails.
If you want to be notified more frequently set the inbox email frequency to every 3 hours.
Comment: Thank you for checking but the problem is I'm not being notified at all. With my current settings if any notifications are unread for more than a day shouldn't I be getting e-mail updates?
Comment: Yes, and according to our logs the last time the system sent you such an email was on Jan 4th 9:29am for 5 unread items.

I'm not receiving daily e-mail updates


Can I write my affiliation from a current university though I did my work in my previous university?

Question: Can I write my affiliation from as current university though I did my work in my previous university?
I want to publish a paper from my previous work, my current university has the access to the journal. I do not want to put any professor as coauthor in my paper. So can I use current university as affiliation?
Comment: You can include a footnote on the first page saying where the work was done (I did this once when I relocated to a new job when the paper was under review) or you could include this information in an Acknowledgments section at the end. However, I'm pretty sure your current affiliation should be used for your "official affiliation". By the way, what does your current university having access to the journal have to do with this issue? Whether or not your current university has access to the journal seems entirely unrelated to your question. Or am I overlooking something?
Comment: Are we talking practically or ethically?
Comment: @IanSudbery, why the distinction? How does ethics apply unless there was funding that needs to be acknowledged?
Comment: Practically, the clear answer is yes - its just a case of pressing the right keys on the keyboard. It is unlikely any one is going to check where the work was carried out (how would they even do that?). There are definite benefits to saying the work is affiliated with your new university, even if that is not true. Universities are judged on the quality of the papers associated with them. In the UK, this is financial - universities get £100k from the government for every "4*" paper they publish. They also use rankings in advertising. TT/probation requirements might depend on work done "here".
Answer: There are two ways of handling this that I can think of, but regardless, I'm pretty sure your current affiliation should be used for your "official affiliation".

You can include a footnote or some other appropriate comment on the first page that says where the work was done. I did this once when I relocated to a new job while the paper was under review. See Additional information here (which appears without the label "Additional information" at the bottom of the first page of the actual paper).

You can include this information in an Acknowledgments section at the end.

In my case, we simply told our contact editor during the proof stage, after acceptance, that the work was done before a job change, and the journal decided how to handle this. This is surely something that occurs not all that infrequently for the journal (and presumably also for most any journal), so I suspect what they did was in their editors' "style manual" (or whatever passes for one at the journal).
My feeling is that if you include this information in an Acknowledgments section, then you probably don't need to say anything before doing so. If you'd rather not do this in an Acknowledgements section, then because journals often have certain styles for first page information and for footnotes, it's probably best to ask your contact editor, after acceptance, how they wish this to be handled.