How deep should I bury my pet (should I rebury)?

Question: A little morbid, but my rabbit died last night, and since the ground in my yard was frozen I could only manage to a dig a foot deep. The rabbit is not wrapped in anything, and there is roughly 3-4" of soil covering him from the 'highest point' where his body begins.
This is in a neighbourhood town. The rabbit presumably died of old age (10 years old at this point) because it suddenly started losing weight last year.
I do not want raccoons or other scavengers digging it up, but the thought of me having to dig him up is just as scary. What should I do, if anything?
Comment: Condolences on your loss.
Comment: Sorry I was not specific enough, this is a neighbourhood town, and the rabbit presumably died of old age (10 years old at this point, suddenly starting losing weight last year)
Comment: Is this an in town location or rural area?  Did the rabbit die of a disease? Do you know the cause?  Sorry to ask these questions but I think the answers to them affect the answer to this question.
Answer: Depending on where you live, burying your pet in your yard may be illegal.  You should check your local laws, before undertaking a reburial. If the area is in a neighborhood, the possibility that a neighbor's dog may find and remove your pet is very high, given the depth the you describe. Also, as you mention, the risk of wildlife exposing the body is significant.
A shallow grave is more likely to allow smells and other evidence of the decaying body to be noticeable in the area.  According to some sources, the appropriate depth for a green burial is 3 - 4 feet (Meter +).  There are also health concerns for any other bunnies now in your home or in the future (and possibly you or your loved one).  As an example Encephalitozoon cuniculi occasionally called 'EC' is a debilitating organism 'which can survive for a long time in the environment'. It can infect both humans and particularly devastating to rabbits.  A shallow grave may allow this or other organism to be transmitted, this is of particular concern if a contagious diseases was the cause of your pets death.
Your local vet should be able to address available options in your area.
Comment: Yes, 3-4 feet deep, said also my father-in-law, who lives in countryside and knows by experience how deep those foxes and whatnots may dig. He shot all sick (mange usually) wild animals he saw within shotgun reach, and then buried them.
Answer: At only a few inches deep, it's still easily detected by coyotes and foxes. Something else to consider is once the ground thaws and it rains, some of the soil on top is going to wash away. I don't think it's necessary to make a grave six feet deep, but a couple feet is much safer than a couple inches.
If transferring him to a deeper grave is not something you're comfortable doing, the best option I think is to cover the grave. You could use a large stone over the top as a gravestone, or even a pile of smaller stones. If you don't want it to look like a grave, you could put a large potted plant on top of it. Something large enough to keep the rain from washing away the dirt, and to discourage digging.
Answer: All the concerns given are valid... but I would leave it where it was.
I buried a 22 year old cat of mine last summer and the arangement was shallower than I would have liked.  There are foxes, racoons, and other predator / scavangers about in my area.  Yet I had no issues with smell or the grave being dug up.  This doesn't mean it can't happen (it certianly can) but just that it won't neccessarily occur.
If you're concerned you can place heavy rocks or pots of heavy soil above the grave to discourage things from digging it up
Answer: Sorry for your loss.
I don't think you should dig him up. Just mark the spot with stones, and, to reduce odor, guarantee that no disease is spread, and accelerate decomposition, cover it with quick lime (mix it with the soil above).
Since this is a one time issue, and it's in your yard, I don't believe you need a license.


Current direction in a multivibrator

Question: I have been studying multivibrators lately, but I have hit a wall right now. I have attached a sketch for an astable multivibrator. I know the basic stuff. When Vout is high then Vin will rise as CT1 is charging. Since the op-amp has negative feedback, then Vref will follow Vin until the upper limit of the Schmitt trigger is hit. Then Vout will turn low.
My problem is that in the split second where Vout changes from Vcc to 0V, then CT1 will discharge through R130. Vref is also higher than 0V, so a current will go through R107 and towards Vout.
So what I see is two positive currents moving towards Vout. But this current has to go somewhere. Vdd of the op-amp is connected to ground, so I can't imagine a current moving into the output of the op-amp, but it is the only solution as I see it.
I hope someone can clarify how the currents are moving when the capacitor is discharging.
Comment: Aslund, Your reasoning about the current is correct. You only need to imagine the internal structure of the op-amp output stage. It is the so-called "push-pull stage" that consists of two complementary transistors - upper and lower. When the output voltage is high, the current exits from the upper transistor; when the voltage is low, the current enters the lower transistor and goes to ground (your case). If you need more explanations, I can draw the current path (loop)... but it will be more useful for you to do it yourself.
Answer: Yes, the output of an op amp can both source and sink current. No problem there.
However, you should note that your circuit also has positive feedback through R107. Your assumption that \$V_{IN} = V_{REF}\$ is not necessarily valid.
Comment: Hello Elliot. Thank you for your fast reply. Then my understanding is somewhat helped. Regarding Vin and Vref, then on an actual circuit they are following each other when I watch with an oscilloscope.
Comment: OK, but "following" means that one changes, creating a difference between them, and then the other one starts moving in the same direction.

Current direction in a multivibrator


Shortcuts of split view

Question: I just learned the feature of split view, does anyone know if there are shortcuts for that (moving a window to the left/right half of the screen)? If not, is there anyway to set up shortcuts?
Answer: macOS Catalina 10.15 onwards

Go to System Preferences -> Keyboard -> Shortcuts -> App Shortcuts
Click on the '+' icon
Set the fields to tile a window to the left or right. For eg:

Application: All Applications
Menu Title: Tile Window to Left of Screen
Keyboard Shortcut: Shift + ⌘ + L

Your newly created shortcut is now visible in the dropdown menu over the full screen button!

Note: You need to exit fullscreen (⌘ + ^ + F) to be able to use the split screen shortcut.
Comment: Works also in 11.5.1 (BigSur). On German MacOS just use the German text as it is displayed. For Example: "Fenster auf die linke Seite des Bildschirms bewegen"
Comment: To make it work on my Macbook Pro 2017 | 13.1 (22C65) I needed to add the "path":
Window->Move Window to Left Side of Screen
Answer: I don't like the behavior of the Tile behavior (slow animation and asks you to tile something to the other side).  So, I followed Kewal's method but used the menu titles "Move Window to Left Side of Screen" and "Move Window to Right Side of Screen" (which are hidden menu options that just snap the window to either side, like in Windows/Mac + Better Snap Tools).  (I also added a "Revert" to return the window to its original size+position.)
Comment: I have my shortcuts setup similar to yours, just without the Control key. But the Revert shortcut is buggy. I have Revert setup as `Shift + ⌘ + Down Arrow`. But if I accidentally press `Shift + ⌘ + Up Arrow` it disables the Revert shortcut somehow. The other shortcuts continue working work, just not Revert. Any idea why?
Comment: Awesome, this option is way better. I have the same problem as @TinyTiger though.
Comment: It is not working for Visual Studio Code.
Answer: This post from Stack Overflow has an answer that seems to outlin the only way to do it (as far as I know): bash - Manipulate OS X windows with script - Stack Overflow.
I've not been a big fan of the split view, because that "locks" you into fullscreen mode, which I am also not a fan of. I know people who accidentally started using fullscreen mode when the green ball behavior changed and so they basically keep opening new windows because they get lost in what is already open, which leads to a crazy amount of fullscreen spaces.

My recommendation would be to use a third party window manager. The only difference is that third party window managers can't adjust the split by dragging the point where the windows meet, but otherwise I'd say they are way better. Third party window managers don't work in fullscreen mode, for obvious reasons.

Rectangle - Free

Probably the best free one.

Moom · Many Tricks - $10

Probably the best paid one. I use this one.
Basically does everything that Spectacle does, but has some added functionality and I'd also say it's more flexible...
Doesn't have preset shortcuts, but you can set those yourself and is perhaps more flexible than a lot of other ones in terms of what you can do.
Zoom button hover positioning. Hover over the green plus to get a context menu with the custom positions, layouts and the resize grid.
Snap to screen edges (kinda like in Windows). You can for example drag a window to the left side of your screen and drop it to resize it to the left half of the screen.
Grid based positioning/resize. It works by selecting the area you desire to fill in the screen by using a grid.
You can save layouts. Which basically means that you save the position of specific windows. Then you can you can "restore" that layout via shortcut or from a context menu.
Chaining. If you give multiple "actions" the same shortcut, they become chained. To be honest I haven't really had a need to use this. I tend to just have my shortcuts close to each other so I can quickly do different things, like for example: first shortcut to move the window to a different screen and then second shortcut to position it to the right 1/2 or something.

Mosaic $~13

I also own this, but I tend to use Moom for no particular reason, other than the fact that I've set the shortcuts in Moom and I mostly use shortcuts, so...
This is fairly close to Moom in functionality but there are small differences. I just wanted to mention it because I can see some people liking this more than Moom.
Drag feature that is a bit more flexible than the one in Moom. If dragging windows is your thing, Mosaic is definitely the go to app. Moom doesn't really let you customize those enough to compete with Mosaic in that area.
Mosaic layouts are just a single position each, so it's not the same as layouts in Moom, which are multiple window position/size snapshots.

Also groups may sound at first like snapshots or something, but you can just group layouts, and you can then show them in different situations.

For instance, Mosaic has similar window drag functionality as Moom, except you don't need to drag the window to screen sides. You could make it so that you see group A when dragging a window, but show group B in the touchbar.

Touchbar support. I'm not sure if Moom or Spectacle support that.
Remote mobile app, so you can adjust window positions from a phone or a tablet. These always sound cool at first, but I'm not going to leave a phone screen open for a full day at work, you kidding me? And if I have to then open the phone/app to do window management on mac... That just isn't worth it. Better to just use shortcuts or dragging or what ever. I do understand that some people might want to would want to use it..

I tend to always set these as my basic shortcuts:

Cmd+Alt+← = 1/2 vertical left side of the screen

Cmd+Alt+→ = 1/2 vertical right side of the screen

Cmd+Alt+↑ = Maximize - Fills the whole screen.

Cmd+Alt+↓ = Move to the next screen (Moom can retain the last position/size, which is nice, especially if your screens have different resolutions).

Cmd+Ctrl+← = 2/3  vertical left side of the screen

Cmd+Ctrl+→ = 2/3  vertical right side of the screen

Cmd+Alt+Ctrl+← = 1/3  vertical left side of the screen

Cmd+Alt+Ctrl+↓ = 1/3  vertical middle of the screen

Cmd+Alt+Ctrl+→ = 1/3  vertical right side of the screen

Cmd+Alt+Ctrl+↑ = Center
Answer: As others answered, one way is to set up keyboard shortcuts through System Preferences. In my experience of trying them on, they are limited as well as sometimes buggy.
One good free, open-source application to set keyboard shortcuts is the Rectangle App. This is based of the now no longer maintained Spectacle App. This app has convenient default options for moving current window to left, right, top, bottom, top-left, etc.
See the screenshot below for the default options of Rectangle App.
Comment: Thanks a lot for this suggestion, Rectangle is awesome as it allows also to snap windows when moving them with the mouse in addition to keyboard shortcuts.

Shortcuts of split view


How to sample vertex color in geometry nodes from a mesh onto another?

Question: I've been trying to sample the (vertex) color of the grass from a plane which has been vertex painted, from what I could gather this should be done with attributes in the geometry node editor, I'm a total newbie in geometry nodes but I could get it to output the color attribute, the problem is sampling from the plane, is it even possible?
Answer: The fix was the use of Named Attribute Node. To achieve the proximity-based transfer I used the node tree in the image below. I just fed the named attribute node in the transfer attribute node to get the vertex color.


Openshift source to image build strategy

Question: My campany deployed an Openshift okd4 cluster (4.7) in order to run our api's and web applications. For our build config, we use source to image (s2i) build strategy in order to generate our custom images in conjunction with gitlab to get our source code from. When the custom image is built we deploy it afterwards.
During the build phase for php based project , we use the assemble script in order to install and generate our vendors with a composer install and some other installations as well.
I do face a probleme with project which use this strategy. When executing the assemble script , the openshift builder switch to user 1001 which lead to a permission denied during our build and thus a fail below are the logs from the build :
<code>STEP 4: USER root
STEP 5: COPY upload/scripts /tmp/scripts
STEP 6: COPY upload/src /tmp/src
STEP 7: RUN chown -R 1001:0 /tmp/scripts /tmp/src
STEP 8: USER 1001
STEP 9: RUN /tmp/scripts/assemble
chown: cannot read directory '/var/lib/mysql': Permission denied
</code>
Is there any way to force the s2i builder to stay on root in step 8 ?
any option to specify in the build config to do such thing ?
Or is there any way to do a similar build using dockerfile strategy ?
i tried to specify in the build config this label :
<code>  labels:
    app: build-app
    io.openshift.s2i.assemble-user: root
</code>
The builder did not take it into account.
Any ideas might help
Best regards to all,
Answer: It's an Openshift security policy issue.
Useful links:
Openshift pod runnning with user id not matching with user in Dockerfile
https://cloud.redhat.com/blog/a-guide-to-openshift-and-uids


Project Manager role in Scrum project

Question: We are building a customer portal to be used by 50,000 customers around the world for placing orders, viewing invoices and reports. In parallel, we have two continuous improvement teams, working on devops and BDD. We are using a mix of internal staff and a software house. The portal interfaces to SAP and Siebel. We are using scrum, and have a product owner and scrum masters.  We also have a project director, delivery manager, change manager and test manager.  Where and how could a Project Manager add value?
Comment: When mapping "traditional" roles to roles in Scrum or related Agile methods, the role of Project Manager typically maps to Product Owner. If the PM has a process-centric focus, they could also map to a Scrum Master or other process coaching role. However, it sounds like you already have these covered. Have you looked at the roles and responsibilities of the PM (and if you have an identified individual, their knowledge and experience) and seen if you have any gaps between the work that needs to be done and what this person has to offer the project team?
Comment: We've seen Project Managers mostly contributing in a Scrum of Scrums situations, i.e. where there's need to coordinate multiple Scrum teams.
They also coordinate release activities beyond getting the software out - marketing, documentation, training etc (although, if you have a dedicated delivery manager, that is covered).
It would help understanding the nature of your releases and Scrum teams to give a proper answer.
Comment: Scrum frames the work as a product (not projects) in order to support change and requires each Increment to be thoroughly tested.  It is good to question the value add of a Project Manager.  What value do the project director, delivery manager, change manager, and test manager provide that cannot be completed with Scrum's defined roles?
Comment: Thanks.  We certainly have enough 'management / governance' roles in this project, which I think is leading to some of the overlap and confusion.  I'll follow up on the suggestion of a gap analysis, to understand what is not being covered adequately by the other roles
Answer: I personally don't think the PM role maps to either that of Product Owner, since they generally don't have the requisite business knowledge, or Scrum Master due to conflicts of interest around organisation of tasks, scheduling etc.
DSDM (www.dsdm.org) defines the PM role in a scrum environment as:

Managing the work environment in which Scrum Teams operate, ensuring appropriate resources, facilities and tools are available as required
Performing high level planning and delivery coordination, influencing scrum teams through negotiation with their product owners
Monitoring progress against baselined high level plans
Managing risk and handling problems escalated from the scrum teams
Organising and participating in project planning events

I am guessing between the Project Director and the Delivery Manager you have this covered ...?!
Comment: Thanks.  I'll have a look at the DSDM site.  I like this answer as it recognises the issue of scale we are facing; certainly the traditional 3 scrum roles do not have the time, inclination or expertise to deliver on these, although as I say in the original question, we do have a project lead (director), a delivery manager and a change manager!  Maybe just too many 'managers'.....
Answer: This is a difficult question to answer as so much depends on the particular circumstances in your organisation.
Scrum defines just three roles: The Product Owner, The Scrum Master and the Development Team Member. Those three roles cover everything that is necessary to deliver the product.
A lot of the traditional activities of Project Managers are no longer relevant when doing Scrum. For example project planning and reporting are typically very different to traditional projects.
There may, however, be some activities that are traditionally performed by a Project Manager that are still relevant. Examples might include:

Billing and other finance related activities
Liaising between teams
Dealing with contractual matters

Note that we are talking about activities here and not a role.
The appropriate way to include these activities in to Scrum are to assign them to one of the three Scrum roles. It might be, for example, that the Product Owner picks up the role of handling the project finances. It might also be that a Development Team Member is doing these activities.
There could be a case for taking somebody with Project Management experience and making them a Development Team Member. The key point here is that they are not acting as a Project Manager, but instead they are acting as a team member with particular skills.
Comment: In pure Scrum and smaller projects, this is possibly correct. On large projects, it is hard to get by on the three Scrum roles alone; cross-team coordination augmented with classical project management techniques is required. Also, in enterprise software, with low release cadence, there is still need for release management, go-to-market activities etc. etc.
So, not sure I agree 100% if we look at practical situations.
Comment: Certainly those finance / admin tasks are not going to be dealt with 'naturally' by any of the scrum roles.  So we need to decide how they will be executed.  Cross-team coordination is certainly worth reviewing; we have multiple scrum teams and CI teams, so at some point we need to recognise and manage the dependencies between those workstreams

Project Manager role in Scrum project


How to enter redemption code for Snow Leopard?

Question: I have purchased the Snow Leopard from the UK store for my iMac (Version 10.5.8, 2.8 GHz Intel Core 2 Duo and 2GB 800 Mhz DDR2 SDRAM memory). I received the redemption code 6 months ago and was so confused as it where to put this code. I wasn't around for the last 6 months and now want to try again. It says I need to enter this code in the app store but can't download this app store until I update my software! When I click the apple icon and go on software update, it says my software is up to date! This is such a catch 22, I really don't know what to do!
Comment: You don't need a redemtion code. There isn't an app store for Leopard. Also, 2 GB (if I remember correctly) isn't sufficient enough. Could you try telling all you tried?
Comment: Snow Leopard only requires 1 GB RAM. (More is always better though.)
Answer: You will need to buy the Snow Leopard installation DVD from the UK Apple Store
I'm not sure why you just got a redemption code. If you look at this information page about older versions of OSX it says when you buy Snow Leopard you get a DVD, but if you buy Lion or Mountain Lion you get a redemption code. Are you sure you got Snow Leopard?


Can you store dissolved rennet tablets?

Question: The rennet tablets I have are for large quantities of milk, 50 litres, much larger batches than I would ever make at home. However, separating out a tenth of a tablet is finicky and inaccurate, so I thought it might be better to dissolve half of or a quarter of a tablet in water, and doing the math to add the correct equivalent quantity of rennet solution each time. Can this reconstituted rennet be stored, if so, how and for how long?
Comment: I have no idea about your actual question, but can't you grind up the tablets and separate out a tenth of the powder by weight, provided you have a sufficiently accurate scale? Scales with ~microgram accuracy are fairly easy to come by, these days.
Comment: @LSchoon Good idea - I hadn't thought of that. Though my scale goes to 0.1g, it tends to be inaccurate with small numbers.
Comment: I picked up a scale with 0.001g precision ("jeweller's scale") a while ago for £14.
Answer: Yes, you can.  In fact, high-quality rennet is sold in liquid form (and I recommend this over tablets).
Just put the dissolved rennet in a bottle and store it in the fridge (it will degrade at room temperature).  It should be good for a few months.
Given your method, though, you'll want to be very sure that the tablet is completely and evenly dissolved.

Can you store dissolved rennet tablets?


Convert -24V to 5V (Digital)

Question: I am using a module which gives me an output of -24V. I need to convert this to +5V so it can be read by my NI Data Acquisition Device. What would be the easiest way, I was trying to use a P-channel MOSFET giving it the module output of -24V as Vgs and operating it with a +5V power supply. But it seems to get switched on at very small negative voltages, (my Vgs or Vin without receiving the module output is around -0.02V and this seems to be enough to switch on the P-mosfet). Are there better ways to do this..I would ideally not like to use an op-amp(inverting configuration) as I would need extra power supplies to operate one. (As of now I have two dc power supplies giving me -24V and +5V). Thanks!
Answer: Edit - I realised you might want from 0V to +5V for -24V to 0V, so here is another NPN based option that might do the trick, and also does not need the -24V rail. I left the FET based circuit there anyway in case it is of interest. As noted below you might have to fiddle with values a bit, this was just intended to put the idea across.
I wasn't entirely sure whether the signal is analog or digital, as you mention digital in the title, but also an acquisition device (so I thought it may be possibly heading for an ADC) so I assumed either was possible, hence the attempt at linearity.
NPN circuit

NPN circuit simulation

Alternative Option
An N-channel FET source follower might work okay with a voltage divider on the input. Say something like a 10:1 divider for a range of -2.4V-0V at the gate. The source of the FET to 0V through a resistor and drain to +5V.
This won't be the most linear but shouldn't be too bad if you fiddle around with values a bit to adjust the desired ratios. You could maybe add a constant current source (e.g another N-channel FET with source to -24V through e.g a 5K resistor, gate tied to source and drain to source of upper FET) on the source to make it more linear if necessary.
Here is a circuit and simulation of the (more linear) constant current idea (the green line is +Vout as Vin is swept from -24V to 0V):
FET circuit

FET circuit simulation
Answer: "Easiest" may be to use an opamp - 2 resistors and an 18 cents SOT23-5 IC may be hard to beat.
This assumes a 5V supply is available, which seems likely given the spec and requires a rail to rail output opamp - available from as little as US 18 cents in 1's.
5V rail-rail 5V supply opamps:

For 29c/1 in stock at Digikey you can have the rather nice Microchip MCP6001 opamp - rail to rail 2.5 - 6V operation. Nicely suited to the task.
Effect of input offset voltage on accuracy: +/- 4.5 mV max input offset voltage giving an unadjusted error of +/- 0.02% max of Vin (about 12 bits accuracy). So eg about 2% worst case error at 1% of full scale input.

Or for 18 cents/1 the similarly performing ST TLV321  also available in dual and quad versions.

The following assumes you want -24 - 0 to translate to 0 - +5V
(ie Vo = 0 when Vin = -24V, Vout = 5V when Vin = 0V.)
Providing (0 to -24V) to (0 to +5V) conversion (inverted polarity compared to above) is only slightly more complex. Advise if that's what you want - although inversion in software would allow this basic 2 x R + IC solution to still be used.
Assume for now that 24k (R1) and 5k (R2) resistors are available.

As non-inverting input is at ground potential and as opamp drives inverting input in negative fedback mode it will act to always drive inverting input to ground.
So current into inverting input via 5k = Vo/5k
= Current out of inverting input via 24k = - Vin/24k (note negative sign)
So V0/5k = -Vin/24k so
Vo = -Vin x 5k/24k.
Actual resistors selected to give as close to desired ration as required.
Non-inverting input to ground will ideally have a resistor equal to parallel combination of two resistors to compensate for input leakage current. (In above example = 24k//5k = 4.14k)

Convert -24V to 5V (Digital)


can i use 4 3v coin battery for a 12v grain of wheat led bulbs

Question: I have 12v mini grain of wheat LED bulbs I want to use for street lights in my miniature Village of Wonder.  Because of the size of the street light the coin battery CR2032 3v is the right size.  The mAH is 220.  4 of these batteries would be 12v. Does this sound like it would work.  If not what battery would work?
I have the bulbs and would like to use them,  with batteries instead of electricity.
Thank You,
CjJehn
Comment: @TonyStewart.EEsince'75 Hi Tony, I recently posted a question regarding this and found out that a battery's capacity is dependent on current draw. The 220mAH capacity is only valid at the continuous drain current typically. For a CR2032, that rating is ~0.1-2mA. If operating at 10mA, that capacity is greatly reduced, thus current draw and battery life do not form a linear relationship.
Comment: Very true. For LiPo it is standardized to 20h then we derate for shorter times e.g. C/40 ( 30 minutes) but for Li/MnO2 its rated something like mAh in 1200h or a fixed R like 15k
Comment: What current you expect to draw?
Comment: If you don't know what current the bulb draws and can't measure it, do you have link to the product? How many bulbs do you intend to run from a single battery stack?
Comment: They would work but last ~20 hrs. @10mA
Comment: I would use 5mm and fishing line and drill a hole epoxy and feed like fibre optic plastic cable to lamps.  With ultrabright and under board wiring, then you dont need batteries.  Run several in series to match supply V.
Comment: the bulbs are Direct Current (12Vdc
Comment: If you can fit them somewhere semi-remotely you'd get much better hours/$ with eg AA's.
Answer: If it is an LED, which is doubtful, connecting them to the battery is not a good idea.
A light bulb will have its own filament resistance, so then it would be fine.
LEDs should be driven by a constant current source.
At a minimum you must use a resistor to limit the current.
With nothing to limit the current the battery will be drained very quickly if the LED does not fail first.
The ohm value of the resistor should be selected carefully for efficiency.
Using a resistor you must balance efficiency and brightness.
The forward voltage of an LED is a characteristic of the LED.
The forward voltage range for LEDs is typically 2.0-3.9 volts.
The forward voltage will vary depending on the current and the LED's junction temperature.
There are no 12V LEDs.  A White 12V LED is actually an LED array and will have 3-4 LED chips.  Red maybe 4-5.  Depends on the  LED's forward voltage.
To select the resistor you must measure the forward voltage of the array or string of LEDs.

The input voltage to an LED circuit must be more than the forward voltage.
In the circuit below the excess voltage is dropped across the resistor.
The closer the input voltage is to the LED forward voltage the less energy that will be converted to heat by the resistor rather than light.
LEDs are greedy, they will take all the current allowed.
So the resistor value must also limit the current.
The correct way would be to use a linear buck step down regulator.
If the input voltage is not greater than the LED forward voltage then a boost step up regulator.
A linear regulator is very simple and very inexpensive (about $2.00).
Below is a $1 switching regulator but if you use only analog dimming (no PWM) you do not need the inductor.
Vin is your battery
Iadj is the current adjust which uses a single resistor
Cin is not needed when powered by battery
VCC is a 5V output.
The voltage and current of the schottky diode is dependent on the circuit in your case 20V 100mA would do.
Answer: Yes, that should work. Assuming the 12 LED bulbs have an internal resistor (probably true) you can connect the LED directly to the 4 batteries


Archive Utility password

Question: Right when I opened Archive Utility for the first time, it asked me for a password for "activated.info". What password is it talking about and what would I put? I've never used it before so I've never set up a password.
Answer: It's possible to put passwords on archives as a protection measure.
The password here would be a user-chosen password when compressing the original content to the zipped archive that you're trying to open.
Go back to the source where you downloaded the file and see if there's a password listed somewhere.

Archive Utility password


Getting user photo from SPUser using WSS Object model

Question: I am trying to retrieve a user on Sharepoint's user photo through the WSS 3.0 object model. I have been browsing the web for solutions, but so far I've been unable to find a way to do it. Is it possible, and if so how?
Answer: Here is a code snippet that should help get the job done for you.  You may need to do some additional validation to avoid any exceptions (ensuring the profile actually exists, ensuring the image URL actually exists, etc...):
<code>    //get current profile manager
    UserProfileManager objUserProfileManager = new UserProfileManager(PortalContext.Current);
    //get current users profile
    UserProfile profile = objUserProfileManager.GetUserProfile(true);
    //get user image URL
    string imageUrl = (string)profile[PropertyConstants.PictureUrl];

    //do something here with imageUrl
</code>
Comment: profile[PropertyContants.PictureURL] returns a collection so you will need to get the value from that since you can't cast it directly to a string.
Comment: This will only work for MOSS - WSS on its own does not contain the profile manager service or class.
Answer: If you are strictly talking about WSS 3.0 (and not MOSS), then you really don't have global user profiles per se, but a hiddenh User Information List in each site collection. That mean none of the stuff in the Microsoft.Office.Server namespaces is available to you.
However, you can update the User Information List programatically as long as you know the URL to a user's picture.  As long as you're running with some kind of elevated privileges, you should be able to manipulate this list just like you can with any other SharePoint list.  Keep in mind that this list is only good for the scope of a site collection, so users would have to make this same update all over the place to actually have a photo URL.  Plus users don't get into the User Information List until someone assigns some kind of permission to them, so not every user in your domain will be in there.
The clean way to handle this is definitely the User Profile mechanism is MOSS, but if that's an option the question should really be updated to ask about MOSS vs WSS.
Answer: Ah, You have to use the UserProfileManager class.
More information here: http://msdn.microsoft.com/en-us/library/microsoft.office.server.userprofiles.userprofilemanager.aspx
Example use:
<code>public override void ItemAdded(SPItemEventProperties properties)
{
    // Get list item on which the event occurred.
    SPListItem item = properties.ListItem;

    // Set the Author Image field to the user's PictureURL if it exists.
    using (SPWeb web = properties.OpenWeb())
    {
        // Author: {C32DB804-FF2D-4656-A38A-B0394BA5C931}
        SPFieldUserValue authorValue = new SPFieldUserValue(properties.OpenWeb(), item[new Guid("{C32DB804-FF2D-4656-A38A-B0394BA5C931}")].ToString());

        UserProfileManager profileManager = new UserProfileManager(ServerContext.GetContext(web.Site));
        UserProfile profile = profileManager.GetUserProfile(authorValue.LookupId);
        UserProfileValueCollection values = profile[PropertyConstants.PictureUrl];

        if (values.Count > 0)
        {
            // Author Image: {37A5CA4C-7621-44d7-BF3B-583F742CE52F}
            SPFieldUrlValue urlValue = new SPFieldUrlValue(values.Value.ToString());
            item[new Guid("{37A5CA4C-7621-44d7-BF3B-583F742CE52F}")] = urlValue.Url;
        }
    }

    item.Update();

    // News Text: {7F55A8F0-4555-46BC-B24C-222240B862AF}
    //

    // Author Image: {37A5CA4C-7621-44d7-BF3B-583F742CE52F}
    //

    // Publish Date: {45E84B8B-E161-46C6-AD51-27A42E4992B5}
    //
}
</code>


Filtering with Expression> using view model

Question: I have a method for paginating a table in a database. Paginating part is not important, so the only focus is filtering part.
Since Where method from Entity Framework Core asks for Expression<Func<T>> as a parameter, where T is an actual model and I have action in controller which asks for a valid view model, how can I use that view model to generate Expression<Func<T>> from that view model?
I want to be able to filter table based on filled parameters in the view model.
Comment: Can you add more details to your question?
Answer: Well you basically need the Expression<Func<YourModel, bool>>. You build a filter to pass to EF.  The below info is more than enough to get you started.
So imagine you have a class like the below. This can be any class not just a ViewModel.
public class Person
{
 public int Id {get;set;}
 public string Name {get;set;}
}

The expression would look sth like this.
Expression<Func<Person,bool>> predicate = p => p.Name == "Some name";
db.People.Where(predicate); // How you would use it in a db context

You can also view this link that uses LinqKit.You do not have to use LinqKit but has some nice examples http://www.albahari.com/nutshell/linqkit.aspx

I want to be able to filter table based on filled parameters in the view model.

Since you want the above you can append to your predicate and just pass it to your Where,Any,Count... as one.
You can see a lot of techniques to how to append to your filter here:
How to Append to an expression
My favorite way of appending is using linqkit predicate builder http://www.albahari.com/nutshell/predicatebuilder.aspx
In the above link many techniques are showcased including the predicate builder.


java vs C++ for natural language processing

Question: Could you please let me know which one is better to learn amongst Java and C++ for natural language processing with respect to library,support etc.
Best, Thetna
Answer: It looks like you have a number of options with either language.
The solution is far more than the language it is implemented in.  Either language should provide sufficient power.
Between Java and C++, in general, I would choose Java.  Java did come a bit after C++ and it does address a few concerns that the C++ community had (note the past tense).  That said, depending on what you are integrating with, whether you view automatic garbage collection as a benefit or a detriment, and which language you or your team is more intimate with, you might easily select either one.
Perhaps to better answer your question, you should consider the criteria for selecting a good programming language.
Answer: Either language is technically capable of doing rich NLP.  Anecdotally, it seems that the most popular NLP libraries, such as Stanford's and LingPipe, are both in Java, however.
Also, if you are planning on developing a web application, Java is very well suited for that to.
That said, C++ is equally capable as java, and there do exist established NLP libraries there as well.


What is the word for when you say something like "I'm dying" but don't mean it?

Question: I'm really have trouble even describing the definition of this word, but I saw a post somewhere that was talking about how people these days say things like, "I'm dying" or "I'm dead" or something like that but they obviously don't mean it. Like they are being extreme. This is truly murdering my brain right now. (Kinda like that.)
Comment: hyperbole hyperbole
[hahy-pur-buh-lee]
Spell  Syllables
Synonyms Examples Word Origin
See more synonyms on Thesaurus.com
noun, Rhetoric.
1.
obvious and intentional exaggeration.
2.
an extravagant statement or figure of speech not intended to be taken literally, as "to wait an eternity.".
Comment: Isn't it _melodramatic_ or _drama queen_?
Comment: Are you asking the difference between "I'm dying" and "I'm dead"?
Comment: Reminds me of the story of the boy who cried wolf. Look here: https://www.storyarts.org/library/aesops/stories/boy.html
Comment: Maybe just everyday exaggeration?
Answer: Histrionics

(used with a sing. or pl. verb) Exaggerated emotional behavior calculated for effect. (American Heritage, found at thefreedictionary.com)

(I couldn't find my own interpretation of this word in any of the dictionaries I checked, but I think that your typical natural-born drama queen or prince doesn't always do it for effect.  Some people do it for more internal reasons.)
Example:

I'm glad to be home.  I'm exhausted from one of my students and his histrionics.  I know perfectly well his jabbering about wanting to kill himself isn't true suicidal ideation, but I couldn't very well ignore it, could I?
Answer: Hyperbole - exaggerated statements or claims not meant to be taken literally
I was looking for a word to reflect a comment to a new Snow Patrol album.
"The album is that bad I would send it to anyone for free".
I know its not life or death but the album is the pits. You should hear it!
Answer: I don't think this word has a proper meaning by itself but it does in the context. Look at the following examples:

You have been hiking, or working so hard and you need a break, then you can say "I'm dying" which means you are tired, weary.
You have done something wrong and you are afraid your parents will tell you off, then you can say "I'm dead" which means your parents will punish you.


Do Hydras regenerate 10 or 20 HP after a head is cut off?

Question: In 5e, does the Hydra regenerate 20 HP or 10 HP? It says per head regenerated, so does that mean per stump regenerated on or per new head?
Answer: It gets 10 HP per head regrown
From the Hydra in the MM pg. 190, emphasis mine:

Whenever the hydra takes 25 or more damage in a single
  turn, one of its heads dies. If all its heads die, the hydra dies.
At the end of its turn, it grows two heads for each of its heads
  that died since its last turn, unless it has taken fire damage
  since its last turn. The hydra regains 10 hit points for each head
  regrown in this way.

The key word there is each. So, if at the end of it's turn, 3 heads have died but there is still 1 alive, the Hydra will grow 6 new heads, gaining 10 HP per head grown, for a total of 60 HP. The heads already alive do not regenerate HP.
The HP regeneration is per head regrown.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/74385/discussion-on-answer-by-lino-frank-ciaralli-do-hydras-regenerate-10-or-20-hp-aft).
Comment: So, if I understand correctly, it only loses 1 head per round regardless of extra dmg? You can't chop off more than 1 head power round by dealing eg 50+ dmg?
Comment: No. It can only lose 1 head *per turn*. Not per round. So for example: Your Barbarian swings and crits, deals 32 damage and severs a head. Next up is your Ranger who fires a barrage of arrows into the marked hydra, dealing 28 damage, severing another head. Then your paladin wades in smiting like a monster, dealing 61 damage, killing another head. Next up the Hydra goes, makes its attacks and moves about. At the end of the turn since nobody has prevented its regeneration, it regrows 6 heads and gains 60 HP back.
Answer: 20 hp, if it lost one head
The hp gain is per head regrown not per head lost.  The hydra 'regrows' 2 heads for each head it loses, so it gets 20 hp, effectively, for each head that was severed.
It isn't going to always be 20 hp, though, because the hydra might lose more than one head in a single round.


SQL Search in Ruby

Question: Ok, this seems like a duplicate question to this:
SQL Super Search
but it's a different approach. Before I was looking for a lean and efficient way to do this entirely on the database side, but now I was wondering if anyone knoew how to do something like this in Ruby.
I've tried this, and while I can run a basic
*SELECT table_name, column_name FROM INFORMATION_SCHEMA.COLUMNS*

I can't seem to run subsequent queries without getting
' WARNING: #<ODBC::Statement:0x2c73e84> was not dropped before garbage collection. '

Can someone show me a really easy way to just run sql text and parse the results (and ideally run more queries based on those results)?
EDIT: To clarify, my db code so far is along the lines of:
oConn = DBI.connect('DBI:ODBC:AX')
oConn2 = DBI.connect('DBI:ODBC:AX')

sth = oConn.execute("Select table\_name, column\_name from information\_schema.columns")
sth.fetch do |row|
  table = row["table\_name"]
  column = row["column\_name"]
  puts table + "," + column
 #Dynamic sql here
  sth2.fetch do |row2|
    puts row2[0]
  end
end
sth.finish

Answer: That warning is a feature, according to Christian Werner. Try oConn.finish after oConn.execute and don't forget to .disconnect in the end.
irb(main):033:0> require 'dbi'
=> false

irb(main):034:0> oConn=DBI.connect('DBI:ODBC:Blacklisted')
=> #<DBI::DatabaseHandle:0x2d50af0 @trace_mode=2, @handle=#<DBI::DBD::ODBC::Database:0x2d50a3c @attr={}, @handle=#<ODBC::Database:0x2d50a64>>, @trace_output=#<IO:0x2846adc>>

irb(main):035:0> sth = oConn.execute("Select * from blacklistednews where id=12140")
=> #<DBI::StatementHandle:0x2d4c838 @trace_mode=2, @fetchable=true, @row=[nil, nil, nil, nil, nil, nil], @handle=#<DBI::DBD::ODBC::Statement:0x2d4c784 @arr=[],@params=[], handle=#<ODBC::Statement:0x2d4c7c0>>, @cols=["id", "title", "url","description", "pubdate", "synced"], @trace_output=#<IO:0x2846adc>, @prepared=false>

irb(main):036:0> sth.finish
=> nil

irb(main):037:0> oConn.disconnect
=> nil

irb(main):038:0>

Comment: I get a NoMethodError on 'drop'
Comment: i still get it with finish:
odbc.rb:7: undefined method `finish' for # (NoMethodError)

SQL Search in Ruby


Mixed strategy equilibrium for subgame

Question: A game has 3 players and the last player to move is player 3. In determining the subgame perfect equilibrium there is a subgame where player 3 has two choices and for each choice the payoff for that player is 0. The full payoff vectors are [3, 0, 0] and [0, 3, 0]. Are there infinite mixed strategy equilibria for this subgame? If not, what is the equilibrium? What is the expected payoff?
Answer: When solving by backwards induction, whenever there is an indifference, that player can play any distribution over their equivalent choices. You will need to solve for the rest of the equilibrium in terms of each distribution they might choose.
This does mean potentially infinitely many equilibria depending on the rest of the game.

Mixed strategy equilibrium for subgame


Can someone put entanglement in laymens terms?

Question: Can someone put entanglement in laymens terms? I understand that photon spin affects an entangled photon across any distance, what I don't understand is how spin works, does a photon only have "spin after its measured", and if so, doesn't this have massive communication applications? I haven't taken physics yet, so keep that in mind.
Answer: I will give you an everyday example of entanglement. Suppose that you knew a pair of twins , Paul and James, and you were told how lucky they were because each had become a director of a bank, one in Philadelphia and the other  in New York. If you meet Paul in the bank in Philadelphia you  immediately know that James has the post in New York.
With photons and other elementary particles  and quantum mechanical systems, there exists a mathematical function ( analogous to the knowledge of who Paul and who James is) , when one measures a part of the system, inevitably, due to the mathematics, you know what the rest of the system is.
In case of photon spin, take a pi0 meson which decays into two photons. If one measures the spin of one of the photons to be +1, one immediately knows that the other that left unmeasured has a spin of -1, because of the functional dependence due to the decay , no matter how far away it has gone.
Basically, the state of photon 2 depends (is entangled) with what is going on with photon 1, even if they are far apart. The photons are entangled , tied up to each other, due to the mathematical function that connects them and the nature of a measurement.
Answer: I want to add to the (otherwise excellent) answer of anna v.
Because from that answer it sounds like it's not such a big deal, right?
The photons could have been sent out as (photon 1: +1, photon 2: -1) or as (photon 1: -1, photon 2: +1), so if you measure one you'll obviously know the other immediately.
The crazy thing about it is that until we measure one of the photons, we are neither in the one case nor in the other.
This can be experimentally confirmed, but it's probably difficult to understand if you haven't taken physics yet.
The keyword here is Bell inequalities.
Maybe you can get some kind of intuitive grasp if you know that this property "spin" can be measured along different directions.
And once you have measured the spin of one of the photons in some direction, the spin of the other one will be aligned along the direction the first one was measured in, and exactly opposite.
Answer: A photon always has spin. The question is how much of that spin is projected along a certain axis (usually the convention is to choose the z axis, but this is arbitrary and we could choose any axis.)
The entanglement part is sort of like this:
Suppose you have 2 photons that are really far apart, and they are in a state that is explained by a function that says $ \psi = (up,down) + (down,up) $. Let (up,down) mean that the first photon is up, and the second photon is down. Let (down,up) mean that the first photon is down and the second photon is up.
When you measure a photon, the system "collapses" (although, the wave function collapse isn't as mystic nowadays as it was 50 years ago) to either (up,down) or (down,up).
So suppose that the photons were $ {really} $ far apart. If you made a measurement on photon 1 and the wavefunction "collapsed" to (up,down) then you know right away that the second photon is down, even when they are lightyears and lightyears away.
Answer: In quantum mechanics a system can be described as an abstract state containing all information we can possibly have about it. We use this information to predict the outcomes of measurements made on that system, but this prediction is intrinsically probabilistic.
Two systems are entangled when we find a correlation between the outcomes of measurements on both systems that is not explainable in terms of classical states. By this I mean that the correlation does not arise from structural or dynamical relationships between the systems that we could understand and model, instead it is there because somehow, and this is very clear in the mathematical framework, although hard to make sense of, both systems are actually one indivisible entity: they are described by the same quantum state, in a superposition of possible configurations, so that it is not possible to, well, "disentangle" them.
What is weird here is that the systems may be spatially separated so that measurements can be made while there is no causal connection between the systems: what happens to one system as we measure it is not able to have an effect to the way the other one is being measured. So the entanglement correlation is non-local, and acausal. It is just there.
It is a correlation between probabilistic distributions, observable at posteriori, which cannot be interpreted as a relationship from cause to effect. And thus, no, it does not lend to any communication application. It is best understood (in my opinion) as a sort of underlying nonlocal symmetry of the physical world.


Physics in the primary coil of an ideal transformer

Question: My textbook says that when primary winding of an ideal transformer is connected to an alternating voltage, an alternating current flows which in turn produces an alternating flux which causes an EMF to be induced in the primary coil which is equal and opposite to the applied voltage. Now how can current flow, if the applied EMF and the back EMF generated in the primary coil are equal? Also if we take an ideal transformer, the resistance of the windings will be zero and if it is zero then the current in windings will become infinite which is something I am not able to grasp. Please explain in detail. Thanks in advance.
Comment: Newton's  3rd law says that there is an equal *reaction force* to any *force* but that does not mean that a *force* cannot accelerate a body.
Answer: An ideal transformer, as the name implies, is not a real object. Thus, in an ideal transformer there are no windings, no core, nothing.
An ideal transformer is an element which is indirectly defined only through the constitutive equations
$$\begin{align}v_2 &= \frac{1}{n}v_1, \\ i_2 &= -ni_1, \end{align}$$
where the reference directions of voltages and currents are chosen according to the convention of multiport devices.
And because of this, the ideal transformer works also in DC!
That said, an ideal transformer can be seen as a limiting case of a pair of lossless coupled inductors with a coupling coefficient of 1 when the primary inductance goes to infinity. In this limit, the current in the primary winding tends to zero when the primary inductance tends to infinity, if the secondary winding is not loaded.
I discussed this limiting case in this answer.
Answer:
Now how can current flow, if the applied EMF and the back EMF generated in the primary coil are equal?

Because they are equal only in ideal transformer (ideal wires without dissipation). Then extremely small remaining force is needed to move the electrons, as they are very light. This extremely small force is customarily neglected in discussion of current in ideal conductors.
In real conductors and real transformers, there is dissipation of energy, electrons experience resistance to motion, so actually induced EMF does not counteract the applied electrostatic field exactly, but some non-zero force remains. This remaining force pushes the current against the dissipative forces like Ohmic resistance.

Also if we take an ideal transformer, the resistance of the windings will be zero and if it is zero then the current in windings will become infinite which is something I am not able to grasp.

Resistance being zero does not imply current will become infinite. Infinite current would require infinite energy which is not easily available, so current will only get as high as available energy and physical laws allow.
In ideal conductor with zero resistance, current is limited by external conditions and laws such as the Faraday law. Current can increase, but this will cause induced EMF to be present, which means somebody has to supply work to increase the current. As a result, current does not get arbitrarily high because nobody can supply arbitrary amounts of work.


portfast uses enabled does not producing loop

Question: I want to know how a portfast will cause loop. I tried connecting a switch with portfast . As soon as another switch connected it enter to normal switch and has the block port.
Comment: It is possible, even likely, that the port is being put in the blocking state in this case because of other systems like BPDU Guard that can put the port in a blocking state right away even if portfast is configured on the port.
Comment: Might be a language barrier here, but it's not clear to me, from your wording, that you've definitely created a loop. Simply connecting a single cable between two switch won't ALWAYS give you a loop...
Answer: Portfast is applied to final stations ports because you suppose that only one host will be connected. In this case, the host will go to Forwading state inmediately after getting link.
If porfast is not applied, final station has to transition from all STP states (blocking, listening, learning, etc. Depends on STP version.). The consequence is that the host spend about 45 seconds to have connectivity.
Is porfast causing the loop? NO but it amplifies consequences. The L2 loop will exist in both cases but with porfast enabled you will have immediately consequences.
Answer: You should only use Portfast on either A)A port that will only have a single device connected to it, or B) if you know EXACTLY what you are doing, and have planned accordingly. Otherwise, loops can happen, and potentially knock down your network. In this case, Portfast just makes the port go instantly to forwarding, but it still sees the BPDUs coming from your other switch, which makes the port go into 'blocking' state.
I'd recommend that you remove the portfast command on the port facing another switch, and configure those ports (on Switch A and B) as trunk ports, then run Rapid Spanning Tree.
Answer: Portfast just makes the port basically bypass the blocking listening and learning phases of stp and goes straight to forwarding.
Always use "bpdu guard" in conjunction with porfast on your access interfaces, this will protect your network from loops, if a rogue switch is connected, by immediately putting the interface into error disabled state.


Different colors on different screens

Question: I'm making a background image for a PDF document.
I have just realized that the same jpeg background looks really different (different colors) on different screens.
Is there a way to avoid this huge bias?
Are there any suggestions?
Comment: I would ask this on Graphic Design.
Comment: Good question. I found myself thinking the same thing when sending out screenshots of an iPhone app by email. They may look very different to the reviewer than they do look on the device itself. Big problem when colors are concerned.
Answer: There are measures you can take to work with web compatible color profiles as SteB mentioned, but the overal problem you're describing is generally an accepted downside to other people being able to view your document on their own screens.
Most computer screens even fluctuate ever so slightly over time in regards to color, so even if you had the same model of computer screen side by side you might be able to detect a difference.
So in short, there really isn't a way around this. It's not worthy losing sleep over though.
Answer: There's a free tool called Calibrize that will help you control your own color environment. But it still won't do anything for other's environments. Read the color management primer for an explanation of possibilities and pitfalls.
Calibrize is a free consumer grade software solution, and it sure is a heck of a lot better than nothing. But for professionals I'd recommend investing in a simple hardware measurement device such as a Colormunki Smile or a Spyder. Along with the right settings, this will make sure that at least your own system adhers to color standards. If it looks off on another monitor, it will be their fault, not yours. So it will only partly fix the color problem, but it will fully fix the issue of responsibility.
BTW, if you're on a Mac, you're in luck. Check your system settings> Monitors> Color. That should get you on your way.
Answer: There is an option in Windows to add and configure a colour profile (I assume something similar is in other OSes), you could give this a try, along with adjusting the colour temperature through the screen's own OSD.

Different colors on different screens


Is there any limitation to Share Point Collect Feedback Workflows Comment Box?

Question: I am creating several collect feedback workflows for my company to review multiple documents. The goal is to set one workflow for each document, but several documents are 100 pages long and there will be quite a bit of feedback that will be provided. I wanted to see, is there a limit of how many characters in the comment box when collecting feedback through the workflow? Thank you!
Answer: I've tried in Sharepoint 2013 (activating the Collect Feedback Workflow from 2010) And works well with more than 12000 characters (twelve thousand).
Doing some research I've found an useful link about SharePoint storing textareas as "nText" SQL Type.
What is the max limit for number of characters in multiline text in Sharepoint?


Do I need to create a separate project if I am consuming my own API?

Question: If I have an API and I am the one consuming it, should the front-end be a separate project?  I'm using Visual Studio ASP.NET Core 1.x.
Answer: An API is an interface first and foremost (and what the "I" in "API" stands for).
In general, it makes sense to have an interface be a separate component to decouple it from the implementation underneath. This also makes it easy to share: you can provide a lean library with only the interface specification, making it easier to use and understand. At runtime, the implementation can be dynamically loaded.
Another benefit is if the implementation is not closely coupled at the module level, it is possible to swap in an alternate implementation. This could be a "mock" and could be useful if, for example, the underlying "real" implementation touches databases or other persistence (or remote) systems that you do not want to mess with during testing.
Do you need to keep the interface separate? No. Is it a good thing? Yes.
Comment: I feel like your answer, while being technically correct in the end, discusses a whole different subject.
Answer: From a "the way Visual Studio does black magic so I could easily shoot myself in the foot" I would have a separate project in my solution at the very least, if not an entirely separate solution to keep things completely clean.


Is there a way to have navigation bar links only show up for people with specific access?

Question: I was wondering if there way a way to add a new link to my navigation bar in SharePoint that only certain people with the right access can see.  I am aware that there are different groups with varying levels of permissions and my users are already put into those groups.  I was hoping to make an "Admin" option in the navbar that only shows up for a select few people with full access of the site.  Is there a way to accomplish what I want? I was thinking maybe in the Term Store Management tool but I didn't happen to see anything.
Answer: It seems audience targeting on navigational links will be the thing you want. The site owner must enable audience targeting for site navigation. Once enabled, any site editor can target menu links to specific audiences.
You can check it here:https://support.microsoft.com/en-us/office/target-navigation-news-and-files-to-specific-audiences-33d84cb6-14ed-4e53-a426-74c38ea32293


DATABASE design for storing specifications?

Question: I am creating , a site like gsmarena , can any one help me with database design to store mobile specifications like here "http://www.gsmarena.com/asus_padfone_infinity_lite-6120.php"
as user can add more custom specification ,
Answer: You can have Phone table where you store phone.
Create two another attributes and sub-attribute tables.
Attribute Table will look like below:

AttributeId (PK, auto generated int is recommended)
PhoneId (FK to Phone tablet, not null)
AttributeKey (String, not null - text like "DISPLAY" "DATA" etc.)
AttributeValue (string, null)

SubAttribute Table will look like below:

SubAttributeId (PK, auto generated int is recommended)
AttributeId (FK to Attribute tablet, not null)
SubAttributeKey (String, not null - text like "Dimensions" "Size" etc.)
SubAttributeValue (string, null)
Comment: And one more question ,which will be good for phoneid ? serialized   or normal data?
Comment: generally you should prefer auto-generated integer IDs. In a separate table, map that integer ID to phone name etc.


not able to include few header files in dev c++

Question: When i include few header files like #include "afxwin.h" and #include "afxext.h" in Dev C++, its showing me file not found. Can anyone help me?
Comment: These are MS Visual C++ precompiled headers, and you aren't going to find them in GCC based compilers. http://en.wikipedia.org/wiki/Precompiled_header
Answer: I was having the same problem and this worked for me
In filename.cpp, I put: #include "full path to filename.h"
When using the file, I had put: #include "full path to filename.h" and #include "full path to filename.cpp"
Answer: These are MS Visual C++ precompiled headers (related to MFC):
http://en.wikipedia.org/wiki/Precompiled_header
You might get lucky and be able to compile and use them in combination with GCC/Dev-C++, but I wouldn't bet on it (see the third comment on the opening post):
How do I move from the MSVC compiler to GCC on Windows?
Assuming that comment is correct, you won't be able to use MFC on GCC compilers. And because Dev-C++ uses these, you won't be able to use MFC in combination with Dev-C++ either. As an alternative, you could try out a free version of MS Visual Studio to be able to use the headers.


A flyback diode selection problem?

Question: I have a motor that constantly rotates in reverse, the current is measured at 5-8A, and the selenium rectifier (Fwd: 1.2A Rev: 150V) is used.But it didn't take long to burn, what should I replace it with?
Comment: Why are you putting 5A through a 1A diode?  This is likely a very old setup, selenium diodes were obsolete 50 years ago. Did something change recently?  Was a larger motor substituted?  Is the "connector" a terminal block?  Is there any relay switching going on?
Comment: The only thing that has me hesitating to say just use a silicon diode is the word "snub" on the diagram. It could be that the reverse characteristics of the selenium diode are important in some setups, like when the terminal block is wired to use alternating current. If you are only using DC, you may not need the diode at all. But, I don't have enough confidence to say for sure, I am still struggling to understand the diagram. There are a few people here that know a lot more about motors than me, maybe one of them will have something to say.
Comment: you have a resistive lead, maybe add a higher resistance in series with that and use a 10A silicon diode.  6V @1.2A suggests 4 ohms might be the right ballpark,
Answer: The supply is applied between CONTROL WIRE #1 and CONTROL WIRE #3? It looks like the diode it there only to freewheel the current through the field coil (which is usually highly inductive) when power is removed. It shouldn't be taking current continuously, only momentarily on disconnection, so the continuous rating of the diode isn't the issue.  The forward drop of the rectifier plus the resistance of the "RESISTIVE LEAD" would serve to decay the current quickly.
Selenium diodes are used since they have no reverse recovery issues, silicon diodes have to absorb a certain amount of charge to establish the depletion region, still allowing a short voltage spike to be generated. A Schottky diode would work in place of the selenium device if you need to replace it.

A flyback diode selection problem?


Is multilevel modelling simpler, more practical, or more convenient using Bayesian methods or frequentist methods?

Question: In this community wiki page a twice-upvoted comment asserted by @probabilityislogic asserted that "Multi-level modelling is definitely easier for bayesian, especially conceptually." Is that true, and if so/not why?
Answer: I agree with Matthew. I'd like to add two observations.
There are several ways to write a multilevel model, but the main alternatives are the leveled and combined forms. As you know, you can write a simple multilevel model as:
$$\begin{align}\text{Level-1}:\, y_i=&\beta_{0j[i]}+\beta_{1j[i]}x_i+\varepsilon_i \\
    \text{Level-2}:\qquad &\beta_{0j}=\gamma^0_0+\gamma^0_1w_j+\eta^0_j \\
    &\beta_{1j}=\gamma^1_0+\gamma^1_1w_j+\eta^1_j
  \end{align}$$
or as:
$$y_i=\gamma^0_0+\gamma^0_1w_{j[i]}+\gamma^1_0 x_n+\gamma^1_1 w_{j[i]}x_i
  +\eta^0_{j[i]}+\eta^1_jx_i+\varepsilon_i$$
In the first form, you model all the coefficients in the same way and writing a bayesian model in BUGS, JAGS or Stan is (almost) straightforward, and you can easily add a third level. When using mixed-effects sofware (PROC MIXED, lmer, etc.) you must remember that whenever you seek to predict a variation in a slope by second-level predictors, you have to include cross-level interaction terms (interactions between level-1 and level-2 predictors) in the fixed-effects part of your formula, and defining the random-effects part is only easy in trivial cases. This is why someone says that there is a strong formal relationships between multilevel modeling and Bayesian analysis (see Kreft and De Leeuw, Introducing Multilevel Modeling, Sage, 1998, §1.4.7).
However, I often use non-Bayesian tools to take a first look and to compare results. Moreover, I'd not say that using PROC MIXED or lmer is "wrong" or "outmoded"
The real issue is that one can't use frequentist methods when the number of level-2 units is small.
This has been highlighted by several  authors, e.g. by Gelman and Hill, Data Analysis Using Regression and Multilevel/Hierachical Models, Cambridge University Press, 2007, §16.1 ("Why you should learn BUGS": "When the number of groups is small or the multilevel model is complicated [...] there just might not be enough information to estimate variance parameters precisely" by frequentist methods) or by Raudenbush and Bryk, Hierarchical Linear Models, Sage, 2002, Chap. 13 ("The number of higher-level units may be small and the data may be unbalanced. In these settings, there are distinct advantages in becoming fully Bayesian".)
A recent paper by Mark L. Bryan and Stephen P. Jenkins (Regression analysis of country effects using multilevel data: a cautionary tale, Institute for Social and Economic Research, WP2013-14) presents a Monte-Carlo simulation analysis that suggests that, in order to derive reliable estimates, users require at least 25 groups for linear models and at least 30 groups for logit models. One of their recommendations is "move beyond classical (frequentist) statistics and make greater use of Bayesian methods
of estimation and inference, as they appear to perform better when there are few
countries."
Comment: Your post appears to concentrate on the estimation of the parameters of a multi-level model via software.  Can you say anything more regarding the argument that the idea of a multi-level model is conceptually easier from a Bayesian perspective?
Comment: Matthew's answer expounds on this better than I could. If you wish additional reading references, you can look at Lindley and Smith, "Bayesian Estimates for the Linear Model", _J. Roy. Statist. Soc. Ser. B_, 34, 1-41, Smith, "A general Bayesian linear model", _J. Roy. Statist. Soc. Ser. B_, 35, 251-71, or Lehmann and Casella, _Theory of Point Estimation_, Springer, 1998, §4.5 about the hierarchical Bayes model.
Comment: Furthermore, frequentist methods include restricted maximum likelihood. As Laird and Ware say, "the Bayesian approach leads to the unified treatment of estimation and computation" (vague priors for fixed, i.e. population, effects. "Random-Effects Models for Longitudinal Data", _Biometrics_, 38, 963-974) They refer to Harville, "Bayesian Inference for Variance Components Using Only Error Contrasts", _Biometrika_, 61, 383-385. See also Searle, Casella and McCullohg, _Variance Components_, John Wiley & Sons, 1992, §8.3g "A Bayesian justification for REML".
Comment: @Sergio, why is the defining of the random effect part only easy in trivial cases? I thought the random effect is the 2nd stage models?
Answer: Bayesian multilevel models are conceptually pleasing because the hierarchical structure of the parameters is built into the prior specification. Consider test score $y_{ij}$ for student $i$ who attends school $j$. We want to learn about the school-specific test score parameters $\theta_j$, so, because we want to use Bayesian methods, we will set a prior distribution for each $\theta_j$. However, this is going to be a multilevel model, so we want/expect school-specific parameters $\{\theta_j\}$ to be similar and/or want to share information across school. To model this, we assign the same prior to each school parameter and then put a prior on this hyperparameter. This gives
$$
y_{ij} \mid \theta_j \sim \pi_1(\theta_j) \text{ for $i \in \text{school}_j$} \\
\theta_j \mid \phi \sim \pi_2(\phi) \\
\phi \sim \pi_3(),
$$
where $\{\pi_1, \pi_2, \pi_3 \}$ are the relevant distributions. In the posterior for this prior specification and data likelihood, the overall parameter $\phi$ will be informed by each $\theta_j$, which are informed by the scores within each relevant school. So $\phi$ gives us a nice overall distribution to study. But $\theta_j$ is also informed by $\phi$ through the prior, so we are sharing information across schools to better inform us in cases where there is a small amount of data. All of this is done through the prior-posterior connection, so it's very natural in the Bayesian paradigm.
Further, there is no limit on the depth of your prior specification. If schools are within districts which are within provinces which are within countries you could theoretically add three more levels to this prior specification. Every new level to the model corresponds to another prior being specified. In this sense multilevel models are very comfortable in Bayesian analyses.
In terms of computational ease, if conjugate priors are chosen throughout it's possible to work out this multilevel model without doing anything more than Gibbs sampling in most cases.
Comment: Could you also explain why a Frequentist multi-level model is not as straightforward conceptually?
Comment: @jsk Sergio's answer expounds on this better than I could.


Copying text from pdf created using xelatex containing Malayalam text

Question: When I create a pdf file containing English text using pdflatex, I can copy text from it and get a reasonably fair text when pasted in a text editor. But when I do the same with a pdf of Malayalam text created using xelatex, the pasted text has several gaps and often wrong characters too. I was under the impression that the pdf created with xelatex will also have Unicode text, which then can be searched, indexed and copied. At least, that is the impression I got from reading about xelatex. On the other hand, I found that Malayalam text can be clearly copied from a pdf created from Libre Office Writer. Is my impression about XeLaTeX wrong, or my understanding of the pdf format wrong? Or am I mistaken somewhere else? I would be very grateful if someone knowledgeable about this can give a reply.
Comment: Could you please provide an MWE?
Comment: An MWE from https://tex.stackexchange.com/q/89118/157031:
\documentclass{article}
\usepackage{fontspec}
\setmainfont[Script=Malayalam]{Rachana}
\begin{document}
മലയാളം \TeX ഉപയോഗിച്ച് ടൈപ്പ്സെറ്റ് ചെയ്തത്
\end{document}
Answer: Malayalam is a script related to Sanskrit, and the single characters undergo considerable changes from the input to the output. In particular, some vowels are placed before the corresponding consonant, and glyphs are put together into compounds, so called ligatures. See https://en.wikipedia.org/wiki/Malayalam_script for examples of ligatures and vowel placements (and much more!).
On the font side, these compounds of consonants are usually precomposed, that is, drawn separately to make them look right. During the typesetting, the characters are replaced with the pre-composed codepoints in the fonts, but those often don't have a textual representation.
There are ways around is, and the font can declare a mapping from code points to character sequences, but this is often not available.
Comment: What about PDF/A support?  AFAIK, this format mandates that the Unicode input strings are preserved, thus bypassing the problematic `input string→glyph→input-like string` conversion.  With proper language tagging I can imagine that this works
Comment: I agree that PDF/A can help here, but this is probably not what xelatex produces.
Answer: This seems to be a technical limitation of the XeLaTeX engine. The issue is incomplete CMAP (character map) of the font embedded in PDF. Recent versions of luahbtex can generate PDF containing complex script texts which can be copy pasted back to a text editor properly. Here is one example of such a document: http://books.sayahna.org/ml/pdf/bbh-web.pdf
Comment: This also doesn't seem to solve that problem. When I copy and paste one paragraph from the above link into a text editor, the symbols for the vowel 'എ' joined to consonants is replaced by something else. Perhaps, might lualatex  solve the problem?


How to make a reusable replacement for plastic or paper bags from the supermarket?

Question: When you want to avoid plastic bags and paper bags from supermarkets and are also not fond of the folding woven synthetic bags that you now see for sale in many places, how can you make your own?
Comment: Are we talking about shopping bags or the produce bags?
Comment: Shopping bags but self made produce bags will not be that different.
Answer: How to make a reusable replacement for plastic or paper bags from the supermarket?
I have done sewing projects for years now and have made many shopping black bags of relatively thin cotton for grocery shopping !
I have made a small lunch bag with handles for work. It has been in use for years now and even gets washed periodically. After all it contains my lunch. In a pinch I have even used in for shopping when I only have to pickup a few small items.
I have even made breathable collapsible black bags for my hiking trips and I am foraging. They are synthetic however.
Needless to say, that around here (British Columbia) many stores sell reusable bags. Some are of natural materials, while others are synthetic. To be honest I find them poorly put together and I do not like spending $5.00 a pop for them. Besides I can make them for pennies and I can use up scraps!

Make Your Own Grocery Bag
Comment: I have once used an old dress shirt in a similar project (sewing the part with the buttons and button holes shut) and it looked super fancy.
Comment: That's the way to go - and you can easily recycle fabric that you already have around. So give the old sheet / blanket / shirt / … a second life instead of tossing them out or turning them directly into rags. Personally, I'm not the biggest fan of the pattern you linked to, but that's just preference.
Comment: @Stephie Thanks you for your comment.  I like being thrifty.
Answer: When was a kid, pretty much everyone had a net / mesh bag. Back in the day, usually from garishly bright nylon strings, but these days I see them more and more in cotton. They are super light, expaaaaaaand like crazy and will fit in every pocket - as opposed to a shopping basket that will always use up the same space, whether full or empty.
There are lots of instructions available on the Internet (I like this example because it has an extra sturdy bottom) if you are a crafter, but you should also be able to buy them.
The ultimate recycling hack would be to crochet them out of old t-shirts, that can be upcycled into a kind of yarn.
Comment: Old curtains can go a long too!
Comment: I make my own nettes bags, by using the craft fishermen have used for a long time. But crochet is a good alternative.
Comment: @Willeke fancy! That could also be an answer for your question.
Answer: The bags do not have to be synthetic. Before the era of supermarkets and self-servicing, everyone used natural-fiber bags. And then the potatoes went there together with the apples and with the carrots. Of course, it was a bad idea to mix strawberries there too, but for that you had another natural-fiber bag.
But with the capitalistic world of today, that kind of setup is no longer really possible - unless you buy all your produce from the people of some village somewhere.
However, in order to minimize waste, I have a few strong bags made of some synthetic stuff, and I carry them with me every time when I go shopping. Some of these bags were in use for more than five years, and still going strong.
Answer: I make my own netted bags, and have been doing it for quite a few years now.
Most are made out of netting cotton, as sold to fishermen and the knots, methods and tools used are also those of fishermen using small mesh net.
Being a member of the International Guild of Knot Tyers, I have had a display of nets (and lanyards) I made over the years in Fareham, near Portsmouth (and that is in the UK) in May 2016.
Some of the nets are made by other methods and other knots, mostly to show people it is possible to do it, not because I liked the method.

One thing that does not show up on the photos is that most of the bags made by traditional netting have inner pockets. Which can be small bags on a bit of string or it can be part of the 'wall' being doubled, attached to the bottom and sides and with a string though the top and the outside of the net next to it. You can always store the full net in that small pocket.
The Solent Branch of the IGKT has basic netting instructions.
For those who would like some video instructions, Sally Pointer makes a Roman style net bag,and Knotting Knots has a different set of round net instructions.
I am sure there are many more sets of instructions on internet as well as in books. So search on if you want to know more but these links do not work for you.
Answer: In the UK, in the 1950s and 60s, wicker shopping baskets were very common:

(Image "free to share and use" courtesy of https://graphicdesign.stackexchange.com/questions/85747/placing-an-image-inside-a-basket-in-photoshop)
They are still available on a number of Etsy sites and there are Youtube videos that can show you how to make them.


Can I put a PV panel on my roof and run wires into a room to a power resistor to generate heat?

Question: Maybe a dumb idea, but can I just put a PV panel on my roof and run wires into a room to a power resistor to generate heat? I have just one room that I was thinking of adding this additional heat to. I suppose I could prototype the idea by running a heater of the desired wattage (maybe 200 watts on average) and seeing if it makes much of a difference in the temp of the room. But I dont see anyone who has done this on the web. Also, you would want to maximize the power transfer from the PV to the power resistor, so that suggests trying to figure out the resistance of the panel and supply lines and trying to match your power resistor to that same resistance?
Answer: Works (while the sun is shining), but is a very expensive option and not overly efficient.
Solar PV panels of a remotely affordable price are about 10% efficient in terms of converting sunlight to electricity. Most of the rest of the sun's energy that hits them is converted to heat.
So, from a sun conversion point of view, direct solar thermal collection is more efficient.
However, for a grid-tied house, you might be better off (as relative prices of PV and thermal systems shift) putting up some grid-tied panels and using the grid they are tied to run a heat pump (depending on climate, a low-tmperature heat pump, which are relatively new on the scene and can operate in air temperatures below 0° F.)
200W is a tiny amount of heat in any case - about 600 BTU/hr.
PV panels tend to have two specified numbers that will be somewhat relevant for choosing a resistor - the open circuit voltage (no current, no power) and the short circuit current (no voltage, no power) - a sophisticated system tries to shoot for the "maximum power point" which is somewhere in the middle. If you are lucky that might also be specified. You are not trying to "match resistance" (whatever you mean by that) - rather you are looking for a resistor that will drop a voltage somewhat less than the open circuit voltage at a current somewhat less than the short circuit current.
Comment: Got any old-tech 100 watt incandescent (or halogen) lightbulbs? Two of those are pretty much exactly the same as a 200W heater.
Comment: FYI most commercial solar panels sold today should be at least 15% efficient and some of the better ones will be close to 20% even without talking about exotic panels for satellites or something. Also, the maximum power point is not a single number but varies with insolation, so I don't think it's typically listed (except maybe at reference sun conditions?). MPP controllers are sophisticated because they *find* it.
Comment: Yup, I realize that 200W is pretty small, as my little plug in electric heater is about 1000W, so to prototype the idea I would have to run that at about a 20% duty cycle just to see how much of a difference it would make to the room.
Comment: ...but only at a 20% duty cycle when the sun is shining.
Comment: Well, Im just saying I would like to see how much of an effect this makes before investing in the PV panel, so to try the idea out (given that I dont have a 200 watt electric heater), Im thinking of running my 1KW heater at a 20% duty cycle. If it can make a good difference, then it might be worth looking into this. I was thinking of making a passive solar collector, but i have run run the air ducts up and back /inside to outside, and thats just harder to do, so I hatched the PV idea, but maybe the passive solar idea is just the way to go.
Comment: thats a good idea
Answer: The short answer is that electricity is not a particularly cost-effective way of generating heat, and solar panels are not a particularly cost-effective way of generating electricity, so this is not really a smart financial decision.
If you are trying to generate heat from the sun you are much better off getting solar thermal panels. A PV panel only gets about 15-20% of the sun's power converted but a thermal panel can be closer to 80%.
If you are the DIY type you can even make your own thermal panel for cheap. There are a few ways to do it but I have seen people make them from old refrigerator coils, aluminum cans, heating ductwork, or other materials.
Answer: I don't think a plain resistor is what you want, I think a resistive load is what you want.  Incandescent bulbs as mentioned would work and they're easy to find and work with.  Of course you won't want an inverter in this setup, and 12V bulbs are readily available for automotive applications.
But it isn't necessary to reinvent the heater, there are tons of 12VDC heaters out there made for automotive use that are cheap as dirt that would work fine.  Most have a fan and the convection will probably make it more effective.  In fact they are a little too cheap, I'd worry about safety left unattended.  There are also 12vdc and 24vdc heaters made for industrial use inside outdoor cabinets, those would work and are I'd trust them much more, but they're more expensive, sometimes you get what you pay for.
Comment: Note that not all solar panels are 12V... some of the small ones are but many of the full-size panels are more like 30V. It really depends on how the panel is constructed... how many individual cells and how they're wired together.
Comment: Well, Im not suggesting a plain resistor, but rather a power resistor - one designed to dissipate such a load and one whose resistance wouldn't change that much with temp range - Im assuming if you want to maximize the power transfer to the resistive load, you would need to match that to the source resistance, same idea as in matching load impedance of an antenna to source impedance.


(C++/winsock) Packaging alternative to structs

Question: I have always used structs for packaging and receiving packets, will i gain anything by converting them to classes inherited from main packet class ?  is there another "c++ish" way for packaging and any performance gain by this ?
Comment: A struct is a class is a struct. Your question needs more detail.
Answer: It is very general and various solutions may be available. This is related to Serialization topic and what you say is a simple model of serialization where packets contains structs which they can be loaded directly into memory and vice versa. I think C and C++ are great in this case because they allow you to write something like struct directly to stream and read it back easily. In other languages you can implement your byte alignment or you should serialize objects to be able to write them to streams.
In some cases you need to read a string stream like XML, SOAP, etc. In some application you should use structs. In some cases you need to serialize your objects into stream. It depends. But I think using structs and pointers is more forward than using object serialization.
In your case, you have 2 structures for each entity I think. A struct which moved along wire or file and a class which holds the entity instance inside memory. If you use binary serialization for your object, you can use just a class for sending, receiving and keeping the instance.
Answer: Data modelling
Generally, your C++ classes should factor the redundancy in the data they model.  So, if the packets share some common layout, then you can create a class that models that data and the operations on it.  You may find it convenient to derive classes that add other data members reflecting the hierarchy of possible packet data layouts, but other times it may be equally convenient to have unrelated classes reflecting the different layouts of parts of the packet (especially if the length or order of parts of the message can vary).
To give a clearer example of the simplest case fitting in with your ideas - if you have a standard packet header containing say a record id, record size in bytes and sequence id, you might reasonably put those fields into a class, and publicly derive a class for each distinct record id.  The base class might have member functions to read those values while converting from network byte order to the local byte order, check sequence ids are incrementing as needed etc. - all accessible to derived classes and their users.
Runtime polymorphism
You should be wary of virtual members though - in almost all implementations they will introduce virtual dispatch pointers in your objects that will likely prevent them mirroring the data layout in the network packets.  If there's a reason to want run-time polymorphism (and there can easily be, especially when reading packets), you may find it useful to have a polymorphic hierarchy of classes having 1:1 correspondences with the hierarchy of non-polymorphic data-layout classes, and just containing a pointer to the location of the data in memory.
Performance
Using a class or struct with layout deliberately mirroring your network packets potentially lets you operate on that memory in-place and very conveniently, trusting the compiler to create efficient code to do so.  Compilers are normally pretty good at that.
The efficiency (speed) of that access should be totally unaffected by the hierarchy of classes you use to model the data.  The data offsets involved and calls to non-virtual functions will all be resolved at compile-time.
You may see performance degredation if you introduce virtual functions as they can prevent inlining and require an extra pointer indirection, but you should put that in context by considering how else and how often you'd have switched between the layout-specific operations you need to support (for example, using switch (record_id) all over the place, if (record_id == X), or explicit function pointers).


Old ASUS eee cannot get past GRUB RESCUE>

Question: While  attempting to upgrade an old ASUS eee (2 Gb, 16 GB "disk") from Ubuntu 16.04 to 18.04,  I erred and used the x64 version of 18.04, instead of the i386 Lubuntu.
Now, the system is stuck on "grub rescue>".
It will not boot from the "RAM".  a USB, a CDROM (via (USB), or even if I set the BIOS to "no hardidsk found".
What Grub Rescue commands can I use to at least free up the RAM and get the BIOS to see my bootable Lubuntu 18.04 i386 USB drive?
Comment: Thanx.  It is an eee  901, with a VERY ARCANE BIOS menu...that I hope to use as a LAMP server, to replace my burnt Raspberry PI-II.
Comment: Grub exists in many parts; stage 1 is the MBR (first 512 byte sector of hdd/sdd; which consists of a pointer to later stages & the simple grub-rescue). It sounds like you've formatted or removed the later stages (1.5 & 2) of grub thus grub's pointer is wrong or of no use. There will be nothing in RAM; as grub-rescue is only loaded early (and you can't fit much code in only 512 bytes!).  You need to reboot, and your machine will follow the eeepc's bios settings as to boot order.   If you installed your usb-device on another machine; it's possibly pointing to a drive on your other pc.
Comment: For help with using grub-rescue - see https://help.ubuntu.com/community/Grub2/Troubleshooting
Comment: Please tell us more about your eeePC: Brand name and model, because different models behave in different ways.
Answer: MY BAD
This problem can be closed (or solved)
Embarrassed to say that the problem was in the BIOS, not the GRUB!
In addition to the usual boot priority list menu (hard-disk, USB, CDROM, etc), there was another list item that asked whether to choose an internal disk or a USB device as a hard disk!
Of course it was set to internal disk, not the USB.
Once fixed, the system booted from, and installed my Lubuntu ISO USB easily.
In the meantime, I have become somewhat of an expert on "Grub Rescue>" commands!
Comment: Thanks for sharing your solution :-) (I recognize it from an eeePC 900 owned by a friend of mine.)


Chromedriver 76 breaks my test suite "javascript error: circular reference"

Question: I now get "javascript error: circular reference(Session info: chrome=76.0.3809.100)" whenever I try and click on any element on my company's webapp.
This is code that was working fine on previous chromedriver versions
I have tried the solutions mentioned in the "Duplicate" question linked to here, to be honest i think that question was marked duplicate erroneously.
Protractor: Version 6.0.0 (also tried on 5.4.2)
webdriver-manager: using global installed version 12.1.6
Selenium server version: 3.141.59
Node: v10.16.2
and obviously chromedriver_76.0.3809.12
the code i am trying to run is here
async function clickElemByID(strID){
    await browser.sleep(15000);
    var testElem = element(by.id(strID));
    try {
        await testElem.click();//throws "Failed: javascript error: circular reference"
    } catch (e) {
        console.log(e);
    }
}

the catch block catches:
"JavascriptError: javascript error: circular reference
  (Session info: chrome=76.0.3809.100)
    at Object.throwDecodedError (c:\Users\%username%\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\error.js:550:15)
    at parseHttpResponse (c:\Users\%username%\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:560:13)
    at Executor.execute (c:\Users\%username%\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:486:26)
    at process._tickCallback (internal/process/next_tick.js:68:7)Error
    at ElementArrayFinder.applyAction_ (c:\Users\%username%\AppData\Roaming\npm\node_modules\protractor\built\element.js:459:29)
    at ElementArrayFinder.(anonymous function).args [as click] (c:\Users\%username%\AppData\Roaming\npm\node_modules\protractor\built\element.js:97:29)
    at ElementFinder.(anonymous function).args [as click] (c:\Users\%username%\AppData\Roaming\npm\node_modules\protractor\built\element.js:818:22)
    at UserContext.it (c:\Users\%username%\Development\test-automation\Repo\Cloud\UK Tax\HMRC Test Cases 2018-19\hmrcTestCase001\spec01.js:173:28)"

This has happened on multiple machines.
Firefox still appears to be working though
Answer: As per Issue 2995: javascript error: circular reference with ChromeDriver  Its fixed in Chrome/ChromeDriver version 76.0.3809.68 . Please try with 76.0.3809.68.
Change logs :
ChromeDriver 76.0.3809.68
Supports Chrome version 76

Includes the following changes over version 76.0.3809.25:
Fixed a bug in detecting circular reference in JavaScript objects

Edit
There is issue with 'webdriver-manager' its not downloading the latest build of v76.0.0 . You will have to install it yourself issue - 408
npm install chromedriver --chromedriver_version=LATEST

Comment: THANKS! Installing the newer version was a little harder for me though, it kept defaulting to using the older version used with protractor, even when i dragged the new chromedriver binary into that folder. In the end, i needed to rename chromedriver_76.0.3809.68.exe to be chromedriver_76.0.3809.12.exe to, for lack of a better word, trick it into using the newer one.

"8 Specs, 0 Failures", sight for sore eyes
Answer: I am also facing the same problem.
According to my research, this happened from ChromeDriver version 75.0.3770.8.
https://sites.google.com/a/chromium.org/chromedriver/downloads

ChromeDriver 75.0.3770.8
Supports Chrome version 75
The most noticeable change is ChromeDriver now runs in W3C standard
  compliant mode by default.

This means, they have enabled W3C standard in the chrome driver. To fix this, either the circular reference error need to be fixed in code or disable W3C. For some disabling W3C worked with the solution from github issue:
https://github.com/angular/protractor/issues/5261
capabilities: {
  'goog:chromeOptions': {
  w3c: false
  }
}

Unfortunately, this solution is not working for me. You can try this as a temporary solution.
Answer: Looks like someone has fixed this in webdriver-manager but it hasn't been released yet. I had the same issue and was able to fix it by applying this diff to my local version of webdriver-manager in node_modules:
https://github.com/angular/webdriver-manager/pull/413/commits/6a95aa4187825d1293bda7c802f39257699095fc
Then updating webdriver downloaded the latest version and everything worked.
Answer: As mentioned by others there is a issue with 'webdriver-manager' its not downloading the latest build of v76.0.0 . even-though you specify the exact version by giving webdriver-manager update --versions.chrome 76.0.3809.68 it always points to the chrome  76.0.3809.12. only name is changed but the file has chrome  76.0.3809.12 version only i think
and as mentioned by Rahul L
quick fix : install chromedriver through npm - v76.0.1
https://www.npmjs.com/package/chromedriver
but one catch here is protractor always points to the default chromedriver that comes along with the webdriver-manager update ,hence just adding the package alone is not enough ,we have to add some values in the config file to over come this senario , we have to overwrite the chromedriver reference path through the config file with these values
export.Config = {
      DirectConnet:true,
      chromeDriver: process.cwd()+'/node_modules/chromedriver/lib/chromedriver/chromedriver.exe',